body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.card {
    border-radius: 12px;
}

.btn {
    border-radius: 8px;
}

/* Status Colors */
.status-inspected { background-color: #d4edda; color: #155724; font-weight: bold; }
.status-not-inspected { background-color: #f8d7da; color: #721c24; font-weight: bold; }
.status-postponed { background-color: #fff3cd; color: #856404; font-weight: bold; }
.status-declined { background-color: #d1d0f0; color: #4b3f9f; font-weight: bold; }

table th, table td {
    vertical-align: middle;
}

a.tel-link {
    color: #1a7a3a;
    text-decoration: none;
}

a.tel-link:hover {
    text-decoration: underline;
}

/* ── Login Page ───────────────────────────────────────────── */
.login-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #0d5c2e 0%, #1a7a3a 50%, #27ae60 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

.login-wrapper {
    width: 100%;
    max-width: 460px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.login-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    width: 100%;
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, #0d5c2e, #1a7a3a);
    color: #fff;
    text-align: center;
    padding: 2.5rem 2rem 2rem;
}

.nda-logo-ring {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    border: 3px solid rgba(255,255,255,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    background: rgba(255,255,255,0.1);
}

.nda-logo-text {
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.login-title {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    margin: 0;
}

.login-subtitle {
    font-size: 0.85rem;
    opacity: 0.85;
    margin: 0.25rem 0 0.1rem;
}

.login-org {
    font-size: 0.75rem;
    opacity: 0.65;
    margin: 0;
}

.login-body-section {
    padding: 2rem;
}

.step-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 0.25rem;
    font-size: 0.95rem;
}

.step-hint {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1.25rem;
}

.back-btn {
    background: none;
    border: none;
    color: #1a7a3a;
    font-size: 0.85rem;
    padding: 0;
    margin-bottom: 1rem;
    cursor: pointer;
    display: block;
}

.back-btn:hover { text-decoration: underline; }

/* Role selection grid */
.role-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-top: 1rem;
}

.role-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.4rem;
    padding: 1.5rem 1rem;
    border-radius: 12px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    background: #f8f9fa;
}

.role-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.12);
}

.role-agent { border-color: #27ae60; }
.role-agent:hover { background: #f0fdf4; }

.role-inspector { border-color: #1a7a3a; }
.role-inspector:hover { background: #e8f5e9; }

.role-icon { font-size: 2rem; }
.role-name { font-weight: 700; font-size: 1rem; color: #222; }
.role-desc { font-size: 0.75rem; color: #666; text-align: center; }

/* Inputs & buttons */
.login-input {
    border-radius: 8px;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    border: 1.5px solid #d0d5dd;
}

.login-input:focus {
    border-color: #1a7a3a;
    box-shadow: 0 0 0 3px rgba(26,122,58,0.15);
}

.login-btn-inspector {
    background: #1a7a3a;
    color: #fff;
    border: none;
    padding: 0.7rem;
    font-weight: 600;
    border-radius: 8px;
}

.login-btn-inspector:hover { background: #145c2c; color: #fff; }

.login-btn-agent {
    background: #27ae60;
    color: #fff;
    border: none;
    padding: 0.7rem;
    font-weight: 600;
    border-radius: 8px;
}

.login-btn-agent:hover { background: #1e9150; color: #fff; }

.login-error {
    color: #dc3545;
    font-size: 0.83rem;
    margin-bottom: 0.75rem;
    background: #fff5f5;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
}

.login-footer {
    color: rgba(255,255,255,0.75);
    font-size: 0.75rem;
    text-align: center;
}

.status-pending { background-color: #212529; color: #ffffff; font-weight: bold; }

/* Inspected rows pushed to bottom and dimmed */
tr.row-inspected { opacity: 0.5; }
tr.row-inspected:hover { opacity: 1; }

/* ── Document pill checkboxes (agent form) ───────────────────*/
.doc-pill-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.4rem;
}

.doc-pill {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.85rem;
    border: 1.5px solid #ced4da;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.85rem;
    background: #f8f9fa;
    color: #444;
    transition: all 0.15s;
    user-select: none;
}

.doc-pill input[type="checkbox"] {
    display: none;
}

.doc-pill:hover {
    border-color: #27ae60;
    background: #f0fdf4;
    color: #155724;
}

.doc-pill:has(input:checked) {
    background: #27ae60;
    border-color: #27ae60;
    color: #fff;
    font-weight: 600;
}

/* ── Document badges (inspector table) ───────────────────────*/
.doc-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    max-width: 160px;
}

.doc-badge {
    display: inline-block;
    background: #e9ecef;
    color: #495057;
    border-radius: 4px;
    padding: 0.15rem 0.4rem;
    font-size: 0.7rem;
    white-space: nowrap;
}

/* ── Greeting ────────────────────────────────────────────────*/
.login-greeting {
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
    margin-bottom: 0.4rem;
}

/* ── FAQ trigger button ──────────────────────────────────────*/
.faq-trigger-btn {
    background: none;
    border: 1.5px dashed #ced4da;
    border-radius: 20px;
    padding: 0.4rem 1rem;
    font-size: 0.82rem;
    color: #666;
    cursor: pointer;
    transition: all 0.15s;
}
.faq-trigger-btn:hover {
    border-color: #1a7a3a;
    color: #1a7a3a;
    background: #e8f5e9;
}

/* ── FAQ card ────────────────────────────────────────────────*/
.faq-card {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    width: 100%;
    max-width: 460px;
    overflow: hidden;
}

.faq-header {
    background: linear-gradient(135deg, #0d5c2e, #1a7a3a);
    color: #fff;
    padding: 1rem 1.5rem;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.faq-header-icon { font-size: 1.2rem; }

.faq-item {
    border-bottom: 1px solid #f0f0f0;
}
.faq-item:last-child { border-bottom: none; }

.faq-question {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 1rem 1.25rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #222;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    transition: background 0.15s;
}
.faq-question:hover { background: #f8f9fa; }
.faq-question.active { color: #1a7a3a; background: #e8f5e9; }

.faq-arrow {
    font-size: 1.2rem;
    font-weight: 300;
    color: #999;
    transition: transform 0.25s;
    flex-shrink: 0;
}
.faq-arrow.rotated { transform: rotate(90deg); color: #1a7a3a; }

.faq-answer {
    display: none;
    padding: 0 1.25rem 1rem;
    font-size: 0.84rem;
    color: #444;
    line-height: 1.7;
}
.faq-answer.open { display: block; }
.faq-answer ul {
    margin: 0.5rem 0 0 0;
    padding-left: 1.2rem;
}
.faq-answer ul li { margin-bottom: 0.3rem; }

/* ── Notification bell & badge ───────────────────────────────*/
.notif-wrap {
    position: relative;
    cursor: default;
    display: flex;
    align-items: center;
}

.notif-icon {
    font-size: 1.35rem;
    line-height: 1;
}

.notif-badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: #e74c3c;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
    border: 2px solid #1a7a3a;
    line-height: 1;
}

@keyframes pulse-badge {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.badge-pulse {
    animation: pulse-badge 1.8s ease-in-out infinite;
}

/* ── Pending summary bar ─────────────────────────────────────*/
.pending-summary {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 20px;
    padding: 0.3rem 1rem;
    font-size: 0.82rem;
    color: #856404;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50%;
    animation: pulse-badge 1.5s ease-in-out infinite;
}

/* ── Agent booking tracker ───────────────────────────────────*/
.tracker-card {
    border-radius: 12px;
    overflow: hidden;
    border: 1.5px solid #d4edda;
}

.tracker-header {
    background: #1a7a3a;
    color: #fff;
    padding: 0.75rem 1.25rem;
    font-weight: 700;
    font-size: 0.92rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tracker-sub {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.8;
}

.tracker-list {
    max-height: 260px;
    overflow-y: auto;
}

.tracker-empty {
    padding: 1.5rem;
    text-align: center;
    color: #999;
    font-size: 0.85rem;
}

.tracker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    gap: 1rem;
}

.tracker-row:last-child { border-bottom: none; }
.tracker-row:hover { background: #f8f9fa; }

.tracker-info { flex: 1; min-width: 0; }

.tracker-importer {
    font-weight: 600;
    font-size: 0.88rem;
    color: #222;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tracker-meta {
    font-size: 0.75rem;
    color: #888;
    margin-top: 0.1rem;
}

.tracker-badge {
    flex-shrink: 0;
    font-size: 0.72rem;
    padding: 0.3rem 0.6rem;
}

/* ── Metrics dashboard ────────────────────────────────────────*/
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.85rem;
}

@media (max-width: 768px) {
    .metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

.metric-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.1rem 0.75rem;
    text-align: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.07);
    border-top: 4px solid #ccc;
    transition: transform 0.15s;
}
.metric-card:hover { transform: translateY(-2px); }

.metric-icon { font-size: 1.5rem; margin-bottom: 0.3rem; }

.metric-value {
    font-size: 1.8rem;
    font-weight: 800;
    color: #222;
    line-height: 1;
}

.metric-label {
    font-size: 0.72rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 0.3rem;
}

.metric-total          { border-top-color: #1a7a3a; }
.metric-inspected      { border-top-color: #27ae60; }
.metric-not-inspected  { border-top-color: #e74c3c; }
.metric-postponed      { border-top-color: #f0ad4e; }
.metric-declined       { border-top-color: #6c3fc5; }
