
:root{--primary:#2563eb;--primary-dark:#1d4ed8;--ink:#172033;--muted:#718096;--line:#e7ecf3;--surface:#fff;--page:#f5f7fb;--soft:#eff5ff}
*{box-sizing:border-box}
body{margin:0;background:var(--page);color:var(--ink);font:14px/1.6 Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",Arial,sans-serif}
a{color:var(--primary);text-decoration:none}
a:hover{color:var(--primary-dark)}
.app-shell{min-height:100vh}
.sidebar{position:fixed;inset:0 auto 0 0;width:252px;background:#fff;border-right:1px solid var(--line);display:flex;flex-direction:column;padding:24px 16px;z-index:10}
.brand{display:flex;align-items:center;gap:11px;color:#15213a;font-size:20px;font-weight:800;letter-spacing:-.5px;padding:2px 8px 28px}
.brand:hover{color:#15213a}
.brand small{display:block;color:#93a0b3;font-size:9px;letter-spacing:1.4px;font-weight:800;margin-top:1px}
.brand-mark{display:grid;place-items:center;width:37px;height:37px;border-radius:11px;background:linear-gradient(145deg,#3b82f6,#1d4ed8);color:#fff;font-size:20px;box-shadow:0 5px 12px #2563eb30}
.side-label{font-size:10px;letter-spacing:1.2px;font-weight:800;color:#9aa5b5;padding:0 12px 10px}
.side-nav{display:flex;flex-direction:column;gap:5px}
.side-nav a{display:flex;align-items:center;gap:12px;padding:10px 12px;border-radius:9px;color:#596579;font-weight:600;transition:.15s}
.side-nav a:hover{background:#f4f7fc;color:var(--primary)}
.side-nav a.active{background:var(--soft);color:var(--primary);font-weight:750}
.nav-icon{display:grid;place-items:center;width:25px;height:25px;border-radius:7px;background:#f0f3f8;color:#66758c;font-size:11px;font-weight:800}
.side-nav a.active .nav-icon{background:#dce9ff;color:var(--primary)}
.sidebar-bottom{margin-top:auto;border-top:1px solid var(--line);padding-top:17px}
.user-chip{display:flex;align-items:center;gap:10px;padding:5px 7px 13px}
.avatar{width:34px;height:34px;display:grid;place-items:center;border-radius:50%;background:#e8f0ff;color:var(--primary);font-weight:800}
.user-chip b,.user-chip small{display:block}.user-chip b{font-size:12px}.user-chip small{font-size:11px;color:var(--muted);text-transform:capitalize}
.logout-link{display:block;padding:8px 7px;color:#778398;font-size:12px}
.main-area{margin-left:252px;min-height:100vh;display:flex;flex-direction:column}
.topbar{height:76px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 34px;position:sticky;top:0;z-index:5}
.topbar .eyebrow{display:block;color:#9aa5b5;font-size:9px;letter-spacing:1.3px;font-weight:800}
.topbar strong{font-size:14px}.topbar-user{font-size:12px;color:#64748b;font-weight:650}
.page-content{width:100%;max-width:1320px;margin:0 auto;padding:30px 34px 48px;flex:1;min-width:0}
.page-title{font-size:25px;letter-spacing:-.6px;margin:0 0 22px;font-weight:800;color:#172033}
.card{background:var(--surface);border:1px solid var(--line);border-radius:13px;padding:22px;margin:0 0 18px;box-shadow:0 2px 7px #1e293b05;min-width:0}
.card h3{font-size:16px;margin:0 0 16px;color:#1d293d;letter-spacing:-.2px}
.card h4{font-size:14px;margin:20px 0 10px}
.grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:15px}
.stat{font-size:29px;line-height:1.25;font-weight:800;letter-spacing:-.8px;margin-top:5px;color:#18243a}
.muted,small{color:var(--muted)}.muted{font-size:12px}
label{display:block;font-weight:650;color:#344258;margin:13px 0 6px}
input,select,textarea{width:100%;max-width:100%;padding:11px 12px;border:1px solid #d8e0eb;border-radius:8px;font:inherit;color:#253149;background:#fff;outline:none}
input:focus,select:focus,textarea:focus{border-color:#75a5fa;box-shadow:0 0 0 3px #3b82f61c}
textarea{min-height:100px;resize:vertical}
button,.btn{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:8px;background:var(--primary);color:#fff;padding:10px 15px;font:inherit;font-weight:650;cursor:pointer;transition:.15s}
button:hover,.btn:hover{background:var(--primary-dark);color:#fff}
.btn.secondary{background:#eef2f7;color:#46546a}.btn.secondary:hover{background:#e1e8f1}
form p{margin:17px 0 0}
table{width:100%;border-collapse:collapse;background:#fff;font-size:13px}
th,td{text-align:left;padding:12px 13px;border-bottom:1px solid #edf0f5;vertical-align:top}
th{background:#f8faff;color:#68758a;font-size:10px;letter-spacing:.65px;text-transform:uppercase;font-weight:800;white-space:nowrap}
td{color:#39465b}tr:last-child td{border-bottom:0}
.card table{min-width:600px}
.table-wrap{width:100%;overflow-x:auto;border:1px solid #edf0f5;border-radius:9px}
.table-wrap table{min-width:620px}
.alert{padding:12px 14px;border-radius:9px;background:#eaf2ff;color:#2456a6;margin:0 0 16px;border:1px solid #d8e7ff}
.alert.error{background:#fff0f0;color:#a12c2c;border-color:#ffdada}
.alert.success{background:#edfbf2;color:#197044;border-color:#d4f3df}
.badge{display:inline-block;padding:4px 9px;border-radius:30px;background:#eef2f7;color:#58677e;font-size:10px;font-weight:750}
.code{background:#172033;color:#e5eaf2;padding:14px;border-radius:9px;overflow:auto;font-size:12px}
footer{padding:20px 34px;color:#9aa5b5;font-size:11px;border-top:1px solid var(--line);background:#fff}
footer span{padding:0 5px}
.public-header{display:flex;justify-content:space-between;align-items:center;padding:20px 34px;background:#fff;border-bottom:1px solid var(--line)}
.public-header nav{display:flex;align-items:center;gap:16px}.public-page{max-width:850px}
@media(max-width:900px){.sidebar{width:210px}.main-area{margin-left:210px}.page-content{padding:25px 22px}.topbar{padding:0 22px}}
@media(max-width:680px){.sidebar{position:static;width:auto;height:auto;padding:12px 14px;border-right:0;border-bottom:1px solid var(--line)}.brand{padding:0 3px 10px}.side-label,.sidebar-bottom{display:none}.side-nav{flex-direction:row;overflow-x:auto;padding-bottom:2px}.side-nav a{white-space:nowrap;padding:8px 10px;font-size:12px}.nav-icon{display:none}.main-area{margin-left:0}.topbar{height:60px;padding:0 16px;position:static}.topbar-user{display:none}.page-content{padding:20px 14px 32px}.page-title{font-size:22px;margin-bottom:17px}.card{padding:16px;border-radius:11px;margin-bottom:14px}.grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}.stat{font-size:24px}footer{padding:17px;text-align:center}.card table{min-width:580px}.public-header{padding:15px}.public-page{padding:20px 14px}}
@media(max-width:380px){.side-nav a{font-size:11px;padding:7px 8px}.grid{grid-template-columns:1fr 1fr}.stat{font-size:21px}}


/* v2.4.3: high-readability typography across Admin and Member areas */
:root{
  --ink:#101828;
  --muted:#475467;
  --line:#d5dce7;
}
html{font-size:16px}
body{
  color:#101828 !important;
  font-size:16px !important;
  line-height:1.75 !important;
  font-weight:400;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
p,li,td,dd,dt{color:#263449}
.muted,small,.muted small{
  color:#475467 !important;
  font-size:14px !important;
  line-height:1.65;
}
.page-title{
  color:#101828 !important;
  font-size:29px !important;
  line-height:1.3;
  font-weight:800 !important;
}
.card h2,.card h3,.card h4,
h2,h3,h4{
  color:#101828 !important;
  font-weight:750 !important;
}
.card h3{font-size:19px !important}
.card h4{font-size:16px !important}
label{
  color:#263449 !important;
  font-size:15px !important;
  font-weight:700 !important;
}
input,select,textarea{
  color:#101828 !important;
  font-size:15px !important;
}
button,.btn{
  font-size:15px !important;
  font-weight:700 !important;
}
table{font-size:15px !important}
th{
  color:#344054 !important;
  font-size:12px !important;
  font-weight:800 !important;
}
td{
  color:#263449 !important;
  font-size:14px !important;
}
.stat{
  color:#101828 !important;
  font-size:32px !important;
  font-weight:850 !important;
}
.side-label{
  color:#667085 !important;
  font-size:11px !important;
}
.side-nav a{
  color:#344054 !important;
  font-size:15px !important;
  font-weight:650 !important;
}
.side-nav a.active{color:#1749b8 !important}
.brand{color:#101828 !important}
.brand small{color:#667085 !important}
.topbar .eyebrow{
  color:#667085 !important;
  font-size:11px !important;
}
.topbar strong{
  color:#101828 !important;
  font-size:16px !important;
}
.topbar-user{
  color:#344054 !important;
  font-size:14px !important;
}
.user-chip b{color:#101828 !important;font-size:14px !important}
.user-chip small,.logout-link{
  color:#475467 !important;
  font-size:13px !important;
}
.badge{
  color:#344054 !important;
  font-size:12px !important;
}
.alert{font-size:14px !important}
footer{color:#667085 !important;font-size:13px !important}
@media(max-width:680px){
  body{font-size:15px !important}
  .page-title{font-size:25px !important}
  .card h3{font-size:17px !important}
  .side-nav a{font-size:13px !important}
  td{font-size:14px !important}
}


/* v2.4.4: mobile layout repair for Admin and Member */
html,body{max-width:100%;overflow-x:hidden}
.app-shell,.main-area,.page-content{width:100%;min-width:0;max-width:100%}
.card,.grid,.table-wrap,form{min-width:0;max-width:100%}
img,iframe,video{max-width:100%;height:auto}
input,select,textarea,button,.btn{max-width:100%}
.table-wrap{
  display:block;
  width:100%;
  max-width:100%;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
}
.table-wrap table{width:100%;min-width:620px}
@media(max-width:680px){
  html,body{width:100%;overflow-x:hidden}
  .app-shell{display:flex;flex-direction:column;width:100%}
  .sidebar{
    position:relative;
    inset:auto;
    display:block;
    width:100%;
    max-width:100%;
    height:auto;
    padding:12px 14px;
    overflow:visible;
  }
  .brand{padding:0 3px 10px}
  .side-label,.sidebar-bottom{display:none}
  .side-nav{
    display:flex;
    flex-direction:row;
    flex-wrap:nowrap;
    gap:6px;
    width:100%;
    max-width:100%;
    overflow-x:auto;
    overflow-y:hidden;
    padding:3px 0 8px;
    -webkit-overflow-scrolling:touch;
  }
  .side-nav a{
    flex:0 0 auto;
    width:auto;
    white-space:nowrap;
    padding:8px 10px;
    font-size:13px!important;
  }
  .main-area{
    display:flex;
    flex-direction:column;
    width:100%;
    min-width:0;
    margin:0;
  }
  .topbar{
    position:relative;
    width:100%;
    height:auto;
    min-height:58px;
    padding:12px 15px;
    gap:10px;
  }
  .page-content{
    width:100%;
    max-width:100%;
    min-width:0;
    margin:0;
    padding:18px 12px 30px;
    overflow-x:hidden;
  }
  .page-title{font-size:23px!important;overflow-wrap:anywhere}
  .grid{
    display:grid;
    grid-template-columns:minmax(0,1fr)!important;
    gap:12px;
    width:100%;
  }
  .card{
    width:100%;
    min-width:0;
    max-width:100%;
    padding:15px 13px;
    margin:0 0 13px;
    overflow:hidden;
  }
  .card table{
    display:block;
    width:100%;
    max-width:100%;
    min-width:0!important;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
  }
  .table-wrap table{display:table;min-width:620px!important}
  th,td{white-space:normal;overflow-wrap:anywhere}
  .table-wrap th,.table-wrap td{white-space:nowrap}
  form{width:100%;max-width:100%}
  form p{max-width:100%}
  footer{width:100%;padding:16px 12px}
}


/* v2.4.5: admin tables and wide controls on narrow screens */
@media(max-width:680px){
  /* Keep admin tables readable; scroll inside each table instead of
     squeezing headings into one or two letters per line. */
  .card table,
  .card .table-wrap table{
    display:block;
    width:100%;
    min-width:0!important;
    max-width:100%;
    overflow-x:auto;
    overflow-y:hidden;
    white-space:nowrap;
    table-layout:auto;
    -webkit-overflow-scrolling:touch;
  }
  .card table thead,
  .card table tbody{
    width:max-content;
    min-width:100%;
  }
  .card table th,
  .card table td{
    white-space:nowrap!important;
    word-break:normal!important;
    overflow-wrap:normal!important;
    min-width:75px;
    padding:12px 13px;
  }
  .card table th:last-child,
  .card table td:last-child{padding-right:18px}
  .card .table-wrap{
    width:100%;
    max-width:100%;
    overflow-x:auto;
    overflow-y:hidden;
  }
  /* Admin approval forms and action buttons should wrap cleanly. */
  .card form{
    width:100%;
    min-width:0;
  }
  .card form p{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:8px;
  }
  .card form button,
  .card form .btn{
    max-width:100%;
    white-space:normal;
  }
  .card input,
  .card select,
  .card textarea{
    width:100%;
    min-width:0;
  }
}


/* v2.4.6: desktop width correction.
   Desktop uses the fixed sidebar + content offset model.
   Do not combine flex-basis sizing with the sidebar offset. */
@media(min-width:681px){
  .app-shell{
    display:block!important;
    width:100%;
    min-height:100vh;
    max-width:100%;
  }
  .sidebar{
    position:fixed!important;
    left:0;top:0;bottom:0;
    width:252px!important;
    flex:none!important;
  }
  .main-area{
    display:flex;
    flex-direction:column;
    width:auto!important;
    max-width:none;
    min-width:0;
    margin-left:252px!important;
    flex:none!important;
  }
  .page-content{
    width:100%;
    max-width:1320px;
    min-width:0;
    margin:0 auto;
  }
}
@media(min-width:681px) and (max-width:900px){
  .sidebar{width:210px!important}
  .main-area{margin-left:210px!important}
}
@media(max-width:680px){
  .app-shell{
    display:flex!important;
    flex-direction:column;
    width:100%;
    max-width:100%;
  }
  .sidebar{position:relative!important;width:100%!important}
  .main-area{width:100%!important;margin-left:0!important;flex:1 1 auto!important}
}
