/* ============================================================
   InternHub — Design Layer v2  ("Ledger Command Centre")
   TISSA · Universiti Utara Malaysia
   Editorial serif identity + command-centre polish + pro clarity.
   Dark maroon rail · airy light content · gold ledger accents.
   Loaded AFTER theme.css; this is the authoritative new look.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Hanken+Grotesk:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400&family=IBM+Plex+Mono:wght@400;500;600&family=Spectral:ital,wght@0,400;0,500;0,600;0,700;1,400&display=swap');

:root{
  --ih-rail-w: 268px;
  --ih-gap: 18px;
  --ih-radius: 16px;
  --ih-radius-sm: 11px;
  --ih-ink: #1c1417;
  --ih-ink-soft: #5c4a50;
  --ih-faint: #95838a;
  --ih-line: #ecdfe4;
  --ih-line-2: #f4ecef;
  --ih-paper: #f6f0f2;
  --ih-card: #ffffff;
  --ih-maroon: #8a1a38;
  --ih-maroon-700: #6e1228;
  --ih-maroon-900: #3d0c17;
  --ih-maroon-950: #2a0810;
  --ih-gold: #cda23f;
  --ih-gold-soft: #e0bf6a;
  --ih-blue: #34589c;
  --ih-green: #2f7d5b;
  --ih-amber: #b6841c;
  --ih-shadow-1: 0 1px 2px rgba(42,8,16,.05), 0 4px 14px rgba(42,8,16,.05);
  --ih-shadow-2: 0 2px 6px rgba(42,8,16,.06), 0 14px 36px rgba(42,8,16,.10);
  --ih-shadow-rail: 10px 0 40px rgba(20,4,9,.30);
  --ih-ease: cubic-bezier(.22,.61,.36,1);
}

/* ---------- App background : warm paper with a faint top wash ---------- */
body{
  font-family:'Hanken Grotesk',system-ui,sans-serif !important;
  color:var(--ih-ink) !important;
  background:
    radial-gradient(1200px 380px at 80% -8%, rgba(205,162,63,.07), transparent 60%),
    radial-gradient(900px 420px at -5% 0%, rgba(138,26,56,.06), transparent 55%),
    var(--ih-paper) !important;
}

/* =====================================================================
   1 · APP SHELL
   ===================================================================== */
.ih-main, .content.ih-main{
  padding: 22px 26px 40px !important;
  min-height:100vh;
}
.ih-wrap{ max-width: 1320px; margin: 0 auto; }

/* =====================================================================
   2 · TOPBAR
   ===================================================================== */
.ih-topbar{
  position: sticky; top: 0; z-index: 20;
  display:flex; align-items:center; justify-content:space-between; gap:18px;
  margin: -22px -26px 20px;
  padding: 16px 26px 15px;
  background: rgba(246,240,242,.82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--ih-line);
}
.ih-topbar::after{ content:""; position:absolute; left:26px; right:26px; bottom:-1px; height:2px;
  background:linear-gradient(90deg,var(--ih-gold),rgba(205,162,63,0) 60%); border-radius:999px; }
.ih-kicker{
  font-family:'IBM Plex Mono',monospace; font-size:11px; font-weight:500;
  letter-spacing:.2em; text-transform:uppercase; color:var(--ih-maroon);
  display:flex; align-items:center; gap:8px;
}
.ih-kicker::before{ content:""; width:14px; height:2px; background:var(--ih-gold); border-radius:999px; display:inline-block; }
.ih-title{
  font-family:'Spectral',Georgia,serif; font-weight:700;
  font-size:clamp(1.5rem,2.4vw,2rem); line-height:1.05; letter-spacing:-.02em;
  color:var(--ih-ink); margin:.18rem 0 0;
}
.ih-topbar-right{ display:flex; align-items:center; gap:12px; }
.ih-datechip{
  text-align:right; line-height:1.2; padding-right:12px; border-right:1px solid var(--ih-line);
}
.ih-datechip strong{ font-size:13px; color:var(--ih-ink); display:block; }
.ih-datechip small{ font-family:'IBM Plex Mono',monospace; font-size:11px; color:var(--ih-faint); letter-spacing:.04em; }
.ih-iconbtn{
  width:40px; height:40px; border-radius:11px; border:1px solid var(--ih-line);
  background:var(--ih-card); color:var(--ih-maroon-700); cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center; position:relative;
  box-shadow:var(--ih-shadow-1); transition:all .15s var(--ih-ease);
}
.ih-iconbtn:hover{ transform:translateY(-2px); box-shadow:var(--ih-shadow-2); color:var(--ih-maroon); }
.ih-iconbtn .ih-dot{ position:absolute; top:9px; right:10px; width:7px; height:7px; border-radius:999px; background:var(--ih-gold); border:1.5px solid var(--ih-card); }
.ih-userpill{
  display:flex; align-items:center; gap:10px; padding:5px 12px 5px 6px;
  border:1px solid var(--ih-line); border-radius:999px; background:var(--ih-card);
  text-decoration:none !important; color:var(--ih-ink) !important; box-shadow:var(--ih-shadow-1);
  transition:all .15s var(--ih-ease);
}
.ih-userpill:hover{ transform:translateY(-2px); box-shadow:var(--ih-shadow-2); }
.ih-avatar{
  width:34px; height:34px; border-radius:50%; flex:0 0 auto;
  background:linear-gradient(135deg,var(--ih-maroon),var(--ih-gold));
  color:#fff; display:inline-flex; align-items:center; justify-content:center;
  font-weight:800; font-size:14px; letter-spacing:.02em;
}
.ih-userpill .nm{ line-height:1.15; }
.ih-userpill .nm strong{ font-size:13px; display:block; max-width:140px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ih-userpill .nm small{ font-family:'IBM Plex Mono',monospace; font-size:10px; color:var(--ih-faint); letter-spacing:.08em; text-transform:uppercase; }

/* =====================================================================
   3 · CONTROL / FILTER BAR
   ===================================================================== */
.ih-controls{
  background:var(--ih-card); border:1px solid var(--ih-line); border-radius:var(--ih-radius);
  box-shadow:var(--ih-shadow-1); padding:14px 16px; margin-bottom:var(--ih-gap);
  position:relative; overflow:hidden;
}
.ih-controls::before{ content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:linear-gradient(180deg,var(--ih-gold),var(--ih-maroon)); }
.ih-controls .form-label,
.ih-controls label{
  font-family:'IBM Plex Mono',monospace !important; font-size:10px !important; font-weight:500 !important;
  letter-spacing:.12em; text-transform:uppercase; color:var(--ih-faint) !important; margin-bottom:5px !important;
}
.ih-controls .form-select,
.ih-controls .form-control{
  border:1px solid var(--ih-line) !important; border-radius:10px !important;
  min-height:40px; font-size:14px; background:var(--ih-paper);
  transition:border-color .15s var(--ih-ease), box-shadow .15s var(--ih-ease);
}
.ih-controls .form-select:focus,
.ih-controls .form-control:focus{ background:#fff; border-color:var(--ih-maroon) !important; box-shadow:0 0 0 3px rgba(205,162,63,.22) !important; }

/* =====================================================================
   4 · KPI STAT CARDS
   ===================================================================== */
.ih-stats{
  display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:var(--ih-gap); margin-bottom:var(--ih-gap);
}
.ih-stat{
  position:relative; background:var(--ih-card); border:1px solid var(--ih-line);
  border-radius:var(--ih-radius); box-shadow:var(--ih-shadow-1);
  padding:18px 18px 16px; overflow:hidden;
  transition:transform .2s var(--ih-ease), box-shadow .2s var(--ih-ease);
}
.ih-stat::after{ content:""; position:absolute; inset:0 0 auto 0; height:3px; background:linear-gradient(90deg,var(--ih-maroon),rgba(138,26,56,0)); opacity:.0; transition:opacity .2s var(--ih-ease); }
.ih-stat:hover{ transform:translateY(-4px); box-shadow:var(--ih-shadow-2); }
.ih-stat:hover::after{ opacity:1; }
.ih-stat-top{ display:flex; align-items:flex-start; justify-content:space-between; gap:10px; margin-bottom:10px; }
.ih-stat-label{ font-family:'IBM Plex Mono',monospace; font-size:10.5px; font-weight:500; letter-spacing:.13em; text-transform:uppercase; color:var(--ih-faint); max-width:78%; line-height:1.3; }
.ih-stat-ic{
  width:38px; height:38px; flex:0 0 auto; border-radius:11px;
  display:inline-flex; align-items:center; justify-content:center; font-size:16px;
  background:rgba(138,26,56,.09); color:var(--ih-maroon);
}
.ih-stat--gold  .ih-stat-ic{ background:rgba(205,162,63,.16); color:var(--ih-amber); }
.ih-stat--blue  .ih-stat-ic{ background:rgba(52,88,156,.12); color:var(--ih-blue); }
.ih-stat--green .ih-stat-ic{ background:rgba(47,125,91,.12); color:var(--ih-green); }
.ih-stat-num{
  font-family:'Spectral',Georgia,serif; font-weight:700; font-variant-numeric:tabular-nums;
  font-size:2.4rem; line-height:1; letter-spacing:-.02em; color:var(--ih-ink);
}
.ih-stat-num .u{ font-family:'IBM Plex Mono',monospace; font-size:1rem; color:var(--ih-faint); font-weight:500; margin-left:3px; }
.ih-stat-foot{ display:flex; align-items:center; gap:10px; margin-top:11px; }
.ih-rule{ width:30px; height:2px; background:var(--ih-gold); border-radius:999px; flex:0 0 auto; }
.ih-stat-sub{ font-size:12px; color:var(--ih-ink-soft); }

/* =====================================================================
   5 · PANELS  (editorial card)
   ===================================================================== */
.ih-grid-3{ display:grid; grid-template-columns:1.5fr 1fr 1fr; gap:var(--ih-gap); margin-bottom:var(--ih-gap); }
.ih-grid-2{ display:grid; grid-template-columns:1fr 1fr; gap:var(--ih-gap); margin-bottom:var(--ih-gap); }
.ih-panel{
  background:var(--ih-card); border:1px solid var(--ih-line); border-radius:var(--ih-radius);
  box-shadow:var(--ih-shadow-1); padding:0; overflow:hidden; display:flex; flex-direction:column;
  transition:box-shadow .2s var(--ih-ease);
}
.ih-panel:hover{ box-shadow:var(--ih-shadow-2); }
.ih-panel-head{ padding:16px 18px 13px; border-bottom:1px solid var(--ih-line-2); position:relative; }
.ih-panel-head::after{ content:""; position:absolute; left:18px; bottom:-1px; width:38px; height:2px; background:var(--ih-gold); border-radius:999px; }
.ih-panel-eyebrow{ font-family:'IBM Plex Mono',monospace; font-size:10px; font-weight:500; letter-spacing:.16em; text-transform:uppercase; color:var(--ih-maroon); margin-bottom:4px; }
.ih-panel-title{ font-family:'Spectral',Georgia,serif; font-weight:700; font-size:1.12rem; letter-spacing:-.01em; color:var(--ih-ink); margin:0; line-height:1.2; }
.ih-panel-note{ font-size:11.5px; color:var(--ih-faint); margin:6px 0 0; }
.ih-panel-body{ padding:16px 18px 18px; flex:1; }

/* chart sizing helpers */
.ih-chart{ height:200px; position:relative; }
.ih-chart.sm{ height:160px; }
.ih-chart.lg{ height:300px; }
.ih-map{ height:230px; border-radius:12px; overflow:hidden; border:1px solid var(--ih-line); position:relative; z-index:0; isolation:isolate; }
/* keep the sticky topbar above Leaflet panes/controls */
.ih-topbar{ z-index:30; }

/* =====================================================================
   6 · GENERIC CARD / TABLE / BUTTON refinements (system-wide ready)
   ===================================================================== */
.ih-section-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:14px; margin:6px 0 14px; }

/* Page header (for content pages that live inside .content, no full-bleed) */
.ih-pagehead{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap;
  margin:0 0 22px; padding-bottom:16px; border-bottom:1px solid var(--ih-line); position:relative; }
.ih-pagehead::after{ content:""; position:absolute; left:0; bottom:-1px; width:48px; height:2px; background:var(--ih-gold); border-radius:999px; }
.ih-pagehead .ih-title{ margin-top:.2rem; }
.ih-pagehead-right{ display:flex; align-items:center; gap:12px; }
.ih-card{ background:var(--ih-card); border:1px solid var(--ih-line); border-radius:var(--ih-radius); box-shadow:var(--ih-shadow-1); }

.ih-btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  height:40px; padding:0 18px; border-radius:11px; font-weight:600; font-size:14px;
  font-family:'Hanken Grotesk',sans-serif; cursor:pointer; border:1px solid transparent;
  text-decoration:none !important; transition:all .15s var(--ih-ease); white-space:nowrap;
}
.ih-btn-primary{ background:linear-gradient(180deg,var(--ih-maroon) ,var(--ih-maroon-700)); color:#fff !important; border-color:var(--ih-maroon-700); box-shadow:0 2px 8px rgba(110,18,40,.28); }
.ih-btn-primary:hover{ transform:translateY(-2px); box-shadow:0 6px 16px rgba(110,18,40,.34); }
.ih-btn-ghost{ background:var(--ih-card); color:var(--ih-maroon-700) !important; border-color:var(--ih-line); box-shadow:var(--ih-shadow-1); }
.ih-btn-ghost:hover{ transform:translateY(-2px); box-shadow:var(--ih-shadow-2); }

/* =====================================================================
   7 · RESPONSIVE
   ===================================================================== */
@media (max-width:1200px){
  .ih-grid-3{ grid-template-columns:1fr 1fr; }
}
@media (max-width:992px){
  .ih-grid-3, .ih-grid-2{ grid-template-columns:1fr; }
  .ih-main{ padding:18px 16px 32px !important; }
  .ih-topbar{ margin:-18px -16px 18px; padding:14px 16px; }
  .ih-topbar::after{ left:16px; right:16px; }
}
@media (max-width:640px){
  .ih-topbar{ flex-direction:column; align-items:flex-start; }
  .ih-datechip{ border-right:0; padding-right:0; text-align:left; }
}

/* =====================================================================
   8 · EVALUATION PAGES (lecturer + company rubric) + live running total
   ===================================================================== */
.ev-subject{ display:flex; flex-wrap:wrap; gap:16px; justify-content:space-between; align-items:flex-start;
  background:var(--ih-card); border:1px solid var(--ih-line); border-left:4px solid var(--ih-maroon);
  border-radius:14px; padding:16px 20px; margin-bottom:20px; box-shadow:var(--ih-shadow-1); }
.ev-subject .nm{ font-family:'Spectral',Georgia,serif; font-size:1.2rem; font-weight:700; color:var(--ih-ink); line-height:1.2; }
.ev-subject .meta{ font-size:12.5px; color:var(--ih-faint); max-width:680px; margin-top:6px; line-height:1.5; }

/* Running total card (top-right of subject) */
.ev-runtotal{ text-align:right; min-width:172px; }
.ev-runtotal .kicker{ justify-content:flex-end; }
.ev-rt-main{ font-family:'Spectral',Georgia,serif; font-weight:700; font-size:2rem; line-height:1; color:var(--ih-maroon);
  font-variant-numeric:tabular-nums; margin-top:3px; }
.ev-rt-main .ev-rt-max{ font-family:'IBM Plex Mono',monospace; font-size:.92rem; color:var(--ih-faint); font-weight:500; }
.ev-rt-pct{ font-family:'IBM Plex Mono',monospace; font-size:11px; letter-spacing:.04em; color:var(--ih-ink-soft); margin-top:3px; }
.ev-rt-bar{ height:6px; border-radius:999px; background:var(--ih-line); overflow:hidden; margin-top:9px; }
.ev-rt-bar > span{ display:block; height:100%; width:0; border-radius:999px;
  background:linear-gradient(90deg,var(--ih-gold),var(--ih-maroon)); transition:width .3s var(--ih-ease); }

.ev-section{ background:var(--ih-card); border:1px solid var(--ih-line); border-radius:14px; box-shadow:var(--ih-shadow-1); margin-bottom:16px; overflow:hidden; }
.ev-section > h5{ display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0; padding:13px 20px;
  font-family:'Spectral',Georgia,serif; font-weight:700; font-size:1.06rem; color:var(--ih-ink);
  border-bottom:1px solid var(--ih-line-2); position:relative; background:linear-gradient(180deg,#fff,var(--surface-soft)); }
.ev-section > h5::after{ content:""; position:absolute; left:20px; bottom:-1px; width:34px; height:2px; background:var(--ih-gold); border-radius:999px; }
.ev-sec-total{ font-family:'IBM Plex Mono',monospace; font-size:11.5px; font-weight:500; color:var(--ih-maroon);
  background:rgba(138,26,56,.08); border:1px solid rgba(138,26,56,.12); border-radius:999px; padding:4px 11px; white-space:nowrap; }

.criterion-row{ display:grid; grid-template-columns:1fr auto; gap:16px; align-items:center; padding:13px 20px; border-top:1px solid var(--ih-line-2); }
.criterion-row:first-of-type{ border-top:0; }
.criterion-row strong{ font-weight:600; color:var(--ih-ink); font-size:14px; }
.rubric-help{ color:#9a6f23; cursor:help; }

.score-options{ display:flex; flex-wrap:wrap; gap:6px; justify-content:flex-end; }
.score-choice{ position:relative; display:inline-flex; flex-direction:column; align-items:center; gap:1px;
  border:1px solid var(--ih-line); border-radius:9px; padding:7px 12px; min-width:44px; text-align:center; cursor:pointer;
  background:#fff; font-family:'IBM Plex Mono',monospace; font-weight:600; font-size:13px; color:var(--ih-ink-soft);
  transition:all .12s var(--ih-ease); user-select:none; }
.score-choice small{ font-family:'Hanken Grotesk',sans-serif; font-weight:600; font-size:9.5px; text-transform:uppercase; letter-spacing:.04em; opacity:.85; }
.score-choice input{ position:absolute; opacity:0; width:0; height:0; }
.score-choice:hover, .score-choice:focus{ border-color:var(--ih-maroon); color:var(--ih-maroon); box-shadow:0 0 0 3px rgba(205,162,63,.18); outline:0; }
.score-choice.score-selected, .score-choice:has(input:checked){
  border-color:var(--ih-maroon-700); color:#fff; background:linear-gradient(180deg,var(--ih-maroon),var(--ih-maroon-700)); box-shadow:0 2px 8px rgba(110,18,40,.25); }
@media (max-width:768px){ .criterion-row{ grid-template-columns:1fr; } .score-options{ justify-content:flex-start; } }

/* =====================================================================
   9 · COMPACT ADMIN DATA TABLE
   ===================================================================== */
.ih-table{ font-size:.86rem; margin-bottom:0; }
.ih-table thead th{ font-size:.64rem !important; letter-spacing:.07em; padding:.6rem .85rem !important; white-space:nowrap; }
.ih-table tbody td{ padding:.58rem .85rem; vertical-align:middle; white-space:nowrap; }
.ih-table tbody td small{ font-size:.76rem; color:var(--ih-faint); font-weight:400; }
.ih-table tbody td:first-child{ font-weight:600; color:var(--ih-ink); }
.ih-table tbody td:first-child small{ font-weight:400; }
.ih-table .btn-sm{ padding:.26rem .62rem; font-size:.78rem; }
.ih-table .badge{ font-size:.68rem; }
.ih-table td.ih-wrap{ white-space:normal; min-width:160px; }

/* =====================================================================
   10 · JOB LISTING CARDS (student available internships)
   ===================================================================== */
.joblist{ display:grid; gap:18px; }
.jobcard{ display:flex; gap:20px; background:var(--ih-card); border:1px solid var(--ih-line); border-radius:16px; box-shadow:var(--ih-shadow-1); padding:18px; transition:transform .2s var(--ih-ease), box-shadow .2s var(--ih-ease); }
.jobcard:hover{ transform:translateY(-2px); box-shadow:var(--ih-shadow-2); }
.jobcard-poster{ flex:0 0 auto; width:148px; aspect-ratio:4/5; border-radius:12px; overflow:hidden; border:1px solid var(--ih-line); background:linear-gradient(160deg,var(--ih-maroon-700),var(--ih-maroon-950)); display:flex; align-items:center; justify-content:center; position:relative; }
.jobcard-poster img{ width:100%; height:100%; object-fit:cover; }
.jobcard-poster .ph{ color:var(--ih-gold-soft); font-size:34px; }
.jobcard-poster .ph-cap{ position:absolute; bottom:10px; left:0; right:0; text-align:center; font-family:'IBM Plex Mono',monospace; font-size:9px; letter-spacing:.12em; text-transform:uppercase; color:rgba(255,255,255,.55); }
.jobcard-body{ flex:1; min-width:0; display:flex; flex-direction:column; }
.jobcard-title{ font-family:'Spectral',Georgia,serif; font-weight:700; font-size:1.28rem; line-height:1.15; margin:0 0 8px; color:var(--ih-ink); }
.jobcard-meta{ display:flex; flex-wrap:wrap; gap:8px 16px; font-size:13px; color:var(--ih-faint); margin-bottom:12px; }
.jobcard-meta span i{ color:var(--ih-maroon); margin-right:5px; }
.jobcard-desc{ font-size:14px; color:var(--ih-ink-soft); margin:0 0 14px; line-height:1.55; }
.jobcard-foot{ margin-top:auto; display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.jobcard-tag{ font-family:'IBM Plex Mono',monospace; font-size:10.5px; text-transform:uppercase; letter-spacing:.05em; background:var(--ih-maroon-50,#fdf5f7); color:var(--ih-maroon-700); border:1px solid var(--maroon-200,#efccd5); border-radius:999px; padding:3px 11px; }
@media (max-width:640px){ .jobcard{ flex-direction:column; } .jobcard-poster{ width:100%; max-width:200px; align-self:center; } }
