/* Nkola Lwanda unified administration theme */
:root{--nl-green:#174b35;--nl-deep:#062b21;--nl-gold:#d8b64a;--nl-cream:#f7f5eb;--nl-ink:#26352b;--nl-muted:#69776f;--nl-border:#e2e9e3;--nl-bg:#f4f7f4;--nl-shadow:0 14px 36px rgba(12,51,37,.08)}
*{box-sizing:border-box}
body{font-family:Inter,Manrope,system-ui,-apple-system,"Segoe UI",sans-serif!important;color:var(--nl-ink)}
.admin-side,.side{background:linear-gradient(180deg,#062b21,#07372a)!important;color:#edf5ef!important}
.admin-side img,.side img{width:78px;height:78px;object-fit:contain;margin:0 0 8px}
.admin-side h3,.side h3{font-family:"Playfair Display",Georgia,serif;letter-spacing:.04em;color:#fff;margin:8px 0}
.admin-side small,.side small{color:#d3e2d8}
.admin-side a,.side a{display:flex!important;align-items:center;gap:9px;color:#e9f2ec!important;text-decoration:none!important;padding:12px 10px!important;margin:2px 0;border:0!important;border-bottom:1px solid #ffffff15!important;border-radius:7px;line-height:1.35;transition:background .15s,color .15s}
.admin-side a:hover,.side a:hover{background:#ffffff12;color:#f6d979!important}
.admin-side a.active,.side a.active,.side a[aria-current=page]{background:#d8b64a1c;color:#f6d979!important;font-weight:800;border-left:3px solid var(--nl-gold);padding-left:7px!important}
.admin-layout,.dash{min-height:100vh}
.admin-workspace,.workspace{min-width:0;background:var(--nl-bg)!important;padding:clamp(20px,3vw,42px)!important}
.admin-workspace h1,.workspace h1,.admin-wrap h1{font-family:"Playfair Display",Georgia,serif!important;color:var(--nl-deep)!important;line-height:1.2}
.admin-workspace h2,.workspace h2,.admin-wrap h2{font-family:"Playfair Display",Georgia,serif!important;color:var(--nl-deep)}
.admin-workspace .card,.workspace .card,.admin-wrap .card{background:#fff;border:1px solid var(--nl-border);border-radius:15px;box-shadow:var(--nl-shadow);padding:clamp(18px,2vw,28px)}
.admin-workspace form,.workspace form,.admin-wrap form{gap:12px}
.admin-workspace input:not([type=checkbox]):not([type=radio]):not([type=hidden]),.admin-workspace select,.admin-workspace textarea,.workspace input:not([type=checkbox]):not([type=radio]):not([type=hidden]),.workspace select,.workspace textarea,.admin-wrap input:not([type=checkbox]):not([type=radio]):not([type=hidden]),.admin-wrap select,.admin-wrap textarea{max-width:100%;border:1px solid #d4ded6;border-radius:8px;padding:11px 13px;font:inherit;background:#fff;color:var(--nl-ink)}
.admin-workspace input:focus,.admin-workspace select:focus,.admin-workspace textarea:focus,.workspace input:focus,.workspace select:focus,.workspace textarea:focus,.admin-wrap input:focus,.admin-wrap select:focus,.admin-wrap textarea:focus{outline:2px solid #174b3540;border-color:var(--nl-green)}
.admin-workspace button,.workspace button,.admin-wrap button,.admin-workspace .btn,.workspace .btn,.admin-wrap .btn{border-radius:8px;font-weight:750;cursor:pointer}
.admin-workspace .btn,.workspace .btn,.admin-wrap .btn{background:var(--nl-green);color:#fff;border:1px solid var(--nl-green);padding:11px 15px;text-decoration:none;display:inline-flex;align-items:center;justify-content:center}
.admin-workspace table,.workspace table,.admin-wrap table{width:100%;border-collapse:collapse;background:#fff}
.admin-workspace th,.workspace th,.admin-wrap th{background:var(--nl-cream);color:#43554a;font-size:12px;letter-spacing:.05em;text-transform:uppercase;text-align:left}
.admin-workspace th,.admin-workspace td,.workspace th,.workspace td,.admin-wrap th,.admin-wrap td{padding:12px 14px;border-bottom:1px solid #e9eee9;vertical-align:middle}
.admin-workspace .notice,.workspace .notice,.admin-wrap .notice{padding:13px 16px;border-radius:9px;background:#e8f3eb;border:1px solid #cfe3d3;color:#1d6841}
.admin-workspace .notice.error,.admin-workspace .notice.err,.workspace .notice.error,.workspace .notice.err,.admin-wrap .notice.err{background:#fff0ef;border-color:#f1ceca;color:#8a2424}
.admin-global-nav{display:flex;flex-wrap:wrap;gap:7px;margin:0 0 22px;padding:10px;background:#fff;border:1px solid var(--nl-border);border-radius:12px;box-shadow:0 6px 20px #00000008}
.admin-global-nav a{display:inline-flex;align-items:center;gap:6px;padding:9px 11px;border-radius:7px;color:var(--nl-green);text-decoration:none;font-size:13px;font-weight:750}
.admin-global-nav a:hover,.admin-global-nav a.active{background:#e8f1e9;color:var(--nl-deep)}
.admin-wrap{max-width:1440px;margin:0 auto;padding:28px clamp(14px,4vw,52px) 48px}
.admin-wrap .admin-grid{display:grid;grid-template-columns:minmax(260px,.75fr) minmax(0,2fr);gap:22px;align-items:start}
.admin-wrap .table-wrap{overflow-x:auto}
.admin-wrap table{min-width:740px}
.admin-wrap .status{display:inline-flex;border-radius:99px;padding:5px 10px;background:#e8f3eb;color:#1d6841;font-size:12px;font-weight:800}
.admin-wrap .status.off{background:#fff1d9;color:#8b5b12}
@media(max-width:900px){.admin-layout,.dash{grid-template-columns:1fr!important}.admin-side,.side{position:relative;padding:18px!important}.admin-side img,.side img{width:55px;height:55px}.admin-side a,.side a{display:inline-flex!important;width:auto;margin:3px;padding:9px 10px!important}.admin-workspace,.workspace{padding:18px!important}.admin-wrap .admin-grid{grid-template-columns:1fr}}
@media(max-width:600px){.admin-global-nav{gap:4px}.admin-global-nav a{font-size:12px;padding:8px}.admin-workspace th,.admin-workspace td,.workspace th,.workspace td{padding:9px;font-size:13px}}

/* Cross-page normalization and legacy page support */
html{min-height:100%;background:var(--nl-bg)}
body{margin:0;background:var(--nl-bg);font-size:15px;line-height:1.55}
.admin-layout{display:grid;grid-template-columns:252px minmax(0,1fr);align-items:stretch}
.admin-side{position:relative;min-height:100vh;padding:25px 24px!important}
.admin-side img{display:block;width:84px!important;height:84px!important;max-width:100%;object-fit:contain!important;object-position:left center;margin:0 0 10px!important}
.admin-side hr{border:0;border-top:1px solid #ffffff30;margin:12px 0}
.admin-workspace{min-height:100vh;padding:clamp(22px,3vw,42px)!important}
.admin-workspace>h1{margin:0 0 10px;font-size:clamp(30px,3vw,42px)}
.admin-workspace>p{color:var(--nl-muted);margin:0 0 22px}
.admin-workspace .radio-admin,.admin-workspace .tv-admin{max-width:1240px;margin:0 auto}
.admin-workspace .grid{align-items:start}
.admin-workspace .grid>.card{min-width:0}
.admin-workspace .card h2,.admin-workspace .card h3{margin-top:0}
.admin-workspace label{display:block;margin:10px 0 5px;font-weight:700;color:#43554a}
.admin-workspace form:not(.inline):not(.action-form){display:grid;gap:10px}
.admin-workspace form.inline,.admin-workspace form.action-form{display:inline-grid!important;gap:4px!important}
.admin-workspace input[type=file]{max-width:100%;padding:9px}
.admin-workspace input[type=checkbox],.admin-workspace input[type=radio]{width:auto}
.admin-workspace .table-wrap,.admin-workspace .overflow-table{max-width:100%;overflow-x:auto}
.admin-workspace table{min-width:620px;border-radius:10px;overflow:hidden}
.admin-workspace a{overflow-wrap:anywhere}
.admin-global-nav{position:relative;z-index:2}
.section:has(.admin-global-nav){max-width:none!important}
.section .admin-global-nav+a{display:inline-block;margin:0 0 18px;color:var(--nl-green)}
.badge{display:inline-flex;align-items:center;border-radius:99px;background:#e8f3eb;color:#1d6841;padding:4px 9px;font-size:12px;font-weight:800}
@media(max-width:900px){
 .admin-layout{grid-template-columns:1fr}
 .admin-side{min-height:0;padding:18px!important}
 .admin-side img{width:62px!important;height:62px!important}
 .admin-side a{display:inline-flex!important;width:auto;padding:9px 10px!important}
 .admin-workspace{padding:20px!important}
 .admin-workspace .grid{grid-template-columns:1fr!important}
}
@media(max-width:600px){
 .admin-workspace{padding:14px!important}
 .admin-workspace table{min-width:560px}
}


/* Residents module uses a top navigation rather than the shared sidebar */
.admin-global-nav{
 display:flex;flex-wrap:wrap;align-items:center;gap:6px;
 margin:0 0 24px;padding:12px;
 background:linear-gradient(135deg,#062b21,#0b4934);
 border:1px solid #174b35;border-radius:14px;
 box-shadow:0 12px 28px rgba(12,51,37,.12);
}
.admin-global-nav a{
 display:inline-flex;align-items:center;gap:8px;
 color:#edf5ef!important;text-decoration:none!important;
 padding:10px 12px;border-radius:8px;font-weight:650;
 border:1px solid transparent;line-height:1.35;
}
.admin-global-nav a:hover{background:#ffffff12;color:#f6d979!important}
.admin-global-nav a.active,.admin-global-nav a[aria-current=page]{
 background:#d8b64a1c;color:#f6d979!important;
 border-color:#d8b64a66;font-weight:800;
}
@media(max-width:700px){
 .admin-global-nav{padding:8px;gap:4px}
 .admin-global-nav a{padding:8px;font-size:13px}
}


.admin-residents-brand{display:flex;align-items:center;gap:14px;margin:0 0 18px;color:var(--nl-deep)}
.admin-residents-brand img{width:62px;height:62px;object-fit:contain}
.admin-residents-brand strong{display:block;font-family:"Playfair Display",Georgia,serif;letter-spacing:.04em;font-size:1.1rem}
.admin-residents-brand span{display:block;color:var(--nl-muted);font-size:.9rem;margin-top:3px}
