/* Base */
body {
    font-family: Arial, sans-serif;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    background: #f5f5f5;
    color: #333;
}

/* Nav */
nav {
    background: #2c3e50;
    padding: 10px 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
nav a {
    color: white;
    text-decoration: none;
    margin-right: 15px;
    font-size: 14px;
}
nav a:hover { text-decoration: underline; }
.nav-user {
    color: #ccc;
    margin-right: 15px;
    font-size: 14px;
}

/* Cards */
.card {
    background: white;
    padding: 20px;
    border-radius: 6px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* Typography */
h1, h2, h3 { color: #2c3e50; }

/* Tables */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eee; }
th { background: #f8f8f8; font-weight: bold; }
td:first-child { white-space: nowrap; }
.table-wrapper { overflow-x: auto; }

/* Buttons */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    border: none;
}
.btn-primary   { background: #2980b9; color: white; }
.btn-secondary { background: #95a5a6; color: white; }
.btn-success   { background: #27ae60; color: white; }
.btn-danger    { background: #e74c3c; color: white; }
.btn-warning   { background: #f39c12; color: white; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn:hover { opacity: 0.9; }

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}
.badge-on      { background: #27ae60; color: white; }
.badge-off     { background: #e74c3c; color: white; }
.badge-pending { background: #f39c12; color: white; }
.badge-submitted { background: #27ae60; color: white; }
.badge-failed  { background: #e74c3c; color: white; }
.badge-pass    { background: #27ae60; color: white; }
.badge-fail    { background: #e74c3c; color: white; }

/* Alerts / flash messages */
.alert {
    padding: 10px 15px;
    border-radius: 4px;
    margin-bottom: 15px;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Entry allowed banners */
.banner-ok {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 15px 20px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}
.banner-abort {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px 20px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: bold;
    margin-bottom: 15px;
}

/* Forms */
input[type=text],
input[type=password],
input[type=number],
input[type=date],
select,
textarea {
    width: 100%;
    padding: 8px;
    margin: 6px 0 12px 0;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}
label { font-weight: bold; font-size: 14px; }

/* ToS string display */
.tos-string {
    font-family: monospace;
    font-size: 13px;
    background: #f8f8f8;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #ddd;
    word-break: break-all;
}

/* Spinner */
.spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid #ccc;
    border-top-color: #2980b9;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: 8px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Utility */
.text-muted  { color: #888; font-size: 13px; }
.text-right  { text-align: right; }
.mt-10 { margin-top: 10px; }
.mb-0  { margin-bottom: 0; }
