/* =========================================================
   e-LKPJ v2 — custom theme (original design)
   ========================================================= */
:root {
  --brand-900: #0b1f3a;
  --brand-800: #10294d;
  --brand-700: #16376a;
  --accent: #16bfae;
  --accent-2: #3ddc97;
  --bg: #f2f5fa;
  --card-r: 1rem;
}

* { scrollbar-width: thin; scrollbar-color: #b8c4d6 transparent; }

.app-body {
  background: var(--bg);
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  min-height: 100vh;
}

/* ---------- Layout ---------- */
.app-wrapper { min-height: 100vh; }
.app-sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 1040;
  width: 262px;
  background: linear-gradient(180deg, var(--brand-900) 0%, var(--brand-800) 55%, var(--brand-700) 100%);
  color: #cfe0ff;
  display: flex; flex-direction: column;
  transition: transform .25s ease;
}
.app-main { margin-left: 262px; min-height: 100vh; display: flex; flex-direction: column; }

@media (max-width: 991.98px) {
  .app-sidebar { transform: translateX(-100%); box-shadow: 0 0 60px rgba(0,0,0,.35); }
  .app-sidebar.open { transform: none; }
  .app-main { margin-left: 0; }
}
.sidebar-backdrop {
  position: fixed; inset: 0; background: rgba(8,15,30,.55); z-index: 1035; display: none;
}
.sidebar-backdrop.show { display: block; }

/* ---------- Sidebar ---------- */
.sidebar-brand {
  display: flex; align-items: center; gap: .75rem;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.brand-logo {
  height: 46px; width: auto; flex: 0 0 auto;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,.45));
}
.brand-icon {
  width: 42px; height: 42px; border-radius: 12px; flex: 0 0 42px;
  display: grid; place-items: center; font-size: 1.35rem; color: #062033;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 18px rgba(22,191,174,.35);
}
.brand-title { font-weight: 700; color: #fff; line-height: 1.1; }
.brand-sub { font-size: .72rem; opacity: .65; letter-spacing: .06em; text-transform: uppercase; }
.sidebar-close { margin-left: auto; color: #fff; background: rgba(255,255,255,.08); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: .9rem .8rem 1rem; }
.nav-section {
  font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: rgba(207,224,255,.45); margin: 1rem .65rem .35rem;
}
.sidebar-nav .nav-link {
  display: flex; align-items: center; gap: .7rem;
  color: rgba(223,234,255,.82);
  padding: .58rem .8rem; margin-bottom: .15rem;
  border-radius: .65rem; font-size: .925rem;
  transition: background .15s, color .15s;
}
.sidebar-nav .nav-link i { font-size: 1.05rem; width: 1.25rem; text-align: center; }
.sidebar-nav .nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.sidebar-nav .nav-link.active {
  background: linear-gradient(90deg, rgba(22,191,174,.25), rgba(22,191,174,.08));
  color: #fff; font-weight: 600;
  box-shadow: inset 3px 0 0 var(--accent);
}
.sidebar-nav .nav-link[aria-expanded] { cursor: pointer; }
.nav-item-bab .bab-chev { font-size: .7rem; opacity: .55; transition: transform .2s ease; }
.nav-item-bab .nav-link[aria-expanded="true"] .bab-chev { transform: rotate(180deg); }
.sub-menu { margin: 0 .15rem .3rem; }
.sub-menu .sub-link {
  display: block; position: relative;
  margin-left: 1.35rem; padding: .34rem .65rem;
  font-size: .8rem; line-height: 1.35;
  color: rgba(207,224,255,.6); text-decoration: none;
  border-left: 2px solid rgba(255,255,255,.13);
  border-radius: 0 .5rem .5rem 0;
  transition: background .15s, color .15s;
}
.sub-menu .sub-link:hover { color: #fff; background: rgba(255,255,255,.07); }
.sub-menu .sub-link.active {
  color: #fff; font-weight: 600;
  border-left-color: var(--accent);
  background: linear-gradient(90deg, rgba(22,191,174,.22), rgba(22,191,174,.05));
}
.sidebar-foot { padding: .9rem 1.25rem; font-size: .75rem; border-top: 1px solid rgba(255,255,255,.08); }

/* ---------- Topbar ---------- */
.app-topbar {
  position: sticky; top: 0; z-index: 1020;
  display: flex; align-items: center; gap: 1rem;
  background: rgba(255,255,255,.85); backdrop-filter: blur(8px);
  padding: .8rem 1.5rem;
  border-bottom: 1px solid #e4e9f2;
}
.topbar-title { font-size: 1.12rem; font-weight: 700; margin: 0; color: var(--brand-900); }
.avatar-circle {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--brand-700), var(--accent));
  color: #fff; font-weight: 700;
  box-shadow: 0 4px 12px rgba(22,55,106,.35);
}
.btn-icon { border: 1px solid #e4e9f2; }

/* ---------- Content ---------- */
.app-content { padding: 1.5rem; flex: 1; }
.app-footer {
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  padding: .9rem 1.5rem; font-size: .8rem; color: #7a8699;
  border-top: 1px solid #e4e9f2; background: #fff;
}

/* ---------- Cards ---------- */
.card {
  border: 0; border-radius: var(--card-r);
  box-shadow: 0 2px 10px rgba(16,42,77,.06);
}
.card-header {
  background: transparent; border-bottom: 1px solid #edf1f7;
  font-weight: 600; padding: 1rem 1.25rem;
}
.stat-card { position: relative; overflow: hidden; }
.stat-card .stat-icon {
  width: 52px; height: 52px; border-radius: 14px;
  display: grid; place-items: center; font-size: 1.5rem;
}
.stat-card .stat-value { font-size: 1.65rem; font-weight: 800; line-height: 1.1; }
.stat-card .stat-label { font-size: .8rem; color: #7a8699; }
.stat-card::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 110px; height: 110px; border-radius: 50%;
  background: currentColor; opacity: .05;
}
.icon-primary   { background: #e7efff; color: #2563eb; }
.icon-success   { background: #e2f7ec; color: #159a5b; }
.icon-warning   { background: #fff4dc; color: #d97706; }
.icon-danger    { background: #fde8e8; color: #dc2626; }
.icon-info      { background: #e0f7f5; color: #0d9488; }

/* ---------- Tables ---------- */
.table-card { overflow: hidden; }
.table thead th {
  background: #f6f8fc; color: #43506a; font-size: .78rem;
  text-transform: uppercase; letter-spacing: .04em; border-bottom: 0;
  white-space: nowrap;
}
.table tbody td { vertical-align: middle; }
.table > :not(caption) > * > * { padding: .75rem 1rem; }

/* ---------- Buttons ---------- */
.btn { border-radius: .6rem; }
.btn-brand {
  background: linear-gradient(135deg, var(--brand-700), #1d4e9e);
  color: #fff; border: 0;
}
.btn-brand:hover { color: #fff; filter: brightness(1.08); }
.btn-accent {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #06342c; border: 0; font-weight: 600;
}
.btn-accent:hover { color: #06342c; filter: brightness(1.06); }

/* ---------- Login ---------- */
.login-page { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login-visual {
  position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 15% 12%, rgba(61,220,151,.20), transparent 42%),
    radial-gradient(circle at 85% 78%, rgba(22,191,174,.26), transparent 46%),
    linear-gradient(160deg, var(--brand-900), var(--brand-700) 70%, #17407c);
  color: #e6efff; padding: 3rem 3.5rem 2rem;
  display: flex; flex-direction: column; justify-content: space-between;
}
.login-visual::before {
  content: ""; position: absolute; inset: 0; opacity: .07; pointer-events: none;
  background-image:
    repeating-linear-gradient(115deg, rgba(255,255,255,.9) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(25deg, rgba(255,255,255,.5) 0 1px, transparent 1px 34px);
}
.login-visual::after {
  content: ""; position: absolute; right: -140px; bottom: -160px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(22,191,174,.35), transparent 65%);
}
.login-visual-inner { position: relative; z-index: 1; }
.login-visual-inner > * { max-width: 30rem; }

.login-kop { display: flex; align-items: center; gap: .9rem; margin-bottom: 2.6rem; }
.login-kop-logo {
  width: 58px; height: auto; flex: 0 0 58px;
  filter: drop-shadow(0 6px 16px rgba(0,0,0,.4));
}
.login-kop-line { font-size: .82rem; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; color: #fff; }
.login-kop-sub { font-size: .78rem; letter-spacing: .05em; color: rgba(230,239,255,.62); }

.login-judul { font-size: clamp(2.4rem, 4.6vw, 3.4rem); font-weight: 800; line-height: 1.05; color: #fff; margin: 0 0 .9rem; }
.login-judul span {
  display: block; margin-top: .55rem;
  font-size: .82rem; font-weight: 700; letter-spacing: .28em; text-transform: uppercase;
  color: var(--accent-2);
}
.login-tagline { font-size: .98rem; line-height: 1.7; color: rgba(230,239,255,.74); margin-bottom: 2.2rem; }
.login-tagline em { font-style: normal; color: #fff; font-weight: 600; }

.login-visual-foot { position: relative; z-index: 1; font-size: .76rem; color: rgba(230,239,255,.5); margin-top: 2.5rem; }

.login-form-wrap {
  display: grid; place-items: center; padding: 2rem 1.5rem; background: var(--bg);
}
.login-card {
  width: 100%; max-width: 26.5rem; background: #fff; border-radius: 1.25rem;
  padding: 2.1rem; box-shadow: 0 24px 60px rgba(11,31,58,.16);
  border: 1px solid #eaeff7;
}
.login-card-head { display: flex; gap: .9rem; align-items: flex-start; margin-bottom: 1.5rem; }
.login-card-head h2 { font-size: 1.35rem; font-weight: 800; color: var(--brand-900); margin: 0 0 .2rem; }
.login-card-head p { font-size: .86rem; color: #7a8699; }
.login-card-logo { width: 44px; height: auto; flex: 0 0 44px; }

.login-input .input-group-text {
  background: #f4f7fc; border-color: #dfe6f1; color: #8d9ab0; border-radius: .7rem 0 0 .7rem;
}
.login-input .form-control {
  border-color: #dfe6f1; font-size: .98rem;
}
.login-input .form-control:focus {
  border-color: var(--accent); box-shadow: 0 0 0 .22rem rgba(22,191,174,.16);
}
.login-input .btn-outline-secondary {
  border-color: #dfe6f1; color: #8d9ab0; background: #f4f7fc; border-radius: 0 .7rem .7rem 0;
}
.login-input .btn-outline-secondary:hover { background: #eaf0f9; color: var(--brand-700); }

.btn-login {
  background: linear-gradient(135deg, var(--brand-700), var(--accent));
  color: #fff; border: 0; font-weight: 700; letter-spacing: .01em;
  border-radius: .8rem; padding: .72rem 1rem;
  box-shadow: 0 12px 26px rgba(22,55,106,.26);
}
.btn-login:hover { color: #fff; filter: brightness(1.07); }
.btn-login:active { transform: translateY(1px); }

.login-card-foot {
  margin-top: 1.5rem; padding-top: 1.1rem; border-top: 1px dashed #e6ecf5;
  font-size: .78rem; line-height: 1.6; color: #8d9ab0; text-align: center;
}

@media (max-width: 991.98px) {
  .login-page { grid-template-columns: 1fr; }
  .login-visual { display: none; }
  .login-form-wrap { min-height: 100vh; background: linear-gradient(160deg, var(--brand-900), var(--brand-700)); }
  .login-card { padding: 1.6rem; }
}

/* ---------- Misc ---------- */
.progress { height: .55rem; border-radius: 99px; }
.predikat-chip {
  display: inline-grid; place-items: center;
  min-width: 2rem; height: 2rem; padding: 0 .4rem;
  border-radius: .6rem; font-weight: 800;
}
.timeline-item { border-left: 3px solid #e4e9f2; padding: .35rem 0 .35rem 1rem; }
.timeline-item:hover { border-left-color: var(--accent); }
.file-chip {
  display: inline-flex; align-items: center; gap: .35rem;
  background: #f1f5fb; border-radius: .5rem; padding: .15rem .6rem;
  font-size: .8rem; font-weight: 600; color: #3d4a63;
}
.export-chip {
  display: inline-flex; align-items: center; gap: .4rem;
  border-radius: .6rem; padding: .35rem .75rem; font-size: .82rem; font-weight: 600;
  text-decoration: none;
}
.export-chip:hover { filter: brightness(.95); text-decoration: none; }
.chip-xls { background: #e2f7ec; color: #107c41; }
.chip-docx { background: #e7efff; color: #2b579a; }
.modal-header { border-bottom: 0; }
.modal-footer { border-top: 0; }
.page-link { border-radius: .5rem !important; margin: 0 .15rem; border: 0; color: var(--brand-700); }
.page-item.active .page-link { background: var(--brand-700); }
.modul-hero .hero-ico { width: 56px; height: 56px; background: rgba(255,255,255,.22); color: #fff; }
.modul-hero .hero-chip { display: inline-flex; align-items: center; background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.35); color: #fff; border-radius: 50rem; padding: .28rem .8rem; font-size: .8rem; }
.modul-hero .hero-chip:hover { background: rgba(255,255,255,.3); }
