:root {
    --navy: #0f2540;
    --navy2: #1a3a5c;
    --navy3: #234d78;
    --orange: #e8500a;
    --orange2: #f06830;
    --green: #0a6b3a;
    --green2: #148f52;
    --red: #b91c1c;
    --bg: #e8ecf4;
    --surface: #ffffff;
    --surface2: #f4f6fb;
    --border: #d1d8e8;
    --border2: #b8c4d8;
    --text: #0d1b2a;
    --text2: #2d3f55;
    --muted: #6b7a90;
    --shadow: 0 2px 14px rgba(15, 37, 64, .10);
    --shadow2: 0 8px 32px rgba(15, 37, 64, .18);
    --radius: 10px;
    --radius2: 14px;
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    font-size: 14px;
}

/* TOPBAR */
.topbar {
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy3) 100%);
    color: #fff;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    position: sticky;
    top: 0;
    z-index: 300;
    box-shadow: 0 2px 20px rgba(0, 0, 0, .35);
}

.tb-brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

.tb-logo {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: .5px;
    color: #fff;
}

.tb-ver {
    background: var(--orange);
    color: #fff;
    font-size: .55rem;
    padding: 2px 7px;
    border-radius: 20px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 800;
}

.tb-right {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

#fySelect {
    background: #1a3a5c;
    color: #fff;
    border: 0.5px solid rgba(255, 255, 255, .3);
    border-radius: 6px;
    padding: 4px 10px;
    font-size: .72rem;
    font-family: 'DM Sans', sans-serif;
    font-weight: 500;
    cursor: pointer;
    outline: none;
}

#fySelect option {
    background: #0f2540;
    color: #fff;
}

.role-pill {
    font-size: .68rem;
    padding: 3px 10px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, .1);
    border-radius: 20px;
    padding: 3px 10px 3px 3px;
    border: 0.5px solid rgba(255, 255, 255, .2);
}

.av {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
}

.uname {
    color: rgba(255, 255, 255, .9);
    font-size: .75rem;
    font-weight: 500;
}

.logout-btn {
    background: none;
    border: 1px solid var(--orange);
    color: var(--orange);
    font-size: .7rem;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    font-weight: 600;
    transition: .15s;
}

.logout-btn:hover {
    background: var(--orange);
    color: #fff;
}

/* MAIN */
.main {
    max-width: 1440px;
    margin: 0 auto;
    padding: 20px 18px;
}

.greeting h2 {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 2px;
}

.greeting p {
    font-size: .78rem;
    color: var(--muted);
    margin-bottom: 16px;
}

/* MODULE CARDS */
.mod-row {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
    margin-bottom: 18px;
}

.mc {
    background: var(--surface);
    border-radius: var(--radius2);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 14px 10px;
    text-align: center;
    cursor: pointer;
    transition: .15s;
}

.mc:hover {
    border-color: var(--orange);
    box-shadow: var(--shadow2);
    transform: translateY(-2px);
}

.mi {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 8px;
    font-size: 18px;
}

.mi-o {
    background: #fff3ef;
}

.mi-b {
    background: #e6f1fb;
}

.mi-t {
    background: #e1f5ee;
}

.mi-p {
    background: #eeedfe;
}

.mi-g {
    background: #f1efe8;
}

.mn {
    font-family: 'Rajdhani', sans-serif;
    font-size: .95rem;
    font-weight: 700;
    color: var(--navy);
}

.ms {
    font-size: .68rem;
    color: var(--muted);
    margin-top: 2px;
}

.mb {
    display: inline-block;
    font-size: .6rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 8px;
    margin-top: 5px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.mb-live {
    background: #eaf3de;
    color: #3b6d11;
}

.mb-soon {
    background: var(--surface2);
    color: var(--muted);
}

.mb-int {
    background: #eeedfe;
    color: #534ab7;
}

/* STATS ROW */
.stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 18px;
}

.sc {
    background: var(--surface);
    border-radius: var(--radius2);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 16px 18px;
}

.sc-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy2);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.sdot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}

.s3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}

.sm {
    background: var(--surface2);
    border-radius: var(--radius);
    padding: 12px;
    text-align: center;
    border: 1px solid var(--border);
}

.sv {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--navy);
}

.sl {
    font-size: .65rem;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-top: 2px;
}

.pay-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.psc {
    background: var(--surface2);
    border-radius: var(--radius);
    padding: 10px 12px;
    border: 1px solid var(--border);
}

.psl {
    font-size: .65rem;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.psv {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--navy);
    margin-top: 3px;
}

/* SECTION LABEL */
.sec-label {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy2);
    margin: 18px 0 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ACTIVITY */
.act-card {
    background: var(--surface);
    border-radius: var(--radius2);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 14px 16px;
    margin-bottom: 12px;
}

.ai {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0;
    border-bottom: 1px solid var(--border);
    font-size: .78rem;
    color: var(--text);
}

.ai:last-child {
    border-bottom: none;
}

.an {
    font-size: .65rem;
    font-weight: 700;
    background: var(--surface2);
    border-radius: 4px;
    padding: 2px 6px;
    color: var(--muted);
    min-width: 24px;
    text-align: center;
    border: 1px solid var(--border);
}

.at {
    margin-left: auto;
    font-size: .65rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.t-open {
    background: #fff3ef;
    color: #c04020;
}

.t-pend {
    background: #fff8e0;
    color: #a05a00;
}

.t-done {
    background: #eaf3de;
    color: #3b6d11;
}

.t-prod {
    background: #e6f1fb;
    color: #185fa5;
}

/* SOON */
.soon-card {
    background: var(--surface);
    border-radius: var(--radius2);
    box-shadow: var(--shadow);
    border: 1px dashed var(--border2);
    padding: 20px;
    text-align: center;
    margin-bottom: 12px;
}

.soon-icon {
    font-size: 24px;
    margin-bottom: 8px;
}

.soon-title {
    font-family: 'Rajdhani', sans-serif;
    font-size: .95rem;
    font-weight: 700;
    color: var(--muted);
}

.soon-sub {
    font-size: .72rem;
    color: var(--muted);
    margin-top: 3px;
}

/* ADMIN */
.admin-card {
    background: var(--surface);
    border-radius: var(--radius2);
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    padding: 16px 18px;
    margin-bottom: 12px;
}

.admin-head {
    font-family: 'Rajdhani', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy2);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pt {
    width: 100%;
    border-collapse: collapse;
    font-size: .75rem;
}

.pt th {
    background: var(--navy);
    color: #fff;
    padding: 8px 11px;
    text-align: left;
    font-weight: 600;
    font-size: .68rem;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.pt td {
    padding: 8px 11px;
    border-bottom: 1px solid var(--border);
    color: var(--text);
    vertical-align: middle;
}

.pt tr:hover td {
    background: var(--surface2);
}

.pt tr:last-child td {
    border-bottom: none;
}

.ton {
    background: #eaf3de;
    color: #3b6d11;
    font-size: .65rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}

.toff {
    background: var(--surface2);
    color: var(--muted);
    font-size: .65rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}

.role-tag {
    font-size: .65rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.role-admin {
    background: #1a3a5c;
    color: #5DCAA5;
}

.role-director {
    background: #1a3a5c;
    color: #FAC775;
}

.role-user {
    background: var(--surface2);
    color: var(--muted);
}

.role-guest {
    background: #1a3a5c;
    color: #85B7EB;
}

.btn-sm {
    font-size: .65rem;
    padding: 3px 9px;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: 600;
    margin-right: 3px;
}

.btn-edit {
    background: #e6f1fb;
    color: #185fa5;
}

.btn-approve {
    background: #eaf3de;
    color: #3b6d11;
}

.btn-del {
    background: #fff0f0;
    color: #b91c1c;
}

/* TOAST */
.cd-toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 600;
    z-index: 9999;
    display: none;
    box-shadow: var(--shadow2);
}

.toast-ok {
    background: var(--green);
    color: #fff;
}

.toast-err {
    background: var(--red);
    color: #fff;
}

/* CONFIRM POPUP */
#confirmPopup {
    position: fixed;
    inset: 0;
    background: rgba(8, 18, 35, .6);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    backdrop-filter: blur(2px);
}

.confirm-box {
    background: var(--surface);
    border-radius: var(--radius2);
    padding: 28px;
    width: 340px;
    text-align: center;
    box-shadow: 0 24px 80px rgba(0, 0, 0, .35);
}

.confirm-box p {
    font-size: .9rem;
    color: var(--text);
    margin-bottom: 20px;
    line-height: 1.5;
}

.confirm-box .btn-row {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.confirm-box .btn-cancel {
    background: var(--surface2);
    color: var(--muted);
    border: 1px solid var(--border);
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: .8rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
}

.confirm-box .btn-confirm {
    background: var(--red);
    color: #fff;
    border: none;
    padding: 8px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: .8rem;
    font-weight: 600;
    font-family: 'DM Sans', sans-serif;
}