:root{
  --hex1:#ffa238; /* light orange */
  --hex2:#ff8901; /* orange */
  --hex3:#15b4b2; /* teal */
  --hex4:#005a5a; /* deep teal */
  --bg:#F4F4F4;

  --text:#0f172a;
  --muted:#64748b;
  --border:#e2e8f0;
  --card:#ffffff;

  --radius-card:0.5rem;
  --radius-btn:0.25rem;

  --shadow:none;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:'Roboto',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI','Helvetica Neue',Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.45;
}
a{color:inherit;text-decoration:none}
a:hover{text-decoration:none}
img{max-width:100%}

/* Utilities */
.muted{color:var(--muted)}
.code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:12px;background:#f1f5f9;border:1px solid var(--border);padding:2px 6px;border-radius:999px}
.badge,.pill{display:inline-flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;border:1px solid var(--border);background:#fff;font-size:12px;color:var(--muted)}
.pill{border-color:rgba(21,180,178,.35);color:var(--hex4)}

/* Tabs (segmented controls) */
.tabs{display:inline-flex;align-items:center;border:1px solid var(--border);border-radius:var(--radius-btn);overflow:hidden;background:#fff}
.tab{display:inline-flex;align-items:center;gap:6px;padding:8px 10px;font-size:12px;font-weight:800;color:var(--hex4);border-right:1px solid var(--border);background:#fff}
.tab:last-child{border-right:none}
.tab:hover{background:rgba(21,180,178,.06)}
.tab.active{background:rgba(255,137,1,.10)}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding:10px 12px;
  border-radius:var(--radius-btn);
  border:1px solid transparent;
  background:var(--hex2);
  color:#fff;
  font-weight:700;
  cursor:pointer;
}
.btn:hover{filter:brightness(.98)}
.btn:disabled{opacity:.6;cursor:not-allowed}
.btn-outline{
  background:#fff;
  color:var(--hex4);
  border-color:var(--border);
}
.btn-outline:hover{border-color:rgba(0,90,90,.35)}
.btn-full{width:100%}

/* Inputs */
.input{
  width:100%;
  padding:10px 12px;
  border-radius:var(--radius-btn);
  background:#fff;
  outline:none;
}
.input:focus{border-color:rgba(21,180,178,.55);box-shadow:0 0 0 4px rgba(21,180,178,.12)}
.label{display:block;font-size:12px;color:var(--muted);font-weight:700;margin-bottom:6px}
.form-row{margin:10px 0}

.select{
  width:100%;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:var(--radius-btn);
  background:#fff;
  outline:none;
}
.select:focus{border-color:rgba(21,180,178,.55);box-shadow:0 0 0 4px rgba(21,180,178,.12)}
.form-grid{display:grid;gap:14px}
.alert.success{
  border-color:rgba(16,185,129,.25);
  background:rgba(16,185,129,.08);
  color:#065f46;
}

/* Alerts */
.alert{
  margin:12px 0;
  padding:12px 14px;
  border-radius:var(--radius-card);
  border:1px solid rgba(21,180,178,.35);
  background:rgba(21,180,178,.07);
  color:var(--hex4);
}
.alert.error{
  border-color:rgba(255,137,1,.35);
  background:rgba(255,137,1,.08);
  color:#7c2d12;
}

/* Cards / grid */
.card{
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  box-shadow:none;
}
.card-pad{padding:16px}
.grid{display:grid;gap:14px}
.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}
.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}
.grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width: 980px){
  .grid-4{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width: 720px){
  .grid-2,.grid-3,.grid-4{grid-template-columns:1fr}
}

/* Auth (login) */
.auth-shell{
  min-height:100vh;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:24px;
}
.auth-card{
  width:min(520px, 100%);
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius-card);
  box-shadow:var(--shadow);
  padding:18px;
}
.auth-brand{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:14px;
}
.auth-mark{
  width:46px;height:46px;
  border-radius:var(--radius-card);
  border:1px solid var(--border);
  background:#fff;
  display:flex;align-items:center;justify-content:center;
}
.brand-dot{
  width:12px;height:12px;border-radius:999px;
  background:var(--hex2);
  box-shadow:0 0 0 5px rgba(255,137,1,.15);
}
.auth-title{font-weight:900}
.auth-sub{font-size:12px;color:var(--muted)}
.auth-foot{margin-top:10px;font-size:12px;color:var(--muted)}

/* App shell */
.app-shell{
  min-height:100vh;
  display:grid;
  grid-template-columns:260px 1fr;
}
@media (max-width: 980px){
  .app-shell{grid-template-columns:1fr}
  .sidebar{display:none}
}
.sidebar{
  background:#fff;
  border-right:1px solid var(--border);
  display:flex;
  flex-direction:column;
  min-height:100vh;
}
.sidebar-top{padding:16px}
.brandline{display:flex;align-items:center;gap:10px}
.brand-logo{object-fit:contain;background:transparent;border:none;display:block}
.brand-text{display:flex;flex-direction:column;gap:2px}
.brand-name{font-weight:900;line-height:1.1}
.brand-sub{font-size:12px;color:var(--muted)}

.nav-section{padding:0 10px 10px}
.nav-h{padding:8px 10px;font-size:12px;color:var(--muted);font-weight:800}
.nav{display:flex;flex-direction:column;gap:4px}
.nav-item{
  display:flex;align-items:center;gap:10px;
  padding:10px 10px;
  border-radius:var(--radius-btn);
  color:var(--text);
}
.nav-item .nav-ic{width:22px;height:22px;display:flex;align-items:center;justify-content:center;color:var(--muted)}
.nav-item:hover{background:#f8fafc}
.nav-item.active{
  background:rgba(21,180,178,.10);
  border:1px solid rgba(21,180,178,.22);
}
.nav-item.active .nav-ic{color:var(--hex4)}

.sidebar-bottom{margin-top:auto;padding:14px;border-top:1px solid var(--border)}
.userbox{display:flex;align-items:center;gap:10px;margin-bottom:12px}
.avatar{
  width:38px;height:38px;border-radius:var(--radius-card);
  background:rgba(255,137,1,.12);
  display:flex;align-items:center;justify-content:center;
  font-weight:900;color:var(--hex2);
}
.userbox-n{font-weight:800;font-size:13px}
.userbox-e{font-size:12px;color:var(--muted);max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}

/* Main */
.main{display:flex;flex-direction:column;min-height:100vh}
.topbar2{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 18px;
  border-bottom:1px solid var(--border);
  background:rgba(252,252,252,.9);
  backdrop-filter:saturate(180%) blur(10px);
  position:sticky;top:0;z-index:10;
}
.topbar-left{display:flex;flex-direction:column}
.crumb{font-size:12px;color:var(--muted);font-weight:800}
.paget{font-size:16px;font-weight:900}
.topbar-mid{flex:1;display:flex;justify-content:center}
.search{
  width:min(520px,100%);
  display:flex;align-items:center;gap:10px;
  border:1px solid var(--border);
  border-radius:var(--radius-btn);
  background:#fff;
  padding:8px 10px;
}
.search-ic{opacity:.65}
.search-in{border:none;outline:none;width:100%;font-size:14px;background:transparent}
.search-in:disabled{color:#94a3b8}
.topbar-right{display:flex;align-items:center;gap:10px}
.iconbtn{
  width:36px;height:36px;border-radius:var(--radius-btn);
  border:1px solid var(--border);
  background:#fff;
  display:flex;align-items:center;justify-content:center;
  color:var(--muted);
}
.iconbtn:hover{border-color:rgba(0,90,90,.35)}
.main-content{padding:18px}
.footer2{padding:14px 18px;color:var(--muted);font-size:12px;margin-top:auto}

/* Page blocks */
.page{display:block}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:12px;margin-bottom:12px}
.page-title{font-size:20px;font-weight:900}
.page-sub{font-size:12px;color:var(--muted);margin-top:4px}
.h1{font-size:20px;margin:0 0 8px;font-weight:900}

/* Dashboard bits */
.stat{
  display:flex;flex-direction:column;gap:4px
}
.stat .k{font-size:12px;color:var(--muted);font-weight:800}
.stat .v{font-size:22px;font-weight:900;color:var(--hex2)}
.chart-placeholder{
  height:220px;border-radius:var(--radius-card);
  border:1px dashed rgba(100,116,139,.45);
  background:rgba(21,180,178,.05);
  display:flex;align-items:center;justify-content:center;
  color:var(--muted);font-weight:800;
}
.list{
  display:flex;flex-direction:column;gap:10px
}
.list-item{
  display:flex;align-items:flex-start;justify-content:space-between;gap:10px;
  padding:10px 10px;border-radius:var(--radius-card);border:1px solid var(--border);background:#fff;
}
.list-item .t{font-weight:800}
.list-item .d{font-size:12px;color:var(--muted);margin-top:2px}
.logo-preview{display:flex;flex-direction:column;align-items:flex-start}

.auth-mark.has-logo{background:transparent;border:none;width:auto;height:auto}


/* ===========================
   Phase 4 helpers (Admissions)
   =========================== */
.stack{display:flex;flex-direction:column;gap:12px}
.field{display:flex;flex-direction:column;gap:6px}
.help{font-size:12px;color:var(--muted)}
.link{color:var(--primary);text-decoration:none;font-weight:800}
.link:hover{text-decoration:underline}
.h2{font-size:18px;font-weight:900;margin:0 0 10px}
.table{width:100%;border-collapse:separate;border-spacing:0}
.table th,.table td{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:top;text-align:left}
.table thead th{font-size:12px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
.table tbody tr:hover{background:rgba(0,0,0,.02)}
.table tr:last-child td{border-bottom:none}


/* ===========================
   Phase 6 portal styles
   =========================== */
.page-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.portal-hero{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;background:rgba(255,137,1,.05)}
.hero-chips{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px}
.feature-card{min-height:190px}
.feature-card-label{font-size:12px;color:var(--muted);font-weight:800;text-transform:uppercase;letter-spacing:.04em}
.feature-card-title{font-size:20px;font-weight:900;margin-top:10px}
.feature-card-text{color:var(--muted);margin-top:6px}
.money-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--border)}
.money-row:last-child{border-bottom:none}
.section-title{font-size:16px;font-weight:900;margin-bottom:12px}
.kv-list{display:flex;flex-direction:column;gap:10px}
.kv-item{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius-card);background:#fff}
.kv-item span{font-size:12px;color:var(--muted);font-weight:700}
.kv-item strong{text-align:right}
.compact-list .list-item{padding:12px}
.empty-inline{padding:14px;border:1px dashed rgba(100,116,139,.45);border-radius:var(--radius-card);background:#f8fafc;color:var(--muted)}
.empty-state{padding:22px;text-align:center;border:1px dashed rgba(100,116,139,.45);border-radius:var(--radius-card);background:#f8fafc}
.empty-state-title{font-size:18px;font-weight:900;margin-bottom:6px}
.empty-state-text{color:var(--muted);max-width:720px;margin:0 auto}
.stat-mini .k{font-size:12px;color:var(--muted);font-weight:800}
.stat-mini .v{font-size:26px;font-weight:900;color:var(--hex4);margin-top:4px}
.money-stack{display:flex;flex-direction:column;gap:10px}
.money-card{display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:12px;border:1px solid var(--border);border-radius:var(--radius-card);background:#fff}
.money-card.compact{padding:10px}
.money-card-title{font-size:15px;font-weight:900}
.money-values{display:flex;flex-direction:column;gap:4px;text-align:right}
.inline-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.table-wrap{width:100%;overflow:auto}
.notif-btn{position:relative}
.notif-count{position:absolute;top:-6px;right:-6px;min-width:18px;height:18px;padding:0 4px;border-radius:999px;background:var(--hex2);color:#fff;font-size:11px;font-weight:900;display:flex;align-items:center;justify-content:center}
.notif-list{display:flex;flex-direction:column;gap:12px}
.notif-item{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding:14px;border:1px solid var(--border);border-radius:var(--radius-card);background:#fff}
.notif-item.unread{border-color:rgba(255,137,1,.35);background:rgba(255,137,1,.05)}
.notif-title{font-size:15px;font-weight:900}
.notif-body{margin-top:6px;color:var(--text)}
.notif-meta{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-top:10px}
.notif-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.student-id-card{max-width:820px;border:1px solid var(--border);border-radius:18px;background:#fff;padding:22px;box-shadow:var(--shadow)}
.student-id-top{display:flex;align-items:center;justify-content:space-between;gap:16px;margin-bottom:18px}
.student-id-school{font-size:13px;font-weight:800;color:var(--hex4);text-transform:uppercase;letter-spacing:.04em}
.student-id-type{font-size:26px;font-weight:900}
.student-id-avatar{width:86px;height:86px;border-radius:18px;background:var(--hex2);color:#fff;display:flex;align-items:center;justify-content:center;font-size:28px;font-weight:900;box-shadow:0 10px 20px rgba(255,137,1,.24)}
.student-id-name{font-size:28px;font-weight:900;margin-bottom:4px}
.student-id-adm{font-size:13px;color:var(--muted);margin-bottom:18px}
.student-id-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.student-id-grid div{border:1px solid var(--border);border-radius:12px;padding:12px;background:#fcfcfc}
.student-id-grid span{display:block;font-size:12px;color:var(--muted);margin-bottom:4px}
.student-id-grid strong{display:block;line-height:1.35}
@media (max-width: 980px){
  .portal-hero{flex-direction:column}
  .topbar-mid{display:none}
  .notif-item{flex-direction:column}
}
@media (max-width: 720px){
  .student-id-grid{grid-template-columns:1fr}
  .student-id-top{align-items:flex-start}
  .student-id-avatar{width:70px;height:70px;font-size:24px}
  .page-head{flex-direction:column;align-items:flex-start}
  .page-actions{width:100%}
  .page-actions .btn,.page-actions .btn-outline{flex:1}
  .money-card,.kv-item{flex-direction:column}
  .money-values{width:100%;text-align:left}
}


/* ===========================
   Tailwind compatibility pass 2
   =========================== */
.page{display:flex;flex-direction:column;gap:1.5rem}
.page-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:1rem;margin:0}
.page-title{font-size:1.875rem;line-height:1.1;font-weight:900;letter-spacing:-.02em;color:#020617}
.page-sub{font-size:.925rem;line-height:1.6;color:#475569;margin-top:.65rem;max-width:56rem}
.card{background:#fff;border:1px solid var(--border);border-radius:var(--radius-card);box-shadow:var(--shadow);padding:1.25rem}
.card-pad{padding:1.25rem}
.btn{border-radius:var(--radius-btn);min-height:42px;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.btn-outline{background:#fff;color:var(--text);border:1px solid var(--border)}
.input,.select{border:1px solid var(--border);min-height:42px;font-size:14px}
.alert{border-radius:var(--radius-card)}
.table-wrap{overflow:auto;border:1px solid var(--border);border-radius:var(--radius-card);background:#fff}
.table thead th{background:#f8fafc;color:#64748b;font-size:11px;font-weight:800;letter-spacing:.14em;text-transform:uppercase}
.table tbody td{font-size:14px;color:#334155}
.list{gap:.875rem}
.list-item{padding:1rem 1rem;border-radius:var(--radius-card);box-shadow:none;background:#fff}
.badge,.pill{font-weight:700}
.empty-state,.empty-inline{border-style:dashed}
.modal-surface{border-radius:var(--radius-card);background:#fff;border:1px solid var(--border);box-shadow:var(--shadow)}
.pagination{display:flex;flex-wrap:wrap;gap:.5rem;align-items:center}
.pagination a,.pagination span{display:inline-flex;align-items:center;justify-content:center;min-width:38px;height:38px;padding:0 .875rem;border:1px solid var(--border);border-radius:var(--radius-btn);background:#fff;font-size:13px;font-weight:700;color:#334155}
.pagination .active{background:rgba(255,137,1,.08);border-color:rgba(255,137,1,.25);color:var(--hex4)}

@media (max-width: 960px){
  .page-title{font-size:1.6rem}
  .card,.card-pad{padding:1rem}
  .table-wrap{border:none;background:transparent}
}
@media (max-width: 720px){
  .page{gap:1rem}
  .page-head{align-items:flex-start}
  .page-title{font-size:1.35rem}
  .page-actions,.inline-actions{width:100%}
  .page-actions .btn,.page-actions .btn-outline,.inline-actions .btn,.inline-actions .btn-outline{flex:1 1 auto}
  .list-item{flex-direction:column;align-items:flex-start}
  table{min-width:640px}
}


/* Design system pass 3 */
body{background:#F4F4F4!important}
.bg-slate-50,.bg-slate-100\/70{background-color:#F4F4F4!important}
.bg-white{background-color:#fff!important}
button,.btn,.btn-outline,.iconbtn{box-shadow:none!important}
.shadow,.shadow-sm,.shadow-md,.shadow-lg,.shadow-xl,.shadow-2xl,.shadow-soft,.shadow-softlg,[class*="shadow-"]{box-shadow:none!important}
.fa-solid,.fa-regular,.fa-brands{line-height:1}
