:root {
    --primary-navy: #0f172a;
    --accent-blue: #2563eb;
    --accent-amber: #f59e0b;
    --accent-emerald: #10b981;
    --surface-bg: #f8fafc;
    --card-border: #e2e8f0;
}

body {
    font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
    background-color: var(--surface-bg);
    color: #1e293b;
    min-height: 100vh;
}

.hero-banner {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 50%, #1e293b 100%);
    color: #ffffff;
    padding: 42px 0 32px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.3);
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.25) 0%, transparent 50%);
    pointer-events: none;
}

.iso-badge-tag {
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #34d399;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    padding: 4px 10px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
}

.role-pill-badge {
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 9999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.back-nav-link {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    transition: color 0.2s ease;
}

.back-nav-link:hover {
    color: #ffffff;
}

/* Main Tabs Switcher */
.tabs-header-nav {
    display: flex;
    gap: 12px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 24px;
}

.tab-btn {
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    padding: 12px 20px;
    font-weight: 700;
    font-size: 0.95rem;
    color: #64748b;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
    margin-bottom: -2px;
}

.tab-btn:hover {
    color: var(--accent-blue);
}

.tab-btn.active {
    color: var(--accent-blue);
    border-bottom-color: var(--accent-blue);
}

.tab-count-pill {
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 9999px;
    background: #e2e8f0;
    color: #334155;
    font-weight: 700;
}

.tab-btn.active .tab-count-pill {
    background: #dbeafe;
    color: #1d4ed8;
}

/* Metric KPI Cards */
.kpi-card {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.05);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
}

.kpi-icon.blue { background: #eff6ff; color: #2563eb; }
.kpi-icon.emerald { background: #ecfdf5; color: #059669; }
.kpi-icon.amber { background: #fffbeb; color: #d97706; }
.kpi-icon.purple { background: #f5f3ff; color: #7c3aed; }

.kpi-val {
    font-size: 1.5rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.1;
}

.kpi-label {
    font-size: 0.8rem;
    color: #64748b;
    font-weight: 600;
    margin-top: 2px;
}

/* Quick Lookup Card */
.quick-lookup-card {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    border: 1px solid #cbd5e1 !important;
}

.quick-icon-box {
    width: 42px;
    height: 42px;
    background: #2563eb;
    color: #ffffff;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    flex-shrink: 0;
}

/* Filter Pills */
.filter-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.filter-pill {
    background: #ffffff;
    border: 1px solid var(--card-border);
    color: #475569;
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-pill:hover,
.filter-pill.active {
    background: var(--accent-blue);
    color: #ffffff;
    border-color: var(--accent-blue);
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2);
}

.filter-pill .pill-badge {
    background: rgba(0, 0, 0, 0.08);
    padding: 1px 6px;
    border-radius: 9999px;
    font-size: 0.72rem;
    margin-left: 4px;
}

.filter-pill.active .pill-badge {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

/* Submissions Table */
.submissions-card {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.03);
}

.submissions-table {
    margin-bottom: 0;
}

.submissions-table thead th {
    background: #f8fafc;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.submissions-table tbody td {
    padding: 14px 18px;
    vertical-align: middle;
    border-bottom: 1px solid #f1f5f9;
}

.submissions-table tbody tr:hover {
    background-color: #f8fafc;
}

.student-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e2e8f0;
}

.student-avatar-fallback {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #bfdbfe;
}

/* Form Badges */
.form-code-badge {
    font-weight: 800;
    font-size: 0.76rem;
    padding: 4px 8px;
    border-radius: 6px;
    letter-spacing: 0.4px;
    display: inline-block;
}

.code-pds { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.code-consent { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.code-eval { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }
.code-exit { background: #ede9fe; color: #5b21b6; border: 1px solid #ddd6fe; }
.code-cert { background: #ccfbf1; color: #115e59; border: 1px solid #99f6e4; }
.code-other { background: #f1f5f9; color: #334155; border: 1px solid #e2e8f0; }

/* Recency Tag */
.recency-tag {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.recency-today { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.recency-recent { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.recency-month { background: #f3e8ff; color: #6b21a8; border: 1px solid #e9d5ff; }
.recency-past { background: #f1f5f9; color: #64748b; border: 1px solid #e2e8f0; }

/* Action Buttons */
.btn-action-view {
    background: #ffffff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
}

.btn-action-view:hover {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #93c5fd;
}

.btn-action-print {
    background: #2563eb;
    color: #ffffff;
    border: 1px solid #2563eb;
    font-weight: 600;
    font-size: 0.8rem;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.btn-action-print:hover {
    background: #1d4ed8;
    color: #ffffff;
    border-color: #1d4ed8;
    box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
}

/* Blank ISO Forms Cards (Tab 2) */
.form-card {
    background: #ffffff;
    border: 1px solid var(--card-border);
    border-radius: 14px;
    padding: 24px;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
}

.form-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 30px -10px rgba(15, 23, 42, 0.12);
    border-color: #93c5fd;
}

.doc-stamp-preview {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    padding: 8px 12px;
    font-family: monospace;
    font-size: 0.82rem;
    color: #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.doc-code-pill {
    font-weight: 800;
    color: #1e3a8a;
    font-size: 0.92rem;
}

.form-card-title {
    font-size: 1.12rem;
    font-weight: 700;
    color: #0f172a;
    line-height: 1.35;
    margin-bottom: 8px;
}

.form-card-desc {
    font-size: 0.85rem;
    color: #64748b;
    line-height: 1.45;
    margin-bottom: 16px;
    flex-grow: 1;
}

.meta-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 18px;
}

.meta-tag {
    font-size: 0.72rem;
    font-weight: 600;
    padding: 3px 8px;
    border-radius: 6px;
    background: #f1f5f9;
    color: #475569;
}

.meta-tag.dpm {
    background: #eff6ff;
    color: #2563eb;
    border: 1px solid #bfdbfe;
}

.meta-tag.orient {
    background: #fef3c7;
    color: #b45309;
    border: 1px solid #fde68a;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid #f1f5f9;
}

.btn-view-form {
    flex: 1;
    background: #0f172a;
    color: #ffffff;
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 8px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.btn-view-form:hover {
    background: var(--accent-blue);
    color: #ffffff;
}

.btn-pdf-orig {
    background: #f1f5f9;
    color: #334155;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 8px;
    padding: 8px 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.btn-pdf-orig:hover {
    background: #e2e8f0;
    color: #0f172a;
}
