/* =========================================================
   NexusAdmin — Global Stylesheet (Login + Dashboard)
   ========================================================= */

:root {
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Light theme */
  --bg: #f4f6fb;
  --bg-soft: #eef1f8;
  --card: #ffffff;
  --card-2: #f8fafd;
  --border: #e5e9f2;
  --text: #171b2b;
  --text-soft: #5b6478;
  --text-faint: #9aa3b5;
  --primary: #6366f1;
  --primary-dark: #4f46e5;
  --primary-soft: #eef2ff;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
  --purple: #a855f7;
  --shadow-sm: 0 1px 2px rgba(23, 27, 43, .05);
  --shadow-md: 0 8px 24px rgba(23, 27, 43, .08);
  --shadow-lg: 0 20px 50px rgba(23, 27, 43, .14);
  --radius: 16px;
  --sidebar-w: 260px;
  --transition: .25s cubic-bezier(.4, 0, .2, 1);
}

[data-theme="dark"] {
  --bg: #0f1117;
  --bg-soft: #171a24;
  --card: #1a1e29;
  --card-2: #20242f;
  --border: #2a2f3c;
  --text: #eef1f8;
  --text-soft: #a6adbd;
  --text-faint: #6b7386;
  --primary-soft: rgba(99, 102, 241, .16);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, .5);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input { font-family: inherit; }
ul { list-style: none; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--text-faint); border-radius: 99px; border: 2px solid var(--bg); }

[hidden] { display: none !important; }

/* =========================================================
   TOAST
   ========================================================= */
.toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translate(-50%, -80px);
  background: var(--card);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: .9rem;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
  border: 1px solid var(--border);
  max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.info i { color: var(--info); }

/* =========================================================
   LOGIN PAGE
   ========================================================= */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #0f1023 0%, #1b1740 45%, #2a1b5e 100%);
  position: relative;
  overflow: hidden;
}

.login-blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; pointer-events: none; }
.blob-1 { width: 420px; height: 420px; background: #6366f1; top: -120px; left: -100px; }
.blob-2 { width: 380px; height: 380px; background: #a855f7; bottom: -140px; right: -80px; }
.blob-3 { width: 260px; height: 260px; background: #06b6d4; top: 40%; right: 12%; opacity: .35; }

.login-wrap {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1060px;
  min-height: 600px;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  backdrop-filter: blur(18px);
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 40px 80px rgba(0, 0, 0, .45);
}

/* ---- brand side ---- */
.login-brand {
  padding: 56px 52px;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: radial-gradient(120% 120% at 0% 0%, rgba(99,102,241,.35), transparent 60%);
  border-right: 1px solid rgba(255, 255, 255, .1);
  position: relative;
  overflow: hidden;
}
.brand-tech {
  position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='760' height='900'%3E%3Cdefs%3E%3ClinearGradient id='g1' x1='0' y1='0' x2='1' y2='1'%3E%3Cstop offset='0' stop-color='%231c1a3d'/%3E%3Cstop offset='1' stop-color='%230d0e24'/%3E%3C/linearGradient%3E%3C/defs%3E%3Crect width='760' height='900' fill='url(%23g1)'/%3E%3Cg stroke='rgba(99,102,241,.14)' stroke-width='1'%3E%3Cpath d='M0 120h760M0 240h760M0 360h760M0 480h760M0 600h760M0 720h760M0 840h760'/%3E%3Cpath d='M120 0v900M240 0v900M360 0v900M480 0v900M600 0v900M720 0v900'/%3E%3C/g%3E%3Cg stroke='rgba(129,140,248,.45)' stroke-width='1.4' fill='none'%3E%3Cpath d='M120 120L360 240L600 120M240 360L480 480L720 360M120 480L360 600M480 240L600 360'/%3E%3C/g%3E%3Cg fill='%23818cf8'%3E%3Ccircle cx='120' cy='120' r='5'/%3E%3Ccircle cx='360' cy='240' r='6'/%3E%3Ccircle cx='600' cy='120' r='5'/%3E%3Ccircle cx='240' cy='360' r='4'/%3E%3Ccircle cx='480' cy='480' r='6'/%3E%3Ccircle cx='720' cy='360' r='5'/%3E%3Ccircle cx='120' cy='480' r='4'/%3E%3Ccircle cx='360' cy='600' r='5'/%3E%3Ccircle cx='480' cy='240' r='4'/%3E%3Ccircle cx='600' cy='360' r='5'/%3E%3C/g%3E%3Cg fill='rgba(34,211,238,.85)'%3E%3Ccircle cx='360' cy='240' r='2'/%3E%3Ccircle cx='480' cy='480' r='2'/%3E%3Ccircle cx='600' cy='360' r='2'/%3E%3C/g%3E%3C/svg%3E");
  background-size: cover; background-position: center;
  opacity: .95;
  pointer-events: none;
}
.brand-inner { position: relative; z-index: 1; }
.brand-logo {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(99, 102, 241, .5);
  overflow: hidden;
}
.login-brand h1 { font-size: 2rem; font-weight: 800; margin: 22px 0 10px; letter-spacing: -.5px; }
.login-brand h1 span { color: #a5b4fc; }
.login-brand > p { color: #c7c9e8; font-size: .95rem; max-width: 40ch; }

/* ---- form side ---- */
.login-form-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 52px;
  background: #fff;
}
[data-theme="dark"] .login-form-side { background: var(--card); }

.login-card-head { text-align: center; margin-bottom: 26px; }
.login-logo-sm {
  width: 80px; height: 80px; margin: 0 auto 14px;
  border-radius: 50%;
  background: #fff;
  display: grid; place-items: center;
  box-shadow: 0 10px 24px rgba(99, 102, 241, .2);
  overflow: hidden;
  padding: 8px;
}
.login-card-head h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.3px; }
.login-card-head p { color: var(--text-soft); font-size: .92rem; margin-top: 4px; }

.alert {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; border-radius: 12px;
  font-size: .85rem; font-weight: 600;
  margin-bottom: 16px; border: 1px solid;
  animation: fadeIn .3s ease;
}
.alert.error { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
.alert.success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
[data-theme="dark"] .alert.error { background: rgba(239,68,68,.12); color: #fca5a5; border-color: rgba(239,68,68,.3); }
[data-theme="dark"] .alert.success { background: rgba(16,185,129,.12); color: #6ee7b7; border-color: rgba(16,185,129,.3); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: .85rem; font-weight: 600; margin-bottom: 7px; }
.input-wrap {
  position: relative;
  display: flex; align-items: center;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  background: var(--card-2);
  transition: var(--transition);
}
.input-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99,102,241,.14); background: var(--card); }
.input-wrap > i {
  position: absolute; left: 14px; color: var(--text-faint); font-size: .9rem; pointer-events: none;
}
.input-wrap input {
  width: 100%;
  padding: 12px 42px 12px 42px;
  border: none; outline: none;
  background: transparent;
  font-size: .92rem;
  color: var(--text);
}
.input-wrap input::placeholder { color: var(--text-faint); }
.toggle-icon {
  position: absolute; right: 10px;
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  color: var(--text-faint); font-size: .8rem;
  transition: var(--transition);
}
.toggle-icon:hover { color: var(--primary); background: var(--primary-soft); }
.error-msg { display: block; color: var(--danger); font-size: .78rem; margin-top: 6px; font-weight: 500; }
.input-wrap.has-error { border-color: var(--danger); }

.login-options {
  display: flex; justify-content: space-between; align-items: center;
  margin: 4px 0 18px; font-size: .85rem;
}
.login-options a { color: var(--primary); font-weight: 600; }
.login-options a:hover { text-decoration: underline; }

.check { display: flex; align-items: center; gap: 8px; cursor: pointer; color: var(--text-soft); font-weight: 500; user-select: none; }
.check input { display: none; }
.checkmark {
  width: 18px; height: 18px; border-radius: 6px;
  border: 1.5px solid var(--border); background: var(--card);
  display: grid; place-items: center;
  transition: var(--transition); flex: none;
}
.check input:checked + .checkmark {
  background: var(--primary); border-color: var(--primary);
}
.check input:checked + .checkmark::after {
  content: '\f00c'; font-family: 'Font Awesome 6 Free'; font-weight: 900;
  color: #fff; font-size: .6rem;
}

.btn-primary {
  width: 100%;
  padding: 13px;
  border-radius: 12px;
  font-weight: 700; font-size: .95rem;
  color: #fff;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow: 0 10px 24px rgba(79, 70, 229, .35);
  transition: var(--transition);
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(79, 70, 229, .45); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .7; cursor: not-allowed; transform: none; }

.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--text-faint); font-size: .8rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.btn-social {
  width: 100%;
  padding: 12px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--card);
  font-weight: 600; font-size: .9rem;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: var(--transition);
}
.btn-social:hover { background: var(--bg-soft); border-color: var(--text-faint); }
.btn-social i { font-size: 1rem; }

.login-footer { text-align: center; color: #8f94b8; font-size: .78rem; margin-top: 26px; }

/* =========================================================
   APP LAYOUT
   ========================================================= */
.app { display: flex; min-height: 100vh; }

/* ---- sidebar ---- */
.sidebar {
  width: var(--sidebar-w);
  flex: none;
  background: var(--card);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: transform var(--transition);
}
.sidebar-head {
  display: flex; align-items: center; gap: 12px;
  padding: 20px 20px 16px;
}
.brand-text { font-size: 1.15rem; font-weight: 800; letter-spacing: -.3px; }
.brand-text span { color: var(--primary); }
.sidebar-close { display: none; margin-left: auto; width: 32px; height: 32px; border-radius: 8px; place-items: center; }
.sidebar-close:hover { background: var(--bg-soft); }

.sidebar-nav { flex: 1; overflow-y: auto; padding: 4px 14px 20px; }
.nav-label { font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--text-faint); padding: 18px 10px 8px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: .9rem; font-weight: 500;
  color: var(--text-soft);
  margin-bottom: 2px;
  transition: var(--transition);
  position: relative;
}
.nav-item i { width: 20px; text-align: center; font-size: .95rem; }
.nav-item:hover { background: var(--bg-soft); color: var(--text); }
.nav-item.active {
  background: var(--primary-soft);
  color: var(--primary-dark);
  font-weight: 700;
}
[data-theme="dark"] .nav-item.active { color: #a5b4fc; }
.nav-item.active::before {
  content: ''; position: absolute; left: -14px; top: 20%; bottom: 20%;
  width: 3.5px; border-radius: 99px; background: var(--primary);
}
.nav-item .badge {
  margin-left: auto;
  background: var(--primary); color: #fff;
  font-size: .68rem; font-weight: 700;
  padding: 2px 8px; border-radius: 99px;
}

.sidebar-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 90; opacity: 0; pointer-events: none;
  transition: var(--transition);
}

/* ---- main ---- */
.main {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-width: 0;
  transition: var(--transition);
}

/* ---- navbar ---- */
.navbar {
  position: sticky; top: 0;
  z-index: 80;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 24px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
}
.navbar-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 11px;
  display: grid; place-items: center;
  font-size: 1rem; color: var(--text-soft);
  transition: var(--transition); position: relative;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--text); }
.icon-btn .dot {
  position: absolute; top: 8px; right: 9px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); border: 2px solid var(--card);
}

.search-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-soft);
  border: 1.5px solid transparent;
  border-radius: 11px;
  padding: 8px 12px;
  width: min(340px, 100%);
  transition: var(--transition);
}
.search-box:focus-within { border-color: var(--primary); background: var(--card); }
.search-box i { color: var(--text-faint); font-size: .85rem; }
.search-box input { flex: 1; border: none; outline: none; background: transparent; font-size: .88rem; color: var(--text); min-width: 0; }
.search-box input::placeholder { color: var(--text-faint); }
.search-box kbd {
  font-size: .68rem; font-family: inherit;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 6px; padding: 2px 6px; color: var(--text-faint);
  white-space: nowrap;
}

.navbar-right { display: flex; align-items: center; gap: 8px; }
#menuToggle { display: none; }

/* dropdown */
.user-menu, #notifBtn { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 10px); right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  min-width: 250px;
  padding: 8px;
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: var(--transition);
  z-index: 200;
}
.dropdown.open { opacity: 1; visibility: visible; transform: none; }
.dropdown a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 9px;
  font-size: .88rem; font-weight: 500; color: var(--text-soft);
  transition: var(--transition);
}
.dropdown a:hover { background: var(--bg-soft); color: var(--text); }
.dropdown a.danger { color: var(--danger); }
.dropdown a.danger:hover { background: rgba(239,68,68,.1); }
.dropdown-head { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 10px; border-bottom: 1px solid var(--border); margin-bottom: 6px; font-size: .88rem; }
.dropdown-head .badge { background: var(--danger); color: #fff; font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 99px; }
.notif-item { display: flex !important; align-items: flex-start; gap: 12px; padding: 8px 10px; border-radius: 10px; cursor: pointer; transition: var(--transition); }
.notif-item:hover { background: var(--bg-soft); }
.notif-icon { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; color: #fff; font-size: .72rem; flex-shrink: 0; }
.notif-item p { font-weight: 600; color: var(--text); font-size: .85rem; margin: 0; }
.notif-item small { color: var(--text-faint); font-size: .74rem; }
.notif-detail { margin-top: 6px; font-size: .78rem; color: var(--text-soft); background: var(--bg-soft); border-radius: 8px; padding: 8px 10px; line-height: 1.4; white-space: pre-line; }
.notif-clear { background: none; border: none; color: var(--text-faint); font-size: .72rem; cursor: pointer; font-weight: 600; padding: 2px 6px; border-radius: 6px; transition: var(--transition); }
.notif-clear:hover { color: var(--danger); background: rgba(239,68,68,.1); }

.user-menu .user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px 6px 6px;
  border-radius: 12px;
  transition: var(--transition);
}
.user-menu .user-chip:hover { background: var(--bg-soft); }
.user-chip img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; }
.user-info { text-align: left; line-height: 1.2; }
.user-info strong { display: block; font-size: .86rem; }
.user-info small { color: var(--text-faint); font-size: .74rem; }
.user-chip > i { font-size: .72rem; color: var(--text-faint); }
.user-dropdown { min-width: 190px; right: 0; }

/* ---- content ---- */
.content { flex: 1; padding: 24px; max-width: 1500px; width: 100%; margin: 0 auto; }

/* page heading */
.page-heading {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}
.page-heading h2 { font-size: 1.4rem; font-weight: 800; letter-spacing: -.4px; }
.page-heading p { color: var(--text-soft); font-size: .88rem; margin-top: 3px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 11px;
  border: 1.5px solid var(--border);
  background: var(--card); color: var(--text);
  font-weight: 600; font-size: .86rem;
  transition: var(--transition);
}
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.btn-primary.sm { width: auto; padding: 10px 16px; font-size: .86rem; }

/* stat cards */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: flex-start; gap: 14px;
  transition: var(--transition);
  position: relative; overflow: hidden;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center; font-size: 1.1rem; flex: none;
}
.stat-icon.blue { background: rgba(59,130,246,.14); color: #3b82f6; }
.stat-icon.green { background: rgba(16,185,129,.14); color: #10b981; }
.stat-icon.orange { background: rgba(245,158,11,.14); color: #f59e0b; }
.stat-icon.purple { background: rgba(168,85,247,.14); color: #a855f7; }
.stat-icon.teal { background: rgba(6,182,212,.14); color: #06b6d4; }
.stat-info { min-width: 0; }
.stat-label { font-size: .8rem; color: var(--text-soft); font-weight: 600; }
.stat-value { font-size: 1.28rem; font-weight: 800; letter-spacing: -.4px; margin: 3px 0 6px; }
.stat-trend { font-size: .76rem; font-weight: 700; margin-right: 6px; }
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }
.stat-sub { font-size: .74rem; color: var(--text-faint); }
.mini-chart { position: absolute; bottom: 0; right: 0; width: 90px; height: 44px; opacity: .5; }

/* panels */
.panel {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
}
.panel-head {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.panel-head h3 { font-size: 1.02rem; font-weight: 800; letter-spacing: -.2px; }
.panel-sub { font-size: .78rem; color: var(--text-faint); margin-top: 2px; }
.panel-link { font-size: .82rem; font-weight: 700; color: var(--primary); display: inline-flex; align-items: center; gap: 6px; }
.panel-link:hover { text-decoration: underline; }

.range-pills { display: flex; gap: 6px; background: var(--bg-soft); padding: 4px; border-radius: 10px; }
.pill {
  padding: 6px 12px; border-radius: 8px;
  font-size: .76rem; font-weight: 600; color: var(--text-soft);
  transition: var(--transition);
}
.pill:hover { color: var(--text); }
.pill.active { background: var(--card); color: var(--primary-dark); box-shadow: var(--shadow-sm); }
[data-theme="dark"] .pill.active { color: #a5b4fc; }

.charts-grid { display: grid; grid-template-columns: 1.9fr 1fr; gap: 18px; margin-bottom: 22px; }
.charts-grid.two { grid-template-columns: 1fr 1.4fr; }
.chart-box { position: relative; height: 300px; }
.chart-box.tall { height: 330px; }
.chart-box.donut { height: 280px; }
.chart-box.donut .donut-center {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  text-align: center; pointer-events: none;
}
.chart-box.donut .donut-center strong { display: block; font-size: 1.4rem; font-weight: 800; }
.chart-box.donut .donut-center span { font-size: .78rem; color: var(--text-faint); }

/* table */
.table-wrap { overflow-x: auto; }
.order-table { width: 100%; border-collapse: collapse; font-size: .86rem; }
.order-table th {
  text-align: left; padding: 10px 12px;
  color: var(--text-faint); font-size: .74rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .6px;
  border-bottom: 1px solid var(--border);
}
.order-table td { padding: 12px; border-bottom: 1px solid var(--border); color: var(--text-soft); }
.order-table tbody tr { transition: var(--transition); }
.order-table tbody tr:hover { background: var(--bg-soft); }
.cell-user { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--text); }
.cell-user img { width: 32px; height: 32px; border-radius: 9px; }
.amount { font-weight: 700; color: var(--text); }
.status { display: inline-flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 700; padding: 4px 10px; border-radius: 99px; }
.status.done { background: rgba(16,185,129,.12); color: #059669; }
.status.progress { background: rgba(59,130,246,.12); color: #2563eb; }
.status.pending { background: rgba(245,158,11,.14); color: #d97706; }
[data-theme="dark"] .status.done { color: #6ee7b7; }
[data-theme="dark"] .status.progress { color: #93c5fd; }
[data-theme="dark"] .status.pending { color: #fcd34d; }

/* placeholder pages */
.placeholder-page { display: none; }
.placeholder-page.visible { display: block; }
.empty-panel {
  text-align: center;
  padding: 60px 20px;
  border-style: dashed;
  background: var(--card-2);
}
.empty-panel i { font-size: 2.4rem; color: var(--primary); opacity: .7; }
.empty-panel h3 { margin-top: 14px; font-size: 1.2rem; }
.empty-panel p { color: var(--text-soft); font-size: .9rem; margin-top: 6px; }

/* ---- footer ---- */
.footer {
  border-top: 1px solid var(--border);
  background: var(--card);
  padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
  font-size: .82rem; color: var(--text-soft);
}
.footer strong { color: var(--text); }
.footer i { color: var(--danger); }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a:hover { color: var(--primary); }

/* =========================================================
   BRAND LOGO IMG
   ========================================================= */
.brand-logo { overflow: hidden; border-radius: 50%; }
.brand-logo img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 50%; }
.login-logo-sm { overflow: hidden; border-radius: 50%; padding: 8px; }
.login-logo-sm img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: 50%; }

/* =========================================================
   UNIT KERJA PAGE
   ========================================================= */
.btn-ghost.sm { padding: 8px 12px; font-size: .8rem; }
.btn-danger {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 16px; border-radius: 11px;
  background: var(--danger); color: #fff;
  font-weight: 700; font-size: .86rem;
  transition: var(--transition);
  box-shadow: 0 8px 18px rgba(239, 68, 68, .3);
}
.btn-danger:hover { background: #dc2626; transform: translateY(-1px); }

/* toolbar */
.uk-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.uk-search {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-soft);
  border: 1.5px solid var(--border);
  border-radius: 11px;
  padding: 8px 12px;
  min-width: 220px;
  flex: 1; max-width: 380px;
  transition: var(--transition);
}
.uk-search:focus-within { border-color: var(--primary); background: var(--card); }
.uk-search i { color: var(--text-faint); font-size: .85rem; }
.uk-search input { flex: 1; border: none; outline: none; background: transparent; font-size: .88rem; color: var(--text); min-width: 0; }
.uk-search input::placeholder { color: var(--text-faint); }
.uk-filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.uk-filters select {
  padding: 9px 32px 9px 12px;
  border-radius: 11px;
  border: 1.5px solid var(--border);
  background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239aa3b5' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") no-repeat right 10px center / 14px;
  appearance: none; -webkit-appearance: none;
  font-family: inherit; font-size: .85rem; font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: var(--transition);
  max-width: 180px;
}
.uk-filters select:focus { border-color: var(--primary); outline: none; }

/* table */
.uk-table th { white-space: nowrap; }
.uk-table .th-actions { text-align: center; width: 90px; }
.uk-table td { vertical-align: middle; }
.uk-table .empty-row td { text-align: center; color: var(--text-faint); padding: 40px 12px; font-weight: 600; }
.unit-code {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; padding: 5px 10px;
  background: var(--primary-soft); color: var(--primary-dark);
  border-radius: 9px; font-weight: 800; font-size: .8rem;
}
[data-theme="dark"] .unit-code { color: #a5b4fc; }
.unit-name { font-weight: 700; color: var(--text); white-space: nowrap; }
.unit-ip { font-family: 'Courier New', monospace; font-weight: 600; font-size: .82rem; }
.unit-addr { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-soft); }

.jarkom-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.jchip {
  font-size: .68rem; font-weight: 700;
  padding: 3px 8px; border-radius: 99px;
  background: var(--bg-soft); color: var(--text-soft);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.jchip.vsat { background: rgba(99,102,241,.12); color: #6366f1; border-color: rgba(99,102,241,.25); }
.jchip.mpls { background: rgba(16,185,129,.12); color: #059669; border-color: rgba(16,185,129,.25); }
.jchip.gprs { background: rgba(245,158,11,.14); color: #d97706; border-color: rgba(245,158,11,.3); }
.jchip.sdwan { background: rgba(168,85,247,.12); color: #a855f7; border-color: rgba(168,85,247,.25); }
[data-theme="dark"] .jchip.vsat { color: #a5b4fc; }
[data-theme="dark"] .jchip.mpls { color: #6ee7b7; }
[data-theme="dark"] .jchip.gprs { color: #fcd34d; }
[data-theme="dark"] .jchip.sdwan { color: #d8b4fe; }

.actions { display: flex; gap: 6px; justify-content: center; }
.action-btn {
  width: 32px; height: 32px; border-radius: 9px;
  display: grid; place-items: center;
  font-size: .82rem;
  transition: var(--transition);
}
.action-btn.edit { color: var(--info); background: rgba(59,130,246,.12); }
.action-btn.edit:hover { background: rgba(59,130,246,.22); }
.action-btn.del { color: var(--danger); background: rgba(239,68,68,.1); }
.action-btn.del:hover { background: rgba(239,68,68,.2); }

/* pagination */
.uk-pagination {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.page-info { font-size: .82rem; color: var(--text-soft); font-weight: 600; }
.page-btns { display: flex; align-items: center; gap: 8px; }
.page-btn {
  width: 34px; height: 34px; border-radius: 9px;
  display: grid; place-items: center;
  background: var(--bg-soft); color: var(--text-soft);
  font-size: .8rem;
  transition: var(--transition);
}
.page-btn:hover:not(:disabled) { background: var(--primary); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }
.page-btn.active { background: var(--primary); color: #fff; }
.page-current { font-size: .82rem; font-weight: 700; min-width: 60px; text-align: center; }

/* modal */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 400;
  background: rgba(10, 12, 20, .55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}
.modal {
  width: 100%; max-width: 560px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  animation: modalIn .25s cubic-bezier(.4, 0, .2, 1);
  max-height: calc(100vh - 40px);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.modal-sm { max-width: 420px; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(.97); }
  to { opacity: 1; transform: none; }
}
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 1.05rem; font-weight: 800; letter-spacing: -.2px; }
.modal-close {
  width: 32px; height: 32px; border-radius: 9px;
  display: grid; place-items: center;
  color: var(--text-faint); font-size: .9rem;
  transition: var(--transition);
}
.modal-close:hover { background: var(--bg-soft); color: var(--danger); }
.modal-body { padding: 20px 22px; overflow-y: auto; }
.modal-foot {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  background: var(--card-2);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.field-full { grid-column: 1 / -1; }
.input-field {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: 11px;
  background: var(--card-2);
  font-size: .9rem; color: var(--text);
  transition: var(--transition);
}
.input-field:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(99,102,241,.14); background: var(--card); }
.input-field::placeholder { color: var(--text-faint); }
.input-field.has-error { border-color: var(--danger); }
.req { color: var(--danger); }
.confirm-icon {
  width: 56px; height: 56px; border-radius: 16px;
  background: rgba(239,68,68,.12); color: var(--danger);
  display: grid; place-items: center; font-size: 1.4rem;
  margin: 0 auto 14px;
}
.modal-body > p { text-align: center; color: var(--text-soft); font-size: .9rem; line-height: 1.6; }
.modal-body > p strong { color: var(--text); }

/* chip checkboxes */
.chip-group { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-check input { display: none; }
.chip-check span {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: 99px;
  border: 1.5px solid var(--border);
  background: var(--card-2);
  font-size: .82rem; font-weight: 600;
  color: var(--text-soft);
  cursor: pointer;
  transition: var(--transition);
  user-select: none;
}
.chip-check span::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--border);
  transition: var(--transition);
}
.chip-check input:checked + span {
  background: var(--primary); border-color: var(--primary);
  color: #fff;
}
.chip-check input:checked + span::before { background: #fff; }

/* import dropzone */
.dropzone {
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 26px 20px;
  text-align: center;
  color: var(--text-soft);
  transition: var(--transition);
  cursor: pointer;
  margin-bottom: 14px;
}
.dropzone:hover, .dropzone.dragover { border-color: var(--primary); background: var(--primary-soft); }
.dropzone i { font-size: 1.8rem; color: var(--primary); margin-bottom: 8px; display: block; }
.dropzone p { font-size: .88rem; font-weight: 600; }
.dropzone small { font-size: .76rem; color: var(--text-faint); }
.import-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }.sum-item {
  border-radius: 12px; padding: 12px;
  text-align: center;
  border: 1px solid var(--border);
}
.sum-item strong { display: block; font-size: 1.3rem; font-weight: 800; }
.sum-item span { font-size: .74rem; color: var(--text-faint); font-weight: 600; }
.sum-item.ok strong { color: var(--success); }
.sum-item.fail strong { color: var(--danger); }
.sum-item.dup strong { color: var(--warning); }
.import-hint { font-size: .8rem; color: var(--text-soft); margin-top: 12px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.import-hint i { color: var(--primary); }
.link-btn {
  color: var(--primary); font-weight: 700; font-size: .8rem;
  text-decoration: underline; padding: 0;
}
.link-btn:hover { opacity: .8; }
.text-faint { color: var(--text-faint); }
.sum-notes {
  grid-column: 1 / -1;
  border-radius: 10px;
  background: rgba(239,68,68,.08);
  border: 1px solid rgba(239,68,68,.2);
  padding: 10px 12px;
  max-height: 120px; overflow-y: auto;
  font-size: .74rem; color: var(--danger);
  line-height: 1.7;
}

/* =========================================================
   PAGE BUILDER / GENERATOR
   ========================================================= */
.modal-wide { max-width: 760px; }
.pg-icon {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary-dark);
  font-size: 1rem;
}
[data-theme="dark"] .pg-icon { color: #a5b4fc; }
.pg-slug {
  font-family: 'Courier New', monospace;
  font-size: .78rem; color: var(--text-soft);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  padding: 3px 8px; border-radius: 7px;
}
.builder-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 18px 0 10px;
}
.builder-head h4 { font-size: .95rem; font-weight: 800; }
.builder-list { display: grid; gap: 12px; }
.frow {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--card-2);
  padding: 12px 14px;
  transition: var(--transition);
}
.frow:focus-within { border-color: var(--primary); }
.frow-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.frow-grip { color: var(--text-faint); cursor: grab; font-size: .9rem; }
.frow-title { font-weight: 700; font-size: .84rem; color: var(--text); }
.frow-tools { margin-left: auto; display: flex; gap: 6px; }
.frow-grid {
  display: grid;
  grid-template-columns: 1.4fr 1.2fr .9fr 1.6fr;
  gap: 0 14px;
}
.frow-grid .field { margin-bottom: 8px; }
.frow-rel, .frow-rel2 { grid-column: span 2; }
.frow-rel[hidden], .frow-rel2[hidden], .frow-opt[hidden] { display: none; }
.hint { display: block; font-size: .72rem; color: var(--text-faint); margin-top: 4px; font-weight: 500; }

/* switch toggle */
.switch {
  position: relative; display: inline-block;
  width: 46px; height: 26px;
  flex: none;
}
.switch input { opacity: 0; width: 0; height: 0; }
.switch span {
  position: absolute; inset: 0;
  background: var(--border);
  border-radius: 99px;
  cursor: pointer;
  transition: var(--transition);
}
.switch span::before {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + span { background: var(--primary); }
.switch input:checked + span::before { transform: translateX(20px); }
.frow-req .switch, .field > .switch { margin-top: 4px; }

/* =========================================================
   DYNAMIC PAGE VIEW
   ========================================================= */
.thumb {
  width: 46px; height: 46px;
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid var(--border);
  display: block;
}
.pv-ellipsis {
  display: inline-block;
  max-width: 220px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  vertical-align: middle;
}
.photo-upload .photo-input { display: none; }
.photo-box {
  width: 100%; height: 130px;
  border: 2px dashed var(--border);
  border-radius: 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--text-faint);
  font-size: .8rem; font-weight: 600;
  cursor: pointer;
  overflow: hidden;
  transition: var(--transition);
  background: var(--bg-soft);
}
.photo-box:hover { border-color: var(--primary); color: var(--primary); }
.photo-box.dragover { border-color: var(--success); color: var(--success); background: rgba(16,185,129,.08); }
.photo-box i { font-size: 1.6rem; }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.you-tag {
  color: var(--primary); font-weight: 700; font-size: .68rem;
  background: var(--primary-soft);
  padding: 1px 6px; border-radius: 99px;
  margin-left: 4px;
}

/* =========================================================
   CHANGE PASSWORD
   ========================================================= */
.auth-panel { max-width: 480px; margin: 0 auto; padding: 30px 28px; }
.auth-icon {
  width: 60px; height: 60px; border-radius: 18px;
  background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center;
  font-size: 1.5rem;
  margin: 0 auto 20px;
}
.auth-input { width: 100%; padding: 12px 42px 12px 42px; border: none; outline: none; background: transparent; font-size: .92rem; color: var(--text); }
.auth-input::placeholder { color: var(--text-faint); }

/* =========================================================
   OPEN TIKET JARKOM
   ========================================================= */
.tiket-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.tiket-panel .panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.tiket-panel .panel-head h3 { margin: 0; font-size: .95rem; }
.tiket-panel .panel-head h3 i { color: var(--primary); margin-right: 8px; }
.tiket-panel .panel-head .input-field { max-width: 200px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.info-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--success-soft, rgba(16,185,129,.12));
  color: var(--success, #059669);
  border: 1px solid rgba(16,185,129,.3);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: .8rem; font-weight: 600;
  margin-bottom: 14px;
  max-width: 100%; flex-wrap: wrap;
}

.quick-grid {
  display: flex; flex-wrap: wrap; gap: 6px;
  margin-top: 8px;
}
.quick-grid .btn-ghost.sm { padding: 6px 10px; font-size: .76rem; border-radius: 8px; }

.tiket-pic-row { display: flex; gap: 8px; }
.tiket-pic-row .input-field { flex: 1; }
.tiket-pic-row .btn-ghost.sm { flex: none; white-space: nowrap; }

.preview-box {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  font-family: 'Courier New', monospace;
  font-size: .82rem;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  color: var(--text);
  min-height: 180px;
  max-height: 340px;
  overflow-y: auto;
  margin-bottom: 10px;
}
.copy-feedback {
  font-size: .8rem; font-weight: 600; color: var(--success, #059669);
  min-height: 18px; margin-bottom: 6px;
}
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.btn-row .btn-ghost, .btn-row .btn-primary.sm { width: auto; flex: none; }
.btn-danger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; padding: 10px 16px; border-radius: 10px; font-weight: 600; font-size: .82rem; background: var(--danger-soft, #fef2f2); color: var(--danger); transition: var(--transition); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-danger.sm { padding: 8px 12px; font-size: .8rem; }

.uker-list { max-height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 6px; }
.uker-row {
  display: grid; grid-template-columns: 64px 1fr auto;
  align-items: center; gap: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  cursor: pointer;
  transition: var(--transition);
}
.uker-row:hover { border-color: var(--primary); background: var(--primary-soft); transform: translateX(2px); }
.uker-kode {
  font-family: 'Courier New', monospace; font-weight: 700; font-size: .8rem;
  background: var(--card); border: 1px solid var(--border); border-radius: 6px;
  padding: 2px 6px; text-align: center; color: var(--primary);
}
.uker-name { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.uker-name span { font-weight: 600; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uker-name small { color: var(--text-faint); font-size: .7rem; }
.uker-ip { font-family: 'Courier New', monospace; font-size: .76rem; color: var(--text-soft); }

.pic-list { display: flex; flex-direction: column; gap: 6px; }
.pic-item {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
}
.pic-item.default-pic { border-color: var(--primary); background: var(--primary-soft); }
.pic-info { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.pic-name { font-weight: 600; font-size: .82rem; }
.pic-sub { color: var(--text-faint); font-size: .72rem; }
.pic-actions { display: flex; gap: 4px; flex: none; }

.upload-zone {
  border: 2px dashed var(--border);
  border-radius: 12px;
  padding: 22px 14px;
  text-align: center;
  color: var(--text-faint);
  cursor: pointer;
  transition: var(--transition);
  background: var(--bg-soft);
}
.upload-zone:hover, .upload-zone.dragover { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.upload-zone i { font-size: 1.6rem; display: block; margin-bottom: 8px; }
.upload-zone p { font-weight: 600; font-size: .85rem; margin-bottom: 4px; }
.upload-zone small { font-size: .72rem; }

.status-row {
  display: flex; align-items: center; gap: 8px;
  font-size: .78rem; font-weight: 600; color: var(--text-soft);
  margin-top: 12px;
}
.dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger);
  display: inline-block; flex: none;
}
.dot.ok { background: var(--success, #059669); }

.tiket-empty {
  text-align: center; color: var(--text-faint);
  font-size: .8rem; padding: 16px 8px;
}

.modal-sm { max-width: 420px; }

/* =========================================================
   DASHBOARD WIDGETS
   ========================================================= */
.widgets-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.widgets-toolbar h3 { font-size: 1.05rem; margin: 0; }
.widgets-toolbar h3 i { color: var(--primary); margin-right: 8px; }
.widget-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}
.widget-card { position: relative; overflow: hidden; }
.widget-card .panel-head h3 { margin: 0; font-size: .92rem; }
.widget-card .panel-head h3 i { color: var(--primary); margin-right: 8px; }
.widget-body { padding-top: 6px; }
.widget-empty {
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 34px 20px;
  text-align: center;
  color: var(--text-faint);
  max-width: 520px;
  margin: 0 auto;
}
.widget-empty i { font-size: 2rem; display: block; margin-bottom: 10px; opacity: .6; }
.widget-empty p { margin: 0; font-size: .92rem; font-weight: 700; color: var(--text-soft); }
.widget-empty small { font-size: .8rem; line-height: 1.6; display: block; margin-top: 6px; }
.widget-config .field { margin-bottom: 10px; }

.w-progress-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.w-progress-head strong { font-size: 1.6rem; font-weight: 800; letter-spacing: -.5px; color: var(--primary); }
.w-progress-head span { font-size: .78rem; color: var(--text-soft); font-weight: 500; }
.w-progress-bar {
  height: 10px;
  border-radius: 99px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  overflow: hidden;
}
.w-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #6366f1, #10b981);
  transition: width .5s ease;
}

.donut-box { position: relative; width: 180px; height: 180px; margin: 0 auto; }
.donut-box canvas { position: absolute; inset: 0; width: 100% !important; height: 100% !important; }
.donut-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; pointer-events: none;
}
.donut-center strong { font-size: 1.5rem; font-weight: 800; color: var(--text); line-height: 1; }
.donut-center span { font-size: .65rem; color: var(--text-faint); text-transform: uppercase; letter-spacing: .5px; margin-top: 2px; }
.donut-legend {
  list-style: none; margin: 12px 0 0; padding: 0;
  display: grid; gap: 5px;
}
.donut-legend li { display: flex; align-items: center; gap: 8px; font-size: .76rem; color: var(--text-soft); }
.donut-legend li em { font-style: normal; color: var(--text-faint); margin-left: auto; font-weight: 700; }
.donut-legend li::before {
  content: ''; width: 10px; height: 10px; border-radius: 3px; flex: none;
  background: var(--lg-c, #6366f1);
}
.widget-body { margin-top: 4px; }
.widget-body.dist-layout { display: flex; flex-direction: column; align-items: center; }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 1024px) {
  .charts-grid, .charts-grid.two { grid-template-columns: 1fr; }
  .tiket-grid { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar-close { display: grid; }
  .sidebar-overlay.show { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  #menuToggle { display: grid; }
}

@media (max-width: 768px) {
  .login-wrap { grid-template-columns: 1fr; max-width: 440px; }
  .login-brand { display: none; }
  .login-form-side { padding: 40px 28px; }
  .search-box { width: 100%; }
  .navbar { padding: 10px 16px; }
  .content { padding: 16px; }
  .user-info { display: none; }
  .search-box kbd { display: none; }
  .stat-cards { grid-template-columns: 1fr 1fr; }
  .frow-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
  .stat-cards { grid-template-columns: 1fr; }
  .stat-value { font-size: 1.1rem; }
  .content { padding: 12px; }
  .panel { padding: 16px; }
  .chart-box, .chart-box.tall, .chart-box.donut { height: 250px; }
  .form-grid { grid-template-columns: 1fr; }
  .modal { max-width: 100%; }
  .import-summary { grid-template-columns: 1fr; }
  .uk-search { max-width: 100%; }
  .page-actions .btn-ghost, .page-actions .btn-primary.sm { padding: 9px 12px; font-size: .8rem; }
  .uker-row { grid-template-columns: 52px 1fr; }
  .uker-ip { display: none; }
  .tiket-panel .panel-head { flex-direction: column; align-items: stretch; }
  .tiket-panel .panel-head .input-field { max-width: 100%; }
  .preview-box { font-size: .76rem; padding: 12px; }
  .widget-grid { grid-template-columns: 1fr; }
  .donut-box { width: 150px; height: 150px; }
}

/* ============ PROFIL & PENGATURAN ============ */
.profile-panel { padding: 28px; }
.profile-head { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.avatar-lg { width: 84px; height: 84px; border-radius: 22px; object-fit: cover; background: var(--bg-soft); border: 3px solid var(--border); }
.avatar-actions { display: flex; gap: 8px; margin-top: 10px; }
.avatar-actions .btn-ghost { padding: 6px 10px; font-size: .75rem; }
.profile-meta h3 { font-size: 1.2rem; margin-bottom: 6px; }
.profile-meta .jchip { display: inline-flex; margin-bottom: 6px; }
.profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.profile-panel .btn-primary { margin-top: 20px; }

.set-group { padding: 18px 0; border-bottom: 1px solid var(--border); }
.set-group:first-child { padding-top: 0; }
.set-group:last-child { border-bottom: 0; padding-bottom: 0; }
.set-group h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: .95rem; color: var(--primary); }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.set-row > div:first-child { flex: 1; }
.set-row p { margin: 0; font-weight: 600; }
.seg { display: flex; gap: 6px; background: var(--bg-soft); padding: 4px; border-radius: 10px; }
.seg label { position: relative; }
.seg label input { position: absolute; opacity: 0; pointer-events: none; }
.seg label span { display: block; padding: 7px 14px; border-radius: 8px; font-size: .8rem; font-weight: 600; cursor: pointer; color: var(--text-faint); }
.seg label input:checked + span { background: var(--primary); color: #fff; }

.notif-empty { display: flex; align-items: center; justify-content: center; color: var(--text-faint); font-size: .8rem; padding: 16px; }
body.notif-off .navbar #notifBtn .dot { display: none; }
body.notif-off #notifDropdown .notif-empty { display: flex; }

/* ============ HALAMAN DATA: KOLOM, DETAIL, IMPORT ============ */
.action-btn.view { color: var(--primary); background: rgba(99,102,241,.12); }
.action-btn.view:hover { background: rgba(99,102,241,.22); }
.col-list { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 6px; }
.col-check {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 9px 12px; cursor: pointer; font-weight: 600; font-size: .82rem;
  transition: var(--transition);
}
.col-check:hover { border-color: var(--primary); background: var(--primary-soft); }
.col-check input { accent-color: var(--primary); width: 16px; height: 16px; flex: none; }
.col-check > span { flex: 1; }
.col-map { cursor: default; }
.col-map:hover { border-color: var(--border); background: none; }
.map-name { flex: 1; }
.map-col { font-size: .74rem; color: var(--text-faint); font-weight: 500; }
.map-col i.fa-check { color: var(--success); margin-right: 4px; }
.map-col i.fa-xmark { color: var(--danger); margin-right: 4px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-item {
  border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px;
  background: var(--bg-soft);
}
.detail-item small { display: block; font-size: .7rem; color: var(--text-faint); font-weight: 700; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 6px; }
.detail-item .detail-val { font-size: .9rem; font-weight: 600; color: var(--text); word-break: break-word; }
.detail-text { white-space: pre-wrap; line-height: 1.55; }
.detail-photo { max-width: 100%; max-height: 220px; border-radius: 10px; object-fit: contain; }
@media (max-width: 640px) { .detail-grid { grid-template-columns: 1fr; } }

/* ============ MERCHANT TOOLS (NOP MONITOR) ============ */
.mt-stats { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.mt-stat {
  display: flex; align-items: center; gap: 9px;
  background: var(--card);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 8px 14px;
  transition: var(--transition);
}
.mt-stat:hover { border-color: var(--primary); background: var(--primary-soft); transform: translateY(-1px); }
.mt-stat.active { border-color: var(--mt-color, #6366f1); background: var(--primary-soft); box-shadow: var(--shadow-sm); }
.mt-stat-num { font-size: 1.25rem; font-weight: 800; color: var(--mt-color, #6366f1); letter-spacing: -.4px; }
.mt-stat-info { display: flex; flex-direction: column; text-align: left; }
.mt-stat-label { font-size: .78rem; font-weight: 800; color: var(--text); letter-spacing: .3px; }
.mt-stat-sub { font-size: .68rem; color: var(--text-faint); }

.mt-table th { text-align: left; }
.mt-table td { vertical-align: middle; }
.mt-tid { font-family: 'Courier New', monospace; font-weight: 700; color: var(--info); font-size: .8rem; white-space: nowrap; }
.mt-nama { font-weight: 800; color: var(--text); font-size: .86rem; }
.mt-sal { text-align: right; font-family: 'Courier New', monospace; font-weight: 700; color: var(--text); font-size: .8rem; white-space: nowrap; }
.mt-br, .mt-vd, .mt-al { color: var(--text-soft); font-size: .82rem; }
.mt-us { font-size: .78rem; color: var(--info); }
.mt-kc { color: var(--success); font-weight: 700; font-size: .8rem; }
.mt-dt { text-align: center; font-family: 'Courier New', monospace; font-size: .8rem; color: var(--warning); white-space: nowrap; }
.hplus { font-size: .62rem; font-weight: 800; margin-top: 2px; display: block; }

/* max 2 baris agar tabel tidak tinggi besar */
.mt-clamp {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  max-width: 220px;
  word-break: break-word;
}

.nop-badge {
  display: inline-block; padding: 3px 11px; border-radius: 99px;
  font-size: .66rem; font-weight: 800; letter-spacing: .3px; white-space: nowrap;
  color: #fff;
}
.nb-late   { background: #dc2626; }
.nb-today  { background: #ef4444; }
.nb-senin  { background: #7c3aed; }
.nb-selasa { background: #2563eb; }
.nb-rabu   { background: #0891b2; }
.nb-kamis  { background: #059669; }
.nb-jumat  { background: #b45309; }
.nb-sabtu  { background: #ea580c; }
.nb-minggu { background: #dc2626; }

.mt-row-late   td { background: linear-gradient(90deg, #b91c1c, #7f1d1d); }
.mt-row-today  td { background: linear-gradient(90deg, #dc2626, #991b1b); }
.mt-row-senin  td { background: linear-gradient(90deg, #6d28d9, #4c1d95); }
.mt-row-selasa td { background: linear-gradient(90deg, #2563eb, #1e40af); }
.mt-row-rabu   td { background: linear-gradient(90deg, #0891b2, #155e75); }
.mt-row-kamis  td { background: linear-gradient(90deg, #059669, #065f46); }
.mt-row-jumat  td { background: linear-gradient(90deg, #b45309, #92400e); }
.mt-row-sabtu  td { background: linear-gradient(90deg, #ea580c, #c2410c); }
.mt-row-minggu td { background: linear-gradient(90deg, #dc2626, #991b1b); }

/* teks di baris berwarna dibuat terang supaya tetap terbaca */
.mt-table tr[class*="mt-row-"] td { color: #fff; }
.mt-table tr[class*="mt-row-"] .mt-tid { color: #e0f2fe; }
.mt-table tr[class*="mt-row-"] .mt-us { color: #e0f2fe; }
.mt-table tr[class*="mt-row-"] .mt-kc { color: #d1fae5; }
.mt-table tr[class*="mt-row-"] .mt-dt { color: #fde68a; }
.mt-table tr[class*="mt-row-"] .mt-nama { color: #fff; }
.mt-table tr[class*="mt-row-"] .mt-sal { color: #fff; }
.mt-table tr[class*="mt-row-"] .mt-br,
.mt-table tr[class*="mt-row-"] .mt-vd,
.mt-table tr[class*="mt-row-"] .mt-al { color: #f1f5f9; }

/* JPG capture header */
.mt-cap-hdr {
  padding: 14px 20px;
  background: linear-gradient(135deg, #0f3460, #16213e);
  border-bottom: 2px solid #1e4080;
  border-radius: 12px 12px 0 0;
}
.mt-cap-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.mt-cap-title { color: #e2e8f0; font-size: .95rem; font-weight: 800; }
.mt-cap-ts { color: #7dd3fc; font-size: .78rem; font-weight: 600; }
.mt-cap-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.mt-cap-stat { border-radius: 8px; padding: 4px 12px; font-size: .7rem; font-weight: 700; color: #fff; }
.mt-cap-wrap { background: #fff; }

/* =====================================================
   OVERVIEW DONUT CHART
   ===================================================== */
.overview-chart-wrap {
  display: flex; align-items: center; gap: 32px; padding: 8px 0 16px;
}
.overview-donut-box {
  position: relative; width: 200px; height: 200px; flex-shrink: 0;
}
.overview-donut-center {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  text-align: center;
}
.overview-donut-center strong { display: block; font-size: 1.8rem; font-weight: 800; color: var(--text); }
.overview-donut-center span { font-size: .75rem; color: var(--text-soft); }
.overview-legend { list-style: none; padding: 0; margin: 0; flex: 1; }
.overview-legend li {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.overview-legend li:last-child { border-bottom: none; }
.overview-legend-dot {
  width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0;
  background: var(--oc);
}
.overview-legend-label { font-weight: 600; font-size: .9rem; color: var(--text); flex: 1; }
.overview-legend-val { font-size: .85rem; color: var(--text-soft); text-align: right; }
.overview-legend-val em { font-style: normal; color: var(--text-soft); }

/* =====================================================
   SETTINGS LOGO UPLOAD
   ===================================================== */
.logo-upload-area {
  display: flex; align-items: center; gap: 20px; margin-top: 8px;
}
.logo-preview {
  width: 80px; height: 80px; border-radius: 50%; border: 2px dashed var(--border);
  display: grid; place-items: center; overflow: hidden; background: var(--bg-soft);
}
.logo-preview img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.logo-preview-placeholder { color: var(--text-soft); font-size: 1.8rem; }

/* =====================================================
   WIDGET GRID LAYOUT
   ===================================================== */
.widgets-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; flex-wrap: wrap; gap: 8px; }
.widgets-toolbar h3 { font-size: 1.05rem; font-weight: 700; }
.widgets-toolbar-right { display: flex; align-items: center; gap: 8px; }
.grid-cols-selector { display: flex; gap: 4px; background: var(--bg-soft); border: 1px solid var(--border); border-radius: 8px; padding: 3px; }
.grid-col-btn {
  padding: 5px 10px; border-radius: 6px; border: none; background: transparent;
  color: var(--text-soft); cursor: pointer; font-size: .75rem; font-weight: 600;
  display: flex; align-items: center; gap: 4px; transition: all .15s;
}
.grid-col-btn:hover { background: var(--card); color: var(--text); }
.grid-col-btn.active { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(99,102,241,.3); }

.widget-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.widget-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  transition: box-shadow .2s, transform .15s;
}
.widget-card.widget-span-2 { grid-column: span 2; }
.widget-card.widget-span-full { grid-column: 1 / -1; }

.widget-card.dragging {
  opacity: .4;
  transform: scale(.97);
}
.widget-card.drag-over {
  box-shadow: 0 0 0 2px var(--primary);
}

.widget-drag-handle {
  position: absolute; top: 10px; right: 10px;
  cursor: grab; color: var(--text-soft); opacity: .4; z-index: 2;
  padding: 4px; border-radius: 4px; transition: opacity .15s;
}
.widget-drag-handle:hover { opacity: .8; background: var(--bg-soft); }
.widget-card:active .widget-drag-handle { cursor: grabbing; }

.widget-size-btns {
  display: flex; gap: 2px; margin-left: auto;
}
.ws-btn {
  padding: 3px 6px; border: 1px solid var(--border); border-radius: 4px;
  background: var(--bg-soft); color: var(--text-soft); cursor: pointer;
  font-size: .65rem; transition: all .15s;
}
.ws-btn:hover { border-color: var(--primary); color: var(--primary); }
.ws-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }

@media (max-width: 640px) {
  .overview-chart-wrap { flex-direction: column; align-items: center; }
}
