:root {
    --bg: #f4f1eb;
    --panel: rgba(255, 255, 255, 0.92);
    --panel-strong: #ffffff;
    --ink: #16324f;
    --muted: #6b7b8c;
    --gold: #d1a22b;
    --gold-deep: #a87f18;
    --navy: #16324f;
    --teal: #1b7f7a;
    --rose: #c95c4f;
    --line: rgba(22, 50, 79, 0.12);
    --shadow: 0 20px 50px rgba(14, 33, 52, 0.12);
    --radius-xl: 28px;
    --radius-lg: 20px;
    --radius-md: 14px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Bahnschrift, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top right, rgba(209, 162, 43, 0.18), transparent 24%),
        radial-gradient(circle at bottom left, rgba(27, 127, 122, 0.12), transparent 20%),
        linear-gradient(180deg, #f9f5ee 0%, #f4f1eb 100%);
    color: var(--ink);
}

body.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px;
}

img {
    max-width: 100%;
}

.login-shell {
    width: min(980px, 100%);
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
    align-items: stretch;
}

.hero-panel,
.login-panel,
.sidebar,
.topbar,
.card,
.table-card,
.notice-card,
.form-shell {
    background: var(--panel);
    backdrop-filter: blur(18px);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.hero-panel {
    border-radius: 34px;
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 640px;
    position: relative;
    overflow: hidden;
}

.hero-panel::after {
    content: "";
    position: absolute;
    inset: auto -140px -140px auto;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(209, 162, 43, 0.22), rgba(22, 50, 79, 0.02));
}

.hero-badge,
.eyebrow {
    letter-spacing: 0.28em;
    text-transform: uppercase;
    font-size: 11px;
    color: var(--gold-deep);
    font-weight: 700;
}

.hero-title,
.page-title {
    margin: 12px 0;
    font-size: clamp(2.1rem, 2.6vw, 3.4rem);
    line-height: 1.02;
}

.hero-copy,
.page-copy,
.muted-text {
    color: var(--muted);
    line-height: 1.6;
}

.feature-list {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.feature-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.7);
    border-radius: 18px;
    border: 1px solid rgba(22, 50, 79, 0.08);
}

.feature-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    margin-top: 4px;
    background: linear-gradient(135deg, var(--gold), var(--navy));
}

.login-panel {
    border-radius: 34px;
    padding: 36px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-logo {
    width: 190px;
    margin-bottom: 18px;
}

.segmented-control {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px;
    background: #eef1f4;
    border-radius: 18px;
    margin: 16px 0 24px;
}

.segmented-control button,
.button,
.button-secondary,
.button-ghost,
.tag,
.sidebar-link {
    border: none;
    font: inherit;
}

.segmented-control button {
    padding: 12px 14px;
    border-radius: 12px;
    background: transparent;
    color: var(--muted);
    font-weight: 700;
    cursor: pointer;
}

.segmented-control button.is-active {
    background: linear-gradient(135deg, rgba(209, 162, 43, 0.16), rgba(209, 162, 43, 0.28));
    color: var(--gold-deep);
}

.form-grid,
.filter-grid,
.kpi-grid,
.stats-grid,
.breakdown-grid,
.double-grid,
.triple-grid,
.portal-grid {
    display: grid;
    gap: 18px;
}

.form-grid.two,
.filter-grid,
.double-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three,
.triple-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

label.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--muted);
}

input,
select,
textarea,
button {
    font: inherit;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="month"],
input[type="number"],
input[type="email"],
textarea,
select {
    width: 100%;
    border: 1px solid rgba(22, 50, 79, 0.14);
    background: rgba(255, 255, 255, 0.98);
    border-radius: 14px;
    padding: 13px 15px;
    color: var(--ink);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(209, 162, 43, 0.9);
    box-shadow: 0 0 0 4px rgba(209, 162, 43, 0.15);
}

textarea {
    min-height: 120px;
    resize: vertical;
}

.button,
.button-secondary,
.button-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 14px;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
}

.button {
    background: linear-gradient(135deg, var(--gold), var(--gold-deep));
    color: white;
}

.button-secondary {
    background: linear-gradient(135deg, var(--navy), #244b75);
    color: white;
}

.button-ghost {
    background: rgba(22, 50, 79, 0.06);
    color: var(--ink);
}

.button-full {
    width: 100%;
}

.validation-message,
.flash {
    padding: 13px 16px;
    border-radius: 14px;
    font-weight: 700;
    margin-bottom: 18px;
}

.validation-message,
.flash.error {
    background: rgba(201, 92, 79, 0.12);
    color: #96382c;
}

.flash.success {
    background: rgba(27, 127, 122, 0.12);
    color: #18645f;
}

.app-shell {
    display: grid;
    grid-template-columns: 300px 1fr;
    min-height: 100vh;
    padding: 18px;
    gap: 18px;
}

.sidebar {
    border-radius: 28px;
    padding: 22px;
    display: flex;
    flex-direction: column;
    gap: 22px;
    position: sticky;
    top: 18px;
    height: calc(100vh - 36px);
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 14px;
}

.brand-badge {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--navy), var(--gold));
    display: grid;
    place-items: center;
    color: white;
    font-size: 1.1rem;
    font-weight: 800;
}

.brand-name {
    font-size: 1.35rem;
    font-weight: 800;
}

.profile-card {
    padding: 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(22, 50, 79, 0.96), rgba(36, 75, 117, 0.96));
    color: white;
}

.profile-card .muted-text {
    color: rgba(255, 255, 255, 0.72);
}

.sidebar-nav {
    display: grid;
    gap: 10px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-radius: 16px;
    color: var(--ink);
    text-decoration: none;
    background: transparent;
    font-weight: 700;
}

.sidebar-link.is-active {
    background: linear-gradient(135deg, rgba(209, 162, 43, 0.2), rgba(255, 255, 255, 0.9));
    border: 1px solid rgba(209, 162, 43, 0.28);
}

.sidebar-note {
    margin-top: auto;
    padding: 18px;
    border-radius: 20px;
    background: rgba(22, 50, 79, 0.06);
}

.content-shell {
    min-width: 0;
}

.topbar {
    border-radius: 28px;
    padding: 24px 28px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
}

.topbar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
}

.notification-trigger {
    position: relative;
}

.notification-trigger button {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: white;
    border: 1px solid var(--line);
    cursor: pointer;
}

.notification-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: var(--rose);
    color: white;
    min-width: 22px;
    height: 22px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-size: 11px;
    font-weight: 700;
}

.notification-dropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 62px;
    width: min(380px, 90vw);
    padding: 14px;
    border-radius: 20px;
    background: white;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    z-index: 30;
}

.notification-dropdown.is-open {
    display: block;
}

.notification-item {
    padding: 14px;
    border-radius: 16px;
    background: rgba(22, 50, 79, 0.05);
    margin-bottom: 10px;
}

.page-section {
    margin-top: 18px;
}

.stats-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 18px;
}

.card,
.table-card,
.notice-card,
.form-shell {
    border-radius: 24px;
    padding: 22px;
}

.stat-card {
    padding: 20px;
    border-radius: 22px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.88));
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.stat-card .stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--muted);
    font-weight: 700;
}

.stat-card .stat-value {
    font-size: 2.1rem;
    font-weight: 800;
    margin-top: 12px;
}

.kpi-grid,
.portal-grid {
    grid-template-columns: 2fr 1.15fr;
    margin-top: 18px;
}

.breakdown-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.table-wrap {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 14px 12px;
    text-align: left;
    border-bottom: 1px solid rgba(22, 50, 79, 0.08);
    vertical-align: top;
}

.table th {
    font-size: 11px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--muted);
}

.table tr:last-child td {
    border-bottom: none;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.badge.gold { background: rgba(209, 162, 43, 0.16); color: var(--gold-deep); }
.badge.teal { background: rgba(27, 127, 122, 0.14); color: var(--teal); }
.badge.rose { background: rgba(201, 92, 79, 0.14); color: var(--rose); }
.badge.navy { background: rgba(22, 50, 79, 0.1); color: var(--navy); }

.notice-card {
    background: linear-gradient(135deg, rgba(22, 50, 79, 0.96), rgba(36, 75, 117, 0.92));
    color: white;
}

.notice-card .muted-text {
    color: rgba(255, 255, 255, 0.76);
}

.notice-card a {
    color: #ffd977;
}

.form-shell {
    margin-top: 18px;
}

.form-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}

.readonly-field {
    background: rgba(22, 50, 79, 0.05) !important;
}

.choice-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.choice-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(22, 50, 79, 0.12);
    background: white;
}

.village-table td {
    min-width: 140px;
}

.village-table th:nth-child(5),
.village-table td:nth-child(5) {
    min-width: 340px;
}

.village-details-panel {
    min-width: 300px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(22, 50, 79, 0.04);
    border: 1px solid rgba(22, 50, 79, 0.08);
}

.status-guide {
    margin: 0;
}

.status-detail-group {
    margin-top: 12px;
}

.village-inline-grid {
    gap: 12px;
    align-items: start;
}

.village-inline-grid textarea {
    min-height: 92px;
}

.hidden {
    display: none !important;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(15, 23, 42, 0.45);
}

.modal-card {
    width: min(520px, 100%);
    max-height: 90vh;
    overflow: auto;
}

.inline-form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.inline-form input {
    min-width: 140px;
}

.panel-list {
    display: grid;
    gap: 12px;
}

.panel-list-item {
    padding: 14px;
    border-radius: 16px;
    background: rgba(22, 50, 79, 0.05);
}

.section-title {
    margin: 0 0 10px;
    font-size: 1.15rem;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.section-subtitle {
    margin-top: 6px;
    color: var(--muted);
}

.small-text {
    font-size: 0.92rem;
    color: var(--muted);
}

.button-danger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 12px 18px;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    font-weight: 700;
    background: linear-gradient(135deg, #c95c4f, #96382c);
    color: white;
}

.village-entry-table th,
.village-entry-table td {
    min-width: 150px;
}

.village-entry-table th:nth-child(12),
.village-entry-table td:nth-child(12) {
    min-width: 320px;
}

.file-upload-stack {
    display: grid;
    gap: 8px;
}

.file-upload-stack input[type="file"] {
    width: 100%;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px dashed rgba(22, 50, 79, 0.18);
    background: rgba(255, 255, 255, 0.95);
}

.upload-meta {
    line-height: 1.4;
}

.file-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 999px;
    text-decoration: none;
    background: rgba(22, 50, 79, 0.08);
    color: var(--navy);
    font-size: 0.88rem;
    font-weight: 700;
    word-break: break-all;
}

.details-card {
    border: 1px solid rgba(22, 50, 79, 0.1);
    border-radius: 18px;
    background: rgba(22, 50, 79, 0.03);
    padding: 10px 12px;
}

.details-card summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--navy);
}

.nested-table-wrap {
    margin-top: 12px;
}

.nested-table {
    min-width: 980px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
}

.row-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}

.row-actions.vertical {
    flex-direction: column;
    align-items: stretch;
}

.row-actions.vertical form {
    width: 100%;
}

.row-actions.vertical .button-secondary,
.row-actions.vertical .button-ghost,
.row-actions.vertical .button-danger {
    width: 100%;
}

@media (max-width: 1180px) {
    .app-shell,
    .login-shell,
    .kpi-grid,
    .portal-grid,
    .stats-grid,
    .breakdown-grid,
    .filter-grid,
    .double-grid,
    .triple-grid,
    .form-grid.two,
    .form-grid.three {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
    }
}

@media (max-width: 720px) {
    body.login-body,
    .app-shell {
        padding: 12px;
    }

    .hero-panel,
    .login-panel,
    .topbar,
    .card,
    .table-card,
    .notice-card,
    .form-shell,
    .sidebar {
        border-radius: 22px;
        padding: 18px;
    }

    .topbar {
        flex-direction: column;
        align-items: stretch;
    }

    .form-toolbar,
    .inline-form,
    .topbar-actions {
        flex-direction: column;
        align-items: stretch;
    }
}
.project-entry-table th,
.project-entry-table td {
    min-width: 150px;
}

.project-entry-table th:nth-child(14),
.project-entry-table td:nth-child(14) {
    min-width: 240px;
}

.project-entry-table textarea {
    min-height: 92px;
}

.login-panel-centered {
    align-items: stretch;
}

.login-logo-centered {
    display: block;
    margin: 0 auto 24px;
}

.instruction-list {
    align-content: start;
}

.instruction-item {
    align-items: stretch;
}

.text-center {
    text-align: center;
}

.stat-value-compact {
    font-size: 1.35rem !important;
    line-height: 1.25;
}

.panel-scroll {
    max-height: 480px;
    overflow-y: auto;
    padding-right: 6px;
}

.panel-scroll-light {
    max-height: 720px;
}

.table-scroll-y {
    max-height: 540px;
    overflow-y: auto;
}

.attendance-table-wrap {
    max-height: 620px;
    overflow: auto;
    border: 1px solid rgba(22, 50, 79, 0.08);
    border-radius: 16px;
}

.attendance-table {
    min-width: 1480px;
}

.attendance-table th,
.attendance-table td {
    white-space: nowrap;
    vertical-align: middle;
}

.attendance-table td:last-child {
    min-width: 180px;
}

.pagination-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-top: 16px;
}

.end-date-stack {
    min-width: 140px;
}

.end-date-stack input {
    min-width: 140px;
}

.project-entry-table th,
.project-entry-table td {
    min-width: 160px;
}

.project-entry-table th:nth-child(18),
.project-entry-table td:nth-child(18) {
    min-width: 240px;
}

.project-entry-table textarea {
    min-height: 92px;
}

.stat-time-pair {
    display: grid;
    gap: 8px;
    margin-top: 14px;
    font-size: 1rem;
    color: var(--ink);
}

/* CODEx UI Refresh Start */
.stats-grid {
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
}

.stats-grid.stats-grid-four {
    grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
}

.app-shell {
    grid-template-columns: 290px minmax(0, 1fr);
    padding: 20px;
    gap: 20px;
}

.sidebar {
    padding: 24px 20px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 241, 232, 0.92));
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-gutter: stable;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 8px 4px;
}

.sidebar-logo-image {
    width: min(100%, 192px);
    height: auto;
    object-fit: contain;
}

.profile-card {
    border: 1px solid rgba(209, 162, 43, 0.2);
    box-shadow: 0 18px 32px rgba(22, 50, 79, 0.18);
}

.sidebar-link {
    min-height: 52px;
    border: 1px solid transparent;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.sidebar-link:hover {
    transform: translateX(2px);
    border-color: rgba(209, 162, 43, 0.22);
    background: rgba(255, 255, 255, 0.75);
}

.topbar,
.card,
.table-card,
.notice-card,
.form-shell {
    background: rgba(255, 255, 255, 0.94);
}

.topbar {
    border-radius: 30px;
    padding: 26px 30px;
}

.performance-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.leaderboard-list,
.feature-chart-list {
    display: grid;
    gap: 14px;
}

.leaderboard-item,
.feature-bar-card {
    display: grid;
    gap: 12px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid rgba(22, 50, 79, 0.09);
    background: linear-gradient(180deg, rgba(247, 244, 237, 0.96), rgba(255, 255, 255, 0.98));
}

.leaderboard-item {
    grid-template-columns: auto 1fr auto;
    align-items: center;
}

.leaderboard-item.is-current {
    border-color: rgba(209, 162, 43, 0.45);
    box-shadow: inset 0 0 0 1px rgba(209, 162, 43, 0.18);
}

.rank-badge {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, rgba(209, 162, 43, 0.2), rgba(22, 50, 79, 0.12));
    color: var(--navy);
    font-size: 1rem;
    font-weight: 800;
}

.leaderboard-metric {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--gold-deep);
    text-align: right;
}

.feature-bar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.feature-bar-track {
    width: 100%;
    height: 12px;
    margin-top: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(22, 50, 79, 0.08);
}

.feature-bar-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #d1a22b 0%, #1e6d96 100%);
}

.panel-list-item,
.details-card,
.choice-pill,
.notification-item {
    background: rgba(247, 244, 237, 0.82);
}

.panel-scroll::-webkit-scrollbar,
.table-scroll-y::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

.panel-scroll::-webkit-scrollbar-thumb,
.table-scroll-y::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(22, 50, 79, 0.2);
}

.panel-scroll::-webkit-scrollbar-track,
.table-scroll-y::-webkit-scrollbar-track,
.table-wrap::-webkit-scrollbar-track {
    background: rgba(22, 50, 79, 0.05);
}

.login-shell {
    width: min(1120px, 100%);
    grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.84fr);
    gap: 30px;
}

.hero-panel {
    min-height: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(250, 247, 239, 0.93));
}

.login-panel {
    padding: 40px;
    background: rgba(255, 255, 255, 0.97);
}

.single-login-tab {
    margin: 4px 0 24px;
    padding: 12px 16px;
    border-radius: 14px;
    text-align: center;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--navy);
    background: linear-gradient(135deg, rgba(209, 162, 43, 0.18), rgba(22, 50, 79, 0.08));
    border: 1px solid rgba(209, 162, 43, 0.24);
}

.portal-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
}

@media (max-width: 1180px) {
    .performance-grid,
    .portal-grid {
        grid-template-columns: 1fr;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        height: auto;
    }

.sidebar-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
}

@media (max-width: 860px) {
    .login-shell {
        grid-template-columns: 1fr;
    }

    .leaderboard-item {
        grid-template-columns: auto 1fr;
    }

    .leaderboard-metric {
        grid-column: 1 / -1;
        text-align: left;
    }
}

@media (max-width: 720px) {
    .app-shell {
        padding: 12px;
        gap: 12px;
    }

    .sidebar-brand {
        justify-content: flex-start;
    }

    .sidebar-nav {
        grid-template-columns: 1fr;
    }

    .stats-grid,
    .stats-grid.stats-grid-four {
        grid-template-columns: 1fr;
    }

    .table th,
    .table td {
        padding: 12px 10px;
    }
}
/* CODEx UI Refresh End */

/* Projects Sidebar Navigation */
.sidebar-group {
    display: grid;
    gap: 10px;
    padding: 14px 16px;
    border-radius: 18px;
    border: 1px solid rgba(22, 50, 79, 0.08);
    background: rgba(255, 255, 255, 0.58);
}

.sidebar-group.is-active {
    border-color: rgba(209, 162, 43, 0.28);
    background: linear-gradient(135deg, rgba(209, 162, 43, 0.12), rgba(255, 255, 255, 0.92));
}

.sidebar-group-title {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--gold-deep);
}

.sidebar-subnav {
    display: grid;
    gap: 8px;
}

.sidebar-sublink {
    display: block;
    padding: 12px 14px;
    border-radius: 14px;
    text-decoration: none;
    font-weight: 700;
    color: var(--ink);
    background: rgba(22, 50, 79, 0.04);
    border: 1px solid transparent;
}

.sidebar-sublink.is-active {
    background: linear-gradient(135deg, rgba(209, 162, 43, 0.2), rgba(255, 255, 255, 0.95));
    border-color: rgba(209, 162, 43, 0.28);
    color: var(--gold-deep);
}

.sidebar-sublink.is-disabled {
    color: var(--muted);
    opacity: 0.72;
}

.sidebar::-webkit-scrollbar {
    width: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(22, 50, 79, 0.22);
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(22, 50, 79, 0.05);
}

.serial-cell {
    font-weight: 800;
    color: var(--gold-deep);
    width: 78px;
}

@media (max-width: 1180px) {
    .sidebar-group {
        padding: 12px 14px;
    }

    .sidebar-subnav {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .sidebar-subnav {
        grid-template-columns: 1fr;
    }
}
