/* =====================================================
   SISTEM PELAPORAN - MySyarikat Style
   Palette: UMT Navy #1B2B5E + Mature Teal #08979A
   ===================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primary: #08979A;
    --primary-dark: #067A7D;
    --primary-light: #E6F6F6;
    --navy: #1B2B5E;
    --navy-light: #2A3D7C;
    --navy-dark: #0F1A3D;
    --secondary: #08979A;
    --bg: #F4F7FB;
    --card: #ffffff;
    --text: #1F2937;
    --text-muted: #6B7280;
    --text-light: #9CA3AF;
    --border: #E5E7EB;
    --border-light: #F3F4F6;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #3B82F6;
    --radius: 8px;
    --radius-lg: 10px;
    --shadow-card: 0 2px 10px rgba(15, 26, 61, 0.055);
    --shadow-raised: 0 6px 18px rgba(15, 26, 61, 0.095);
}

body {
    font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    font-size: 14px;
}

a { color: var(--primary-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.icon, .alert-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    vertical-align: middle;
}
.btn .icon, .sidebar .icon {
    width: 16px;
    height: 16px;
}
.btn, .sidebar a, .mobile-toggle, .hamburger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.sidebar a {
    display: flex;
}
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 13px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 500;
}
.alert-success { background: #d1fae5; color: #065f46; border-color: #a7f3d0; }
.alert-error { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.alert-info { background: #dbeafe; color: #1e40af; border-color: #bfdbfe; }

/* ===== Login Page (MySyarikat Style) ===== */
.login-bg {
    min-height: 100vh;
    background: var(--navy);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.login-wrap {
    width: 100%;
    max-width: 580px;
}
.login-logo {
    text-align: center;
    margin-bottom: 24px;
}
.login-logo-icon {
    display: inline-block;
    background: transparent;
    margin-bottom: 12px;
}
.login-logo-icon svg {
    width: 56px;
    height: 56px;
}
.login-logo h1 {
    color: #fff;
    font-size: 24px;
    font-weight: 800;
    letter-spacing: 2px;
}
.login-card {
    background: #fff;
    border-radius: 8px;
    padding: 48px 56px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}
.login-card-logo {
    text-align: center;
    margin-bottom: 18px;
}
.login-card-logo img {
    max-height: 90px;
    max-width: 220px;
    object-fit: contain;
}
.login-card-title {
    text-align: center;
    color: var(--navy);
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 32px;
}
.login-card-title strong {
    color: var(--navy);
    font-weight: 800;
}
.login-card .subtitle { color: var(--text-muted); font-size: 13px; margin-bottom: 8px; }
.login-tabs {
    display: flex;
    background: #F4F7FB;
    border-radius: 8px;
    padding: 4px;
    margin-bottom: 24px;
}
.login-tab {
    flex: 1;
    padding: 11px;
    text-align: center;
    cursor: pointer;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    transition: 0.2s;
    color: var(--text-muted);
}
.login-tab.active {
    background: #fff;
    color: var(--navy);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.login-form-group {
    margin-bottom: 18px;
}
.login-form-group label {
    display: block;
    color: var(--navy);
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 8px;
}
.login-form-group input {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    color: var(--text);
    font-family: inherit;
    transition: 0.15s;
}
.login-form-group input:focus {
    outline: none;
    border-color: var(--navy);
    box-shadow: 0 0 0 3px rgba(27, 43, 94, 0.1);
}

.btn-login {
    display: block;
    width: 200px;
    margin: 32px auto 0;
    background: var(--navy);
    color: #fff;
    padding: 13px 24px;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s;
    font-family: inherit;
}
.btn-login:hover {
    background: var(--navy-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 26, 61, 0.3);
}

.login-footer-text {
    text-align: center;
    margin-top: 22px;
    color: var(--text-muted);
    font-size: 13px;
}

.login-bottom {
    text-align: right;
    color: rgba(255, 255, 255, 0.8);
    font-size: 13px;
    margin-top: 18px;
}
.login-bottom a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    margin: 0 8px;
}
.login-bottom a:hover { color: #fff; text-decoration: underline; }

/* ===== Layout (Admin & PIC) ===== */
.app, .layout {
    display: flex;
    min-height: 100vh;
}

/* ===== Sidebar (PUTIH bukan dark) ===== */
.sidebar {
    width: 260px;
    background: #ffffff;
    color: var(--text);
    padding: 0;
    flex-shrink: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
}
.sidebar-brand {
    padding: 20px 22px;
    border-bottom: 1px solid var(--border-light);
    background: var(--navy);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
}
.sidebar-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
    flex-shrink: 0;
    background: #fff;
    padding: 4px;
    border-radius: 8px;
}
.sidebar-brand-text {
    flex: 1;
    min-width: 0;
}
.sidebar-brand h2 {
    font-size: 15px;
    color: #fff;
    font-weight: 700;
    letter-spacing: -0.2px;
    line-height: 1.2;
}
.sidebar-brand small {
    color: rgba(255, 255, 255, 0.85);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}
.sidebar-user {
    padding: 14px 22px;
    background: #F8FAFC;
    margin: 0;
    font-size: 12px;
    border-bottom: 1px solid var(--border-light);
}
.sidebar-user strong {
    color: var(--navy);
    display: block;
    font-size: 13px;
    font-weight: 600;
}
.sidebar-user small { color: var(--text-muted); }

.sidebar a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 22px;
    color: var(--text-muted);
    font-size: 13.5px;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: 0.15s;
    margin: 1px 0;
}
.sidebar a:hover {
    background: var(--primary-light);
    color: var(--navy);
    text-decoration: none;
}
.sidebar a.active {
    background: var(--primary-light);
    color: var(--primary-dark);
    border-left-color: var(--primary);
    font-weight: 600;
}
.sidebar-section {
    padding: 18px 22px 6px;
    color: var(--text-light);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    font-weight: 700;
}

/* ===== Main Content Area ===== */
.main {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}
.topbar {
    background: #ffffff;
    padding: 16px 28px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}
.topbar h1 {
    font-size: 19px;
    color: var(--navy);
    font-weight: 700;
}
.mobile-toggle, .hamburger {
    display: none;
    background: var(--primary-light);
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: var(--radius);
    color: var(--navy);
}
.content { padding: 28px; flex: 1; }

/* ===== Cards ===== */
.card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-card);
    margin-bottom: 20px;
    border: 1px solid var(--border-light);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 10px;
}
.card-header h3 {
    font-size: 16px;
    color: var(--navy);
    font-weight: 700;
}

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 22px;
}
.stat-card {
    background: #fff;
    padding: 22px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-card);
    position: relative;
    transition: 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-raised);
}
.stat-card::before {
    content: '';
    position: absolute;
    left: 0; top: 18px; bottom: 18px;
    width: 4px;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
}
.stat-card.success::before { background: var(--success); }
.stat-card.warning::before { background: var(--warning); }
.stat-card.danger::before { background: var(--danger); }
.stat-card.info::before { background: var(--info); }
.stat-label {
    color: var(--text-muted);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 600;
}
.stat-value {
    font-size: 28px;
    font-weight: 700;
    margin-top: 4px;
    color: var(--navy);
}

/* ===== Forms ===== */
.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-group { display: flex; flex-direction: column; }
.form-group-full { grid-column: 1 / -1; }
.form-group label {
    font-size: 12px;
    font-weight: 600;
    color: var(--navy);
    margin-bottom: 6px;
}
.form-group input, .form-group select, .form-group textarea, .form-control {
    padding: 10px 13px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    background: #fff;
    font-family: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
    width: 100%;
    color: var(--text);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus, .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(8, 151, 154, 0.14);
}
.form-group textarea { min-height: 70px; resize: vertical; }
.form-group small { color: var(--text-muted); font-size: 11px; margin-top: 4px; }
.req { color: var(--danger); }

.section-title {
    font-size: 14px;
    color: var(--navy);
    margin: 24px 0 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--primary);
    font-weight: 700;
    display: inline-block;
    min-width: 200px;
}
.section-title:first-child { margin-top: 0; }

.form-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    margin-top: 24px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--radius);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: 0.15s;
    background: var(--border-light);
    color: var(--text);
    font-family: inherit;
}
.btn:hover {
    text-decoration: none;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 26, 61, 0.08);
}
.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-primary:hover {
    background: var(--primary-dark);
    color: #fff;
}
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #DC2626; color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-warning:hover { background: #D97706; color: #fff; }
.btn-info { background: var(--info); color: #fff; }
.btn-info:hover { background: #2563EB; color: #fff; }
.btn-secondary { background: var(--navy); color: #fff; }
.btn-secondary:hover { background: var(--navy-light); color: #fff; }
.btn-sm { padding: 6px 11px; font-size: 12px; }
.btn-block { width: 100%; }

/* ===== Tables ===== */
.table-wrap {
    overflow-x: auto;
    overflow-y: visible;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
}
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
}
thead {
    background: var(--primary-light);
}
th, td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border-light);
}
th {
    font-weight: 700;
    color: var(--navy);
    font-size: 11.5px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
tbody tr:hover { background: #FAFBFD; }
tbody tr:last-child td { border-bottom: none; }
td .actions, .action-btns {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}
.action-menu {
    position: relative;
    display: inline-flex;
    justify-content: flex-end;
}
.action-menu-trigger {
    min-width: 34px;
    justify-content: center;
    padding: 6px 10px;
    font-size: 18px;
    line-height: 1;
}
.action-menu-dropdown {
    display: none;
    position: fixed;
    min-width: 160px;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 12px 28px rgba(15, 26, 61, 0.16);
    padding: 6px;
    z-index: 900;
}
.export-menu .action-menu-dropdown {
    min-width: 130px;
}
.action-menu.open .action-menu-dropdown {
    display: block;
}
.action-menu-dropdown a,
.action-menu-dropdown button {
    width: 100%;
    display: block;
    padding: 9px 10px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text);
    text-align: left;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}
.action-menu-dropdown a:hover,
.action-menu-dropdown button:hover {
    background: var(--primary-light);
    color: var(--navy);
    text-decoration: none;
}
.action-menu-dropdown form {
    margin: 0;
}
.action-menu-dropdown .danger {
    color: var(--danger);
}
.action-menu-dropdown .danger:hover {
    background: #fee2e2;
    color: #991b1b;
}
.empty {
    text-align: center;
    color: var(--text-light);
    padding: 36px;
    font-style: italic;
}
.catatan-row { background: #FFFBEB !important; }
.catatan-row td { font-size: 12px; color: #92400E; padding: 10px 14px; }

/* ===== Filter Bar ===== */
.filter-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.filter-bar select, .filter-bar input {
    padding: 8px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    font-size: 13px;
    background: #fff;
}
.inline-category-form {
    margin: 0;
    display: grid;
    gap: 8px;
    min-width: 230px;
}
.inline-category-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.table-select {
    min-width: 170px;
    padding: 7px 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    font-size: 12px;
    font-family: inherit;
}
.table-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(8, 151, 154, 0.14);
}
.multi-select {
    position: relative;
}
.multi-select-trigger {
    width: 100%;
    min-height: 38px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 34px 8px 11px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    color: var(--text);
    font: inherit;
    font-size: 12px;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
    position: relative;
}
.multi-select-trigger::after {
    content: '';
    width: 7px;
    height: 7px;
    border-right: 1.8px solid var(--text-muted);
    border-bottom: 1.8px solid var(--text-muted);
    transform: rotate(45deg);
    position: absolute;
    right: 13px;
    top: 13px;
}
.multi-select.open .multi-select-trigger {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(8, 151, 154, 0.14);
}
.multi-select.open .multi-select-trigger::after {
    top: 16px;
    transform: rotate(225deg);
}
.multi-select-trigger span {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.multi-select-menu {
    display: none;
    position: fixed;
    width: min(320px, 86vw);
    max-height: 250px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 16px 34px rgba(15, 26, 61, 0.18);
    z-index: 950;
}
.multi-select.open .multi-select-menu {
    display: grid;
    gap: 3px;
}
.multi-select-menu label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 9px;
    border-radius: 6px;
    color: var(--text);
    font-size: 12.5px;
    font-weight: 500;
    cursor: pointer;
}
.multi-select-menu label:hover {
    background: var(--primary-light);
    color: var(--navy);
}
.multi-select-menu input[type="checkbox"] {
    width: auto;
    margin: 0;
    accent-color: var(--primary);
    flex: 0 0 auto;
}
.filter-bar select:focus, .filter-bar input:focus {
    outline: none;
    border-color: var(--primary);
}

/* ===== Modal ===== */
.modal, .modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 26, 61, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(2px);
}
.modal.show, .modal-overlay.show { display: flex; }
.modal-content {
    background: #fff;
    border-radius: var(--radius-lg);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(15, 26, 61, 0.3);
}
.modal-content.modal-lg { max-width: 900px; }
.modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #F8FAFC;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.modal-header h3 {
    font-size: 16px;
    color: var(--navy);
    font-weight: 700;
}
.modal-close {
    background: none;
    border: none;
    font-size: 26px;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
}
.modal-close:hover { color: var(--danger); }
.modal-body { padding: 22px; }
.modal-footer {
    padding: 16px 22px;
    border-top: 1px solid var(--border-light);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    background: #FAFBFD;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

/* ===== Badges ===== */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}
.badge-info { background: #DBEAFE; color: #1E40AF; }
.badge-success { background: #D1FAE5; color: #065F46; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-danger { background: #FEE2E2; color: #991B1B; }

/* ===== Detail View ===== */
.detail-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 10px 18px;
    font-size: 13px;
}
.detail-label {
    color: var(--text-muted);
    font-weight: 600;
}
.detail-value { color: var(--text); }

/* ===== File preview ===== */
.file-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
    margin-top: 6px;
}
.file-thumb,
.file-doc {
    display: flex;
    flex-direction: column;
    gap: 6px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 8px;
    background: #fff;
    color: var(--text);
    min-width: 0;
}
.file-thumb:hover,
.file-doc:hover {
    text-decoration: none;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(15, 26, 61, 0.08);
}
.file-thumb img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 6px;
    background: var(--border-light);
}
.file-thumb span,
.file-doc span {
    font-size: 11px;
    color: var(--text-muted);
    overflow-wrap: anywhere;
}
.file-doc {
    flex-direction: row;
    align-items: center;
}
.selected-file-list {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}
.selected-file-summary {
    font-size: 12px;
    color: var(--navy);
    font-weight: 600;
}
.selected-file {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: var(--border-light);
    border: 1px solid var(--border);
    font-size: 12px;
}
.selected-file span {
    overflow-wrap: anywhere;
}
.selected-file small {
    flex-shrink: 0;
    margin-top: 0;
}
.selected-file.valid small { color: #065f46; }
.selected-file.invalid {
    background: #fee2e2;
    border-color: #fecaca;
}
.selected-file.invalid small { color: #991b1b; }

/* ===== Helper Classes ===== */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.mt-3 { margin-top: 12px; }
.mb-3 { margin-bottom: 12px; }
.hidden { display: none; }

/* ===== Welcome banner ===== */
.welcome-banner {
    background: var(--navy);
    color: #fff;
    padding: 28px 32px;
    border-radius: var(--radius-lg);
    margin-bottom: 22px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(15, 26, 61, 0.16);
}
.welcome-banner::before {
    content: '';
    position: absolute;
    top: 0; right: 0; bottom: 0;
    width: 8px;
    background: var(--primary);
}
.welcome-banner::after {
    content: none;
}
.welcome-banner h2 {
    font-size: 22px;
    margin-bottom: 6px;
    font-weight: 700;
    position: relative;
    z-index: 1;
}
.welcome-banner p {
    opacity: 0.95;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* ===== Tabs ===== */
.tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 22px;
}
.tab {
    padding: 13px 22px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}
.tab.active {
    color: var(--primary-dark);
    border-bottom-color: var(--primary);
}

/* ===== Upload zone ===== */
.upload-zone {
    border: 2px dashed var(--primary);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    background: var(--primary-light);
    margin-bottom: 14px;
}
.upload-zone h4 {
    font-size: 14px;
    margin-bottom: 6px;
    color: var(--navy);
}
.upload-zone p { color: var(--text-muted); font-size: 12px; }

/* ===== Flash messages ===== */
.flash-msg {
    border-radius: var(--radius) !important;
    font-weight: 500;
}

/* ===== Code style ===== */
code {
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 600;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--border-light); }
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-dark); }

/* ===== Mobile ===== */
@media (max-width: 900px) {
    .sidebar {
        position: fixed;
        left: -280px;
        top: 0; bottom: 0;
        z-index: 999;
        transition: left 0.3s;
    }
    .sidebar.open { left: 0; }
    .mobile-toggle, .hamburger { display: inline-block; }
    .form-grid { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .content { padding: 16px; }
    .topbar { padding: 14px 18px; }
    .welcome-banner { padding: 22px 22px; }
    .welcome-banner h2 { font-size: 18px; }
}

@media (max-width: 700px) {
    .table-wrap {
        border: none;
        overflow: visible;
    }
    .table-wrap table,
    .table-wrap thead,
    .table-wrap tbody,
    .table-wrap tr,
    .table-wrap th,
    .table-wrap td {
        display: block;
        width: 100%;
    }
    .table-wrap thead {
        display: none;
    }
    .table-wrap tbody tr {
        background: #fff;
        border: 1px solid var(--border-light);
        border-radius: var(--radius-lg);
        box-shadow: var(--shadow-card);
        margin-bottom: 12px;
        padding: 8px 0;
    }
    .table-wrap tbody tr:hover {
        background: #fff;
    }
    .table-wrap td {
        display: grid;
        grid-template-columns: 120px 1fr;
        gap: 10px;
        border-bottom: 1px solid var(--border-light);
        padding: 9px 12px;
        text-align: left;
    }
    .table-wrap td:last-child {
        border-bottom: none;
    }
    .table-wrap td::before {
        content: attr(data-label);
        color: var(--text-muted);
        font-weight: 700;
        font-size: 11px;
        text-transform: uppercase;
    }
    .table-wrap td.empty,
    .catatan-row td {
        display: block;
    }
    .table-wrap td.empty::before,
    .catatan-row td::before {
        content: '';
    }
    .selected-file {
        flex-direction: column;
        gap: 2px;
    }
}

/* Senarai checkbox kategori (modal Lulus/Kategori) */
.kategori-checklist { max-height: 220px; overflow-y: auto; border: 1.5px solid var(--border); border-radius: var(--radius); padding: 8px 12px; }
.kategori-checklist label { display: flex; align-items: center; gap: 8px; font-weight: normal; margin: 6px 0; cursor: pointer; }
.form-group .kategori-checklist input[type="checkbox"] { width: auto; padding: 0; margin: 0; flex: 0 0 auto; accent-color: var(--primary, #2563eb); }
