:root{
  --tt-primary:#0f6e3d;      /* Nigerian green */
  --tt-primary-dark:#0a4f2c;
  --tt-accent:#ffb400;
  --tt-bg:#f4f6f8;
  --tt-sidebar-w:250px;
  --tt-radius:10px;
}
*{box-sizing:border-box}
body{background:var(--tt-bg);font-family:'Segoe UI',system-ui,Arial,sans-serif;color:#1e2a24;}

.tt-shell{display:flex;min-height:100vh;}
.tt-sidebar{
  width:var(--tt-sidebar-w);flex-shrink:0;background:linear-gradient(180deg,var(--tt-primary-dark),var(--tt-primary));
  color:#fff;position:sticky;top:0;height:100vh;overflow-y:auto;
}
.tt-brand{font-weight:700;font-size:1.15rem;padding:1.2rem 1.2rem 1rem;display:flex;gap:.6rem;align-items:center;color:#fff;}
.tt-brand i{font-size:1.4rem;color:var(--tt-accent);}
.tt-brand-text{display:flex;flex-direction:column;line-height:1.15;}
.tt-brand-name{font-weight:800;letter-spacing:.02em;font-size:1rem;}
.tt-brand-sub{font-weight:400;font-size:.68rem;opacity:.75;letter-spacing:.03em;text-transform:uppercase;}
.tt-nav-section{font-size:.7rem;text-transform:uppercase;letter-spacing:.08em;opacity:.6;padding:1rem 1.2rem .3rem;}
.tt-sidebar .nav-link{color:rgba(255,255,255,.85);padding:.55rem 1.2rem;border-left:3px solid transparent;font-size:.92rem;display:flex;gap:.6rem;align-items:center;}
.tt-sidebar .nav-link:hover{background:rgba(255,255,255,.08);color:#fff;}
.tt-sidebar .nav-link.active{background:rgba(255,255,255,.14);border-left-color:var(--tt-accent);color:#fff;font-weight:600;}
.tt-sub-badge{padding:.8rem 1.2rem 1.2rem;}
.tt-trial-banner{background:#fff7e6;border:1px solid #ffdf99;border-radius:var(--tt-radius);padding:.7rem 1rem;margin-bottom:1rem;font-size:.88rem;}

.tt-main{flex:1;min-width:0;display:flex;flex-direction:column;}
.tt-topbar{background:#fff;padding:.7rem 1.2rem;display:flex;align-items:center;gap:1rem;border-bottom:1px solid #e4e8eb;position:sticky;top:0;z-index:20;}
.tt-topbar-brand{font-weight:700;color:var(--tt-primary);letter-spacing:.03em;font-size:.9rem;}
.tt-content{padding:1.4rem;flex:1;}
.tt-footer{padding:1rem 1.4rem 1.6rem;text-align:center;font-size:.78rem;color:#8a968f;}

.tt-card{background:#fff;border:1px solid #e6e9ec;border-radius:var(--tt-radius);padding:1.2rem;box-shadow:0 1px 2px rgba(0,0,0,.03);}
.tt-stat{border-radius:var(--tt-radius);padding:1rem 1.2rem;color:#fff;}
.tt-stat h3{font-size:1.8rem;margin:0;font-weight:700;}
.tt-stat.bg-green{background:linear-gradient(135deg,var(--tt-primary),var(--tt-primary-dark));}
.tt-stat.bg-amber{background:linear-gradient(135deg,#e0a100,#a86e00);}
.tt-stat.bg-red{background:linear-gradient(135deg,#c0392b,#8e2a1f);}
.tt-stat.bg-blue{background:linear-gradient(135deg,#1b6ea8,#124a70);}

/* Timetable grid */
.tt-grid-wrap{overflow-x:auto;}
table.tt-grid{border-collapse:separate;border-spacing:6px;width:100%;}
table.tt-grid th{background:transparent;font-size:.78rem;text-transform:uppercase;letter-spacing:.04em;color:#5b6b63;padding:.4rem;}
.tt-time-col{font-size:.72rem;color:#7c8a83;white-space:nowrap;width:90px;}
.tt-cell{
  min-width:130px;min-height:64px;border-radius:8px;background:#fff;border:1px solid #e2e7e4;
  padding:.5rem .55rem;cursor:grab;transition:box-shadow .15s, transform .1s;position:relative;
}
.tt-cell:hover{box-shadow:0 3px 10px rgba(15,110,61,.15);transform:translateY(-1px);}
.tt-cell.locked{background:#fff7e6;border-color:#ffdf99;cursor:not-allowed;}
.tt-cell.conflict{background:#fdeceb;border-color:#f2a49c;}
.tt-cell.empty{background:#fafbfb;border-style:dashed;cursor:copy;}
.tt-cell .subj{font-weight:600;font-size:.86rem;display:block;color:#173d29;}
.tt-cell .teacher{font-size:.76rem;color:#5b6b63;display:block;margin-top:2px;}
.tt-cell .badge-row{position:absolute;top:4px;right:4px;display:flex;gap:2px;}
.tt-break-cell{background:repeating-linear-gradient(45deg,#eef2ee,#eef2ee 8px,#e3e9e3 8px,#e3e9e3 16px);
  border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:.75rem;color:#67766f;font-weight:600;}

.tt-cell.dragging{opacity:.4;}
.tt-cell.drop-target{outline:2px dashed var(--tt-primary);outline-offset:2px;}

/* Mobile card view for the timetable */
@media (max-width:768px){
  .tt-sidebar{position:fixed;left:-260px;transition:left .2s;z-index:1050;}
  .tt-sidebar.open{left:0;}
  table.tt-grid.desktop-only{display:none;}
  .tt-mobile-list .day-block{margin-bottom:1rem;}
  .tt-mobile-list .day-title{font-weight:700;color:var(--tt-primary-dark);margin:.6rem 0 .3rem;}
  .tt-mobile-list .lesson-row{display:flex;justify-content:space-between;background:#fff;border:1px solid #e2e7e4;border-radius:8px;padding:.55rem .7rem;margin-bottom:.4rem;}
}
@media (min-width:769px){
  .tt-mobile-list{display:none;}
}

@media print{
  .no-print, .tt-sidebar, .tt-topbar, .tt-footer{display:none!important;}
  .tt-main{margin:0!important;}
  .tt-content{padding:0!important;}
  .tt-print-header{display:block!important;}
  .tt-cell .badge-row, .tt-cell button{display:none!important;}
  body{background:#fff!important;}
}
.tt-print-header{display:none;}
.tt-print-header .pt-school{font-size:1.3rem;font-weight:800;color:var(--tt-primary-dark);}
.tt-print-header .pt-meta{font-size:.85rem;color:#4a564e;margin-top:.2rem;}
.tt-print-header .pt-brand{font-size:.72rem;color:#8a968f;margin-top:.6rem;letter-spacing:.03em;text-transform:uppercase;}
.tt-print-header{text-align:center;margin-bottom:1.2rem;padding-bottom:1rem;border-bottom:2px solid var(--tt-primary);}
