/* =========================================================================
   SISTEM INFORMASI ALUMNI — Admin Design System
   ========================================================================= */

:root {
  /* Warna inti */
  --navy-950: #0D1830;
  --navy-900: #12203D;
  --navy-800: #17294D;
  --navy-700: #1E3560;
  --navy-accent: #23407A;

  --blue-600: #2454A8;
  --blue-500: #2F6FCB;
  --blue-50:  #EAF1FC;

  --amber-500: #E8A33D;
  --amber-50:  #FDF3E3;

  --green-600: #1E8F6F;
  --green-50:  #E6F5EF;

  --teal-600: #1D7A93;
  --teal-50:  #E4F3F6;

  --purple-600: #6449AD;
  --purple-50: #EFEAFB;

  --orange-600: #C9622A;
  --orange-50: #FBEBE0;

  --pink-600: #B2447A;
  --pink-50: #FBEAF2;

  --red-600: #C13B3B;
  --red-50: #FBEAEA;

  --ink-900: #1B2437;
  --ink-700: #384158;
  --ink-500: #5B6478;
  --ink-400: #838BA0;
  --ink-200: #DEE2EB;
  --ink-100: #EBEEF3;

  --bg-app: #F3F5F9;
  --bg-card: #FFFFFF;
  --border-soft: #E5E8F0;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 2px rgba(18, 32, 61, 0.04), 0 1px 1px rgba(18, 32, 61, 0.03);
  --shadow-md: 0 4px 14px rgba(18, 32, 61, 0.07);
  --shadow-lg: 0 12px 32px rgba(18, 32, 61, 0.12);

  --sidebar-w: 264px;
  --topbar-h: 68px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-app);
  color: var(--ink-900);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14.5px;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

::selection { background: var(--blue-50); color: var(--blue-600); }

/* Scrollbar halus */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #C7CEDC; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #AEB7CB; }

/* =========================================================================
   LOGIN PAGE
   ========================================================================= */
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  background: var(--navy-950);
}

.login-visual {
  position: relative;
  overflow: hidden;
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(720px 480px at 8% -10%, rgba(47, 111, 203, 0.35), transparent 60%),
    radial-gradient(600px 420px at 100% 100%, rgba(232, 163, 61, 0.16), transparent 55%),
    linear-gradient(165deg, var(--navy-950) 0%, var(--navy-900) 55%, var(--navy-800) 100%);
  color: #fff;
}

.login-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse at 20% 20%, black 0%, transparent 65%);
  pointer-events: none;
}

.login-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.login-brand .mark {
  width: 42px; height: 42px; border-radius: 11px;
  background: linear-gradient(140deg, var(--blue-500), var(--navy-700));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; color: #fff;
  box-shadow: var(--shadow-md);
}
.login-brand .name { font-weight: 700; font-size: 16.5px; letter-spacing: 0.2px; }
.login-brand .sub { font-size: 12px; color: rgba(255,255,255,0.55); margin-top: 1px; }

.login-quote {
  position: relative;
  z-index: 1;
  max-width: 460px;
}
.login-quote .eyebrow {
  font-size: 12px; text-transform: uppercase; letter-spacing: 1.4px;
  color: var(--amber-500); font-weight: 700; margin-bottom: 14px;
}
.login-quote h1 {
  font-size: 32px; line-height: 1.28; font-weight: 700; margin: 0 0 16px;
  letter-spacing: -0.3px;
}
.login-quote p { color: rgba(255,255,255,0.62); line-height: 1.7; font-size: 14.5px; margin: 0; }

.login-stats {
  position: relative; z-index: 1;
  display: flex; gap: 36px; margin-top: 40px;
}
.login-stats div strong { display: block; font-size: 24px; font-weight: 800; }
.login-stats div span { font-size: 12px; color: rgba(255,255,255,0.5); }

.login-form-side {
  display: flex; align-items: center; justify-content: center;
  background: var(--bg-app);
  padding: 40px;
}
.login-box { width: 100%; max-width: 380px; }
.login-box h2 { font-size: 23px; font-weight: 700; margin: 0 0 6px; color: var(--ink-900); }
.login-box .desc { color: var(--ink-500); font-size: 13.5px; margin: 0 0 28px; }

.field { margin-bottom: 18px; }
.field label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--ink-700); margin-bottom: 7px;
}
.field .input-wrap { position: relative; }
.field .input-wrap > svg {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--ink-400);
}
.field input {
  width: 100%; padding: 12px 14px 12px 40px;
  border: 1.5px solid var(--ink-200); border-radius: var(--radius-sm);
  font-size: 14px; font-family: inherit; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus {
  outline: none; border-color: var(--blue-500);
  box-shadow: 0 0 0 3.5px var(--blue-50);
}
.field .toggle-pass {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--ink-400); padding: 4px;
}

.remember-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; font-size: 13px; }
.remember-row label { display: flex; align-items: center; gap: 7px; color: var(--ink-500); cursor: pointer; }

.btn-login {
  width: 100%; padding: 12.5px; border: none; border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--blue-600), var(--navy-accent));
  color: #fff; font-weight: 700; font-size: 14.5px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(36, 84, 168, 0.28);
  transition: transform .12s, box-shadow .12s;
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(36, 84, 168, 0.34); }
.btn-login:active { transform: translateY(0); }

.login-alert {
  display: flex; gap: 10px; align-items: flex-start;
  background: var(--red-50); border: 1px solid #F3CACA; color: var(--red-600);
  padding: 11px 13px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 18px;
}

.login-demo {
  margin-top: 26px; padding: 13px 15px; border-radius: var(--radius-sm);
  background: #fff; border: 1px dashed var(--ink-200); font-size: 12.3px; color: var(--ink-500);
}
.login-demo b { color: var(--ink-700); }

.login-footer-note { text-align: center; color: var(--ink-400); font-size: 12px; margin-top: 26px; }

/* =========================================================================
   ADMIN LAYOUT
   ========================================================================= */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--navy-950), var(--navy-900) 55%, var(--navy-800));
  color: #fff;
  position: fixed; inset: 0 auto 0 0;
  display: flex; flex-direction: column;
  z-index: 40;
  transition: transform .2s ease;
}

.sidebar-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 20px 20px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.sidebar-brand .mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(140deg, var(--blue-500), var(--navy-700));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px; flex-shrink: 0;
}
.sidebar-brand .txt { min-width: 0; }
.sidebar-brand .txt .n1 { font-size: 13.5px; font-weight: 700; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-brand .txt .n2 { font-size: 11px; color: rgba(255,255,255,0.45); }

.sidebar-scroll { flex: 1; overflow-y: auto; padding: 14px 12px 20px; }

.nav-group-label {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: 1px;
  color: rgba(255,255,255,0.32); font-weight: 700;
  padding: 16px 12px 8px;
}
.nav-group-label:first-child { padding-top: 4px; }

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 9px;
  color: rgba(255,255,255,0.72); font-size: 13.4px; font-weight: 500;
  margin-bottom: 2px; cursor: pointer;
  position: relative;
  transition: background .12s, color .12s;
}
.nav-item svg { flex-shrink: 0; opacity: 0.85; }
.nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
.nav-item.active { background: rgba(47,111,203,0.18); color: #fff; }
.nav-item.active::before {
  content: '';
  position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  background: var(--amber-500); border-radius: 0 3px 3px 0;
}
.nav-item .chev { margin-left: auto; transition: transform .15s; opacity: 0.5; }
.nav-item.has-sub.open .chev { transform: rotate(90deg); }

.nav-badge {
  margin-left: auto; background: var(--amber-500); color: #2A1B04;
  font-size: 10.5px; font-weight: 800; padding: 1px 7px; border-radius: 20px;
}

.nav-sub { max-height: 0; overflow: hidden; transition: max-height .2s ease; padding-left: 14px; }
.nav-sub.open { max-height: 400px; }
.nav-sub .nav-item { font-size: 12.9px; padding: 8px 12px; color: rgba(255,255,255,0.58); }
.nav-sub .nav-item:hover, .nav-sub .nav-item.active { color: #fff; }
.nav-sub .nav-item.active::before { left: -2px; }

.sidebar-user {
  padding: 14px 16px; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; gap: 10px;
}
.sidebar-user .avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--navy-accent); display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 12.5px; flex-shrink: 0;
}
.sidebar-user .meta { min-width: 0; flex: 1; }
.sidebar-user .meta .u-name { font-size: 12.8px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .meta .u-role { font-size: 11px; color: rgba(255,255,255,0.42); text-transform: capitalize; }
.sidebar-user a.logout-mini { color: rgba(255,255,255,0.5); padding: 6px; border-radius: 7px; }
.sidebar-user a.logout-mini:hover { background: rgba(255,255,255,0.08); color: #fff; }

/* Main area */
.main-area { margin-left: var(--sidebar-w); flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h);
  background: #fff; border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 26px; position: sticky; top: 0; z-index: 30;
}
.topbar-left { display: flex; align-items: center; gap: 14px; }
.burger { display: none; background: none; border: none; cursor: pointer; color: var(--ink-700); }
.breadcrumb { font-size: 12.5px; color: var(--ink-400); }
.breadcrumb b { color: var(--ink-900); font-weight: 700; font-size: 15.5px; display: block; margin-bottom: 1px; }

.topbar-right { display: flex; align-items: center; gap: 10px; }
.tb-icon-btn {
  width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border-soft);
  background: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--ink-500); position: relative; transition: background .12s;
}
.tb-icon-btn:hover { background: var(--bg-app); }
.tb-icon-btn .dot {
  position: absolute; top: 7px; right: 7px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--red-600); border: 2px solid #fff;
}
.tb-profile { display: flex; align-items: center; gap: 9px; padding: 5px 10px 5px 5px; border-radius: 11px; border: 1px solid var(--border-soft); cursor: pointer; }
.tb-profile .avatar { width: 30px; height: 30px; border-radius: 8px; background: linear-gradient(140deg, var(--blue-500), var(--navy-accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.tb-profile .meta { line-height: 1.2; }
.tb-profile .meta .n { font-size: 12.8px; font-weight: 700; }
.tb-profile .meta .r { font-size: 10.8px; color: var(--ink-400); text-transform: capitalize; }

.content { padding: 26px; flex: 1; }

/* Dropdown notif sederhana */
.dropdown-panel {
  position: absolute; top: 54px; right: 26px; width: 340px; background: #fff;
  border: 1px solid var(--border-soft); border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  z-index: 50; display: none; overflow: hidden;
}
.dropdown-panel.open { display: block; }
.dropdown-panel .dh { padding: 14px 16px; border-bottom: 1px solid var(--border-soft); font-weight: 700; font-size: 13.5px; display: flex; justify-content: space-between; align-items: center; }
.dropdown-panel .dh span { font-size: 11px; font-weight: 700; color: var(--blue-600); background: var(--blue-50); padding: 2px 8px; border-radius: 20px; }
.dropdown-list { max-height: 340px; overflow-y: auto; }
.dropdown-item { display: flex; gap: 11px; padding: 12px 16px; border-bottom: 1px solid #F2F4F8; }
.dropdown-item:last-child { border-bottom: none; }
.dropdown-item .ic { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.dropdown-item .tx b { display: block; font-size: 12.8px; font-weight: 600; color: var(--ink-900); line-height: 1.4; }
.dropdown-item .tx span { font-size: 11.3px; color: var(--ink-400); }

/* =========================================================================
   PAGE HEADER / BREADCRUMB BLOCK
   ========================================================================= */
.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 22px; flex-wrap: wrap; gap: 14px;
}
.page-head h1 { font-size: 21px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.2px; }
.page-head .sub { color: var(--ink-500); font-size: 13.2px; }

/* =========================================================================
   BUTTONS
   ========================================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9.5px 16px; border-radius: 9px; font-size: 13.3px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer; font-family: inherit;
  transition: background .12s, border-color .12s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--blue-600); color: #fff; box-shadow: 0 4px 10px rgba(36,84,168,0.22); }
.btn-primary:hover { background: var(--navy-accent); }
.btn-outline { background: #fff; border-color: var(--ink-200); color: var(--ink-700); }
.btn-outline:hover { background: var(--bg-app); }
.btn-soft { background: var(--blue-50); color: var(--blue-600); }
.btn-soft:hover { background: #DEEAFB; }
.btn-danger { background: var(--red-50); color: var(--red-600); }
.btn-danger:hover { background: #F6D6D6; }
.btn-success { background: var(--green-600); color: #fff; }
.btn-sm { padding: 6.5px 11px; font-size: 12.3px; border-radius: 7px; }
.btn-icon { padding: 8px; border-radius: 8px; }

/* =========================================================================
   STAT CARDS
   ========================================================================= */
.stat-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
  margin-bottom: 22px;
}
.stat-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stat-card {
  background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius-md);
  padding: 18px 18px 16px; box-shadow: var(--shadow-sm);
  transition: box-shadow .15s, transform .15s;
}
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.stat-card .top-row { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 14px; }
.stat-card .icon-badge {
  width: 40px; height: 40px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
}
.stat-card .trend { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 20px; display: flex; align-items: center; gap: 3px; }
.stat-card .trend.up { color: var(--green-600); background: var(--green-50); }
.stat-card .trend.down { color: var(--red-600); background: var(--red-50); }
.stat-card .trend.flat { color: var(--ink-500); background: var(--ink-100); }
.stat-card .value { font-size: 26px; font-weight: 800; letter-spacing: -0.4px; line-height: 1; margin-bottom: 6px; }
.stat-card .label { font-size: 12.6px; color: var(--ink-500); font-weight: 500; }

.tint-blue   { background: var(--blue-50);   color: var(--blue-600); }
.tint-green  { background: var(--green-50);  color: var(--green-600); }
.tint-amber  { background: var(--amber-50);  color: #B87614; }
.tint-teal   { background: var(--teal-50);   color: var(--teal-600); }
.tint-purple { background: var(--purple-50); color: var(--purple-600); }
.tint-orange { background: var(--orange-50); color: var(--orange-600); }
.tint-pink   { background: var(--pink-50);   color: var(--pink-600); }
.tint-red    { background: var(--red-50);    color: var(--red-600); }

/* =========================================================================
   CARD / PANEL
   ========================================================================= */
.panel {
  background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}
.panel-head {
  padding: 18px 20px; border-bottom: 1px solid var(--border-soft);
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.panel-head h3 { margin: 0; font-size: 15px; font-weight: 700; }
.panel-head .sub { font-size: 12px; color: var(--ink-400); margin-top: 2px; }
.panel-body { padding: 20px; }
.panel-body.no-pad { padding: 0; }

.grid-2col { display: grid; grid-template-columns: 1.55fr 1fr; gap: 18px; margin-bottom: 18px; }
.grid-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.grid-charts-3 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; margin-bottom: 18px; }

/* Activity feed */
.activity-item { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid #F2F4F8; }
.activity-item:last-child { border-bottom: none; padding-bottom: 2px; }
.activity-item .ic { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.activity-item .body { flex: 1; min-width: 0; }
.activity-item .body p { margin: 0; font-size: 13px; color: var(--ink-800); line-height: 1.5; }
.activity-item .body p b { font-weight: 700; }
.activity-item .body .time { font-size: 11.3px; color: var(--ink-400); margin-top: 2px; }

/* Notif list on dashboard */
.notif-row { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid #F2F4F8; }
.notif-row:last-child { border-bottom: none; }
.notif-row .ic { width: 32px; height: 32px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; margin-top: 1px; }
.notif-row .txt p { margin: 0; font-size: 12.8px; color: var(--ink-800); font-weight: 600; line-height: 1.45; }
.notif-row .txt span { font-size: 11.5px; color: var(--ink-400); }
.notif-row .go { margin-left: auto; color: var(--ink-300); }

/* Table */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data-table th {
  text-align: left; font-size: 11.3px; text-transform: uppercase; letter-spacing: 0.4px;
  color: var(--ink-400); font-weight: 700; padding: 12px 16px; background: #FAFBFD;
  border-bottom: 1px solid var(--border-soft); white-space: nowrap;
}
table.data-table td { padding: 13px 16px; border-bottom: 1px solid #F2F4F8; vertical-align: middle; color: var(--ink-800); }
table.data-table tbody tr:hover { background: #FAFBFD; }
table.data-table tbody tr:last-child td { border-bottom: none; }

/* Thumbnail foto pada tabel (event & berita) — kolom Cover terpisah, ukuran seragam & bisa diklik */
.thumb-cover {
  display: inline-flex; width: 46px; height: 46px; border-radius: 9px; overflow: hidden;
  border: 1px solid var(--border-soft); background: var(--bg-app); cursor: default;
}
.thumb-cover.has-img { cursor: zoom-in; }
.thumb-cover.has-img:hover { border-color: var(--blue-500); }
.thumb-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-cover .thumb-empty { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: var(--ink-300); }

/* Preview gambar di form tambah/edit */
.upload-preview { margin-top: 10px; display: flex; align-items: center; gap: 12px; }
.upload-preview img { width: 90px; height: 90px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border-soft); }
.upload-preview .hint { margin-top: 0; }

/* Lightbox untuk lihat foto ukuran asli */
.img-lightbox-overlay {
  position: fixed; inset: 0; background: rgba(10,16,32,0.78); z-index: 200;
  display: none; align-items: center; justify-content: center; padding: 30px; cursor: zoom-out;
}
.img-lightbox-overlay.open { display: flex; }
.img-lightbox-overlay img { max-width: min(90vw, 780px); max-height: 85vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); cursor: default; }
.img-lightbox-overlay .lb-close {
  position: absolute; top: 22px; right: 26px; width: 40px; height: 40px; border-radius: 50%;
  background: rgba(255,255,255,0.12); border: none; color: #fff; display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .12s;
}
.img-lightbox-overlay .lb-close:hover { background: rgba(255,255,255,0.22); }
.img-lightbox-overlay .lb-caption {
  position: absolute; bottom: 26px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,0.85); font-size: 13px;
}

.cell-user { display: flex; align-items: center; gap: 10px; }
.cell-user .av { width: 32px; height: 32px; border-radius: 8px; background: var(--blue-50); color: var(--blue-600); font-weight: 700; font-size: 11.5px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.cell-user .info b { display: block; font-size: 13px; font-weight: 600; }
.cell-user .info span { font-size: 11.6px; color: var(--ink-400); }

.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 11.3px; font-weight: 700; padding: 4px 10px; border-radius: 20px; }
.badge-dot { width: 6px; height: 6px; border-radius: 50%; }
.badge-green { background: var(--green-50); color: var(--green-600); }
.badge-amber { background: var(--amber-50); color: #B87614; }
.badge-red { background: var(--red-50); color: var(--red-600); }
.badge-blue { background: var(--blue-50); color: var(--blue-600); }
.badge-gray { background: var(--ink-100); color: var(--ink-500); }
.badge-purple { background: var(--purple-50); color: var(--purple-600); }
.badge-teal { background: var(--teal-50); color: var(--teal-600); }
.badge-orange { background: var(--orange-50); color: var(--orange-600); }

.row-actions { display: flex; gap: 6px; }
.row-actions a, .row-actions button { width: 30px; height: 30px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--border-soft); background: #fff; color: var(--ink-500); cursor: pointer; }
.row-actions a:hover { background: var(--bg-app); }
.row-actions .act-danger:hover { background: var(--red-50); color: var(--red-600); border-color: #F3CACA; }
.row-actions .act-primary:hover { background: var(--blue-50); color: var(--blue-600); border-color: #C9DCF6; }
.row-actions .act-success:hover { background: var(--green-50); color: var(--green-600); border-color: #BFE4D3; }

/* Search / filter bar */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.search-input { position: relative; flex: 1; min-width: 220px; max-width: 320px; }
.search-input svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--ink-400); }
.search-input input {
  width: 100%; padding: 9.5px 12px 9.5px 36px; border: 1.5px solid var(--ink-200); border-radius: 9px;
  font-size: 13px; font-family: inherit;
}
.search-input input:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3.5px var(--blue-50); }
.select-filter {
  padding: 9.5px 30px 9.5px 12px; border: 1.5px solid var(--ink-200); border-radius: 9px;
  font-size: 13px; font-family: inherit; background: #fff; cursor: pointer;
}
.select-filter:focus { outline: none; border-color: var(--blue-500); }

/* Pagination */
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-top: 1px solid var(--border-soft); font-size: 12.5px; color: var(--ink-500); }
.pagination .pages { display: flex; gap: 5px; }
.pagination .pages a, .pagination .pages span { width: 30px; height: 30px; border-radius: 7px; display: flex; align-items: center; justify-content: center; border: 1px solid var(--border-soft); }
.pagination .pages .active { background: var(--blue-600); color: #fff; border-color: var(--blue-600); font-weight: 700; }

/* Forms */
.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.form-group label { display: block; font-size: 12.8px; font-weight: 600; color: var(--ink-700); margin-bottom: 6px; }
.form-group .req { color: var(--red-600); }
.form-group input[type=text], .form-group input[type=email], .form-group input[type=number],
.form-group input[type=date], .form-group input[type=datetime-local], .form-group input[type=password],
.form-group input[type=tel], .form-group input[type=file], .form-group select, .form-group textarea {
  width: 100%; padding: 10px 13px; border: 1.5px solid var(--ink-200); border-radius: 8px;
  font-size: 13.3px; font-family: inherit; background: #fff;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
  outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3.5px var(--blue-50);
}
.form-group textarea { resize: vertical; min-height: 90px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.hint { font-size: 11.5px; color: var(--ink-400); margin-top: 5px; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(13,24,48,0.5); backdrop-filter: blur(2px);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box { background: #fff; border-radius: var(--radius-lg); width: 100%; max-width: 480px; box-shadow: var(--shadow-lg); overflow: hidden; }
.modal-box.wide { max-width: 640px; }
.modal-head { padding: 18px 22px; border-bottom: 1px solid var(--border-soft); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { margin: 0; font-size: 15.5px; font-weight: 700; }
.modal-head button { background: none; border: none; cursor: pointer; color: var(--ink-400); padding: 4px; }
.modal-body { padding: 22px; max-height: 70vh; overflow-y: auto; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--border-soft); display: flex; justify-content: flex-end; gap: 10px; }

/* Alerts / flash */
.alert { display: flex; gap: 11px; align-items: flex-start; padding: 13px 15px; border-radius: 10px; font-size: 13.2px; margin-bottom: 18px; }
.alert-success { background: var(--green-50); color: #146650; border: 1px solid #BFE4D3; }
.alert-error { background: var(--red-50); color: var(--red-600); border: 1px solid #F3CACA; }
.alert-info { background: var(--blue-50); color: var(--blue-600); border: 1px solid #C9DCF6; }

/* Empty state */
.empty-state { text-align: center; padding: 52px 20px; color: var(--ink-400); }
.empty-state .ic { width: 56px; height: 56px; border-radius: 16px; background: var(--bg-app); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; color: var(--ink-300); }
.empty-state b { display: block; color: var(--ink-700); font-size: 14px; margin-bottom: 4px; }
.empty-state p { font-size: 12.8px; margin: 0; }

/* Tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border-soft); margin-bottom: 20px; }
.tab-item { padding: 11px 16px; font-size: 13px; font-weight: 600; color: var(--ink-500); cursor: pointer; border-bottom: 2.5px solid transparent; margin-bottom: -1px; }
.tab-item.active { color: var(--blue-600); border-color: var(--blue-600); }

/* Utility */
.mt-0{margin-top:0} .mb-0{margin-bottom:0}
.d-flex{display:flex} .items-center{align-items:center} .justify-between{justify-content:space-between}
.gap-8{gap:8px} .gap-10{gap:10px} .gap-14{gap:14px}
.text-muted{color:var(--ink-500)} .text-sm{font-size:12.5px}
.w-full{width:100%}

/* Responsive */
@media (max-width: 1200px) {
  .stat-grid, .stat-grid.cols-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-2col, .grid-charts, .grid-charts-3 { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin-left: 0; }
  .burger { display: flex; }
  .stat-grid, .stat-grid.cols-3 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }

  /* Overlay gelap di belakang sidebar saat dibuka lewat menu hamburger */
  .sidebar-overlay {
    display: none; position: fixed; inset: 0; background: rgba(13,24,48,.45);
    z-index: 39; opacity: 0; transition: opacity .2s ease;
  }
  .sidebar-overlay.open { display: block; opacity: 1; }

  .topbar { padding: 0 14px; flex-wrap: nowrap; gap: 8px; }
  .topbar-left { min-width: 0; gap: 10px; }
  .breadcrumb { min-width: 0; overflow: hidden; }
  .breadcrumb b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-right { gap: 6px; flex-shrink: 0; }
  .tb-icon-btn { width: 34px; height: 34px; }
  .tb-profile .meta { display: none; }
  /* Samakan tampilan dengan tombol notifikasi (border + ukuran sama) supaya
     header terlihat rapi & konsisten, bukan cuma avatar polos tanpa bingkai. */
  .tb-profile { width: 34px; height: 34px; padding: 0; justify-content: center; border: 1px solid var(--border-soft); }
  .tb-profile svg { display: none; }
  .dropdown-panel { right: 14px; width: min(320px, calc(100vw - 28px)); }
}

@media (max-width: 480px) {
  .content { padding: 14px; }
  .stat-box { padding: 14px 14px 12px; }
}

/* ---------- Login page: satu kolom di layar kecil ---------- */
@media (max-width: 860px) {
  .login-shell { grid-template-columns: 1fr; min-height: auto; }
  .login-visual { padding: 30px 26px 26px; }
  .login-quote { max-width: 100%; }
  .login-stats { margin-top: 22px; gap: 22px; }
  .login-quote h1 { font-size: 24px; }
  .login-form-side { padding: 28px 22px 36px; }
}
/* Di HP, hero dipadatkan jadi banner singkat (bukan disembunyikan total)
   supaya identitas brand tetap kelihatan tapi form login tidak ketutup
   jauh di bawah / butuh banyak scroll. */
@media (max-width: 560px) {
  .login-visual { padding: 20px 20px 18px; }
  .login-brand .mark { width: 36px; height: 36px; font-size: 15px; }
  .login-brand .name { font-size: 14.5px; }
  .login-brand .sub { font-size: 11px; }
  .login-quote { margin-top: 16px; }
  .login-quote .eyebrow { margin-bottom: 6px; font-size: 11px; }
  .login-quote h1 { font-size: 18px; line-height: 1.32; margin-bottom: 6px; }
  .login-quote p { display: none; }
  .login-stats { margin-top: 14px; gap: 16px; }
  .login-stats div strong { font-size: 16px; }
  .login-stats div span { font-size: 10.5px; }
  .login-form-side { padding: 22px 18px 30px; }
  .login-box h2 { font-size: 19px; }
}