/* ============================================================
   HIIT Plc — Internship Management System
   Design tokens: blue/navy + teal accent, Poppins + Inter
   Signature motif: the "logbook rung" — a stepped progress rail
   echoing the weekly SIWES logbook interns fill by hand.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Inter:wght@400;500;600;700&display=swap');

:root{
  /* Color */
  --navy-900:#0F1A3C;
  --navy-800:#152352;
  --blue-700:#1739B0;
  --blue-600:#2952E3;
  --blue-500:#4368F0;
  --blue-100:#E9EEFD;
  --teal-500:#17B8A6;
  --teal-100:#E1F7F4;
  --amber-500:#F5A524;
  --amber-100:#FDF1DC;
  --red-500:#E5484D;
  --red-100:#FBE7E8;
  --gray-50:#F6F7FB;
  --gray-100:#EEF0F6;
  --gray-200:#E4E7EF;
  --gray-300:#D3D7E3;
  --gray-500:#6B7280;
  --gray-600:#525A70;
  --gray-800:#2B3150;
  --ink:#1A1F36;
  --white:#FFFFFF;

  --grad-primary: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-700) 55%, var(--navy-900) 100%);
  --grad-teal: linear-gradient(135deg, var(--teal-500) 0%, #0E9C8D 100%);
  --grad-surface: linear-gradient(180deg, #FFFFFF 0%, #F7F9FE 100%);

  /* Type */
  --font-display:'Poppins', sans-serif;
  --font-body:'Inter', sans-serif;

  /* Radius / shadow */
  --r-sm:10px;
  --r-md:14px;
  --r-lg:16px;
  --r-pill:999px;
  --shadow-sm: 0 1px 2px rgba(15,26,60,0.06), 0 1px 1px rgba(15,26,60,0.04);
  --shadow-md: 0 8px 24px rgba(15,26,60,0.08), 0 2px 6px rgba(15,26,60,0.05);
  --shadow-lg: 0 16px 48px rgba(15,26,60,0.14), 0 4px 12px rgba(15,26,60,0.06);
  --shadow-focus: 0 0 0 3px rgba(41,82,227,0.25);

  --ease: cubic-bezier(.4,0,.2,1);
  --sidebar-w: 264px;
  --sidebar-w-collapsed: 84px;
  --topbar-h: 72px;
}

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:0.001ms !important; animation-iteration-count:1 !important; transition-duration:0.001ms !important; scroll-behavior:auto !important; }
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family:var(--font-body);
  color:var(--ink);
  background:var(--gray-50);
  -webkit-font-smoothing:antialiased;
  line-height:1.5;
}
h1,h2,h3,h4,.font-display{ font-family:var(--font-display); color:var(--navy-900); margin:0; letter-spacing:-0.01em; }
p{ margin:0; }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; margin:0; padding:0; }
button{ font-family:inherit; cursor:pointer; }
img{ max-width:100%; display:block; }

:focus-visible{ outline:none; box-shadow:var(--shadow-focus); border-radius:8px; }

.container{ width:100%; max-width:1240px; margin:0 auto; padding:0 24px; }

/* ---------- Buttons ---------- */
.btn{
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding:12px 22px; border-radius:var(--r-sm); border:1px solid transparent;
  font-family:var(--font-body); font-weight:600; font-size:14.5px;
  cursor:pointer; transition:transform .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease), color .18s var(--ease);
  position:relative; overflow:hidden; white-space:nowrap;
}
.btn:active{ transform:scale(.97); }
.btn-primary{ background:var(--grad-primary); color:#fff; box-shadow:0 6px 18px rgba(41,82,227,.32); }
.btn-primary:hover{ box-shadow:0 10px 26px rgba(41,82,227,.42); transform:translateY(-1px); }
.btn-secondary{ background:#fff; color:var(--blue-700); border-color:var(--gray-200); box-shadow:var(--shadow-sm); }
.btn-secondary:hover{ border-color:var(--blue-500); color:var(--blue-600); transform:translateY(-1px); box-shadow:var(--shadow-md); }
.btn-ghost{ background:transparent; color:var(--gray-600); }
.btn-ghost:hover{ background:var(--gray-100); color:var(--ink); }
.btn-danger{ background:var(--red-500); color:#fff; }
.btn-danger:hover{ background:#cf3d42; }
.btn-sm{ padding:8px 14px; font-size:13px; border-radius:8px; }
.btn-block{ width:100%; }
.btn-icon{ width:38px; height:38px; padding:0; border-radius:10px; }

/* ripple */
.btn::after{
  content:''; position:absolute; inset:0; border-radius:inherit;
  background:radial-gradient(circle at var(--rx,50%) var(--ry,50%), rgba(255,255,255,.55) 0%, rgba(255,255,255,0) 60%);
  opacity:0; transition:opacity .5s;
}
.btn:active::after{ opacity:1; transition:opacity 0s; }

/* ---------- Cards ---------- */
.card{
  background:#fff; border-radius:var(--r-lg); border:1px solid var(--gray-200);
  box-shadow:var(--shadow-sm); transition:box-shadow .25s var(--ease), transform .25s var(--ease);
}
.card-hover:hover{ box-shadow:var(--shadow-md); transform:translateY(-2px); }
.card-pad{ padding:24px; }

/* fade-in cards */
.fade-in{ opacity:0; transform:translateY(14px); animation:fadeInUp .55s var(--ease) forwards; }
@keyframes fadeInUp{ to{ opacity:1; transform:translateY(0); } }

/* ---------- Badges ---------- */
.badge{ display:inline-flex; align-items:center; gap:6px; padding:5px 12px; border-radius:var(--r-pill); font-size:12.5px; font-weight:600; }
.badge-teal{ background:var(--teal-100); color:#0E9C8D; }
.badge-amber{ background:var(--amber-100); color:#B36A08; }
.badge-red{ background:var(--red-100); color:var(--red-500); }
.badge-blue{ background:var(--blue-100); color:var(--blue-700); }
.badge-gray{ background:var(--gray-100); color:var(--gray-600); }
.badge-dot{ width:6px; height:6px; border-radius:50%; background:currentColor; }

/* ---------- Forms ---------- */
.field{ display:flex; flex-direction:column; gap:7px; margin-bottom:18px; }
.field label{ font-size:13.5px; font-weight:600; color:var(--gray-800); }
.field .hint{ font-size:12.5px; color:var(--gray-500); font-weight:400; }
.input, .select, textarea.input{
  width:100%; padding:12px 14px; border-radius:var(--r-sm); border:1.5px solid var(--gray-200);
  background:#fff; font-family:var(--font-body); font-size:14.5px; color:var(--ink);
  transition:border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.input:hover{ border-color:var(--gray-300); }
.input:focus, .select:focus, textarea.input:focus{ border-color:var(--blue-500); box-shadow:var(--shadow-focus); outline:none; }
.input-icon-wrap{ position:relative; }
.input-icon-wrap i{ position:absolute; left:14px; top:50%; transform:translateY(-50%); color:var(--gray-500); font-size:16px; }
.input-icon-wrap .input{ padding-left:42px; }
.input-icon-wrap .toggle-visibility{ position:absolute; right:14px; top:50%; transform:translateY(-50%); color:var(--gray-500); background:none; border:none; }
.checkbox-row{ display:flex; align-items:center; gap:8px; font-size:14px; color:var(--gray-600); }
.checkbox-row input{ width:16px; height:16px; accent-color:var(--blue-600); }

/* ---------- Tables ---------- */
.table-wrap{ overflow-x:auto; border-radius:var(--r-lg); border:1px solid var(--gray-200); background:#fff; }
table.data-table{ width:100%; border-collapse:collapse; min-width:720px; }
.data-table thead th{
  text-align:left; font-size:12.5px; text-transform:uppercase; letter-spacing:.04em;
  color:var(--gray-500); font-weight:600; padding:14px 20px; background:var(--gray-50); border-bottom:1px solid var(--gray-200);
  white-space:nowrap;
}
.data-table tbody td{ padding:16px 20px; font-size:14.5px; border-bottom:1px solid var(--gray-100); color:var(--ink); }
.data-table tbody tr{ transition:background .15s; }
.data-table tbody tr:hover{ background:var(--gray-50); }
.data-table tbody tr:last-child td{ border-bottom:none; }
.row-actions{ display:flex; gap:6px; }
.avatar{ width:36px; height:36px; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13px; color:#fff; background:var(--grad-primary); flex-shrink:0; }
.name-cell{ display:flex; align-items:center; gap:12px; }
.name-cell .sub{ font-size:12.5px; color:var(--gray-500); }

/* pagination */
.pagination{ display:flex; align-items:center; justify-content:space-between; padding:16px 20px; border-top:1px solid var(--gray-200); flex-wrap:wrap; gap:12px; }
.pg-btns{ display:flex; gap:6px; }
.pg-btn{ width:34px; height:34px; border-radius:8px; border:1px solid var(--gray-200); background:#fff; display:flex; align-items:center; justify-content:center; font-size:13.5px; font-weight:600; color:var(--gray-600); transition:.15s; }
.pg-btn:hover{ border-color:var(--blue-500); color:var(--blue-600); }
.pg-btn.active{ background:var(--grad-primary); color:#fff; border-color:transparent; }

/* toolbar */
.toolbar{ display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:18px; }
.toolbar-filters{ display:flex; gap:10px; flex-wrap:wrap; align-items:center; }
.search-box{ position:relative; }
.search-box i{ position:absolute; left:12px; top:50%; transform:translateY(-50%); color:var(--gray-500); }
.search-box input{ padding:10px 14px 10px 38px; border-radius:var(--r-sm); border:1.5px solid var(--gray-200); font-size:14px; width:240px; background:#fff; }

/* ---------- Modal ---------- */
.modal-overlay{ position:fixed; inset:0; background:rgba(15,26,60,.45); backdrop-filter:blur(2px); display:flex; align-items:center; justify-content:center; z-index:200; opacity:0; pointer-events:none; transition:opacity .22s var(--ease); }
.modal-overlay.open{ opacity:1; pointer-events:auto; }
.modal{ background:#fff; border-radius:var(--r-lg); width:100%; max-width:460px; box-shadow:var(--shadow-lg); transform:translateY(16px) scale(.98); opacity:0; transition:.25s var(--ease); max-height:88vh; overflow-y:auto; }
.modal-overlay.open .modal{ transform:translateY(0) scale(1); opacity:1; }
.modal-head{ display:flex; align-items:center; justify-content:space-between; padding:20px 24px; border-bottom:1px solid var(--gray-100); }
.modal-body{ padding:24px; }
.modal-foot{ padding:16px 24px; border-top:1px solid var(--gray-100); display:flex; justify-content:flex-end; gap:10px; }
.modal-close{ background:none; border:none; color:var(--gray-500); font-size:20px; }

/* ---------- Toasts ---------- */
.toast-stack{ position:fixed; top:20px; right:20px; z-index:300; display:flex; flex-direction:column; gap:10px; }
.toast{ display:flex; align-items:center; gap:10px; background:#fff; border-left:4px solid var(--teal-500); border-radius:12px; box-shadow:var(--shadow-lg); padding:14px 18px; min-width:280px; transform:translateX(120%); animation:toastIn .4s var(--ease) forwards; font-size:14px; }
.toast.error{ border-color:var(--red-500); }
.toast.warn{ border-color:var(--amber-500); }
.toast i{ font-size:18px; color:var(--teal-500); }
.toast.error i{ color:var(--red-500); }
.toast.warn i{ color:var(--amber-500); }
@keyframes toastIn{ to{ transform:translateX(0); } }
.toast.hide{ animation:toastOut .3s var(--ease) forwards; }
@keyframes toastOut{ to{ transform:translateX(120%); opacity:0; } }

/* ---------- Empty state ---------- */
.empty-state{ text-align:center; padding:64px 24px; }
.empty-state i{ font-size:44px; color:var(--gray-300); margin-bottom:14px; }
.empty-state h4{ font-size:16px; margin-bottom:6px; }
.empty-state p{ color:var(--gray-500); font-size:14px; max-width:360px; margin:0 auto 18px; }

/* ---------- Skeleton ---------- */
.skeleton{ background:linear-gradient(90deg, var(--gray-100) 25%, var(--gray-200) 37%, var(--gray-100) 63%); background-size:400% 100%; animation:shimmer 1.4s ease infinite; border-radius:8px; }
@keyframes shimmer{ 0%{ background-position:100% 0; } 100%{ background-position:0 0; } }

/* ---------- Breadcrumb ---------- */
.breadcrumb{ display:flex; align-items:center; gap:8px; font-size:13.5px; color:var(--gray-500); margin-bottom:18px; flex-wrap:wrap; }
.breadcrumb a:hover{ color:var(--blue-600); }
.breadcrumb i{ font-size:11px; }
.breadcrumb .current{ color:var(--ink); font-weight:600; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar{ width:8px; height:8px; }
::-webkit-scrollbar-thumb{ background:var(--gray-300); border-radius:8px; }
::-webkit-scrollbar-track{ background:transparent; }

/* ============================================================
   App shell: sidebar + topbar (dashboards)
   ============================================================ */
.app-shell{ display:flex; min-height:100vh; }

.sidebar{
  width:var(--sidebar-w); flex-shrink:0; background:var(--navy-900);
  background-image: radial-gradient(600px 300px at -10% -10%, rgba(67,104,240,.35), transparent 60%);
  color:#cfd6f2; position:fixed; top:0; left:0; bottom:0; z-index:100;
  display:flex; flex-direction:column; transition:width .28s var(--ease);
  overflow:hidden;
}
.sidebar.collapsed{ width:var(--sidebar-w-collapsed); }
.sidebar-brand{ display:flex; align-items:center; gap:12px; padding:22px 22px; flex-shrink:0; }
.sidebar-brand .mark{ width:38px; height:38px; border-radius:11px; background:var(--grad-teal); display:flex; align-items:center; justify-content:center; color:#fff; font-family:var(--font-display); font-weight:800; flex-shrink:0; }
.sidebar-brand .brand-text{ font-family:var(--font-display); font-weight:700; color:#fff; font-size:16px; white-space:nowrap; }
.sidebar-brand .brand-text small{ display:block; font-family:var(--font-body); font-weight:400; font-size:11.5px; color:#8b96c4; }
.sidebar.collapsed .brand-text, .sidebar.collapsed .nav-label, .sidebar.collapsed .nav-section-title{ display:none; }

.sidebar-nav{ flex:1; overflow-y:auto; padding:8px 14px 14px; }
.nav-section-title{ font-size:11px; text-transform:uppercase; letter-spacing:.08em; color:#6b76a8; padding:16px 12px 8px; }
.nav-item{ display:flex; align-items:center; gap:13px; padding:11px 12px; border-radius:10px; color:#c3cbea; font-size:14.5px; font-weight:500; margin-bottom:2px; transition:background .16s, color .16s; position:relative; white-space:nowrap; }
.nav-item i{ font-size:18px; width:20px; text-align:center; flex-shrink:0; }
.nav-item:hover{ background:rgba(255,255,255,.06); color:#fff; }
.nav-item.active{ background:linear-gradient(90deg, rgba(67,104,240,.35), rgba(67,104,240,.08)); color:#fff; }
.nav-item.active::before{ content:''; position:absolute; left:-14px; top:8px; bottom:8px; width:3px; border-radius:3px; background:var(--teal-500); }
.nav-item .count{ margin-left:auto; background:rgba(255,255,255,.12); color:#fff; font-size:11px; font-weight:700; padding:2px 7px; border-radius:20px; }
.sidebar.collapsed .nav-item .count{ display:none; }

.sidebar-foot{ padding:16px; border-top:1px solid rgba(255,255,255,.08); flex-shrink:0; }
.collapse-btn{ width:100%; display:flex; align-items:center; justify-content:center; gap:8px; background:rgba(255,255,255,.06); color:#c3cbea; border:none; padding:10px; border-radius:10px; font-size:13px; }
.collapse-btn:hover{ background:rgba(255,255,255,.1); color:#fff; }

.main-col{ flex:1; margin-left:var(--sidebar-w); transition:margin-left .28s var(--ease); min-width:0; display:flex; flex-direction:column; }
.sidebar.collapsed ~ .main-col{ margin-left:var(--sidebar-w-collapsed); }

.topbar{
  height:var(--topbar-h); background:rgba(246,247,251,.85); backdrop-filter:blur(10px);
  border-bottom:1px solid var(--gray-200); display:flex; align-items:center; justify-content:space-between;
  padding:0 28px; position:sticky; top:0; z-index:90; gap:20px;
}
.topbar-left{ display:flex; align-items:center; gap:16px; min-width:0; }
.menu-toggle{ display:none; background:none; border:none; font-size:22px; color:var(--gray-600); }
.topbar-search{ position:relative; }
.topbar-search i{ position:absolute; left:14px; top:50%; transform:translateY(-50%); color:var(--gray-500); }
.topbar-search input{ width:280px; padding:10px 14px 10px 40px; border-radius:var(--r-pill); border:1.5px solid var(--gray-200); background:#fff; font-size:14px; }
.topbar-right{ display:flex; align-items:center; gap:16px; flex-shrink:0; }
.icon-btn{ position:relative; width:40px; height:40px; border-radius:10px; background:#fff; border:1px solid var(--gray-200); display:flex; align-items:center; justify-content:center; color:var(--gray-600); font-size:17px; transition:.15s; }
.icon-btn:hover{ border-color:var(--blue-500); color:var(--blue-600); }
.icon-btn .dot{ position:absolute; top:8px; right:8px; width:8px; height:8px; border-radius:50%; background:var(--red-500); border:2px solid #fff; }
.profile-btn{ display:flex; align-items:center; gap:10px; background:#fff; border:1px solid var(--gray-200); border-radius:var(--r-pill); padding:5px 14px 5px 5px; }
.profile-btn .avatar{ width:32px; height:32px; font-size:12px; }
.profile-btn .who{ text-align:left; }
.profile-btn .who strong{ display:block; font-size:13.5px; }
.profile-btn .who span{ font-size:11.5px; color:var(--gray-500); }
.profile-btn i.bx-chevron-down{ color:var(--gray-500); font-size:16px; }

.dropdown{ position:relative; }
.dropdown-menu{ position:absolute; right:0; top:calc(100% + 10px); background:#fff; border:1px solid var(--gray-200); border-radius:14px; box-shadow:var(--shadow-lg); width:240px; padding:8px; opacity:0; visibility:hidden; transform:translateY(-8px); transition:.2s var(--ease); z-index:150; }
.dropdown.open .dropdown-menu{ opacity:1; visibility:visible; transform:translateY(0); }
.dropdown-menu a, .dropdown-menu button{ display:flex; align-items:center; gap:10px; width:100%; padding:10px 12px; border-radius:9px; font-size:14px; color:var(--gray-800); background:none; border:none; text-align:left; }
.dropdown-menu a:hover, .dropdown-menu button:hover{ background:var(--gray-50); }
.dropdown-menu hr{ border:none; border-top:1px solid var(--gray-100); margin:6px 0; }
.dropdown-menu .danger{ color:var(--red-500); }
.notif-panel{ width:340px; }
.notif-item{ display:flex; gap:12px; padding:12px; border-radius:10px; align-items:flex-start; }
.notif-item .n-ico{ width:34px; height:34px; border-radius:9px; background:var(--blue-100); color:var(--blue-600); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.notif-item .n-body p{ font-size:13.5px; line-height:1.4; }
.notif-item .n-body small{ color:var(--gray-500); font-size:11.5px; }

.page{ padding:28px; max-width:1400px; }
.page-head{ display:flex; align-items:flex-end; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:22px; }
.page-head h1{ font-size:24px; font-weight:700; }
.page-head p.sub{ color:var(--gray-500); font-size:14.5px; margin-top:4px; }

.overlay-scrim{ position:fixed; inset:0; background:rgba(15,26,60,.4); z-index:95; opacity:0; pointer-events:none; transition:.2s; }
.overlay-scrim.show{ opacity:1; pointer-events:auto; }

/* stat cards grid */
.stat-grid{ display:grid; grid-template-columns:repeat(4, 1fr); gap:20px; margin-bottom:24px; }
.stat-card{ padding:22px; display:flex; flex-direction:column; gap:14px; position:relative; }
.stat-card .top-row{ display:flex; align-items:flex-start; justify-content:space-between; }
.stat-card .ico{ width:44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center; font-size:20px; color:#fff; }
.stat-card .value{ font-family:var(--font-display); font-size:30px; font-weight:700; color:var(--navy-900); }
.stat-card .label{ font-size:13.5px; color:var(--gray-500); font-weight:500; }
.stat-card .trend{ font-size:12.5px; font-weight:600; display:flex; align-items:center; gap:4px; }
.trend.up{ color:#0E9C8D; } .trend.down{ color:var(--red-500); }

.grid-2{ display:grid; grid-template-columns:1.6fr 1fr; gap:20px; }
.section-title{ display:flex; align-items:center; justify-content:space-between; margin-bottom:16px; }
.section-title h3{ font-size:16.5px; font-weight:700; }
.section-title a{ font-size:13px; color:var(--blue-600); font-weight:600; }

.activity-item{ display:flex; gap:14px; padding:14px 0; border-bottom:1px solid var(--gray-100); }
.activity-item:last-child{ border:none; padding-bottom:0; }
.activity-item .a-ico{ width:38px; height:38px; border-radius:10px; background:var(--gray-100); color:var(--gray-600); display:flex; align-items:center; justify-content:center; flex-shrink:0; }
.activity-item p{ font-size:14px; }
.activity-item p b{ font-weight:600; }
.activity-item small{ color:var(--gray-500); font-size:12px; }

/* logbook rung progress — signature element */
.rung-track{ display:flex; align-items:center; gap:6px; margin:18px 0 6px; }
.rung{ flex:1; height:8px; border-radius:5px; background:var(--gray-100); position:relative; overflow:hidden; }
.rung.filled{ background:var(--grad-teal); }
.rung.current::after{ content:''; position:absolute; inset:0; background:rgba(255,255,255,.35); animation:pulseRung 1.6s infinite; }
@keyframes pulseRung{ 0%,100%{ opacity:.2; } 50%{ opacity:.6; } }

/* responsive */
@media (max-width: 1100px){
  .stat-grid{ grid-template-columns:repeat(2,1fr); }
  .grid-2{ grid-template-columns:1fr; }
}
@media (max-width: 900px){
  .sidebar{ transform:translateX(-100%); width:var(--sidebar-w); }
  .sidebar.mobile-open{ transform:translateX(0); }
  .main-col, .sidebar.collapsed ~ .main-col{ margin-left:0; }
  .menu-toggle{ display:flex; align-items:center; }
  .topbar-search input{ width:160px; }
}
@media (max-width: 640px){
  .stat-grid{ grid-template-columns:1fr; }
  .page{ padding:18px; }
  .topbar{ padding:0 16px; }
  .topbar-search{ display:none; }
  .profile-btn .who{ display:none; }
}
