*{box-sizing:border-box}html,body{margin:0;min-height:100%;font-family:Inter,Segoe UI,Arial,sans-serif;background:#f4f7fb;color:#172033}body{font-size:14px}.admin-shell{min-height:100vh;display:flex}.sidebar{width:250px;background:#102a56;color:#fff;display:flex;flex-direction:column;position:fixed;inset:0 auto 0 0}.brand{height:76px;padding:16px 18px;display:flex;align-items:center;gap:11px;border-bottom:1px solid rgba(255,255,255,.12)}.brand-mark,.login-logo{width:42px;height:42px;border-radius:10px;background:#fff;color:#102a56;display:grid;place-items:center;font-weight:800}.brand strong{display:block;font-size:16px}.brand small{display:block;color:#b9c9e4;margin-top:3px}.sidebar nav{padding:18px 12px;display:grid;gap:5px}.sidebar a{color:#dbe7f8;text-decoration:none;padding:11px 13px;border-radius:8px;display:block}.sidebar nav a:hover,.sidebar-bottom a:hover{background:rgba(255,255,255,.1);color:#fff}.sidebar-bottom{margin-top:auto;padding:14px 12px;border-top:1px solid rgba(255,255,255,.12)}.main{margin-left:250px;min-height:100vh;flex:1}.topbar{height:82px;background:#fff;border-bottom:1px solid #e3e8f0;padding:14px 28px;display:flex;justify-content:space-between;align-items:center}.eyebrow{font-size:11px;color:#6b7890;letter-spacing:1.3px}.topbar h1{margin:3px 0 0;font-size:22px}.admin-user{display:flex;align-items:center;gap:15px;color:#44516a}.admin-user a{color:#1557b0;text-decoration:none}.content{padding:28px}.welcome{background:linear-gradient(135deg,#fff,#eef5ff);border:1px solid #dce7f6;border-radius:14px;padding:24px;margin-bottom:22px}.welcome h2{margin:0 0 7px;font-size:22px}.welcome p{margin:0;color:#65738a}.stats-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;margin-bottom:22px}.stat-card{background:#fff;border:1px solid #e1e7ef;border-radius:12px;padding:20px;box-shadow:0 2px 8px rgba(20,40,70,.04)}.stat-card span{display:block;color:#66748b;margin-bottom:10px}.stat-card strong{font-size:28px}.table-card,.form-card{background:#fff;border:1px solid #e1e7ef;border-radius:12px;overflow:hidden;box-shadow:0 2px 8px rgba(20,40,70,.04)}.table-head{padding:17px 19px;border-bottom:1px solid #e5eaf1;display:flex;justify-content:space-between}.status-row{display:flex;justify-content:space-between;padding:16px 19px;border-bottom:1px solid #edf0f4}.status-row:last-child{border-bottom:0}.status{padding:5px 9px;border-radius:999px;font-size:12px}.status.active{background:#e6f7ee;color:#16704a}.empty-page{background:#fff;border:1px solid #e1e7ef;border-radius:12px;padding:30px}.footer{padding:18px 28px;color:#7b8799;font-size:12px}.login-page{min-height:100vh;display:grid;place-items:center;background:linear-gradient(135deg,#eef4fb,#dfeaf8)}.login-card{width:min(420px,calc(100% - 32px));background:#fff;border:1px solid #dce4ef;border-radius:16px;padding:32px;box-shadow:0 18px 50px rgba(20,45,80,.12)}.login-logo{margin:0 auto 14px}.login-card h1{text-align:center;margin:0;font-size:24px}.login-card>p{text-align:center;color:#6c788b;margin:6px 0 25px}.login-card form{display:grid;gap:16px}.login-card label,.field label{display:grid;gap:7px;font-weight:600;color:#3d4a60}.login-card input,.field input,.field select,.field textarea{width:100%;padding:11px 12px;border:1px solid #ccd5e2;border-radius:8px;font:inherit}.btn{display:inline-block;border:0;border-radius:8px;padding:10px 15px;background:#e9eef5;color:#23324a;text-decoration:none;cursor:pointer;font-weight:600}.btn.primary{background:#1557b0;color:#fff}.btn.full{width:100%}.alert{padding:11px 13px;border-radius:8px;margin-bottom:15px}.alert.error{background:#fff0f0;color:#a12b2b;border:1px solid #f0caca}@media(max-width:800px){.sidebar{width:210px}.main{margin-left:210px}.stats-grid{grid-template-columns:repeat(2,1fr)}}@media(max-width:600px){.sidebar{position:static;width:100%;height:auto}.admin-shell{display:block}.main{margin-left:0}.sidebar nav{grid-template-columns:1fr 1fr}.topbar{height:auto;gap:15px;align-items:flex-start}.stats-grid{grid-template-columns:1fr}.content{padding:16px}}

/* ================================
   STEP 2 ADDITIONS
================================ */

.alert.success {
    background: #e8f7ef;
    color: #176b48;
    border: 1px solid #c8e9d7;
}

.setup-card {
    width: min(480px, calc(100% - 32px));
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 14px 18px;
    text-align: left;
    border-bottom: 1px solid #edf0f4;
    white-space: nowrap;
}

.data-table th {
    background: #f8fafc;
    color: #526078;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.data-table tbody tr:hover {
    background: #fafcff;
}

.status.inactive {
    background: #eef1f5;
    color: #5f6b7d;
}

.status.completed {
    background: #e7f0ff;
    color: #1557b0;
}

.status.suspended,
.status.cancelled {
    background: #fff0f0;
    color: #a12b2b;
}

.empty-state {
    padding: 30px 20px;
    text-align: center;
}

.empty-state h3 {
    margin: 0 0 6px;
}

.empty-state p {
    margin: 0;
    color: #6b7890;
}


/* ================================
   STEP 3 — STUDENT MANAGEMENT
================================ */

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 22px;
}

.page-header h2 {
    margin: 0 0 6px;
    font-size: 22px;
}

.page-header p {
    margin: 0;
    color: #6b7890;
}

.page-actions {
    display: flex;
    gap: 10px;
}

.filter-card {
    background: #ffffff;
    border: 1px solid #e1e7ef;
    border-radius: 12px;
    padding: 18px;
    margin-bottom: 18px;
    box-shadow: 0 2px 8px rgba(20, 40, 70, 0.04);
}

.filter-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 12px;
    align-items: end;
}

.field {
    min-width: 0;
}

.field small {
    color: #7a8799;
    font-weight: 400;
}

.filter-actions {
    display: flex;
    gap: 8px;
}

.table-count {
    margin-left: 8px;
    color: #7a8799;
    font-size: 12px;
    font-weight: 400;
}

.action-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
}

.inline-form {
    display: inline;
}

.btn.small {
    padding: 7px 9px;
    font-size: 12px;
}

.form-card {
    padding: 0;
}

.form-card form {
    width: 100%;
}

.form-section {
    padding: 24px;
    border-bottom: 1px solid #e8edf3;
}

.form-section:last-of-type {
    border-bottom: 0;
}

.form-section h3 {
    margin: 0 0 18px;
    font-size: 16px;
}

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

.field-wide {
    grid-column: span 2;
}

.field textarea {
    resize: vertical;
    min-height: 90px;
}

.form-actions {
    padding: 18px 24px;
    background: #fafbfd;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    border-top: 1px solid #e8edf3;
}

.profile-grid {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 18px;
}

.profile-card,
.detail-card {
    background: #ffffff;
    border: 1px solid #e1e7ef;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 2px 8px rgba(20, 40, 70, 0.04);
}

.profile-card {
    text-align: center;
}

.profile-photo {
    margin-bottom: 16px;
}

.profile-photo img,
.photo-placeholder {
    width: 150px;
    height: 150px;
    border-radius: 12px;
    object-fit: cover;
    margin: 0 auto;
}

.photo-placeholder {
    display: grid;
    place-items: center;
    background: #eef4fb;
    color: #1557b0;
    font-size: 48px;
    font-weight: 700;
}

.profile-card h3 {
    margin: 0 0 10px;
}

.detail-card {
    grid-column: span 1;
}

.profile-grid .detail-card:nth-child(2) {
    grid-column: 2;
}

.profile-grid .detail-card:nth-child(3),
.profile-grid .detail-card:nth-child(4) {
    grid-column: 1 / -1;
}

.detail-card h3 {
    margin: 0 0 18px;
    font-size: 16px;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.detail-grid span {
    display: block;
    color: #78859a;
    font-size: 12px;
    margin-bottom: 5px;
}

.detail-grid strong {
    font-size: 14px;
    word-break: break-word;
}

.address-text {
    color: #3e4b61;
    line-height: 1.6;
    margin: 0 0 20px;
}

.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
}

.pagination a {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 1px solid #d8e0ea;
    border-radius: 7px;
    text-decoration: none;
    color: #42516a;
    background: #ffffff;
}

.pagination a:hover,
.pagination a.current {
    background: #1557b0;
    color: #ffffff;
    border-color: #1557b0;
}

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

    .filter-actions {
        grid-column: 1 / -1;
    }

    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .detail-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 800px) {
    .page-header {
        flex-direction: column;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .profile-grid .detail-card:nth-child(2),
    .profile-grid .detail-card:nth-child(3),
    .profile-grid .detail-card:nth-child(4) {
        grid-column: auto;
    }
}

@media (max-width: 600px) {
    .filter-grid,
    .form-grid,
    .detail-grid {
        grid-template-columns: 1fr;
    }

    .field-wide {
        grid-column: auto;
    }

    .form-section {
        padding: 18px;
    }

    .form-actions {
        padding: 16px 18px;
    }

    .action-buttons {
        flex-wrap: wrap;
    }
}

/* Recovery-only additions: logo and admission badge. */
.brand-mark img{width:44px;height:44px;object-fit:cover;border-radius:9px;background:#fff;padding:2px;display:block}
.nav-badge{display:inline-block;min-width:18px;height:18px;line-height:18px;text-align:center;border-radius:10px;background:#c9212b;color:#fff;font-size:9px;font-weight:800;margin-left:6px;padding:0 5px}


/* V3 branch workspace + accessibility sizing */
body{font-size:16px}.sidebar{width:270px}.main{margin-left:270px}.brand{height:92px;padding:12px 16px}.brand-mark{width:64px;height:64px;min-width:64px;overflow:hidden;border-radius:12px}.brand-mark img{width:100%;height:100%;object-fit:contain;padding:3px;border-radius:10px;display:block}.brand strong{font-size:17px}.brand small{font-size:13px}.sidebar a{font-size:15px;padding:13px 14px}.topbar{height:88px;padding:16px 30px}.topbar h1{font-size:25px}.content{padding:30px}.btn{font-size:15px;padding:11px 16px}.btn-small{font-size:13px}.data-table th,.table-card th{font-size:13px}.data-table td,.table-card td{font-size:15px}.detail-grid strong{font-size:15px}
.branch-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:22px}.branch-card{position:relative;background:#fff;border:1px solid #dfe6ef;border-radius:20px;padding:22px;min-height:235px;text-decoration:none;color:#172033;box-shadow:0 8px 24px rgba(20,40,70,.07);overflow:hidden;transition:.2s}.branch-card:hover{transform:translateY(-3px);box-shadow:0 14px 30px rgba(20,40,70,.12);border-color:#b9cce5}.branch-art{height:82px;border-radius:15px;background:linear-gradient(135deg,#102a56,#2467b1);display:flex;align-items:center;justify-content:space-between;padding:0 18px;color:#fff;margin-bottom:18px}.branch-icon{font-size:38px;font-weight:800}.branch-code{font-size:18px;font-weight:800;letter-spacing:1px}.branch-card h3{font-size:21px;margin:0 0 5px}.branch-location{color:#69768a;font-size:14px;min-height:20px}.branch-meta{display:grid;grid-template-columns:1fr 1fr 1fr;gap:8px;margin-top:18px}.branch-meta div{background:#f5f8fc;border-radius:10px;padding:10px}.branch-meta span{display:block;color:#78859a;font-size:12px}.branch-meta strong{font-size:17px}.branch-status{position:absolute;right:22px;top:102px}.branch-dashboard-head{display:flex;justify-content:space-between;gap:20px;align-items:flex-start;margin-bottom:24px}.branch-dashboard-head h2{margin:0 0 5px;font-size:29px}.branch-dashboard-head p{margin:0;color:#66748b;font-size:16px}.branch-actions{display:flex;gap:10px}.branch-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:16px;margin-bottom:24px}.branch-stat{background:#fff;border:1px solid #e0e7ef;border-radius:16px;padding:20px;box-shadow:0 4px 14px rgba(20,40,70,.05)}.branch-stat span{display:block;color:#68768a;font-size:14px;margin-bottom:10px}.branch-stat strong{font-size:30px}.branch-stat small{display:block;margin-top:7px;color:#8792a2}.branch-dashboard-grid{display:grid;grid-template-columns:2fr 1fr;gap:20px}.branch-panel{background:#fff;border:1px solid #e0e7ef;border-radius:16px;overflow:hidden}.branch-panel-head{padding:18px 20px;border-bottom:1px solid #e7ecf2;display:flex;justify-content:space-between;align-items:center}.branch-panel-head strong{font-size:17px}.branch-panel table{width:100%;border-collapse:collapse}.branch-panel th,.branch-panel td{padding:14px 16px;text-align:left;border-bottom:1px solid #edf1f5;font-size:14px}.branch-panel th{font-size:12px;text-transform:uppercase;color:#6c7890;background:#f8fafc}.branch-panel td small{display:block;color:#7c8798;margin-top:3px}.branch-quick{display:grid;gap:10px;padding:16px}.branch-quick a{display:flex;justify-content:space-between;align-items:center;padding:14px;border-radius:11px;background:#f5f8fc;color:#1d4f8f;text-decoration:none;font-weight:700}.branch-quick a:hover{background:#eaf2fb}.review-actions{display:flex;flex-wrap:wrap;gap:12px;margin-top:22px;padding:20px;background:#f7f9fc;border:1px solid #e0e7ef;border-radius:14px}.review-actions form{margin:0}.review-actions .btn{min-width:150px}.btn.success{background:#168653;color:#fff}.btn.danger{background:#b52d38;color:#fff}.payment-warning{padding:14px 16px;border-radius:11px;background:#fff5e8;border:1px solid #f1d5a8;color:#7a5314;margin-top:18px;font-size:15px}.approval-note{padding:14px 16px;border-radius:11px;background:#edf7ff;border:1px solid #cfe4f7;color:#24547c;margin-top:18px;font-size:15px}
@media(max-width:1100px){.branch-grid{grid-template-columns:repeat(2,1fr)}.branch-stats{grid-template-columns:repeat(2,1fr)}.branch-dashboard-grid{grid-template-columns:1fr}}
@media(max-width:700px){.sidebar{width:220px}.main{margin-left:220px}.content{padding:18px}.branch-grid{grid-template-columns:1fr}.branch-dashboard-head{flex-direction:column}.branch-stats{grid-template-columns:1fr 1fr}.brand{height:80px}.brand-mark{width:54px;height:54px;min-width:54px}}
@media(max-width:520px){.sidebar{position:static;width:100%}.main{margin-left:0}.admin-shell{display:block}.branch-stats{grid-template-columns:1fr}.branch-meta{grid-template-columns:1fr 1fr}}

/* =========================================================
   ICE E-SKILL PROFESSIONAL COURSE MANAGEMENT UI
   CSS-only enhancement — no database/PHP changes
   ========================================================= */
:root{
  --ice-navy:#12285a;
  --ice-blue:#1e63c5;
  --ice-blue-dark:#174e9d;
  --ice-red:#c92b32;
  --ice-bg:#f3f6fb;
  --ice-border:#e1e7f0;
  --ice-text:#17233b;
  --ice-muted:#69778d;
  --ice-card:#ffffff;
}

body{font-size:16px;background:var(--ice-bg);color:var(--ice-text);line-height:1.45}
.main{background:var(--ice-bg)}
.topbar{height:86px;padding:16px 34px;background:rgba(255,255,255,.98);box-shadow:0 1px 0 rgba(18,40,90,.04)}
.topbar h1{font-size:27px;font-weight:800;letter-spacing:-.3px;color:#15233d}
.eyebrow{font-size:12px;font-weight:700;color:#6880a2;letter-spacing:1.6px}
.admin-user{font-size:15px;font-weight:600}

.content{padding:34px;max-width:1700px}
.page-actions{display:flex;justify-content:space-between;align-items:center;gap:24px;margin-bottom:25px}
.page-actions h2{font-size:29px;line-height:1.15;margin:4px 0 7px;font-weight:800;letter-spacing:-.5px}
.page-actions p{font-size:16px;color:var(--ice-muted);margin:0}
.action-group{display:flex;gap:10px;align-items:center}

.btn{border-radius:10px;padding:11px 17px;font-size:15px;font-weight:700;line-height:1.2;border:1px solid transparent;transition:transform .15s ease,box-shadow .15s ease,background .15s ease}
.btn:hover{transform:translateY(-1px);box-shadow:0 6px 16px rgba(18,40,90,.12)}
.btn-primary{background:var(--ice-blue);color:#fff!important;border-color:var(--ice-blue)}
.btn-primary:hover{background:var(--ice-blue-dark)}
.btn-small{font-size:13px;padding:8px 11px;border-radius:8px}

.alert{font-size:15px;padding:13px 16px;border-radius:11px;margin-bottom:20px}
.alert.success{box-shadow:0 3px 12px rgba(22,134,83,.06)}

.table-card{border:1px solid var(--ice-border);border-radius:18px;background:var(--ice-card);box-shadow:0 8px 30px rgba(18,40,90,.07);overflow:hidden}
.table-head{min-height:66px;padding:18px 22px;background:linear-gradient(180deg,#fff,#fbfcfe);border-bottom:1px solid #e7ecf3;align-items:center}
.table-head strong{font-size:18px;font-weight:800;color:#1b2a44}
.table-head span{font-size:14px;color:#6c7890;background:#f0f4fa;padding:7px 11px;border-radius:999px;font-weight:700}
.table-wrap{overflow-x:auto}
.table-card table{width:100%;border-collapse:separate;border-spacing:0;min-width:1120px}
.table-card thead th{background:#f7f9fc;color:#5d6b81;font-size:12px;font-weight:800;letter-spacing:.8px;text-transform:uppercase;padding:14px 17px;border-bottom:1px solid #e4e9f1;white-space:nowrap}
.table-card tbody td{font-size:15px;color:#263650;padding:17px;border-bottom:1px solid #edf1f5;vertical-align:middle}
.table-card tbody tr{transition:background .15s ease}
.table-card tbody tr:hover{background:#f8fbff}
.table-card tbody tr:last-child td{border-bottom:0}
.table-card td:first-child{font-weight:800;color:#183e78}
.table-card td:nth-child(2){min-width:310px}
.table-card td:nth-child(2) strong{display:block;font-size:16px;color:#182944;margin-bottom:4px}
.table-card td:nth-child(2) small{display:block;max-width:430px;color:#7a8799;font-size:13px;line-height:1.35}
.table-card td:nth-child(3){min-width:205px}
.table-card td:nth-child(4){white-space:nowrap;color:#5c6b80}
.table-card td:nth-child(5){font-weight:800;color:#182944;white-space:nowrap}
.table-card td:nth-child(6){font-weight:700;white-space:nowrap}
.table-card td:nth-child(7){text-align:center;font-weight:800}
.table-card td:nth-child(8){white-space:nowrap}
.table-card td:nth-child(9){min-width:175px}

/* Category pills even though the PHP outputs plain text */
.table-card td:nth-child(3){font-weight:700;color:#285993}
.table-card td:nth-child(3)::before{content:"";display:inline-block;width:7px;height:7px;border-radius:50%;background:#4f86d6;margin:0 8px 2px 0}

.status{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:800}
.status-active{background:#e8f7ef;color:#16734b;border:1px solid #ccebdc}
.status-inactive{background:#eef1f5;color:#687386;border:1px solid #dfe4eb}
.status-active::before{content:"";width:6px;height:6px;border-radius:50%;background:#1c9a61}
.status-inactive::before{content:"";width:6px;height:6px;border-radius:50%;background:#8b95a4}

.row-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap}
.row-actions .btn{background:#f0f4fa;color:#27415f;border-color:#dfe6ef}
.row-actions .btn:hover{background:#e5edf8;color:#174e9d;border-color:#cbd9ec}
.row-actions form button{font-family:inherit}

/* Keep the navigation polished and readable */
.sidebar{width:270px;background:linear-gradient(180deg,#142c62 0%,#10234e 100%);box-shadow:5px 0 25px rgba(12,31,69,.08);z-index:10}
.main{margin-left:270px}
.brand{height:92px;border-bottom:1px solid rgba(255,255,255,.12)}
.sidebar nav{padding:20px 13px;gap:5px}
.sidebar a{font-size:15px;font-weight:600;padding:13px 14px;color:#dbe7f8;border:1px solid transparent}
.sidebar nav a:hover{background:rgba(255,255,255,.08);border-color:rgba(255,255,255,.08)}

@media(max-width:1000px){
 .content{padding:25px}
 .page-actions{align-items:flex-start}
}
@media(max-width:700px){
 .content{padding:18px}
 .page-actions{flex-direction:column}
 .page-actions h2{font-size:25px}
 .topbar{padding:14px 20px}
}
/* ICE E-SKILL SUPER ADMIN — PROFESSIONAL UI UPGRADE */
:root{--navy:#18244b;--navy2:#101a3a;--red:#e31e2f;--gold:#f3c400;--bg:#f5f7fb;--ink:#172038;--muted:#68738a;--line:#e4e8f0;--soft:#eef2f8;--white:#fff;--shadow:0 12px 34px rgba(20,32,65,.07);--radius:18px}
html{scroll-behavior:smooth}body{font-family:Inter,Segoe UI,Roboto,Arial,sans-serif;background:var(--bg);color:var(--ink);line-height:1.5}
.admin-shell{background:var(--bg)}.sidebar{width:275px;background:linear-gradient(180deg,var(--navy) 0%,var(--navy2) 100%);box-shadow:8px 0 30px rgba(10,18,45,.08);z-index:40}.brand{height:82px;padding:13px 16px;background:#fff;border-bottom:0;box-shadow:0 8px 25px rgba(0,0,0,.08)}.brand-mark{width:48px;height:48px;border-radius:12px;background:#fff;box-shadow:0 3px 12px rgba(20,32,65,.08)}.brand-mark img{width:100%;height:100%;object-fit:contain;border-radius:10px}.brand strong{color:var(--navy);font-size:15px}.brand small{color:var(--muted);font-size:10px;letter-spacing:.3px}
.sidebar nav{padding:18px 14px;gap:4px}.sidebar a{color:#dbe1ef;padding:12px 13px;border-radius:11px;font-weight:650;transition:.18s}.sidebar nav a:hover{background:rgba(255,255,255,.08);color:#fff;transform:translateX(2px)}.sidebar nav a.active{background:#fff;color:var(--navy);box-shadow:0 8px 20px rgba(0,0,0,.14)}.nav-badge{background:var(--red)!important;color:#fff!important;border-radius:99px;padding:2px 7px!important;font-size:10px!important;margin-left:auto}.sidebar-bottom{padding:14px;border-top:1px solid rgba(255,255,255,.1)}
.main{margin-left:275px}.topbar{height:104px;padding:20px 38px;border-bottom:1px solid var(--line);box-shadow:0 1px 0 rgba(20,32,65,.02);position:sticky;top:0;z-index:20}.eyebrow{font-size:10px;font-weight:900;letter-spacing:1.7px;color:var(--red)}.topbar h1{font-size:28px;line-height:1.1;margin:5px 0 0}.admin-user{gap:11px}.admin-user span{font-size:13px;font-weight:750}.admin-user a{background:var(--soft);border-radius:9px;padding:8px 11px;color:var(--navy);font-size:11px;font-weight:800}.content{max-width:1500px;padding:30px 38px 20px}
.welcome{background:linear-gradient(120deg,var(--navy),#293a70);color:#fff;border:0;border-radius:22px;padding:28px 30px;box-shadow:var(--shadow);position:relative;overflow:hidden}.welcome:after{content:"";position:absolute;width:250px;height:250px;border:46px solid rgba(255,255,255,.045);border-radius:50%;right:-110px;top:-120px}.welcome h2{font-size:29px;margin:0 0 7px;position:relative;z-index:1}.welcome p{color:#d4dbeb;position:relative;z-index:1}
.stats-grid{grid-template-columns:repeat(3,1fr);gap:15px;margin-bottom:22px}.stat-card{border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 5px 20px rgba(20,32,65,.045);padding:19px;transition:.18s}.stat-card:hover{transform:translateY(-2px);box-shadow:var(--shadow)}.stat-card span{font-size:10px;text-transform:uppercase;letter-spacing:.55px;font-weight:800;color:var(--muted)}.stat-card strong{display:block;font-size:26px;color:var(--navy);margin-top:9px}
.table-card,.form-card,.filter-card,.profile-card,.detail-card,.empty-page{border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 5px 20px rgba(20,32,65,.045);background:#fff}.table-card{overflow:hidden}.table-head{padding:18px 20px;border-bottom:1px solid var(--line);align-items:center}.table-head strong{font-size:14px}.data-table{min-width:0}.data-table th{background:#fbfcfe;color:var(--muted);font-size:10px;letter-spacing:.7px}.data-table th,.data-table td{padding:13px 15px;border-bottom:1px solid var(--line)}.data-table tbody tr:hover{background:#fafbfe}.table-wrap{overflow-x:auto}
.page-header{margin-bottom:22px}.page-header h2{font-size:24px}.page-header p{color:var(--muted)}.page-actions{gap:9px}.btn{border-radius:10px;padding:10px 14px;font-weight:800;transition:.18s}.btn.primary{background:var(--red);color:#fff}.btn.primary:hover{background:#c91426;transform:translateY(-1px)}.btn:not(.primary){background:var(--soft);color:var(--navy)}.btn:hover{transform:translateY(-1px)}
.filter-card{padding:18px}.filter-grid{gap:12px}.field label,.login-card label{font-size:10px;text-transform:uppercase;letter-spacing:.55px;font-weight:850;color:#4e5a70}.field input,.field select,.field textarea,.login-card input{border:1px solid #d8deea;border-radius:10px;padding:11px 12px;outline:none;transition:.15s}.field input:focus,.field select:focus,.field textarea:focus,.login-card input:focus{border-color:#aab6cf;box-shadow:0 0 0 3px rgba(24,36,75,.07)}
.status{font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.35px;padding:5px 9px;border-radius:99px}.status.active{background:#eaf8f1;color:#117446}.status.completed{background:#eef4ff;color:#294b86}.status.pending{background:#fff7df;color:#8a6800}.status.suspended,.status.cancelled{background:#fff0f2;color:#ad1b2c}.status.inactive{background:#eef1f6;color:#5d687c}
.profile-card,.detail-card{box-shadow:0 5px 20px rgba(20,32,65,.045)}.profile-photo img,.photo-placeholder{border-radius:18px}.pagination a{border-color:#d8deea;border-radius:9px}.pagination a:hover,.pagination a.current{background:var(--red);border-color:var(--red)}
.footer{padding:22px 38px;color:#8a94a8}.alert{border-radius:12px}.alert.success{background:#edf9f3;color:#147245;border-color:#c7ead7}.alert.error{background:#fff1f2;color:#a9192b;border-color:#f4c8cf}
/* Branch financial dashboard */
.branch-dashboard-head{background:linear-gradient(120deg,var(--navy),#293a70);color:#fff;border-radius:22px;padding:28px 30px;margin-bottom:22px;box-shadow:var(--shadow)}.branch-dashboard-head h2{font-size:28px}.branch-dashboard-head p{color:#d4dbeb}.branch-actions{display:flex;gap:8px}.branch-actions .btn{background:rgba(255,255,255,.12);color:#fff;border:1px solid rgba(255,255,255,.16)}.branch-actions .btn-primary{background:var(--red);border-color:var(--red)}.branch-stats{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin-bottom:18px}.branch-stat{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:19px;box-shadow:0 5px 20px rgba(20,32,65,.045)}.branch-stat span{font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.55px;font-weight:800}.branch-stat strong{display:block;font-size:24px;color:var(--navy);margin-top:8px}.branch-stat small{display:block;color:var(--muted);margin-top:4px}.branch-dashboard-grid{display:grid;grid-template-columns:1.35fr .65fr;gap:18px}.branch-panel{background:#fff;border:1px solid var(--line);border-radius:var(--radius);box-shadow:0 5px 20px rgba(20,32,65,.045);overflow:hidden}.branch-panel-head{padding:16px 18px;border-bottom:1px solid var(--line);display:flex;justify-content:space-between;align-items:center}.branch-quick{padding:10px}.branch-quick a{display:flex;justify-content:space-between;padding:13px;border-radius:11px;text-decoration:none;color:var(--navy);font-weight:750}.branch-quick a:hover{background:var(--soft)}
@media(max-width:1100px){.stats-grid{grid-template-columns:repeat(2,1fr)}.branch-stats{grid-template-columns:repeat(2,1fr)}.branch-dashboard-grid{grid-template-columns:1fr}}
@media(max-width:760px){.sidebar{position:static;width:100%;height:auto}.admin-shell{display:block}.main{margin-left:0}.topbar{position:static;height:auto;padding:18px 20px}.content{padding:20px}.stats-grid,.branch-stats{grid-template-columns:1fr}.branch-dashboard-head{padding:22px}.branch-actions{flex-wrap:wrap}.data-table{min-width:700px}}

/* =========================================================
   V2 — SUPER ADMIN DESKTOP FIT / VIEWPORT OVERRIDES
   UI ONLY — no PHP/DB changes
   ========================================================= */
html,body{max-width:100%;overflow-x:hidden}
.admin-shell{width:100%;min-width:0}
.sidebar{width:250px;flex:0 0 250px}
.main{width:calc(100% - 250px);margin-left:250px;min-width:0;overflow-x:hidden}
.topbar{width:100%;min-width:0;padding-left:clamp(20px,2vw,34px);padding-right:clamp(20px,2vw,34px)}
.content{width:100%;max-width:none;margin:0;padding:28px clamp(20px,2.2vw,36px)}
.footer{padding-left:clamp(20px,2.2vw,36px);padding-right:clamp(20px,2.2vw,36px)}
.stats-grid{grid-template-columns:repeat(4,minmax(0,1fr))}
.table-card,.form-card,.filter-card,.empty-page,.profile-card,.detail-card{min-width:0;max-width:100%}
.table-wrap{width:100%;max-width:100%;overflow:hidden}
.data-table{width:100%;min-width:0;table-layout:fixed}
.data-table th,.data-table td{padding:11px 10px;font-size:12px;overflow-wrap:anywhere;white-space:normal;word-break:normal;vertical-align:middle}
.data-table th{font-size:9.5px;letter-spacing:.45px}
.data-table .action-buttons,.data-table .row-actions{display:flex;flex-wrap:wrap;gap:5px}
.data-table .btn{white-space:nowrap}
.filter-grid{grid-template-columns:minmax(0,2fr) minmax(130px,1fr) minmax(130px,1fr) minmax(130px,1fr) auto}
.page-header{min-width:0}.page-actions{flex-wrap:wrap}
.form-card{overflow:hidden}
.form-grid{min-width:0}
.profile-grid{min-width:0}
@media(min-width:1500px){.content{padding-left:32px;padding-right:32px}.data-table th,.data-table td{padding-left:9px;padding-right:9px}}
@media(max-width:1200px) and (min-width:801px){.stats-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.filter-grid{grid-template-columns:2fr 1fr 1fr auto}.filter-grid .field:nth-child(4){display:none}.content{padding:22px}.data-table th,.data-table td{font-size:11px;padding:9px 8px}}
@media(max-width:800px) and (min-width:601px){.sidebar{width:210px;flex-basis:210px}.main{width:calc(100% - 210px);margin-left:210px}.stats-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.filter-grid{grid-template-columns:1fr 1fr}.filter-actions{grid-column:1/-1}.content{padding:18px}}
@media(max-width:600px){.sidebar{width:100%;flex:none}.main{width:100%;margin-left:0}.content{padding:16px}.stats-grid{grid-template-columns:1fr}.filter-grid{grid-template-columns:1fr}.filter-grid .field:nth-child(4){display:block}.filter-actions{grid-column:auto}.table-wrap{overflow-x:auto}.data-table{min-width:760px;table-layout:auto}.topbar{overflow:hidden}.topbar h1{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.profile-grid{grid-template-columns:1fr}.profile-grid .detail-card:nth-child(2),.profile-grid .detail-card:nth-child(3),.profile-grid .detail-card:nth-child(4){grid-column:auto}}

/* Results table desktop fit fix */
.table-card:has(.data-table thead th:nth-child(7):last-child) .table-wrap{width:100%;max-width:100%;overflow:hidden}
.table-card:has(.data-table thead th:nth-child(7):last-child) .data-table{width:100%!important;min-width:0!important;table-layout:fixed!important}
.table-card:has(.data-table thead th:nth-child(7):last-child) .data-table th,
.table-card:has(.data-table thead th:nth-child(7):last-child) .data-table td{min-width:0!important;max-width:none;white-space:normal;overflow-wrap:anywhere;word-break:normal}
.table-card:has(.data-table thead th:nth-child(7):last-child) .data-table th:nth-child(1),
.table-card:has(.data-table thead th:nth-child(7):last-child) .data-table td:nth-child(1){width:15%}
.table-card:has(.data-table thead th:nth-child(7):last-child) .data-table th:nth-child(2),
.table-card:has(.data-table thead th:nth-child(7):last-child) .data-table td:nth-child(2){width:15%}
.table-card:has(.data-table thead th:nth-child(7):last-child) .data-table th:nth-child(3),
.table-card:has(.data-table thead th:nth-child(7):last-child) .data-table td:nth-child(3){width:12%}
.table-card:has(.data-table thead th:nth-child(7):last-child) .data-table th:nth-child(4),
.table-card:has(.data-table thead th:nth-child(7):last-child) .data-table td:nth-child(4){width:22%}
.table-card:has(.data-table thead th:nth-child(7):last-child) .data-table th:nth-child(5),
.table-card:has(.data-table thead th:nth-child(7):last-child) .data-table td:nth-child(5){width:12%;text-align:center}
.table-card:has(.data-table thead th:nth-child(7):last-child) .data-table th:nth-child(6),
.table-card:has(.data-table thead th:nth-child(7):last-child) .data-table td:nth-child(6){width:12%}
.table-card:has(.data-table thead th:nth-child(7):last-child) .data-table th:nth-child(7),
.table-card:has(.data-table thead th:nth-child(7):last-child) .data-table td:nth-child(7){width:12%;text-align:center}
.table-card:has(.data-table thead th:nth-child(7):last-child) .data-table td:nth-child(4){line-height:1.35}
.table-card:has(.data-table thead th:nth-child(7):last-child) .data-table td:nth-child(5){white-space:nowrap;overflow-wrap:normal}
.table-card:has(.data-table thead th:nth-child(7):last-child) .data-table td:nth-child(7) .btn,
.table-card:has(.data-table thead th:nth-child(7):last-child) .data-table td:nth-child(7) a{white-space:nowrap}

@media(max-width:1200px) and (min-width:801px){
  .table-card:has(.data-table thead th:nth-child(7):last-child) .data-table th,
  .table-card:has(.data-table thead th:nth-child(7):last-child) .data-table td{font-size:11px;padding:10px 7px}
}
