*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
:root{
  --navy:#1a3a6b;--gold:#c8a84b;--bg:#f0f2f7;--surface:#fff;--surface2:#f5f6fa;
  --surface3:#eaecf3;--border:rgba(0,0,0,0.09);--border2:rgba(0,0,0,0.16);
  --text:#1a1c24;--text2:#5a6070;--text3:#9aa0b0;
  --green-bg:#eaf4e0;--green:#2d7a2d;--red-bg:#fdecea;--red:#b92b2b;
  --blue-bg:#e6f0fb;--blue:#1a5faa;--amber-bg:#fff8e6;--amber:#a07000;
  --radius:10px;--radius-sm:6px;--radius-xs:4px;
  --topbar-h:76px;--nav-h:46px;
}
body{font-family:'Segoe UI',system-ui,sans-serif;background:var(--bg);color:var(--text);font-size:14px;line-height:1.5;min-height:100vh}

/* ══════════════════════════════════════════
   TOPBAR
══════════════════════════════════════════ */
.topbar{background:#fff;padding:0 2rem;display:flex;align-items:center;justify-content:space-between;height:var(--topbar-h);border-bottom:2.5px solid var(--gold);box-shadow:0 2px 10px rgba(0,0,0,0.07);position:sticky;top:0;z-index:300}
.topbar-left h1{font-size:19px;font-weight:700;color:var(--navy)}
.topbar-left p{font-size:11px;color:var(--gold);text-transform:uppercase;letter-spacing:0.07em;font-weight:600}
.topbar img{height:56px;object-fit:contain}

/* Hamburger button — hidden on desktop */
.hamburger{display:none;background:none;border:none;cursor:pointer;padding:8px;border-radius:var(--radius-xs);color:var(--navy);flex-direction:column;gap:5px;align-items:center;justify-content:center;flex-shrink:0}
.hamburger span{display:block;width:22px;height:2px;background:var(--navy);border-radius:2px;transition:all 0.25s}
.hamburger.open span:nth-child(1){transform:translateY(7px) rotate(45deg)}
.hamburger.open span:nth-child(2){opacity:0;transform:scaleX(0)}
.hamburger.open span:nth-child(3){transform:translateY(-7px) rotate(-45deg)}

/* ══════════════════════════════════════════
   NAV — DESKTOP (horizontal bar)
══════════════════════════════════════════ */
.nav{background:var(--navy);display:flex;gap:0;overflow-x:auto;position:sticky;top:var(--topbar-h);z-index:290}
.nav-btn{padding:13px 24px;color:rgba(255,255,255,0.7);border:none;background:none;cursor:pointer;font-family:inherit;font-size:13px;font-weight:500;white-space:nowrap;border-bottom:3px solid transparent;transition:all 0.18s;display:flex;align-items:center;gap:7px;text-decoration:none}
.nav-btn:hover{color:#fff;background:rgba(255,255,255,0.08)}
.nav-btn.active{color:#fff;border-bottom:3px solid var(--gold);background:rgba(255,255,255,0.06)}
.nav-btn .dot{width:7px;height:7px;border-radius:50%;background:var(--gold);display:none}
.nav-btn.active .dot{display:inline-block}
a.nav-btn{text-decoration:none}
a.nav-btn:hover{color:#fff;border-bottom-color:rgba(255,255,255,0.4)}
a.nav-btn.active{color:#fff;border-bottom-color:var(--gold)}

/* Drawer overlay backdrop */
.nav-backdrop{display:none;position:fixed;inset:0;background:rgba(0,0,0,0.45);z-index:398}
.nav-backdrop.open{display:block}

/* ══════════════════════════════════════════
   PAGES
══════════════════════════════════════════ */
.page{display:none;max-width:980px;margin:0 auto;padding:1.75rem 1.5rem 4rem}
.page.active{display:block}

/* ══════════════════════════════════════════
   CARDS
══════════════════════════════════════════ */
.card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.25rem 1.5rem;margin-bottom:1rem;box-shadow:0 1px 4px rgba(0,0,0,0.04)}
.card-title{font-size:11px;font-weight:700;color:var(--text2);letter-spacing:0.07em;text-transform:uppercase;margin-bottom:1rem;padding-bottom:0.6rem;border-bottom:1px solid var(--border);display:flex;align-items:center;gap:7px}
.page-title{font-size:22px;font-weight:700;color:var(--navy);margin-bottom:4px}
.page-sub{font-size:13px;color:var(--text2);margin-bottom:1.5rem}

/* ══════════════════════════════════════════
   GRID
══════════════════════════════════════════ */
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:14px}
.grid-3{display:grid;grid-template-columns:1fr 1fr 1fr;gap:14px;margin-bottom:14px}
.grid-4{display:grid;grid-template-columns:1fr 1fr 1fr 1fr;gap:14px;margin-bottom:14px}
.field{display:flex;flex-direction:column;gap:5px}
.field.full{grid-column:1/-1}
label{font-size:12px;font-weight:600;color:var(--text2)}
input[type=text],input[type=number],input[type=email],input[type=tel],select,textarea{width:100%;padding:8px 11px;border:1px solid var(--border2);border-radius:var(--radius-sm);background:var(--surface2);color:var(--text);font-family:inherit;font-size:14px;transition:border-color 0.15s,box-shadow 0.15s}
input:focus,select:focus,textarea:focus{outline:none;border-color:var(--navy);box-shadow:0 0 0 3px rgba(26,58,107,0.1);background:#fff}
input::placeholder,textarea::placeholder{color:var(--text3)}
textarea{resize:vertical;min-height:80px}
select{cursor:pointer}

/* ══════════════════════════════════════════
   MULTI-SELECT
══════════════════════════════════════════ */
.ms-wrap{position:relative}
.ms-trigger{width:100%;padding:8px 11px;border:1px solid var(--border2);border-radius:var(--radius-sm);background:var(--surface2);display:flex;align-items:center;justify-content:space-between;cursor:pointer;font-size:14px;color:var(--text2);user-select:none;transition:border-color 0.15s}
.ms-trigger:hover,.ms-trigger.open{border-color:var(--navy);box-shadow:0 0 0 3px rgba(26,58,107,0.1)}
.ms-badge{background:var(--navy);color:#fff;font-size:10px;font-weight:700;padding:1px 7px;border-radius:20px;margin-left:6px;display:none}
.ms-dropdown{display:none;position:absolute;top:calc(100% + 3px);left:0;right:0;background:var(--surface);border:1px solid var(--border2);border-radius:var(--radius-sm);box-shadow:0 6px 20px rgba(0,0,0,0.12);z-index:200;max-height:190px;overflow-y:auto}
.ms-dropdown.open{display:block}
.ms-opt{display:flex;align-items:center;gap:9px;padding:8px 12px;cursor:pointer;font-size:13px;border-bottom:1px solid var(--border);transition:background 0.1s}
.ms-opt:last-child{border-bottom:none}
.ms-opt:hover{background:var(--surface2)}
.ms-opt input[type=checkbox]{width:15px;height:15px;accent-color:var(--navy);cursor:pointer;flex-shrink:0}
.pills{display:flex;flex-wrap:wrap;gap:5px;margin-top:6px}
.pill{background:var(--blue-bg);color:var(--blue);font-size:11px;font-weight:500;padding:3px 8px 3px 10px;border-radius:20px;display:flex;align-items:center;gap:4px}
.pill button{background:none;border:none;cursor:pointer;color:var(--blue);font-size:15px;line-height:1;padding:0;display:flex;align-items:center}

/* ══════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════ */
.btn-row{display:flex;gap:10px;margin-top:1.25rem;flex-wrap:wrap}
.btn{height:42px;padding:0 20px;border:none;border-radius:var(--radius-sm);font-family:inherit;font-size:14px;font-weight:600;cursor:pointer;display:inline-flex;align-items:center;gap:7px;transition:opacity 0.15s,transform 0.1s;white-space:nowrap}
.btn:active{transform:scale(0.98)}
.btn-primary{background:var(--navy);color:#fff;flex:1}
.btn-primary:hover{opacity:0.87}
.btn-success{background:#1e7e4e;color:#fff}
.btn-success:hover{opacity:0.87}
.btn-outline{background:var(--surface);color:var(--text);border:1px solid var(--border2)}
.btn-outline:hover{background:var(--surface2)}
.btn-danger{background:#b92b2b;color:#fff}
.btn-danger:hover{opacity:0.87}
.btn-sm{height:34px;padding:0 14px;font-size:12px}
.btn-export{background:#1e7a4a;color:#fff}
.btn-export:hover{opacity:0.87}

/* ══════════════════════════════════════════
   STATS ROW
══════════════════════════════════════════ */
.stats-row{display:grid;grid-template-columns:repeat(5,1fr);gap:12px;margin-bottom:1.25rem}
.stat-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1rem 1.25rem;box-shadow:0 1px 4px rgba(0,0,0,0.04)}
.stat-card.clickable{cursor:pointer;transition:border-color 0.15s,box-shadow 0.15s,transform 0.1s}
.stat-card.clickable:hover{border-color:var(--navy);box-shadow:0 4px 16px rgba(26,58,107,0.15);transform:translateY(-2px)}
.stat-label{font-size:11px;font-weight:600;color:var(--text2);text-transform:uppercase;letter-spacing:0.06em;margin-bottom:4px}
.stat-val{font-size:26px;font-weight:700;color:var(--navy)}
.stat-sub{font-size:11px;color:var(--text3);margin-top:2px}

/* ══════════════════════════════════════════
   TABLE (desktop: normal; mobile: card stack)
══════════════════════════════════════════ */
.table-wrap{overflow-x:auto;border:1px solid var(--border);border-radius:var(--radius);box-shadow:0 1px 4px rgba(0,0,0,0.04)}
table{width:100%;border-collapse:collapse;font-size:13px;min-width:600px}
thead th{background:var(--navy);color:rgba(255,255,255,0.88);font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:0.05em;padding:10px 12px;text-align:left;white-space:nowrap}
tbody td{padding:9px 12px;border-bottom:1px solid var(--border);vertical-align:middle}
tbody tr:nth-child(even) td{background:#f8f9fc}
tbody tr:hover td{background:#eef2f9 !important}
tbody tr:last-child td{border-bottom:none}

/* Drive table */
.drive-table-wrap{overflow-x:auto;border:1px solid var(--border);border-radius:var(--radius-sm)}
.drive-table{width:100%;border-collapse:collapse;font-size:13px;min-width:700px}
.drive-table thead th{background:var(--navy);color:rgba(255,255,255,.88);font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.05em;padding:9px 10px;text-align:left;white-space:nowrap}
.drive-table tbody td{padding:7px 10px;border-bottom:1px solid var(--border);vertical-align:top}
.drive-table tbody tr:nth-child(even) td{background:#f8f9fc}
.drive-table tbody tr:hover td{background:#eef2f9}

/* ══════════════════════════════════════════
   BADGES
══════════════════════════════════════════ */
.badge{display:inline-block;padding:2px 9px;border-radius:20px;font-size:11px;font-weight:600}
.badge-placed{background:var(--green-bg);color:var(--green)}
.badge-notplaced{background:var(--red-bg);color:var(--red)}
.badge-notreg{background:var(--amber-bg);color:var(--amber)}
.badge-y{background:var(--green-bg);color:var(--green)}
.badge-n{background:var(--red-bg);color:var(--red)}

/* ══════════════════════════════════════════
   SEARCH BAR
══════════════════════════════════════════ */
.search-bar{display:flex;gap:10px;align-items:flex-end;margin-bottom:1rem;flex-wrap:wrap}
.search-bar .field{flex:1;min-width:180px}
.search-input-wrap{position:relative}
.search-input-wrap input{padding-left:34px}
.search-icon{position:absolute;left:10px;top:50%;transform:translateY(-50%);color:var(--text3);font-size:15px;pointer-events:none}

/* ══════════════════════════════════════════
   COMPANY CARD
══════════════════════════════════════════ */
.company-list{display:flex;flex-direction:column;gap:10px}
.company-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1rem 1.25rem;box-shadow:0 1px 3px rgba(0,0,0,0.04);display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.company-card:hover{border-color:var(--navy);box-shadow:0 2px 8px rgba(26,58,107,0.1)}
.co-name{font-size:15px;font-weight:700;color:var(--navy)}
.co-role{font-size:12px;color:var(--text2);margin-top:2px}
.co-meta{display:flex;gap:10px;flex-wrap:wrap;margin-top:5px}
.co-tag{font-size:11px;padding:2px 8px;border-radius:20px;background:var(--surface2);color:var(--text2);border:1px solid var(--border)}
.co-actions{display:flex;gap:8px;flex-shrink:0}

/* ══════════════════════════════════════════
   MODAL
══════════════════════════════════════════ */
.modal-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,0.45);z-index:500;align-items:center;justify-content:center;padding:1rem}
.modal-overlay.open{display:flex}
.modal{background:var(--surface);border-radius:var(--radius);padding:1.5rem;max-width:680px;width:100%;max-height:90vh;overflow-y:auto;box-shadow:0 20px 60px rgba(0,0,0,0.25)}
.modal-title{font-size:17px;font-weight:700;color:var(--navy);margin-bottom:1.25rem;padding-bottom:0.75rem;border-bottom:1px solid var(--border);display:flex;align-items:center;justify-content:space-between}
.modal-close{background:none;border:none;cursor:pointer;font-size:20px;color:var(--text2);padding:2px 6px;border-radius:4px}
.modal-close:hover{background:var(--surface2)}

/* ══════════════════════════════════════════
   ALERT / TOAST
══════════════════════════════════════════ */
.toast{position:fixed;bottom:1.5rem;left:50%;transform:translateX(-50%);background:#1a1c24;color:#fff;padding:11px 22px;border-radius:8px;font-size:13px;font-weight:500;display:none;align-items:center;gap:8px;box-shadow:0 4px 20px rgba(0,0,0,0.25);z-index:999;white-space:nowrap}
.alert{padding:10px 14px;border-radius:var(--radius-sm);font-size:13px;margin-bottom:1rem;display:none}
.alert-info{background:var(--blue-bg);color:var(--blue);border:1px solid rgba(26,95,170,0.2);display:block}

/* ══════════════════════════════════════════
   EMPTY STATE
══════════════════════════════════════════ */
.empty{text-align:center;padding:2.5rem;color:var(--text2);font-size:13px}
.empty big{display:block;font-size:2rem;margin-bottom:8px}

/* ══════════════════════════════════════════
   DIVIDER
══════════════════════════════════════════ */
.divider{height:1px;background:var(--border);margin:1.25rem 0}

/* ══════════════════════════════════════════
   STUDENT DETAIL
══════════════════════════════════════════ */
.detail-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.detail-item{padding:8px 12px;background:var(--surface2);border-radius:var(--radius-xs);border:1px solid var(--border)}
.detail-label{font-size:10px;font-weight:700;color:var(--text3);text-transform:uppercase;letter-spacing:0.05em}
.detail-value{font-size:14px;color:var(--text);font-weight:500;margin-top:2px}

/* ══════════════════════════════════════════
   LOGIN PAGE
══════════════════════════════════════════ */
.login-overlay{position:fixed;inset:0;background:#f0f2f7;z-index:9999;display:flex;align-items:center;justify-content:center;padding:1rem}
.login-box{background:#fff;border-radius:16px;padding:2.5rem 2rem;width:100%;max-width:420px;box-shadow:0 8px 40px rgba(26,58,107,0.18);text-align:center}
.login-logo{height:64px;object-fit:contain;margin-bottom:1.25rem}
.login-title{font-size:20px;font-weight:700;color:var(--navy);margin-bottom:4px}
.login-sub{font-size:12px;color:var(--gold);text-transform:uppercase;letter-spacing:0.07em;font-weight:600;margin-bottom:1.75rem}
.login-field{text-align:left;margin-bottom:1rem}
.login-field label{font-size:12px;font-weight:600;color:var(--text2);display:block;margin-bottom:5px}
.login-field input{width:100%;height:48px;padding:0 12px;border:1px solid var(--border2);border-radius:var(--radius-sm);font-family:inherit;font-size:15px;background:var(--surface2);color:var(--text);transition:border-color 0.15s,box-shadow 0.15s}
.login-field input:focus{outline:none;border-color:var(--navy);box-shadow:0 0 0 3px rgba(26,58,107,0.1);background:#fff}
.login-btn{width:100%;height:48px;background:var(--navy);color:#fff;border:none;border-radius:var(--radius-sm);font-family:inherit;font-size:15px;font-weight:600;cursor:pointer;margin-top:0.5rem;transition:opacity 0.15s}
.login-btn:hover{opacity:0.88}
.login-error{display:none;margin-top:12px;padding:10px 14px;background:var(--red-bg);border:1px solid rgba(185,43,43,0.2);border-radius:var(--radius-sm);font-size:12px;color:var(--red);line-height:1.5;text-align:left}
.login-divider{height:1px;background:var(--border);margin:1.5rem 0}

/* ══════════════════════════════════════════
   STARTUP OVERLAY
══════════════════════════════════════════ */
#startupOverlay{position:fixed;inset:0;background:rgba(26,58,107,0.92);z-index:9998;display:none;align-items:center;justify-content:center;padding:1rem}
.startup-box{background:#fff;border-radius:16px;padding:2rem;width:100%;max-width:580px;box-shadow:0 12px 48px rgba(0,0,0,0.3)}
.startup-title{font-size:17px;font-weight:700;color:var(--navy);margin-bottom:4px}
.startup-sub{font-size:12px;color:var(--text2);margin-bottom:1.5rem;line-height:1.6}
.startup-files{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin-bottom:1.25rem}
.startup-file-card{border:1.5px dashed var(--border2);border-radius:var(--radius);padding:1rem;text-align:center;cursor:pointer;background:var(--surface2);transition:border-color 0.15s,background 0.15s}
.startup-file-card:hover{border-color:var(--navy);background:#eef2fb}
.startup-file-card.loaded{border-color:var(--green);background:var(--green-bg);border-style:solid}
.startup-file-icon{font-size:2rem;margin-bottom:6px}
.startup-file-name{font-size:12px;font-weight:700;color:var(--navy);margin-bottom:4px}
.startup-file-status{font-size:11px;color:var(--text3)}
.startup-file-card.loaded .startup-file-status{color:var(--green);font-weight:600}
.startup-btn-row{display:flex;gap:10px}
.startup-skip{flex:0;height:40px;padding:0 16px;background:var(--surface);color:var(--text2);border:1px solid var(--border2);border-radius:var(--radius-sm);font-family:inherit;font-size:13px;cursor:pointer}
.startup-skip:hover{background:var(--surface2)}
.startup-launch{flex:1;height:40px;background:var(--navy);color:#fff;border:none;border-radius:var(--radius-sm);font-family:inherit;font-size:14px;font-weight:600;cursor:pointer;transition:opacity 0.15s}
.startup-launch:hover{opacity:0.88}

/* ══════════════════════════════════════════
   DASHBOARD CHARTS
══════════════════════════════════════════ */
.kpi-row{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:1rem}
.kpi-item{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);padding:10px 12px;text-align:center;position:relative;overflow:hidden;transition:border-color 0.15s,box-shadow 0.15s,transform 0.1s}
.kpi-item.clickable:hover{border-color:var(--navy);box-shadow:0 4px 16px rgba(26,58,107,0.15);transform:translateY(-2px)}
.kpi-item.clickable:active{transform:scale(0.98)}
.kpi-item::before{content:'';position:absolute;top:0;left:0;right:0;height:3px}
.kpi-item.kpi-total::before{background:var(--navy)}.kpi-item.kpi-elig::before{background:#185fa5}
.kpi-item.kpi-placed::before{background:var(--green)}.kpi-item.kpi-np::before{background:var(--red)}
.kpi-num{font-size:26px;font-weight:800;line-height:1.1}
.kpi-lbl{font-size:11px;font-weight:600;color:var(--text2);text-transform:uppercase;letter-spacing:.05em;margin-top:2px}
.kpi-pct{font-size:11px;font-weight:600;margin-top:4px}
.charts-grid-top{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-bottom:1rem}
.charts-grid-bot{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-bottom:1rem}
.chart-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.1rem 1.25rem;box-shadow:0 1px 4px rgba(0,0,0,0.05)}
.chart-title{font-size:13px;font-weight:700;color:var(--navy);margin-bottom:2px}
.chart-sub{font-size:11px;color:var(--text3);margin-bottom:10px}
.charts-divider{height:1px;background:var(--border);margin:1.25rem 0}

/* ══════════════════════════════════════════
   MANAGE DRIVE
══════════════════════════════════════════ */
.drive-tiles{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1rem;margin-bottom:1.5rem}
.drive-tile{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.25rem;cursor:pointer;transition:border-color .15s,box-shadow .15s,transform .1s;position:relative}
.drive-tile:hover{border-color:var(--navy);box-shadow:0 4px 16px rgba(26,58,107,.15);transform:translateY(-2px)}
.drive-tile-co{font-size:15px;font-weight:700;color:var(--navy);margin-bottom:2px}
.drive-tile-role{font-size:12px;color:var(--text2);margin-bottom:10px}
.drive-tile-meta{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:10px}
.drive-tile-tag{font-size:11px;padding:2px 8px;border-radius:20px;background:var(--surface2);color:var(--text2);border:1px solid var(--border)}
.drive-tile-status{font-size:11px;font-weight:700;padding:3px 10px;border-radius:20px;position:absolute;top:12px;right:12px}
.drive-status-active{background:var(--blue-bg);color:var(--blue)}
.drive-status-offer{background:var(--amber-bg);color:var(--amber)}
.drive-status-done{background:var(--green-bg);color:var(--green)}
.round-stepper{display:flex;align-items:center;gap:0;margin-bottom:1.25rem;overflow-x:auto;padding-bottom:4px}
.round-step{display:flex;align-items:center;cursor:pointer;flex-shrink:0}
.round-step-circle{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:12px;font-weight:700;border:2px solid var(--border2);background:var(--surface2);color:var(--text2);transition:all .15s;flex-shrink:0}
.round-step.active .round-step-circle{background:var(--navy);border-color:var(--navy);color:#fff;box-shadow:0 0 0 3px rgba(26,58,107,.2)}
.round-step.done .round-step-circle{background:var(--green);border-color:var(--green);color:#fff}
.round-step.offer .round-step-circle{background:var(--gold);border-color:var(--gold);color:#fff;width:36px;height:36px;font-size:11px}
.round-step-line{width:28px;height:2px;background:var(--border2);flex-shrink:0}
.round-step.done + .round-step .round-step-line,.round-step.done .round-step-line{background:var(--green)}
.round-step-label{font-size:10px;color:var(--text3);text-align:center;margin-top:3px;white-space:nowrap}
.status-sel{background:var(--green-bg);color:var(--green);font-weight:600;padding:2px 8px;border-radius:20px;font-size:11px}
.status-hold{background:var(--amber-bg);color:var(--amber);font-weight:600;padding:2px 8px;border-radius:20px;font-size:11px}
.status-ns{background:var(--red-bg);color:var(--red);font-weight:600;padding:2px 8px;border-radius:20px;font-size:11px}
.status-accepted{background:var(--green-bg);color:var(--green);font-weight:700;padding:2px 10px;border-radius:20px;font-size:11px}
.status-rejected{background:var(--red-bg);color:var(--red);font-weight:700;padding:2px 10px;border-radius:20px;font-size:11px}
.remark-input{width:100%;min-width:180px;padding:5px 8px;border:1px solid var(--border2);border-radius:4px;font-family:inherit;font-size:12px;resize:vertical;min-height:52px;background:var(--surface2)}
.remark-input:focus{outline:none;border-color:var(--navy);background:#fff}
.remark-warn{font-size:10px;color:var(--red);margin-top:2px;display:none}
.char-count{font-size:10px;color:var(--text3);text-align:right}
.char-count.ok{color:var(--green)}
.drive-header-bar{display:flex;align-items:center;justify-content:space-between;margin-bottom:1rem;flex-wrap:wrap;gap:10px}
.drive-back{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--navy);cursor:pointer;font-weight:600;padding:6px 12px;border-radius:var(--radius-sm);border:1px solid var(--border2);background:var(--surface);transition:background .15s}
.drive-back:hover{background:var(--surface2)}
.offer-timestamp{font-size:10px;color:var(--text3);margin-top:2px}

/* ══════════════════════════════════════════
   PLACEMENT HISTORY
══════════════════════════════════════════ */
.ph-kpi-row{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:1.25rem}
.ph-kpi{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius-sm);padding:12px 14px;text-align:center;position:relative;overflow:hidden}
.ph-kpi::before{content:'';position:absolute;top:0;left:0;right:0;height:3px;background:var(--navy)}
.ph-kpi:nth-child(2)::before{background:var(--green)}
.ph-kpi:nth-child(3)::before{background:var(--gold)}
.ph-kpi:nth-child(4)::before{background:#185fa5}
.ph-kpi-num{font-size:24px;font-weight:800;color:var(--navy)}
.ph-kpi-lbl{font-size:11px;font-weight:600;color:var(--text2);text-transform:uppercase;letter-spacing:.05em;margin-top:2px}
.ph-charts-2{display:grid;grid-template-columns:1fr 1fr;gap:1rem;margin-bottom:1rem}
.ph-empty{text-align:center;padding:4rem 2rem;color:var(--text2)}
.ph-empty big{font-size:3rem;display:block;margin-bottom:1rem;opacity:.5}

/* ══════════════════════════════════════════
   ROUND NAME GRID
══════════════════════════════════════════ */
.round-name-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:8px;margin-top:4px}
.round-name-item{display:flex;flex-direction:column;gap:3px}
.round-name-item label{font-size:11px;font-weight:600;color:var(--text2)}
.round-name-item input{height:34px;font-size:13px;padding:0 8px;border:1px solid var(--border2);border-radius:var(--radius-sm);background:var(--surface2);font-family:inherit;width:100%}

/* ══════════════════════════════════════════
   STUDENT APPLICATION (v9)
══════════════════════════════════════════ */
.apptpl-card{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:1.1rem 1.25rem;margin-bottom:10px;display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.apptpl-name{font-size:14px;font-weight:700;color:var(--navy)}
.apptpl-meta{font-size:11px;color:var(--text3);margin-top:2px}
.app-code-badge{display:inline-block;background:var(--navy);color:#fff;font-size:12px;font-weight:700;padding:3px 12px;border-radius:20px;letter-spacing:0.04em;cursor:pointer;user-select:all}
.app-code-badge:hover{background:#0f2a55}

/* Apply Form overlay */
.apply-overlay{position:fixed;inset:0;background:#f0f2f7;z-index:9990;display:none;overflow-y:auto}
.apply-overlay.open{display:block}
.apply-form-box{max-width:680px;margin:2rem auto 4rem;background:#fff;border-radius:14px;box-shadow:0 4px 24px rgba(26,58,107,0.12);padding:2rem}
.apply-form-header{background:var(--navy);border-radius:10px 10px 0 0;margin:-2rem -2rem 1.5rem;padding:1.5rem 2rem}
.apply-form-co{font-size:20px;font-weight:800;color:#fff}
.apply-form-role{font-size:13px;color:rgba(255,255,255,0.75);margin-top:4px}
.apply-section-title{font-size:11px;font-weight:700;color:var(--text2);text-transform:uppercase;letter-spacing:0.07em;border-bottom:1px solid var(--border);padding-bottom:6px;margin:1.25rem 0 0.75rem}
.apply-success-box{text-align:center;padding:3rem 2rem}
.apply-success-icon{font-size:3.5rem;margin-bottom:1rem}
.apply-success-title{font-size:20px;font-weight:700;color:var(--navy);margin-bottom:8px}
.apply-success-sub{font-size:13px;color:var(--text2);line-height:1.7}

/* Code input landing */
.apply-landing{max-width:480px;margin:4rem auto;background:#fff;border-radius:14px;box-shadow:0 4px 24px rgba(26,58,107,0.12);padding:2.5rem;text-align:center}
.apply-landing-icon{font-size:3rem;margin-bottom:1rem}
.apply-landing-title{font-size:20px;font-weight:700;color:var(--navy);margin-bottom:6px}
.apply-landing-sub{font-size:13px;color:var(--text2);margin-bottom:1.5rem;line-height:1.6}
.apply-code-input{width:100%;height:52px;font-size:20px;font-weight:700;letter-spacing:0.12em;text-align:center;text-transform:uppercase;border:2px solid var(--border2);border-radius:var(--radius-sm);font-family:inherit;padding:0 12px;background:var(--surface2);color:var(--text)}
.apply-code-input:focus{outline:none;border-color:var(--navy);box-shadow:0 0 0 3px rgba(26,58,107,0.1);background:#fff}
.apply-code-err{color:var(--red);font-size:13px;margin-top:8px;display:none;text-align:left;line-height:1.6;padding:8px 10px;background:var(--red-bg,#fff0f0);border-radius:6px;border:1px solid rgba(185,43,43,0.15)}

/* Upload zone */
.upload-zone{border:2px dashed var(--border2);border-radius:var(--radius);padding:1.5rem;text-align:center;cursor:pointer;background:var(--surface2);transition:border-color 0.15s,background 0.15s}
.upload-zone:hover,.upload-zone.drag{border-color:var(--navy);background:#eef2fb}
.upload-zone .icon{font-size:1.8rem;margin-bottom:6px}
.upload-zone p{font-size:13px;font-weight:600;color:var(--navy);margin-bottom:2px}
.upload-zone .hint{font-size:11px;color:var(--text3)}
.file-ok{display:none;align-items:center;gap:6px;font-size:12px;color:var(--green);margin-top:6px;font-weight:600}


/* ══════════════════════════════════════════
   FILL-FORM (student-facing)
══════════════════════════════════════════ */
.sf-wrap{max-width:680px;margin:0 auto;padding:1.5rem 1rem 4rem}
.sf-header{background:var(--navy);border-radius:14px;padding:1.5rem 2rem;margin-bottom:1.5rem;display:flex;align-items:center;gap:1.25rem}
.sf-header img{height:52px;width:52px;object-fit:contain;background:#fff;border-radius:8px;padding:4px;flex-shrink:0}
.sf-header-text h1{font-size:17px;font-weight:800;color:#fff;margin:0 0 2px}
.sf-header-text p{font-size:12px;color:rgba(255,255,255,0.72);margin:0}
.sf-card{background:#fff;border-radius:12px;box-shadow:0 2px 12px rgba(26,58,107,0.09);padding:1.75rem 2rem;margin-bottom:1.25rem}
.sf-step-label{font-size:11px;font-weight:700;color:var(--text3);text-transform:uppercase;letter-spacing:.06em;margin-bottom:1rem}
.sf-field{margin-bottom:14px}
.sf-field label{display:block;font-size:12px;font-weight:600;color:var(--text2);margin-bottom:5px}
.sf-input{width:100%;height:44px;padding:0 12px;font-size:14px;border:1.5px solid var(--border2);border-radius:8px;font-family:inherit;background:#fff;color:var(--text);transition:border-color .15s;box-sizing:border-box}
.sf-input:focus{outline:none;border-color:var(--navy);box-shadow:0 0 0 3px rgba(26,58,107,.10)}
.sf-input.code-input{font-size:18px;font-weight:700;letter-spacing:.1em;text-align:center;text-transform:uppercase}
.sf-error{display:none;margin-top:8px;padding:10px 14px;background:#fff0f0;border:1px solid rgba(185,43,43,.18);border-radius:8px;font-size:13px;color:var(--red);line-height:1.6}
.sf-btn-primary{width:100%;height:48px;background:var(--navy);color:#fff;border:none;border-radius:10px;font-size:15px;font-weight:700;cursor:pointer;font-family:inherit;margin-top:6px;transition:opacity .15s}
.sf-btn-primary:hover{opacity:.88}
.sf-btn-outline{height:38px;padding:0 18px;background:transparent;border:1.5px solid var(--border2);border-radius:8px;font-size:13px;font-weight:600;cursor:pointer;font-family:inherit;color:var(--text2);margin-top:8px}
.sf-divider{border:none;border-top:1px solid var(--border);margin:14px 0}
.sf-success{text-align:center;padding:2rem 1rem}
.sf-success-icon{font-size:3.5rem;margin-bottom:1rem}
.sf-success-title{font-size:20px;font-weight:700;color:var(--navy);margin-bottom:8px}
.sf-success-sub{font-size:13px;color:var(--text2);line-height:1.7}
.sf-section{display:none}
.sf-section.active{display:block}


/* ══════════════════════════════════════════════════════════════
   ██████  MOBILE RESPONSIVE  ██████
   Breakpoint: ≤768px → hamburger drawer nav + card-stack tables
══════════════════════════════════════════════════════════════ */
@media(max-width:768px){

  /* ── Topbar ── */
  .topbar{padding:0 1rem;height:60px;--topbar-h:60px}
  .topbar img{height:40px}
  .topbar-left h1{font-size:14px}
  .topbar-left p{font-size:10px}
  .hamburger{display:flex}

  /* ── Nav becomes a side drawer ── */
  .nav{
    position:fixed;
    top:0;left:0;bottom:0;
    width:280px;
    flex-direction:column;
    overflow-y:auto;overflow-x:hidden;
    transform:translateX(-100%);
    transition:transform 0.28s cubic-bezier(0.4,0,0.2,1);
    z-index:399;
    padding-top:16px;
    padding-bottom:32px;
    box-shadow:none;
  }
  .nav.open{
    transform:translateX(0);
    box-shadow:4px 0 24px rgba(0,0,0,0.22);
  }
  .nav-btn{
    padding:14px 20px;
    font-size:14px;
    border-bottom:none;
    border-left:3px solid transparent;
    width:100%;
    justify-content:flex-start;
  }
  .nav-btn.active{
    border-left:3px solid var(--gold);
    border-bottom:none;
    background:rgba(255,255,255,0.1);
  }
  .nav-btn:hover{border-left-color:rgba(255,255,255,0.3)}

  /* Drawer header label */
  .nav::before{
    content:'Navigation';
    display:block;
    font-size:10px;
    font-weight:700;
    color:rgba(255,255,255,0.4);
    text-transform:uppercase;
    letter-spacing:0.1em;
    padding:0 20px 12px;
    border-bottom:1px solid rgba(255,255,255,0.08);
    margin-bottom:8px;
  }

  /* ── Page content ── */
  .page{padding:1rem 0.875rem 5rem}
  .page-title{font-size:18px}

  /* ── Grids collapse ── */
  .grid-2,.grid-3,.grid-4{grid-template-columns:1fr}
  .stats-row{grid-template-columns:1fr 1fr}
  .kpi-row{grid-template-columns:1fr 1fr}
  .charts-grid-top,.charts-grid-bot,.ph-charts-2{grid-template-columns:1fr}
  .ph-kpi-row{grid-template-columns:1fr 1fr}
  .detail-grid{grid-template-columns:1fr}

  /* ── Drive tiles ── */
  .drive-tiles{grid-template-columns:1fr}

  /* ── Modal: full-screen ── */
  .modal-overlay{padding:0;align-items:flex-end}
  .modal{
    border-radius:var(--radius) var(--radius) 0 0;
    max-height:92vh;
    max-width:100%;
    padding:1.25rem 1rem;
  }

  /* ── TABLE → CARD STACK on mobile ── */
  /* Hide the thead */
  .table-wrap table thead,
  .drive-table-wrap .drive-table thead{display:none}

  /* Remove min-width constraint */
  .table-wrap table,
  .drive-table-wrap .drive-table{min-width:0;width:100%}

  /* Each row becomes a card */
  .table-wrap table tbody tr,
  .drive-table-wrap .drive-table tbody tr{
    display:block;
    background:var(--surface) !important;
    border:1px solid var(--border);
    border-radius:var(--radius-sm);
    margin-bottom:10px;
    padding:10px 12px;
    box-shadow:0 1px 4px rgba(0,0,0,0.04);
  }

  /* Each cell is a label-value row */
  .table-wrap table tbody td,
  .drive-table-wrap .drive-table tbody td{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    padding:5px 0;
    border-bottom:1px solid var(--border);
    font-size:13px;
    gap:8px;
  }
  .table-wrap table tbody td:last-child,
  .drive-table-wrap .drive-table tbody td:last-child{border-bottom:none}

  /* data-label pseudo-element for column name */
  .table-wrap table tbody td[data-label]::before,
  .drive-table-wrap .drive-table tbody td[data-label]::before{
    content:attr(data-label);
    font-size:10px;
    font-weight:700;
    color:var(--text3);
    text-transform:uppercase;
    letter-spacing:0.05em;
    flex-shrink:0;
    min-width:90px;
    padding-top:2px;
  }

  /* Stripe off on mobile (card borders handle separation) */
  .table-wrap table tbody tr:nth-child(even) td,
  .drive-table-wrap .drive-table tbody tr:nth-child(even) td{background:transparent}

  /* ── Drive detail page ── */
  .drive-header-bar{flex-direction:column;align-items:flex-start}
  .remark-input{min-width:0}

  /* ── Search bar ── */
  .search-bar{flex-direction:column}
  .search-bar .field{width:100%}

  /* ── Button rows ── */
  .btn-row{flex-direction:column}
  .btn-row .btn{width:100%;justify-content:center}
  .btn-primary{flex:none}

  /* ── Round stepper: scroll horizontally ── */
  .round-stepper{-webkit-overflow-scrolling:touch;padding-bottom:6px}

  /* ── KPI numbers smaller on mobile ── */
  .kpi-num,.stat-val{font-size:22px}
  .ph-kpi-num{font-size:20px}

  /* ── Admin 2-col upload grid ── */
  .startup-files{grid-template-columns:1fr}

  /* ── Apply management 2-col grid ── */
  /* (inline styles in app.js use grid — override via wrapper) */
  #page-apply-mgmt > div > div[style*="grid-template-columns:1fr 1fr"]{
    display:block !important;
  }
  #page-apply-mgmt > div > div[style*="grid-template-columns:1fr 1fr"] > div{
    margin-bottom:1rem;
  }

  /* ── Admin 2-col upload cards ── */
  div[style*="grid-template-columns:1fr 1fr"]{
    display:block !important;
  }
  div[style*="grid-template-columns:1fr 1fr"] > .card{
    margin-bottom:1rem !important;
  }

  /* ── Topbar KPI on dashboard: inline style override ── */
  /* Stats row that uses inline grid */
  div[style*="grid-template-columns:repeat(4"]{
    grid-template-columns:1fr 1fr !important;
  }
  div[style*="grid-template-columns:repeat(5"]{
    grid-template-columns:1fr 1fr !important;
  }

  /* ── fill-form.html mobile adjustments ── */
  .sf-wrap{padding:1rem 0.75rem 3rem}
  .sf-header{padding:1.25rem 1rem;gap:0.75rem;border-radius:10px}
  .sf-header img{height:42px;width:42px}
  .sf-header-text h1{font-size:14px}
  .sf-header-text p{font-size:11px}
  .sf-card{padding:1.25rem 1rem}
  .sf-input{height:48px;font-size:15px}
  .sf-input.code-input{font-size:20px;height:56px}
  .sf-btn-primary{height:52px;font-size:16px}

  /* ── Apply form box ── */
  .apply-form-box{margin:0;border-radius:0;padding:1.25rem 1rem;min-height:100vh}
  .apply-form-header{margin:-1.25rem -1rem 1.25rem;padding:1.25rem 1rem;border-radius:0}
  .apply-landing{margin:2rem auto;padding:1.75rem 1.25rem}

  /* ── Company card actions ── */
  .company-card{flex-direction:column;align-items:flex-start}
  .co-actions{width:100%;justify-content:flex-end}

  /* ── Apptpl card ── */
  .apptpl-card{flex-direction:column;align-items:flex-start}

  /* ── Toast: full width on mobile ── */
  .toast{left:1rem;right:1rem;transform:none;white-space:normal;text-align:center}

  /* ── Toolbar inline flex rows (add-company, eligibility) ── */
  div[style*="display:flex"][style*="justify-content:space-between"]{
    flex-direction:column !important;
    align-items:stretch !important;
  }
  div[style*="display:flex"][style*="justify-content:space-between"] > div,
  div[style*="display:flex"][style*="justify-content:space-between"] > button,
  div[style*="display:flex"][style*="justify-content:space-between"] > span{
    width:100%;
  }
}

/* ══════════════════════════════════════════
   EXTRA SMALL (≤480px)
══════════════════════════════════════════ */
@media(max-width:480px){
  .stats-row,.kpi-row,.ph-kpi-row{grid-template-columns:1fr 1fr}
  .btn{font-size:13px;padding:0 14px}
  .modal{padding:1rem 0.875rem}
  .card{padding:1rem}
  .drive-tile{padding:1rem}
  .sf-card{padding:1rem 0.875rem}
  .page-title{font-size:16px}
}


/* ══════════════════════════════════════════
   HOSTINGER / HTTPS SPECIFIC ADDITIONS
══════════════════════════════════════════ */

/* iOS safe area insets (notch + home indicator) */
@supports (padding: max(0px)) {
  .topbar {
    padding-left: max(2rem, env(safe-area-inset-left));
    padding-right: max(2rem, env(safe-area-inset-right));
  }
  .page {
    padding-bottom: max(4rem, calc(4rem + env(safe-area-inset-bottom)));
  }
  .toast {
    bottom: max(1.5rem, calc(1.5rem + env(safe-area-inset-bottom)));
  }
  @media(max-width:768px){
    .topbar {
      padding-left: max(1rem, env(safe-area-inset-left));
      padding-right: max(1rem, env(safe-area-inset-right));
    }
    .nav {
      padding-left: env(safe-area-inset-left);
      padding-bottom: max(32px, calc(32px + env(safe-area-inset-bottom)));
    }
  }
}

/* Prevent rubber-band scroll on iOS from showing white background */
html { background: var(--bg); }

/* Improve tap highlight on mobile */
* { -webkit-tap-highlight-color: rgba(26,58,107,0.12); }
a, button { -webkit-tap-highlight-color: rgba(26,58,107,0.15); }

/* Prevent text size adjustment on iOS rotation */
body { -webkit-text-size-adjust: 100%; }

/* Smooth scrolling */
html { scroll-behavior: smooth; }

/* Better focus rings for accessibility */
:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 2px;
}
