:root {
  --primary: #0072bc;
  --primary-dark: #005a92;
  --primary-light: #e5f1f8;
  /* Bootstrap 5 primary (tombol/link/badge) */
  --bs-primary: #0072bc;
  --bs-primary-rgb: 0, 114, 188;
  --bs-link-color: #005a92;
  --bs-link-hover-color: #003e63;
  --bs-border-radius: 0.625rem;
  --bs-border-radius-sm: 0.5rem;
  --bs-border-radius-lg: 0.875rem;
  --secondary-bg-subtle: #e5f1f8;
  --info-bg: #e5f1f8;
  --success: #10b981;
  --success-dark: #059669;
  --success-bg: #d5f1de;
  --info: #3b82f6;
  --info-dark: #2563eb;
  --info-bg: #d6ebff;
  --warning: #f59e0b;
  --warning-dark: #d97706;
  --warning-bg: #fef7e6;
  --danger: #ef4444;
  --danger-dark: #dc2626;
  --danger-bg: #fadddd;
  --light: #f1f5f9;
  --dark: #1e293b;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #f8fafc;
  --card: #ffffff;
  --radius: 1rem;
  --shadow: 0 4px 12px rgba(0, 0, 0, .06);
  --sidebar: 260px;
  --font: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
}

/* Dark mode (toggle di navbar, data-bs-theme="dark" dari AdminLTE v4) */
[data-bs-theme="dark"] {
  --primary-light: #16294a;
  --success-bg: #052e22;
  --info-bg: #0a2f4a;
  --warning-bg: #3a2b0a;
  --danger-bg: #3a0d0d;
  --light: #1e293b;
  --dark: #e2e8f0;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --line: #334155;
  --bg: #0f172a;
  --card: #1e293b;
  --shadow: 0 4px 12px rgba(0, 0, 0, .4);
}
[data-bs-theme="dark"] .card-header, [data-bs-theme="dark"] .card-head { background: var(--card); }

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-size: 14.5px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.55;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: none; }

h1, h2, h3, h4 { margin: 0 0 .35em; line-height: 1.25; font-weight: 700; }
h1 { font-size: 1.55rem; }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 .8em; }

/* ---------- Layout: ditangani AdminLTE 3 (lihat app/views/head_adminlte.php) ---------- */

/* ---------- Cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.2rem 1.3rem;
  margin-bottom: 1.1rem;
}
.card.tight { padding: .9rem 1rem; }
.card-head { display: flex; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.card-head .grow { flex: 1; }
.card-head p { color: var(--muted); margin: 0; font-size: .85rem; }

.page-head { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.1rem; flex-wrap: wrap; }
.page-head .grow { flex: 1; }
.page-head p { color: var(--muted); margin: 0; font-size: .86rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .52rem .95rem;
  border-radius: 9999px;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff; font-size: .85rem; font-weight: 600;
  cursor: pointer; font-family: inherit;
  text-decoration: none; transition: .15s;
  line-height: 1.2;
}
.btn:hover { background: var(--primary-dark); border-color: var(--primary-dark); text-decoration: none; color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-outline { background: #fff; color: var(--primary-dark); border-color: var(--line); }
.btn-outline:hover { background: #e5f1f8; color: var(--primary-dark); border-color: #b9d8ec; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--primary); }
.btn-ghost:hover { background: #e5f1f8; border-color: transparent; color: var(--primary-dark); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #912018; border-color: #912018; }
.btn-sm { padding: .32rem .6rem; font-size: .78rem; border-radius: 7px; }
.btn-lg { padding: .7rem 1.3rem; font-size: .95rem; }
.btn-block { width: 100%; justify-content: center; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.actions { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.actions form { margin: 0; }

/* ---------- Alerts ---------- */
.alert {
  display: flex; gap: .6rem; align-items: flex-start;
  padding: .75rem .95rem; border-radius: 10px; margin-bottom: .9rem;
  font-size: .86rem; border: 1px solid transparent;
}
.alert-ok { background: var(--ok-bg); color: #085d3a; border-color: #abefc6; }
.alert-error { background: var(--danger-bg); color: #912018; border-color: #fecdca; }
.alert-info { background: var(--info-bg); color: #1849a9; border-color: #b2ddff; }
.alert-warn { background: #fffaeb; color: #93370d; border-color: #fedf89; }

/* ---------- Forms ---------- */
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem 1rem; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: .8rem; font-weight: 700; margin-bottom: .28rem; color: #34463f; }
.field .help { font-size: .74rem; color: var(--muted); margin-top: .22rem; }
.field .req { color: var(--danger); }
input[type=text], input[type=number], input[type=date], input[type=password],
input[type=email], input[type=tel], input[type=search], input[type=file], select, textarea {
  width: 100%;
  padding: .52rem .65rem;
  border: 1px solid #ced2d8;
  border-radius: 8px;
  background: #fff;
  font-family: inherit;
  font-size: .88rem;
  color: var(--text);
  outline: none;
  transition: border .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--success-dark);
  box-shadow: 0 0 0 3px rgba(20, 122, 88, .13);
}
textarea { min-height: 84px; resize: vertical; }
select { appearance: auto; }
.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: flex-end; }
.inline-form .field { min-width: 150px; }
.check { display: flex; align-items: center; gap: .45rem; font-size: .85rem; }
.check input { width: 16px; height: 16px; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
table.table { width: 100%; border-collapse: collapse; font-size: .86rem; background: #fff; }
.table th, .table td { padding: .58rem .65rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th {
  background: #f6faf8; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .05em; color: #4b635b; font-weight: 700; white-space: nowrap;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: #fbfefc; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .center { text-align: center; }
.table input[type=number] { width: 82px; padding: .35rem .4rem; text-align: right; }
.table input[type=text], .table textarea { padding: .35rem .5rem; font-size: .84rem; }
.table textarea { min-height: 44px; }
.table .row-actions { white-space: nowrap; }

.badge {
  display: inline-block; padding: .16rem .5rem; border-radius: 999px;
  font-size: .7rem; font-weight: 700; line-height: 1.5;
}
.badge-green { background: #d1fae5; color: var(--primary-dark); }
.badge-gray { background: #eef2f0; color: #54655f; }
.badge-gold { background: #fef7e6; color: #935f00; }
.badge-red { background: var(--danger-bg); color: var(--danger); }
.badge-blue { background: var(--info-bg); color: var(--info); }

.p-a { color: #059669; font-weight: 700; }
.p-b { color: #175cd3; font-weight: 700; }
.p-c { color: #b54708; font-weight: 700; }
.p-d { color: #b42318; font-weight: 700; }

/* ---------- Dashboard ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .9rem; margin-bottom: 1.1rem; }
.stat {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .95rem 1rem; box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.stat .s-label { font-size: .74rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.stat .s-value { font-size: 1.75rem; font-weight: 800; color: var(--primary-dark); line-height: 1.2; }
.stat .s-note { font-size: .74rem; color: var(--muted); }
.stat .s-ico { position: absolute; right: .9rem; top: .8rem; font-size: 1.5rem; opacity: .22; }

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.1rem; }

.hero {
  background: var(--primary-dark);
  color: #eaf7f1; border-radius: var(--radius); padding: 1.3rem 1.4rem;
  box-shadow: var(--shadow); margin-bottom: 1.1rem;
  display: flex; gap: 1rem; align-items: center; flex-wrap: wrap;
}
.hero h1 { color: #fff; margin-bottom: .2rem; }
.hero p { color: #c5e5d7; margin: 0; font-size: .88rem; }
.hero .grow { flex: 1; }
.hero .btn { background: #fff; color: var(--primary-dark); border-color: #fff; }
.hero .btn:hover { background: #e9f7f0; }

.progress { height: 8px; background: #e6eeea; border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: var(--success-dark); border-radius: 99px; }

.empty { text-align: center; padding: 2.2rem 1rem; color: var(--muted); }
.empty .big { font-size: 2.4rem; margin-bottom: .4rem; }

/* ---------- Login / Setup ---------- */
.auth-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr .9fr;
  background: var(--bg);
}
.auth-side {
  background: var(--primary);
  color: #d5f1de; padding: 3rem; display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.auth-side::after {
  content: ""; position: absolute; width: 420px; height: 420px; border-radius: 50%;
  background: rgba(255, 255, 255, .05); right: -140px; bottom: -140px;
}
.auth-side .logo-row { display: flex; align-items: center; gap: .8rem; margin-bottom: 2rem; }
.auth-side .logo-row img { width: 54px; height: 54px; background: #fff; border-radius: 12px; padding: 4px; object-fit: contain; }
.auth-side h1 { font-size: 2rem; color: #fff; }
.auth-side p { color: #b9dccd; max-width: 420px; }
.auth-side ul { padding-left: 1.1rem; color: #cde8dc; font-size: .88rem; }
.auth-side li { margin-bottom: .35rem; }
.auth-card { display: flex; align-items: center; justify-content: center; padding: 2rem; }
.auth-box { width: 100%; max-width: 420px; }
.auth-box.setup { max-width: 760px; }
.auth-box .card { padding: 1.6rem; }
.auth-title { text-align: center; margin-bottom: 1.2rem; }
.auth-title h2 { margin-bottom: .1rem; }
.auth-title p { color: var(--muted); font-size: .85rem; margin: 0; }
.auth-footer { text-align: center; font-size: .76rem; color: var(--muted); margin-top: 1rem; }

/* ---------- Nilai / rapor ---------- */
.toolbar {
  display: flex; gap: .7rem; flex-wrap: wrap; align-items: flex-end;
  padding: .9rem 1rem; background: #f7fbf9; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 1rem;
}
.toolbar .field { min-width: 170px; }
.toolbar .spacer { flex: 1; }

.nilai-badge { display: inline-block; min-width: 42px; text-align: center; font-weight: 800; }

/* ---------- Print ---------- */
.print-toolbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; gap: .6rem; align-items: center; flex-wrap: wrap;
  background: #fff; border-bottom: 1px solid var(--line); padding: .7rem 1rem;
}
.sheet {
  background: #fff; width: 215mm; min-height: 330mm; margin: 1.2rem auto;
  padding: 14mm 15mm; box-shadow: 0 8px 30px rgba(0, 0, 0, .12);
  color: #111; font-family: "Times New Roman", Times, serif; font-size: 11.5pt; line-height: 1.35;
}
.sheet .kop { display: flex; align-items: center; gap: 12px; border-bottom: 3px double #111; padding-bottom: 8px; margin-bottom: 10px; }
.sheet .kop img { width: 74px; height: 74px; object-fit: contain; }
.sheet .kop .kop-text { flex: 1; text-align: center; }
.sheet .kop .k1 { font-size: 12pt; text-transform: uppercase; letter-spacing: .4px; }
.sheet .kop .k2 { font-size: 15pt; font-weight: 700; text-transform: uppercase; }
.sheet .kop .k3 { font-size: 10.5pt; }
.sheet .judul { text-align: center; margin: 8px 0 12px; }
.sheet .judul .j1 { font-size: 13pt; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.sheet .judul .j2 { font-size: 10.5pt; }
.sheet .ident { display: grid; grid-template-columns: 130px 10px 1fr; row-gap: 1px; font-size: 10.5pt; margin-bottom: 8px; }
.sheet .ident .lbl { color: #222; }
.sheet .ident .sep { text-align: center; }
.sheet h4 { text-align: center; font-size: 11pt; margin: 10px 0 5px; text-transform: uppercase; }
.sheet table { width: 100%; border-collapse: collapse; font-size: 10pt; margin-bottom: 4px; }
.sheet th, .sheet td { border: 1px solid #333; padding: 3px 5px; vertical-align: top; }
.sheet th { background: #eaeaea; text-align: center; font-weight: 700; }
.sheet td.c { text-align: center; }
.sheet td.r { text-align: right; }
.sheet .ket { font-size: 9.5pt; color: #333; }
.sheet .ttd { display: flex; justify-content: space-between; margin-top: 18px; font-size: 10.5pt; }
.sheet .ttd .col { width: 32%; text-align: center; }
.sheet .ttd .ruang { height: 62px; }
.sheet .ttd .nama { font-weight: 700; text-decoration: underline; }
.sheet .catatan-box { border: 1px solid #333; padding: 6px 8px; min-height: 52px; font-size: 10pt; }
.sheet .wm { position: fixed; opacity: .04; font-size: 70pt; transform: rotate(-28deg); pointer-events: none; }
.sheet .draft { outline: 2px dashed #c99; }

/* ---------- Misc ---------- */
.muted { color: var(--muted); }
.small { font-size: .8rem; }
.tiny { font-size: .72rem; }
.mt0 { margin-top: 0; }
.mt1 { margin-top: .6rem; }
.mt2 { margin-top: 1.1rem; }
.mb0 { margin-bottom: 0; }
.mb1 { margin-bottom: .6rem; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.flex { display: flex; gap: .6rem; align-items: center; flex-wrap: wrap; }
.hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
.list-plain { margin: .3rem 0; padding-left: 1.1rem; }
.list-plain li { margin-bottom: .2rem; }

.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin-bottom: 1rem; flex-wrap: wrap; }
.tabs a {
  padding: .5rem .85rem; border-radius: 9px 9px 0 0; color: var(--muted);
  font-size: .85rem; font-weight: 600; text-decoration: none;
}
.tabs a.active { background: #fff; color: var(--primary-dark); border: 1px solid var(--line); border-bottom-color: #fff; margin-bottom: -1px; }

/* ---------- Responsive ---------- */
.menu-toggle { display: none; background: none; border: 0; font-size: 1.35rem; color: var(--primary-dark); cursor: pointer; }

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .layout { display: block; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%);
    transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.3);
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .menu-toggle { display: inline-flex; }
  .content { padding: 1rem; }
  .form-grid { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .topbar { padding: .6rem .8rem; }
  .user-chip .u-meta { display: none; }
}

@media (max-width: 620px) {
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .page-head { align-items: flex-start; }
  .sheet { width: 100%; padding: 8mm; }
}

@media print {
  body { background: #fff; }
  .sidebar, .topbar, .print-toolbar, .no-print { display: none !important; }
  .content { padding: 0; max-width: none; }
  .sheet { box-shadow: none; margin: 0; width: auto; min-height: 0; padding: 0; }
  @page { size: 215mm 330mm; margin: 12mm 14mm; }
}

.auth-wrap { background: #ffffff; }
.auth-side { background: #0f2438; }


/* ---------- Notifikasi ala RDM (SweetAlert) ---------- */
.flash-overlay {
  position: fixed; inset: 0; background: rgba(0, 0, 21, .45);
  display: none; align-items: center; justify-content: center; z-index: 1000;
  padding: 1rem;
}
.flash-overlay.show { display: flex; }
.flash-card {
  background: #fff; border-radius: .25rem; max-width: 420px; width: 100%;
  padding: 1.6rem 1.4rem; text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 21, .25);
  animation: flashIn .18s ease-out;
}
@keyframes flashIn { from { transform: scale(.92); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.flash-icon {
  width: 64px; height: 64px; border-radius: 50%; margin: 0 auto .9rem;
  display: grid; place-items: center; font-size: 1.9rem; color: #fff; font-weight: 700;
}
.flash-icon.ok { background: #059669; }
.flash-icon.error { background: #b42318; }
.flash-icon.info { background: #175cd3; }
.flash-icon.warn { background: #e9a825; color: #1e2b28; }
.flash-title { font-weight: 700; font-size: 1.15rem; margin-bottom: .35rem; color: #1e293b; }
.flash-text { color: #64748b; margin-bottom: 1.1rem; font-size: .9rem; }
.flash-btn {
  background: #059669; color: #fff; border: 0; padding: .5rem 1.6rem;
  border-radius: .25rem; cursor: pointer; font-weight: 600; font-size: .9rem;
}
.flash-btn:hover { background: #0b4d38; }

/* ---------- Peningkatan tabel (pencarian & paging) ---------- */
.table-tools { display: flex; gap: .5rem; align-items: center; margin-bottom: .6rem; flex-wrap: wrap; }
.table-tools input[type=search] { flex: 1; min-width: 180px; padding: .45rem .6rem; }
.table-tools select { width: auto; padding: .45rem .5rem; }
.table-pager { display: flex; gap: .3rem; justify-content: center; margin-top: .7rem; flex-wrap: wrap; }
.table-pager .btn { min-width: 34px; }
.table-info { margin-top: .4rem; text-align: center; }

/* ---------- Dropdown yang bisa dicari ---------- */
.searchable-select { position: relative; width: 100%; }
.searchable-select select { display: none; }
.ss-input {
  width: 100%; padding: .52rem .65rem; border: 1px solid #ced2d8; border-radius: 8px;
  background: #fff; font-size: .88rem; color: #1e2b28; outline: none;
}
.ss-input:focus { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(20, 122, 88, .13); }
.ss-list {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
  max-height: 220px; overflow-y: auto; margin: .25rem 0 0; padding: 0;
  list-style: none; background: #fff; border: 1px solid #dce6e2; border-radius: 8px;
  box-shadow: 0 8px 24px rgba(6, 56, 41, .12); display: none;
}
.ss-list.open { display: block; }
.ss-list li { padding: .45rem .65rem; cursor: pointer; font-size: .86rem; }
.ss-list li:hover { background: #d5f1de; }
.ss-list li.selected { background: #d5f1de; font-weight: 700; color: #059669; }
.ss-list li.ss-empty { color: #64756f; cursor: default; }
.ss-list li.ss-empty:hover { background: transparent; }

/* ---------- Editor teks sederhana ---------- */
.rich-toolbar { display: flex; gap: .3rem; margin-bottom: .35rem; }
.rich-toolbar button {
  background: #f8fafc; color: #1e293b; border: 1px solid #d8dbe0;
  padding: .25rem .55rem; border-radius: .25rem; cursor: pointer; font-size: .85rem;
}
.rich-toolbar button:hover { background: #d6d2f8; color: #1e2b28; }
.rich-editor {
  min-height: 84px; border: 1px solid #ced2d8; border-radius: 8px; padding: .52rem .65rem;
  background: #fff; font-size: .88rem; outline: none;
}
.rich-editor:focus { border-color: #4f46e5; box-shadow: 0 0 0 3px rgba(20, 122, 88, .13); }
.rich-editor[contenteditable="false"] { background: #f1f5f4; }

/* ---------- Validasi form ---------- */
.is-invalid { border-color: #b42318 !important; box-shadow: 0 0 0 3px rgba(180, 35, 24, .12) !important; }

/* ---------- CoreUI / RDM style overrides ---------- */
.c-app { display:flex; flex-direction:row; min-height:100vh; }
.c-main { flex:1; display:flex; flex-direction:column; }

.c-navbar { box-shadow:none; }
.c-breadcrumb { padding:0; background:transparent; border:none; margin:0; }

.c-avatar { position:relative; display:inline-flex; align-items:center; justify-content:center; border-radius:50em; }
.c-avatar-sm { width:24px; height:24px; font-size:9.6px; }

.c-sidebar-brand img { width:32px; height:32px; object-fit:contain; background:#fff; border-radius:6px; padding:2px; }

.c-sidebar-nav a.active { background:rgba(255,255,255,.15); color:#fff; font-weight:700; }
.c-sidebar-nav a:hover { background:rgba(255,255,255,.08); color:#fff; text-decoration:none; }

.c-content { flex:1; }

/* Buttons mirroring CoreUI/Bootstrap */
.btn { border-radius:var(--radius); font-weight:600; font-size:.86rem; }
.btn-primary { color:#fff; background-color:var(--primary); border-color:var(--primary); }
.btn-primary:hover { background-color:var(--primary-dark); border-color:var(--primary-dark); color:#fff; text-decoration:none; }
.btn-outline-secondary { color:var(--dark); border-color:var(--secondary); background:transparent; }
.btn-outline-secondary:hover { color:var(--dark); background-color:#d6dade; border-color:#cfd4d8; }
.btn-sm { padding:.25rem .5rem; font-size:.765rem; }

/* Alerts mirroring CoreUI */
.alert { border-radius:var(--radius); padding:.75rem 1.25rem; margin-bottom:1rem; border:1px solid transparent; }
.alert-primary { color:#1a107c; background-color:#d6d2f8; border-color:#c6c0f5; }
.alert-success { color:#18603a; background-color:#d5f1de; border-color:#c4ebd1; }
.alert-info { color:#1b508f; background-color:#d6ebff; border-color:#c6e2ff; }
.alert-warning { color:#815c15; background-color:#feefd0; border-color:#fde9bd; }
.alert-danger { color:#772b35; background-color:#fadddd; border-color:#f8cfcf; }

/* Cards */
.card { border:none; border-radius:var(--radius); box-shadow:var(--shadow); background:var(--card); }
.card-header, .card-head { border-bottom:1px solid var(--line); border-radius:var(--radius) var(--radius) 0 0; padding:.75rem 1.25rem; background:#fff; }
.card-body { padding:1.25rem; }

/* Tables */
.table { border-collapse:collapse; width:100%; margin-bottom:1rem; color:var(--text); }
.table th, .table td { padding:.75rem; vertical-align:top; border-top:1px solid var(--line); }
.table thead th { background:#f1f5f9; color:var(--muted); font-weight:700; font-size:.765rem; text-transform:uppercase; border-bottom:2px solid var(--line); }
.table tbody tr:nth-of-type(odd) { background:rgba(0,0,21,.025); }

/* Input groups */
.input-group { position:relative; display:flex; flex-wrap:wrap; align-items:stretch; width:100%; }
.input-group > .form-control { position:relative; flex:1 1 auto; width:1%; min-width:0; margin-bottom:0; }
.input-group-append { display:flex; }
.input-group-text { display:flex; align-items:center; padding:.375rem .75rem; margin-bottom:0; font-size:.875rem; font-weight:400; line-height:1.5; color:#4f5d73; text-align:center; white-space:nowrap; background-color:#f8fafc; border:1px solid #ced2d8; border-radius:var(--radius); }

/* Form control */
.form-control { display:block; width:100%; height:calc(2.25rem + 2px); padding:.375rem .75rem; font-size:.875rem; line-height:1.5; color:#4f5d73; background-color:#fff; background-clip:padding-box; border:1px solid #ced2d8; border-radius:var(--radius); transition:border-color .15s ease-in-out,box-shadow .15s ease-in-out; }
.form-control:focus { border-color:#81b8ff; outline:0; box-shadow:0 0 0 .2rem rgba(50,31,219,.25); }

/* Badges */
.badge { display:inline-block; padding:.25em .4em; font-size:75%; font-weight:700; line-height:1; text-align:center; white-space:nowrap; vertical-align:baseline; border-radius:var(--radius); }
.badge-primary { color:#fff; background-color:var(--primary); }
.badge-success { color:#fff; background-color:var(--success); }
.badge-info { color:#fff; background-color:var(--info); }
.badge-warning { color:#4f5d73; background-color:var(--warning); }
.badge-danger { color:#fff; background-color:var(--danger); }

/* Flash overlay (SweetAlert ala RDM) */
.flash-overlay { position:fixed; inset:0; background:rgba(0,0,21,.45); display:none; align-items:center; justify-content:center; z-index:1000; padding:1rem; }
.flash-overlay.show { display:flex; }
.flash-card { background:#fff; border-radius:var(--radius); max-width:420px; width:100%; padding:1.6rem 1.4rem; text-align:center; box-shadow:0 10px 40px rgba(0,0,21,.25); animation:flashIn .18s ease-out; }
@keyframes flashIn { from{transform:scale(.92);opacity:0} to{transform:scale(1);opacity:1} }
.flash-icon { width:64px; height:64px; border-radius:50%; margin:0 auto .9rem; display:grid; place-items:center; font-size:1.9rem; color:#fff; font-weight:700; }
.flash-icon.ok { background:var(--success); }
.flash-icon.error { background:var(--danger); }
.flash-icon.info { background:var(--info); }
.flash-icon.warn { background:var(--warning); color:#1e293b; }
.flash-title { font-weight:700; font-size:1.15rem; margin-bottom:.35rem; color:var(--text); }
.flash-text { color:var(--muted); margin-bottom:1.1rem; font-size:.9rem; }
.flash-btn { background:var(--primary); color:#fff; border:0; padding:.5rem 1.6rem; border-radius:var(--radius); cursor:pointer; font-weight:600; font-size:.9rem; }
.flash-btn:hover { background:var(--primary-dark); }

/* Utilities */
.text-muted { color:var(--muted); }
.text-right { text-align:right; }
.mt-2 { margin-top:.8rem; }
.mb-0 { margin-bottom:0; }
.no-print { display:block; }
@media print { .no-print { display:none !important; } }

/* Responsive */
@media (max-width:768px) {
  .c-sidebar-nav { position:fixed; left:0; top:0; bottom:0; transform:translateX(-100%); transition:transform .2s; box-shadow:0 0 40px rgba(0,0,0,.3); z-index:1100; }
  body.nav-open .c-sidebar-nav { transform:translateX(0); }
  .c-main { margin-left:0; }
  .menu-toggle { display:inline-flex; }
  .c-content { padding:.8rem; }
}
.menu-toggle { display:none; background:none; border:none; font-size:1.35rem; color:var(--primary); cursor:pointer; }

/* Override previous green styles to primary */
.btn-outline { background:#fff; color:var(--primary); border-color:var(--line); }
.btn-outline:hover { background:#d6d2f8; color:var(--primary-dark); border-color:#c6c0f5; }
.btn-ghost { background:transparent; border-color:transparent; color:var(--primary); }
.btn-ghost:hover { background:#d6d2f8; border-color:transparent; color:var(--primary-dark); }
.btn-danger { background:var(--danger); border-color:var(--danger); color:#fff; }
.btn-danger:hover { background:#dc2626; border-color:#dc2626; }

/* Table tools (search/paging) */
.table-tools { display:flex; gap:.5rem; align-items:center; margin-bottom:.6rem; flex-wrap:wrap; }
.table-tools input[type=search] { flex:1; min-width:180px; }
.table-pager { display:flex; gap:.3rem; justify-content:center; margin-top:.7rem; flex-wrap:wrap; }
.table-info { margin-top:.4rem; text-align:center; font-size:.8rem; color:var(--muted); }

/* ============== Login / Setup Page (Full Screen) ============== */
.login-wrapper {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  background: url('assets/images/bg-01.webp') no-repeat center center fixed;
  background-size: cover;
  background-color: #f8fafc;
  padding: 1rem;
  min-height: 100vh;
}
.login-card {
  width: 100%;
  max-width: 400px;
  padding: 2.2rem;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}
.login-body {
  text-align: center;
}
.login-body .logo {
  width: 56px;
  height: 56px;
  background: #fff;
  border-radius: 10px;
  padding: 4px;
  object-fit: contain;
  margin-bottom: 1rem;
}
.login-body h2 {
  margin: 0 0 .5rem;
  color: var(--text);
  font-size: 1.4rem;
}
.login-body .subtitle {
  margin: 0 0 1.5rem;
  font-size: .85rem;
  color: var(--muted);
}
.login-body .alert {
  padding: .75rem 1rem;
  border-radius: .5rem;
  margin-bottom: 1rem;
  font-size: .85rem;
}
.login-body .form-group {
  margin-bottom: 1rem;
}
.login-body .form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 700;
  margin-bottom: .4rem;
  color: var(--text);
}
.login-body .form-group .form-control {
  width: 100%;
  padding: .55rem .7rem;
  border: 1px solid #ced2d8;
  border-radius: .5rem;
  background: #fff;
  font-size: .88rem;
  color: var(--text);
  outline: none;
  transition: border .15s, box-shadow .15s;
}
.login-body .form-group .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .13);
}
.login-body .btn {
  width: 100%;
  padding: .6rem 1.2rem;
  border-radius: .5rem;
  font-size: .9rem;
}
.login-body .alert {
  padding: .7rem 1rem;
  border-radius: .5rem;
  margin-bottom: 1rem;
  font-size: .82rem;
}
.login-body .alert-danger {
  background: #fadddd;
  color: #772b35;
  border: 1px solid #f8cfcf;
}
.login-body .auth-footer {
  margin-top: 1rem;
  font-size: .76rem;
  color: var(--muted);
  text-align: center;
}

/* ============== Login Page - Split Screen Design ============== */
/* Left: Graphical panel (blue gradient + abstract elements) */
/* Right: Form panel (white background, centered) */

/* Split screen container */
.split-login {
  position: fixed; inset: 0; display: flex; background: #f8fafc;
}
@media (max-width: 900px) {
  .split-login { flex-direction: column; }
  .split-login .left-panel { width: 100%; height: 220px; justify-content: center; padding: 2rem; }
  .split-login .right-panel { flex: 1; padding: 2rem 1.5rem; }
  .split-login .form-card { max-width: 420px; margin: 0 auto; }
}

/* Left panel - graphical side */
.split-login .left-panel {
  position: relative;
  width: 55%;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding: 4rem 4rem 4rem 3rem;
  text-align: left;
  color: #fff;
  overflow: hidden;
  background: url('../images/login-bg.jpg') center/cover no-repeat;
}

/* Background decoration elements */
.split-login .left-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.8);
  pointer-events: none;
}

/* Network/constellation dots */
.split-login .left-panel .network-dots {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 2rem;
  opacity: .15;
  pointer-events: none;
}

.split-login .left-panel .network-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
  animation: pulse-dots 4s ease-in-out infinite;
}

@keyframes pulse-dots {
  0%, 100% { transform: scale(1); opacity: .6; }
  50% { transform: scale(1.5); opacity: 1; }
}

/* Abstract wave patterns */
.split-login .left-panel .waves {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 120px;
  pointer-events: none;
  overflow: hidden;
}

.split-login .left-panel .waves svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  stroke: #fff;
  fill: none;
  stroke-width: 1.5;
  opacity: .25;
}

/* Logo / Brand */
.split-login .logo-brand {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  display: flex;
  align-items: center;
  gap: .6rem;
  color: #fff;
}

.split-login .logo-brand .badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  font-weight: 700;
  background: rgba(255,255,255,.2);
  color: #fff;
  flex-shrink: 0;
}

.split-login .logo-brand .brand-text {
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
  opacity: .85;
}

/* Welcome message */
.split-login .welcome {
  margin-bottom: 1.2rem;
}

.split-login .welcome .greeting {
  font-size: .9rem;
  font-weight: 400;
  opacity: .75;
  letter-spacing: .05em;
}

.split-login .welcome .headline {
  font-size: 3rem;
  font-weight: 800;
  letter-spacing: .08em;
  line-height: 1.1;
  margin-bottom: .5rem;
  text-transform: uppercase;
  text-shadow: 0 2px 20px rgba(0,0,0,.2);
}

.split-login .welcome .subtitle-text {
  font-size: .8rem;
  opacity: .6;
  max-width: 400px;
  line-height: 1.6;
}

/* Right panel - form side */
.split-login .right-panel {
  position: relative;
  width: 45%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2.5rem;
  background: #fff;
  height: 100vh;
}

.split-login .right-panel .form-card {
  width: 100%;
  max-width: 400px;
  padding: 2rem;
  border-radius: 16px;
  box-shadow: 0 25px 50px rgba(15,23,42,.08), 0 8px 24px rgba(15,23,42,.06);
}

.split-login .form-card .card-header {
  text-align: center;
  margin-bottom: 1.8rem;
}

.split-login .form-card .card-header .logo-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .8rem;
  background: #4f46e5;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 800;
  letter-spacing: .08em;
  box-shadow: 0 8px 24px rgba(79,70,229,.3);
}

.split-login .form-card .card-header h3 {
  margin: 0 0 .3rem;
  color: #1e293b;
  font-size: 1.3rem;
  font-weight: 700;
}

.split-login .form-card .card-header p {
  margin: 0;
  color: var(--muted);
  font-size: .85rem;
}

.split-login .form-card .input-group {
  margin-bottom: 1.2rem;
  position: relative;
}

.split-login .form-card .input-group .input-wrap {
  position: relative;
  padding: 0;
}

.split-login .form-card .input-group .input-wrap .input-left-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--primary);
  border-radius: 4px 0 0 4px;
}

.split-login .form-card .input-group .input-wrap input {
  width: 100%;
  padding: .7rem 1rem .7rem 2.8rem;
  border: 1.5px solid #e2e8f0;
  border-radius: .6rem;
  background: #f8fafc;
  font-size: .9rem;
  color: var(--text);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

.split-login .form-card .input-group .input-wrap input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, .12);
  background: #fff;
}

.split-login .form-card .form-check {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: 1.2rem;
  font-size: .82rem;
  color: var(--text);
  cursor: pointer;
}

.split-login .form-card .form-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.split-login .form-card .form-check .check-label {
  display: flex;
  align-items: center;
  gap: .4rem;
  cursor: pointer;
}

.split-login .form-card .form-check .check-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  cursor: pointer;
}

.split-login .form-card .form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.2rem;
}

.split-login .form-card .form-footer .link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
  font-size: .85rem;
  transition: color .15s;
}

.split-login .form-card .form-footer .link:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.split-login .form-card .form-footer .link .icon {
  font-size: .85rem;
  vertical-align: middle;
  margin-right: .2rem;
}

.split-login .form-card .btn-submit {
  width: 100%;
  padding: .75rem 1.5rem;
  border: none;
  border-radius: 50px;
  background: #4f46e5;
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
}

.split-login .form-card .btn-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(79, 70, 229, .35);
}

.split-login .form-card .btn-submit:active {
  transform: translateY(0);
}

/* Zodiac symbol (optional decorative) */
.split-login .form-card .zodiac {
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  opacity: .2;
  letter-spacing: .1em;
}

/* Fallback logo when no image available */
.fallback-logo, .logo-icon-svg {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #4f46e5;
  color: #fff;
  font-size: 1.2rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  letter-spacing: .05em;
}

/* Mobile adjustments */
@media (max-width: 1024px) {
  .split-login .left-panel {
    width: 45%;
    padding: 0 1rem;
  }
  .split-login .right-panel {
    width: 55%;
  }
}

@media (max-width: 768px) {
  .split-login {
    flex-direction: column;
  }
  .split-login .left-panel {
    width: 100%;
    height: 55vh;
    padding: 1.5rem;
  }
  .split-login .right-panel {
    width: 100%;
    height: 45vh;
    padding: 1rem;
  }
  .split-login .right-panel .form-card {
    padding: 1.5rem;
  }
  .split-login .logo-brand {
    position: static;
    margin-bottom: 1rem;
  }
  .split-login .welcome {
    display: none;
  }
  .split-login .right-panel .zodiac {
    display: none;
  }
}
@media (max-width: 1024px) {
  .split-login .left-panel {
    width: 45%;
    padding: 0 1rem;
  }
  .split-login .right-panel {
    width: 55%;
  }
}

@media (max-width: 768px) {
  .split-login {
    flex-direction: column;
  }
  .split-login .left-panel {
    width: 100%;
    height: 55vh;
    padding: 1.5rem;
  }
  .split-login .right-panel {
    width: 100%;
    height: 45vh;
    padding: 1rem;
  }
  .split-login .right-panel .form-card {
    padding: 1.5rem;
  }
  .split-login .logo-brand {
    position: static;
    margin-bottom: 1rem;
  }
  .split-login .welcome {
    display: none;
  }
  .split-login .right-panel .zodiac {
    display: none;
  }
}


/* Tabel daftar CRUD: padding sel rapat. */
.table-tight > thead > tr > th,
.table-tight > tbody > tr > td {
  padding: .3rem .4rem;
}


/* SweetAlert2 toast: teks putih bold */
.swal2-toast.swal-white-bold,
.swal2-toast.swal-white-bold .swal2-title,
.swal2-toast.swal-white-bold .swal2-content,
.swal2-toast.swal-white-bold h2 {
  color: #fff !important;
  font-weight: 700 !important;
}


/* Avatar inisial pengguna (navbar & dropdown akun) */
.avatar-circle { width:34px;height:34px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background:var(--primary);color:#fff;font-weight:700;font-size:.78rem;letter-spacing:.03em;flex:0 0 auto; }
.avatar-lg { width:54px;height:54px;font-size:1.1rem;box-shadow:0 0 0 2px rgba(255,255,255,.35); }
.user-menu .dropdown-toggle::after { margin-left:.35rem; }
.user-menu .dropdown-menu { min-width: 16rem; }

/* Navbar (AdminLTE v4) */
.app-header.navbar { min-height: 3.6rem; padding: .4rem .25rem; }
.navbar-burger, .navbar-action { width: 2.5rem; height: 2.5rem; display: inline-flex; align-items: center; justify-content: center; border-radius: .65rem; color: var(--text); text-decoration: none; font-size: 1.05rem; transition: background .15s ease, color .15s ease; }
.navbar-burger:hover, .navbar-action:hover, .navbar-action[aria-expanded='true'] { background: var(--light); color: var(--primary); text-decoration: none; }
.navbar-brand-icon { font-size: 1.05rem; color: var(--primary); }
.navbar-brand-name { font-size: .92rem; font-weight: 700; color: var(--text); letter-spacing: .015em; white-space: nowrap; }
.navbar-pill { font-size: .68rem; font-weight: 600; letter-spacing: .03em; color: var(--primary-dark); background: #e8eff7; border: 1px solid #d5e2ee; border-radius: 999px; padding: .3em .75em; white-space: nowrap; }
.navbar-divider { width: 1px; height: 1.6rem; background: var(--line); display: inline-block; margin: 0 .35rem; }
[data-bs-theme='dark'] .navbar-burger:hover, [data-bs-theme='dark'] .navbar-action:hover, [data-bs-theme='dark'] .navbar-action[aria-expanded='true'] { background: #263449; }
[data-bs-theme='dark'] .navbar-pill { background: #16294a; color: #bfdbfe; border-color: #23406e; }

/* Papan Juara (podium 3 besar) */
.podium { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:.45rem; }
.podium li { display:flex; align-items:center; gap:.75rem; padding:.55rem .65rem; border:1px solid var(--line); border-radius:.75rem; background:var(--card); }
.podium-medal { width:2.5rem; height:2.5rem; border-radius:50%; display:flex; align-items:center; justify-content:center; font-weight:800; font-size:1.05rem; flex:0 0 auto; }
.podium-medal.rank-1 { background:#fbbf24; color:#3b2505; box-shadow:0 2px 6px rgba(245,158,11,.4); }
.podium-medal.rank-2 { background:#e2e8f0; color:#1f2937; box-shadow:0 2px 6px rgba(148,163,184,.4); }
.podium-medal.rank-3 { background:#e7c08b; color:#2d1a03; box-shadow:0 2px 6px rgba(161,98,7,.4); }
.podium-name { font-weight:700; font-size:.9rem; line-height:1.3; }
.podium-kelas { color:var(--muted); font-size:.72rem; }
.podium-score { margin-left:auto; font-weight:800; font-size:1.3rem; color:var(--primary); font-variant-numeric:tabular-nums; }

/* ===== Gaya CBT: teal + membulat ===== */
.app-header.navbar { background: #0072bc; border-bottom: none; box-shadow: 0 2px 12px rgba(0,114,188,.4); }
.app-header.navbar .navbar-burger, .app-header.navbar .navbar-action { color: #fff; }
.app-header.navbar .navbar-burger:hover, .app-header.navbar .navbar-action:hover, .app-header.navbar .navbar-action[aria-expanded='true'] { background: rgba(255,255,255,.18); color: #fff; }
.app-header.navbar .navbar-brand-icon { color: #fff; }
.app-header.navbar .navbar-brand-name { color: #fff; }
.app-header.navbar .navbar-badge { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.35); }
.app-header.navbar .navbar-divider { background: rgba(255,255,255,.3); }
.app-header.navbar .avatar-circle { background: #fff; color: var(--primary-dark); box-shadow: 0 0 0 2px rgba(255,255,255,.4); }
.sidebar-teal { background: #0f2438 !important; }
.form-control, .form-select { border-radius: .75rem; }
.form-control:focus, .form-select:focus { box-shadow: 0 0 0 .2rem rgba(0,114,188,.25); border-color: #0072bc; }
.dropdown-menu { border-radius: .9rem; }
.alert { border-radius: .9rem; }
.tabulator { border-radius: var(--radius); }
