@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700;800&family=Manrope:wght@500;600;700;800&display=swap');
:root{--ink:#172b45;--navy:#123b5d;--blue:#1677b8;--cyan:#20a6b7;--muted:#75869a;--line:#e8eef4;--canvas:#f3f7fb;--surface:#fff;--shadow:0 10px 32px rgba(24,58,91,.07);--radius:19px}
*{box-sizing:border-box}html{scroll-behavior:smooth}body{font-family:'DM Sans',system-ui,sans-serif;background:var(--canvas);color:var(--ink);min-height:100vh;font-size:14px}.topbar{height:72px;background:linear-gradient(112deg,#102f4d 0%,#14547a 58%,#167c91 100%);box-shadow:0 8px 28px rgba(15,53,83,.16);z-index:1030}.navbar-brand{color:#fff!important}.brand-symbol{width:40px;height:40px;display:grid;place-items:center;border-radius:13px;background:linear-gradient(145deg,rgba(255,255,255,.25),rgba(255,255,255,.09));border:1px solid rgba(255,255,255,.2);color:#fff;font-size:19px;box-shadow:inset 0 1px 0 rgba(255,255,255,.18)}.brand-copy{display:flex;flex-direction:column;line-height:1.05}.brand-copy strong{font:800 17px 'Manrope',sans-serif;letter-spacing:-.5px}.brand-copy small{font-size:9px;letter-spacing:2.4px;font-weight:700;opacity:.72;margin-top:5px}.topbar-caption{color:#d6e9f5;font-size:12px}.mobile-menu-btn{border:1px solid rgba(255,255,255,.24);color:#fff;width:39px;height:39px;font-size:22px;padding:0;border-radius:12px}.mobile-menu-btn:hover{background:rgba(255,255,255,.12);color:#fff}.top-user{color:#fff}.avatar-circle{width:37px;height:37px;border-radius:50%;display:grid;place-items:center;background:linear-gradient(145deg,#8ed8d5,#d7f4eb);color:#14536b;font-weight:800;font-size:15px}.user-meta{display:flex;flex-direction:column;line-height:1.2}.user-meta strong{font-size:12px}.user-meta small{font-size:10px;color:#c8dce8;margin-top:4px}.btn-logout{border:1px solid rgba(255,255,255,.28);color:#fff;background:rgba(255,255,255,.08);font-size:12px;padding:8px 13px}.btn-logout:hover{background:#fff;color:var(--navy)}.app-shell{max-width:1920px}.sidebar{background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);border-right:1px solid var(--line);min-height:calc(100vh - 72px);padding:0;position:relative}.sidebar-inner{padding:26px 15px 105px}.sidebar-section-label{font-size:9px;font-weight:800;letter-spacing:1.35px;color:#9aa9b9;padding:0 12px 9px}.navitem{display:flex;align-items:center;gap:12px;padding:11px 12px;margin:3px 0;border-radius:12px;color:#62748a;text-decoration:none;font-size:12px;font-weight:700;transition:background .2s ease,color .2s ease,transform .2s ease;position:relative}.navitem:hover{background:#f0f7fb;color:#146b9d;transform:translateX(2px)}.navitem.active{background:linear-gradient(100deg,#e7f4fb,#eff9fa);color:#116b9d;box-shadow:inset 3px 0 #1694b1}.nav-icon{width:21px;height:21px;display:grid;place-items:center;font-size:15px;flex:none}.nav-count{margin-left:auto;background:#e34f63;color:#fff;border-radius:30px;min-width:20px;text-align:center;padding:2px 6px;font-size:10px}.sidebar-bottom{position:absolute;bottom:0;left:0;right:0;padding:15px 18px 19px;border-top:1px solid var(--line);background:#fbfdff;color:#6d8195;font-size:10px;display:flex;align-items:center;gap:7px;flex-wrap:wrap}.sidebar-bottom small{width:100%;padding-left:15px;color:#a0adba;font-size:9px}.status-dot{width:7px;height:7px;border-radius:50%;background:#20b486;box-shadow:0 0 0 4px #e2f7ef;display:inline-block}.main-content{min-height:calc(100vh - 72px);display:flex;flex-direction:column;padding:0 0 0 0}.content-wrap{width:100%;max-width:1600px;margin:0 auto;padding:30px clamp(16px,2.5vw,42px) 42px;flex:1;animation:contentIn .48s cubic-bezier(.2,.7,.2,1) both}.footer{padding:15px clamp(16px,2.5vw,42px);display:flex;justify-content:space-between;gap:10px;flex-wrap:wrap;border-top:1px solid var(--line);color:#9aa9b9;font-size:10px;background:rgba(255,255,255,.55)}.page-heading{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:4px 0 25px}.eyebrow{font-size:9px;letter-spacing:1.8px;color:#1685a6;font-weight:800;margin-bottom:8px}.page-heading h1{font:800 clamp(23px,2vw,30px) 'Manrope',sans-serif;letter-spacing:-1px;color:#183652}.page-heading p{font-size:12px;color:#8292a4}.role-chip{background:#e8f6f1;color:#16815e;border:1px solid #d6efe5;border-radius:30px;padding:8px 14px;font-size:10px;font-weight:800;white-space:nowrap}.stat-card{height:100%;position:relative;overflow:hidden;background:var(--surface);border:1px solid #e9eff5;border-radius:var(--radius);padding:21px 22px;box-shadow:var(--shadow);transition:transform .24s ease,box-shadow .24s ease}.stat-card:after{content:'';position:absolute;right:-28px;top:-34px;width:105px;height:105px;border-radius:50%;background:linear-gradient(135deg,rgba(31,159,185,.1),rgba(31,159,185,0));pointer-events:none}.stat-card:hover{transform:translateY(-4px);box-shadow:0 16px 38px rgba(24,58,91,.12)}.stat-label{color:#7c8da0;font-size:11px;font-weight:700}.stat-value{font:800 31px 'Manrope',sans-serif;letter-spacing:-1px;margin:11px 0 5px;color:#153d5d}.stat-note{font-size:10px;color:#a0adba}.content-card,.card{border-radius:var(--radius)!important;border-color:#e9eff5!important;box-shadow:var(--shadow)!important;overflow:hidden}.card-header{background:#fff!important;border-bottom:1px solid var(--line)!important;padding:16px 20px!important;font-weight:800}.card-body{padding:21px}.login-wrap{min-height:72vh;display:grid;place-items:center}.login-card{width:min(100%,460px);border-radius:24px!important}.brand-mark{height:52px;width:52px;border-radius:16px;display:grid;place-items:center;background:linear-gradient(145deg,#e3f5fb,#e9f8f4);color:var(--blue);font-weight:800}.form-label{font-size:11px;font-weight:700;color:#53677d;margin-bottom:7px}.form-control,.form-select{border:1px solid #dfe8ef;border-radius:11px;padding:.7rem .85rem;font-size:13px;min-height:42px;box-shadow:none!important}.form-control:focus,.form-select:focus{border-color:#70b8d0;box-shadow:0 0 0 3px rgba(32,166,183,.12)!important}.btn{border-radius:11px;font-weight:700;font-size:12px;padding:9px 14px;transition:transform .2s ease,box-shadow .2s ease}.btn:hover{transform:translateY(-1px)}.btn-primary{background:linear-gradient(110deg,#176eaa,#168da5);border:0;box-shadow:0 5px 13px rgba(22,119,171,.17)}.btn-primary:hover{background:linear-gradient(110deg,#125d92,#11798e)}.btn-outline-primary{border-color:#b8d8e8;color:#176e9d}.table{font-size:12px;vertical-align:middle}.table thead th{background:#f5f9fc;color:#718398;font-size:9px;letter-spacing:.7px;text-transform:uppercase;padding:13px 15px;border-bottom:1px solid #e7eef4;white-space:nowrap}.table tbody td{padding:13px 15px;border-color:#eef2f6;color:#4d6075}.table tbody tr{transition:background .18s}.table tbody tr:hover{background:#f8fbfd}.status-pill{font-size:9px;font-weight:800;padding:5px 9px;border-radius:30px}.status-pill.active{background:#e6f6ee;color:#168253}.status-pill.inactive{background:#fcebea;color:#b54740}.alert{border:0;border-radius:13px;font-size:12px}.app-alert{box-shadow:var(--shadow);margin-bottom:18px}.badge{font-weight:700}.pagination .page-link{border-radius:8px!important;margin:0 2px;color:#176e9d;font-size:11px}.empty-state{text-align:center;padding:38px 18px;color:#8798a9}.empty-state i{font-size:32px;color:#a8c9d8;display:block;margin-bottom:10px}
@keyframes contentIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@media(min-width:992px){.sidebar{position:sticky;top:72px;height:calc(100vh - 72px);overflow-y:auto}.sidebar::-webkit-scrollbar{width:4px}.sidebar::-webkit-scrollbar-thumb{background:#e3ebf1;border-radius:10px}}
@media(max-width:991.98px){.topbar{height:62px}.sidebar{width:min(86vw,310px);border:0;border-radius:0 20px 20px 0;box-shadow:12px 0 35px rgba(14,43,69,.16)}.sidebar .offcanvas-header{padding:18px 18px 12px;border-bottom:1px solid var(--line)}.sidebar-brand{display:flex;align-items:center;gap:10px;color:var(--navy)}.sidebar-brand .brand-symbol{background:linear-gradient(135deg,#176eaa,#20a6b7)}.sidebar-brand span:last-child{display:flex;flex-direction:column}.sidebar-brand strong{font:800 15px 'Manrope'}.sidebar-brand small{font-size:10px;color:#91a0af}.sidebar-inner{padding-top:20px}.sidebar-bottom{position:static;margin-top:0}.main-content{min-height:calc(100vh - 62px)}.content-wrap{padding:23px 16px 30px}.footer{padding:13px 16px}.page-heading{align-items:flex-start}.stat-card{padding:18px}.stat-value{font-size:27px}}
@media(max-width:575.98px){.page-heading{flex-direction:column;gap:10px;margin-bottom:19px}.page-heading h1{font-size:24px}.role-chip{padding:7px 11px}.content-wrap{padding-top:19px}.stat-card{border-radius:16px;padding:16px}.stat-value{font-size:25px}.card-body{padding:16px}.table-responsive{border-radius:12px}.footer span:last-child{display:none}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{scroll-behavior:auto!important;animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}

/* FASE UI FIX v1.1: Bootstrap Icons and sidebar labels */
.navitem{min-width:0;white-space:normal}
.navitem .nav-label{min-width:0;line-height:1.35;overflow-wrap:break-word}
.navitem .nav-icon{width:22px;height:22px;flex:0 0 22px;font-size:16px;line-height:1}
.navitem .nav-icon i{display:block;font-style:normal;line-height:1}
.sidebar-section-label{white-space:normal;line-height:1.4}


/* FASE UI MOBILE COMPACT v1.2 */
@media(max-width:991.98px){
  .app-shell,.app-shell>.row{width:100%;max-width:100%;margin-left:0;margin-right:0}
  .app-shell>.row{display:flex;flex-wrap:wrap;align-items:flex-start}
  .main-content,.app-shell main.col-lg-10{display:flex;flex:0 0 100%;width:100%;max-width:100%;min-width:0;margin:0;padding:0;min-height:calc(100dvh - 62px)}
  .content-wrap{width:100%;max-width:100%;min-width:0;margin:0;padding:14px 12px 22px;flex:1 0 auto}
  .page-heading{margin:0 0 13px;gap:7px}
  .page-heading h1{font-size:clamp(20px,5vw,24px);line-height:1.2;margin-bottom:4px}
  .page-heading p{font-size:11px;margin-bottom:0;line-height:1.4}
  .sidebar{min-height:0}
  .sidebar-inner{padding:16px 14px 12px}
  .sidebar-section-label{padding-bottom:6px}
  .navitem{padding:10px 11px;margin:2px 0}
  .sidebar-bottom{padding:12px 16px}
  .content-wrap .card,.content-wrap .content-card{margin-bottom:12px}
  .content-wrap .card-header{padding:12px 14px!important}
  .content-wrap .card-body{padding:13px}
  .content-wrap .table-responsive{width:100%;max-width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}
  .content-wrap .row{--bs-gutter-y: .65rem}
  .footer{padding:10px 12px;font-size:9px}
}
@media(max-width:575.98px){
  .topbar .container-fluid{padding-left:10px!important;padding-right:10px!important}
  .topbar{height:58px}
  .main-content,.app-shell main.col-lg-10{min-height:calc(100dvh - 58px)}
  .content-wrap{padding:12px 10px 18px}
  .page-heading{margin-bottom:11px}
  .page-heading h1{font-size:21px}
  .page-heading p{font-size:10px}
  .role-chip{font-size:9px;padding:6px 9px}
  .stat-card{padding:13px;border-radius:14px}
  .stat-label{font-size:10px}
  .stat-value{font-size:23px;margin:7px 0 3px}
  .card-body{padding:12px}
  .form-control,.form-select{min-height:40px;padding:.6rem .72rem}
  .btn{padding:8px 12px}
  .table{font-size:11px}
  .table thead th,.table tbody td{padding:10px 11px}
}

/* FASE UI MOBILE POSITION FIX v1.3
   Prevent mobile content from being vertically stretched or pushed below the header. */
@media(max-width:991.98px){
  html,body{min-height:0;height:auto}
  .app-shell{height:auto;min-height:0}
  .app-shell>.row{min-height:0;height:auto;align-content:flex-start}
  .main-content,.app-shell main.col-lg-10{
    min-height:0!important;
    height:auto!important;
    justify-content:flex-start!important;
    align-items:stretch!important;
  }
  .content-wrap{
    flex:0 0 auto!important;
    align-self:stretch!important;
    margin-top:0!important;
    padding-top:12px!important;
    transform:none;
  }
  .page-heading{margin-top:0!important}
  .footer{margin-top:8px}
}
@media(max-width:575.98px){
  .content-wrap{padding:10px 10px 16px!important}
  .page-heading{margin-top:0!important;margin-bottom:10px!important}
}

/* v1.4: force normal document flow on mobile; cache-busted from layout.php */
@media (max-width: 991.98px) {
  body > .app-shell { display:block !important; }
  .app-shell > .row { display:block !important; }
  .app-shell > .row > main.main-content {
    display:block !important; position:relative !important;
    top:auto !important; margin-top:0 !important; transform:none !important;
    height:auto !important; min-height:0 !important;
  }
  .app-shell > .row > main.main-content > .content-wrap {
    display:block !important; flex:none !important; margin-top:0 !important;
    padding-top:12px !important; transform:none !important;
  }
}

/* v1.5 - Mobile first-viewport and normal-flow correction */
@media (max-width: 991.98px) {
  html, body { height:auto !important; min-height:0 !important; }
  body { overflow-x:hidden; }
  nav.topbar { position:relative !important; top:auto !important; }
  .app-shell { display:block !important; height:auto !important; min-height:0 !important; }
  .app-shell > .row { display:block !important; height:auto !important; min-height:0 !important; }
  .app-shell > .row > aside.sidebar { position:fixed !important; }
  .app-shell > .row > main.main-content,
  .app-shell > .row > main.public-content {
    display:block !important; position:relative !important;
    float:none !important; clear:both !important;
    width:100% !important; max-width:100% !important;
    height:auto !important; min-height:0 !important;
    margin:0 !important; padding:0 !important;
    inset:auto !important; transform:none !important;
  }
  .app-shell > .row > main.main-content > .content-wrap,
  .app-shell > .row > main.public-content > .content-wrap {
    display:block !important; position:relative !important;
    width:100% !important; max-width:100% !important;
    height:auto !important; min-height:0 !important;
    margin:0 !important; padding:12px 10px 18px !important;
    flex:none !important; transform:none !important;
  }
  .app-shell > .row > main > .page-heading { margin-top:0 !important; }
  .app-shell > .row > main > .footer { margin-top:8px !important; }
}
