:root {
  --bg: #eef2ff;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #dbe3ef;
  --input-bg: #ffffff;
  --input-text: #0f172a;
  --input-placeholder: #94a3b8;
  --id-pill-bg: #dbeafe;
  --id-pill-text: #1e3a8a;
  --status-paid-bg: #d1fae5;
  --status-paid-text: #065f46;
  --status-unpaid-bg: #fef3c7;
  --status-unpaid-text: #92400e;
  --sidebar: linear-gradient(180deg, #0b1635 0%, #08122d 100%);
  --sidebar-text: #d7e3ff;
}

body[data-theme="dark"] {
  --bg: #020617;
  --card: #0f172a;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --border: #334155;
  --input-bg: #0b1220;
  --input-text: #e2e8f0;
  --input-placeholder: #64748b;
  --id-pill-bg: #1e3a8a;
  --id-pill-text: #dbeafe;
  --status-paid-bg: #064e3b;
  --status-paid-text: #a7f3d0;
  --status-unpaid-bg: #78350f;
  --status-unpaid-text: #fde68a;
  --sidebar: linear-gradient(180deg, #020617 0%, #0a1225 100%);
  --sidebar-text: #cbd5e1;
}

body {
  margin: 0;
  background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.12), transparent 28%), var(--bg);
  color: var(--text);
  transition: background 0.2s ease, color 0.2s ease;
  -webkit-font-smoothing: antialiased;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.34;
  background-image:
    radial-gradient(circle at 18px 18px, rgba(99, 102, 241, 0.06) 0, rgba(99, 102, 241, 0.06) 8px, transparent 8px),
    radial-gradient(circle at 54px 54px, rgba(236, 72, 153, 0.055) 0, rgba(236, 72, 153, 0.055) 10px, transparent 10px),
    linear-gradient(45deg, transparent 41%, rgba(245, 158, 11, 0.055) 42%, rgba(245, 158, 11, 0.055) 58%, transparent 59%),
    linear-gradient(-45deg, transparent 41%, rgba(59, 130, 246, 0.045) 42%, rgba(59, 130, 246, 0.045) 58%, transparent 59%);
  background-size: 72px 72px, 96px 96px, 120px 120px, 120px 120px;
  mix-blend-mode: multiply;
  z-index: 0;
}

button,
.btn,
a.btn,
input,
select,
textarea {
  min-height: 42px;
}

.app-loader {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.9);
  color: #fff;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.app-loader-message {
  margin-top: 0.8rem;
  font-size: 1rem;
  font-weight: 700;
}

.app-loader-subtitle {
  margin-top: 0.25rem;
  font-size: 0.84rem;
  color: rgba(226, 232, 240, 0.82);
}

.app-loader.hide {
  opacity: 0;
  visibility: hidden;
}

.app-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px 1fr;
  transition: grid-template-columns 0.25s ease;
  position: relative;
  z-index: 1;
}

.app-layout.sidebar-collapsed {
  grid-template-columns: 0 1fr;
}

.app-sidebar {
  background: var(--sidebar);
  color: var(--sidebar-text);
  padding: 1rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  transition: transform 0.25s ease, opacity 0.2s ease;
  overflow: hidden;
}

.app-sidebar::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    radial-gradient(circle at 28px 28px, rgba(255, 255, 255, 0.14) 0, rgba(255, 255, 255, 0.14) 7px, transparent 7px),
    linear-gradient(45deg, transparent 42%, rgba(251, 191, 36, 0.14) 43%, rgba(251, 191, 36, 0.14) 57%, transparent 58%),
    linear-gradient(-45deg, transparent 42%, rgba(96, 165, 250, 0.16) 43%, rgba(96, 165, 250, 0.16) 57%, transparent 58%);
  background-size: 78px 78px, 110px 110px, 110px 110px;
}

.app-layout.sidebar-collapsed .app-sidebar {
  transform: translateX(-110%);
  opacity: 0;
}

.app-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0;
  color: #fff;
}

.app-subtitle {
  font-size: 0.76rem;
  opacity: 0.9;
}

.topbar-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
}

.login-brand-logo {
  width: 84px;
  height: 84px;
  object-fit: contain;
}

.side-nav {
  display: grid;
  gap: 0.35rem;
}

.side-link {
  color: var(--sidebar-text);
  text-decoration: none;
  padding: 0.6rem 0.75rem;
  border-radius: 0.6rem;
  display: block;
  font-size: 0.92rem;
  transition: all 0.2s ease;
}

.side-link:hover,
.side-link.active {
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  transform: translateX(2px);
}

.app-content-wrap {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
}

.app-topbar {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--border);
  background: color-mix(in oklab, var(--card) 90%, white 10%);
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(6px);
  overflow: hidden;
}

.app-topbar::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.42;
  background:
    linear-gradient(90deg, rgba(219, 234, 254, 0.85), rgba(243, 232, 255, 0.7) 50%, rgba(254, 249, 195, 0.5)),
    radial-gradient(circle at right center, rgba(59, 130, 246, 0.12), transparent 26%);
}

.app-topbar > * {
  position: relative;
  z-index: 1;
}

.app-main {
  padding: 1rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
}

.app-footer {
  border-top: 1px solid var(--border);
  padding: 0.75rem 1rem 1rem;
  font-size: 0.82rem;
  color: var(--muted);
  background: transparent;
}

.app-footer a {
  color: #2563eb;
  text-decoration: none;
}

.bg-white,
.bg-slate-100,
.bg-slate-50,
[class*="rounded-xl shadow"] {
  background: var(--card) !important;
  color: var(--text) !important;
}

.bg-white.rounded-xl.shadow,
section.bg-white.rounded-xl.shadow,
.stat-card,
.info-card {
  position: relative;
  overflow: hidden;
}

.bg-white.rounded-xl.shadow::after,
section.bg-white.rounded-xl.shadow::after,
.stat-card::after,
.info-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(45deg, transparent 44%, rgba(124, 58, 237, 0.06) 45%, rgba(124, 58, 237, 0.06) 55%, transparent 56%),
    linear-gradient(-45deg, transparent 44%, rgba(59, 130, 246, 0.05) 45%, rgba(59, 130, 246, 0.05) 55%, transparent 56%);
  background-size: 140px 140px, 140px 140px;
}

.text-slate-500,
.text-slate-600,
.text-slate-700 {
  color: var(--muted) !important;
}

.border,
.border-b {
  border-color: var(--border) !important;
}

table td, table th {
  vertical-align: top;
}

.table-soft thead th {
  font-size: 0.79rem;
  font-weight: 700;
  color: color-mix(in oklab, var(--muted) 84%, var(--text) 16%);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

.table-soft tbody tr {
  transition: background 0.2s ease;
}

.table-soft tbody tr:hover {
  background: color-mix(in oklab, var(--card) 92%, #3b82f6 8%);
}

.id-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--id-pill-bg);
  color: var(--id-pill-text);
}

.name-cell {
  font-weight: 600;
  color: var(--text);
  min-width: 120px;
}

.address-cell {
  max-width: 280px;
  line-height: 1.35;
  color: var(--muted);
  font-size: 0.83rem;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.22rem 0.58rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
}

.status-pill.paid {
  background: var(--status-paid-bg);
  color: var(--status-paid-text);
}

.status-pill.unpaid {
  background: var(--status-unpaid-bg);
  color: var(--status-unpaid-text);
}

.dashboard-hero-card,
.dashboard-update-card {
  border: 1px solid var(--border);
  box-shadow: 0 14px 34px rgba(2, 6, 23, 0.08);
}

.dashboard-hero-card {
  background: linear-gradient(135deg, color-mix(in oklab, var(--card) 92%, #eff6ff 8%), var(--card));
  border-radius: 1.25rem;
  padding: 1.2rem;
}

.dashboard-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(220px, 0.8fr);
  gap: 1rem;
  align-items: center;
}

.dashboard-hero-kicker,
.dashboard-section-kicker {
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #2563eb;
}

.dashboard-hero-title,
.dashboard-section-title {
  margin: 0.35rem 0 0;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text);
}

.dashboard-hero-text,
.dashboard-section-text {
  margin-top: 0.55rem;
  color: var(--muted);
  line-height: 1.7;
}

.dashboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1rem;
}

.dashboard-hero-card--compact {
  padding: 0.9rem 1rem;
}

.dashboard-hero-compact-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.dashboard-hero-compact-main {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.dashboard-hero-logo-inline {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--card) 94%, #eff6ff 6%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dashboard-hero-logo {
  width: min(100%, 160px);
  max-height: 140px;
  object-fit: contain;
  filter: drop-shadow(0 12px 24px rgba(37, 99, 235, 0.14));
}

.dashboard-hero-logo--mini {
  width: 32px;
  max-height: 32px;
  filter: none;
}

.dashboard-hero-title--compact {
  font-size: 1.2rem;
  margin-top: 0.15rem;
}

.dashboard-hero-text--compact {
  margin-top: 0.2rem;
  font-size: 0.92rem;
  line-height: 1.5;
}

.dashboard-hero-actions--compact {
  margin-top: 0;
  align-items: center;
}

.dashboard-section-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  margin-bottom: 1rem;
}

.dashboard-section-head--compact {
  margin-bottom: 0.75rem;
}

.dashboard-section-title--compact {
  font-size: 1.15rem;
}

.dashboard-update-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-weight: 800;
  font-size: 0.8rem;
}

.dashboard-feature-grid,
.dashboard-flow-list {
  display: grid;
  gap: 0.85rem;
}

.dashboard-feature-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-update-card--compact {
  min-height: auto;
}

.dashboard-bullet-list,
.dashboard-inline-steps {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.7;
}

.dashboard-bullet-list li,
.dashboard-inline-steps li {
  margin-bottom: 0.38rem;
}

.dashboard-feature-item,
.dashboard-flow-item,
.dashboard-shortcut-card,
.tutorial-step-card {
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--card) 97%, #f8fafc 3%);
}

.dashboard-feature-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 0.8rem;
  border-radius: 1rem;
  padding: 0.95rem;
}

.dashboard-feature-icon,
.dashboard-flow-no,
.tutorial-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 1rem;
  background: #eff6ff;
  color: #2563eb;
  font-size: 1.1rem;
  font-weight: 800;
}

.dashboard-feature-title,
.dashboard-flow-title,
.tutorial-step-title {
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.18rem;
}

.dashboard-feature-text,
.dashboard-flow-text,
.tutorial-step-text {
  color: var(--muted);
  line-height: 1.58;
  font-size: 0.9rem;
}

.dashboard-flow-item,
.tutorial-step-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 0.85rem;
  border-radius: 1rem;
  padding: 1rem;
}

.dashboard-shortcuts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.dashboard-shortcuts--compact {
  margin-top: 0.9rem;
}

.dashboard-shortcut-card {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--text);
  border-radius: 1rem;
  padding: 0.95rem 1rem;
  min-height: 64px;
}

.dashboard-shortcut-card:hover {
  background: color-mix(in oklab, var(--card) 90%, #dbeafe 10%);
  color: #1d4ed8;
}

.dashboard-shortcut-card i {
  font-size: 1.15rem;
}

.tutorial-modal {
  background: var(--card);
  color: var(--text);
  border-radius: 1.25rem;
  border: 1px solid var(--border);
}

body[data-theme="dark"] .dashboard-update-badge,
body[data-theme="dark"] .dashboard-feature-icon,
body[data-theme="dark"] .dashboard-flow-no,
body[data-theme="dark"] .tutorial-step-number {
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
}

.stat-card {
  background: linear-gradient(180deg, color-mix(in oklab, var(--card) 96%, #ffffff 4%), var(--card));
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.08);
}

.table-wrap {
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

.table-card-mode .inline {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.table-card-mode td[data-label="Aksi"] .inline,
.table-card-mode td[data-label="Aksi"] form,
.table-card-mode td[data-label="Aksi"] .d-flex {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

input,
select,
textarea,
.form-control,
.form-select {
  background: var(--input-bg) !important;
  color: var(--input-text) !important;
  border-color: var(--border) !important;
}

input::placeholder,
textarea::placeholder,
.form-control::placeholder {
  color: var(--input-placeholder) !important;
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus,
.form-control:focus,
.form-select:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 0.18rem rgba(59, 130, 246, 0.22) !important;
}

.btn-outline-secondary {
  color: var(--text) !important;
  border-color: var(--border) !important;
}

.btn-outline-secondary:hover {
  background: color-mix(in oklab, var(--card) 84%, #334155 16%) !important;
  color: var(--text) !important;
}

.btn-outline-primary,
.btn-outline-danger,
.btn-outline-secondary,
.btn-outline-primary:hover,
.btn-outline-danger:hover,
.btn-outline-secondary:hover {
  color: var(--text) !important;
}

.bg-slate-200,
.bg-slate-100,
.bg-red-100,
.bg-amber-100,
.bg-emerald-100,
.bg-cyan-100,
.bg-sky-100,
.bg-white {
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.bg-slate-200 {
  background: #e2e8f0 !important;
  color: #0f172a !important;
}

.bg-slate-100 {
  background: #f1f5f9 !important;
  color: #0f172a !important;
}

.bg-red-100 {
  background: #fee2e2 !important;
  color: #b91c1c !important;
}

.bg-amber-100 {
  background: #fef3c7 !important;
  color: #92400e !important;
}

.bg-emerald-100 {
  background: #d1fae5 !important;
  color: #065f46 !important;
}

.bg-cyan-100 {
  background: #cffafe !important;
  color: #155e75 !important;
}

.bg-sky-100 {
  background: #e0f2fe !important;
  color: #075985 !important;
}

body[data-theme="dark"] .bg-slate-200 {
  background: #334155 !important;
  color: #e2e8f0 !important;
}

body[data-theme="dark"] .bg-slate-100 {
  background: #1e293b !important;
  color: #e2e8f0 !important;
}

body[data-theme="dark"] .bg-red-100 {
  background: rgba(127, 29, 29, 0.9) !important;
  color: #fecaca !important;
}

body[data-theme="dark"] .bg-amber-100 {
  background: rgba(120, 53, 15, 0.95) !important;
  color: #fde68a !important;
}

body[data-theme="dark"] .bg-emerald-100 {
  background: rgba(6, 78, 59, 0.95) !important;
  color: #a7f3d0 !important;
}

body[data-theme="dark"] .bg-cyan-100 {
  background: rgba(22, 78, 99, 0.95) !important;
  color: #a5f3fc !important;
}

body[data-theme="dark"] .bg-sky-100 {
  background: rgba(12, 74, 110, 0.95) !important;
  color: #bae6fd !important;
}

body[data-theme="dark"] .text-red-800,
body[data-theme="dark"] .text-red-700,
body[data-theme="dark"] .text-amber-800,
body[data-theme="dark"] .text-amber-700,
body[data-theme="dark"] .text-emerald-800,
body[data-theme="dark"] .text-emerald-700,
body[data-theme="dark"] .text-slate-700,
body[data-theme="dark"] .text-slate-600,
body[data-theme="dark"] .text-slate-500 {
  color: inherit !important;
}

body[data-theme="dark"] .table,
body[data-theme="dark"] .table td,
body[data-theme="dark"] .table th,
body[data-theme="dark"] .table-light,
body[data-theme="dark"] .table-light th {
  background-color: transparent !important;
  color: var(--text) !important;
  border-color: var(--border) !important;
}

body[data-theme="dark"] .table-success {
  background: rgba(6, 95, 70, 0.2) !important;
  color: #a7f3d0 !important;
}

.badge.text-bg-success {
  background: #0f766e !important;
  color: #ecfeff !important;
}

.grid > section,
.app-main > section,
.app-main > div {
  animation: riseIn 0.35s ease both;
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.js-table-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.65rem;
}

.js-table-search {
  min-width: 220px;
  max-width: 360px;
}

.js-table-search-wrap {
  flex: 1 1 260px;
}

.js-table-pager {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.js-table-pager .btn {
  padding: 0.15rem 0.55rem;
  font-size: 0.8rem;
}

.js-page-size-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.js-page-size-wrap select {
  min-width: 74px;
}

.js-table-info {
  font-size: 0.8rem;
  color: var(--muted);
}

.stats-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.info-card {
  background: linear-gradient(180deg, color-mix(in oklab, var(--card) 96%, #ffffff 4%), var(--card));
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1rem;
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.06);
}

.info-card .info-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.info-card .info-value {
  margin-top: 0.35rem;
  font-size: 1.55rem;
  font-weight: 800;
  color: var(--text);
}

.info-card .info-note {
  margin-top: 0.3rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.bill-layout-table {
  min-width: 1120px;
}

.bill-meta,
.bill-meter,
.bill-charge,
.bill-payment {
  display: grid;
  gap: 0.24rem;
}

.bill-subline {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
}

.bill-highlight {
  color: #059669;
  font-weight: 800;
}

.bill-actions {
  display: grid;
  gap: 0.5rem;
  min-width: 180px;
}

.bill-action-form {
  display: grid;
  gap: 0.4rem;
}

.bill-action-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.bill-inline-note {
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.4;
}

.announcement-banner {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 0.85rem;
  align-items: start;
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
  box-shadow: 0 10px 24px rgba(2, 6, 23, 0.06);
}

.announcement-banner-icon {
  width: 44px;
  height: 44px;
  border-radius: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  background: rgba(255, 255, 255, 0.55);
}

.announcement-banner-title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.announcement-banner-text {
  color: inherit;
  line-height: 1.6;
  font-size: 0.92rem;
}

.announcement-banner-audience {
  font-size: 0.76rem;
  font-weight: 700;
  opacity: 0.8;
}

.announcement-info {
  background: linear-gradient(135deg, #dbeafe, #eff6ff);
  color: #1e3a8a;
  border-color: #bfdbfe;
}

.announcement-success {
  background: linear-gradient(135deg, #d1fae5, #ecfdf5);
  color: #065f46;
  border-color: #a7f3d0;
}

.announcement-warning {
  background: linear-gradient(135deg, #fef3c7, #fffbeb);
  color: #92400e;
  border-color: #fde68a;
}

.announcement-danger {
  background: linear-gradient(135deg, #fee2e2, #fef2f2);
  color: #991b1b;
  border-color: #fecaca;
}

body[data-theme="dark"] .announcement-info {
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.32), rgba(15, 23, 42, 0.95));
  color: #dbeafe;
  border-color: rgba(96, 165, 250, 0.45);
}

body[data-theme="dark"] .announcement-success {
  background: linear-gradient(135deg, rgba(6, 95, 70, 0.35), rgba(15, 23, 42, 0.95));
  color: #d1fae5;
  border-color: rgba(52, 211, 153, 0.4);
}

body[data-theme="dark"] .announcement-warning {
  background: linear-gradient(135deg, rgba(146, 64, 14, 0.4), rgba(15, 23, 42, 0.95));
  color: #fde68a;
  border-color: rgba(251, 191, 36, 0.35);
}

body[data-theme="dark"] .announcement-danger {
  background: linear-gradient(135deg, rgba(127, 29, 29, 0.42), rgba(15, 23, 42, 0.95));
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.36);
}

.announcement-login-wrap {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 30;
}

.announcement-admin-card {
  border-radius: 1rem;
  padding: 1rem;
  border: 1px solid var(--border);
}

.announcement-admin-title {
  font-size: 1rem;
  font-weight: 800;
}

.announcement-admin-meta,
.announcement-admin-date {
  font-size: 0.8rem;
  opacity: 0.85;
}

.announcement-admin-message {
  margin-top: 0.75rem;
  line-height: 1.65;
}

.announcement-admin-footer {
  margin-top: 0.9rem;
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  flex-wrap: wrap;
}

.app-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9997;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(2, 6, 23, 0.55);
  backdrop-filter: blur(7px);
}

.app-popup-card {
  width: min(100%, 560px);
  border-radius: 1.35rem;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 30px 80px rgba(2, 6, 23, 0.32);
}

.app-popup-head {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  padding: 1rem 1.1rem 0.4rem;
}

.app-popup-kicker {
  font-size: 0.74rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.8;
}

.app-popup-title {
  font-size: 1.3rem;
  font-weight: 800;
  margin-top: 0.2rem;
}

.app-popup-close {
  border: 0;
  background: transparent;
  color: inherit;
  width: 40px;
  height: 40px;
  border-radius: 999px;
}

.app-popup-close:hover {
  background: rgba(255,255,255,0.16);
}

.app-popup-body {
  padding: 0.2rem 1.1rem 1.1rem;
}

.app-popup-text {
  line-height: 1.7;
  font-size: 0.95rem;
}

.app-popup-meta {
  margin-top: 0.8rem;
  font-size: 0.82rem;
  opacity: 0.85;
}

.app-popup-actions {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-end;
}

.table-card-mode td[data-label] {
  position: relative;
}

.install-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9998;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  background: rgba(2, 6, 23, 0.48);
  backdrop-filter: blur(8px);
}

.install-popup-card {
  width: min(100%, 680px);
  background: var(--card);
  border-radius: 1.5rem;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(2, 6, 23, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.12);
  animation: installPromptUp 0.28s ease;
}

.install-popup-head {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #fff;
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.install-popup-brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.install-popup-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.install-popup-icon {
  width: 32px;
  height: 32px;
}

.install-popup-title {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.1;
}

.install-popup-subtitle {
  opacity: 0.9;
  font-size: 0.95rem;
}

.install-popup-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 1.35rem;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.install-popup-close:hover {
  background: rgba(255, 255, 255, 0.14);
}

.install-popup-body {
  padding: 1.25rem;
}

.install-popup-text {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--muted);
  margin-bottom: 1rem;
}

.install-popup-note {
  background: #fff7db;
  border: 1px solid #fde68a;
  color: #92400e;
  border-radius: 1rem;
  padding: 0.95rem 1rem;
  margin-bottom: 1rem;
  line-height: 1.55;
}

.install-steps {
  display: grid;
  gap: 0.85rem;
}

.install-step {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 0.9rem;
  align-items: start;
  border: 1px solid var(--border);
  background: color-mix(in oklab, var(--card) 96%, #f8fafc 4%);
  border-radius: 1rem;
  padding: 1rem;
}

.install-step-icon {
  width: 48px;
  height: 48px;
  border-radius: 1rem;
  background: #eff6ff;
  color: #2563eb;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
}

body[data-theme="dark"] .install-step-icon {
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
}

.install-step-title {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 0.18rem;
}

.install-step-text {
  color: var(--muted);
  line-height: 1.6;
}

.install-popup-actions {
  display: flex;
  gap: 0.65rem;
  justify-content: flex-end;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}

.install-main-btn {
  min-width: 150px;
  font-weight: 700;
}

@keyframes installPromptUp {
  from {
    opacity: 0;
    transform: translateY(22px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ts-control,
.ts-dropdown {
  border-color: var(--border) !important;
  background: var(--card) !important;
  color: var(--text) !important;
}

.ts-control input::placeholder {
  color: var(--input-placeholder) !important;
}

@media (max-width: 992px) {
  .app-layout {
    grid-template-columns: 1fr;
  }

  .app-sidebar {
    position: fixed;
    left: -280px;
    width: 260px;
    height: 100vh;
    z-index: 30;
    transition: left 0.2s ease;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.25);
    transform: none;
    opacity: 1;
  }

  .app-layout.sidebar-open .app-sidebar {
    left: 0;
  }

  .app-layout.sidebar-collapsed .app-sidebar {
    left: -280px;
    transform: none;
    opacity: 1;
  }

  .app-topbar {
    flex-wrap: wrap;
    align-items: center;
    gap: 0.55rem;
    padding: 0.7rem 0.8rem;
  }

  .app-topbar > div {
    width: 100%;
  }

  .app-topbar > div:last-child {
    justify-content: stretch !important;
  }

  .app-topbar > div:last-child .btn,
  .app-topbar > div:last-child .badge {
    flex: 1 1 calc(50% - 0.35rem);
    justify-content: center;
    text-align: center;
  }

  .app-main {
    padding: 0.8rem;
  }

  .js-table-tools {
    flex-direction: column;
    align-items: stretch;
  }

  .js-table-search {
    min-width: 0;
    max-width: 100%;
    width: 100%;
  }

  .js-table-pager {
    width: 100%;
    justify-content: space-between;
  }

  .js-page-size-wrap {
    width: 100%;
    justify-content: space-between;
  }

  .js-page-size-wrap select {
    min-width: 88px;
  }

  .dashboard-hero-grid,
  .dashboard-feature-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-compact-row,
  .dashboard-hero-compact-main {
    align-items: flex-start;
  }

  .stats-grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .table-soft th,
  .table-soft td {
    padding-top: 0.45rem !important;
    padding-bottom: 0.45rem !important;
    padding-right: 0.5rem !important;
  }

  .address-cell {
    max-width: 180px;
  }

  .id-pill,
  .status-pill {
    font-size: 0.7rem;
  }

  .mobile-form-actions,
  .bill-action-links,
  .bill-actions {
    width: 100%;
  }

  .mobile-form-actions > *,
  .bill-action-links > *,
  .bill-actions > * {
    width: 100%;
  }
}

@media (max-width: 1200px) {
  .table-card-mode {
    min-width: 0;
  }

  .table-card-mode thead {
    display: none;
  }

  .table-card-mode,
  .table-card-mode tbody,
  .table-card-mode tr,
  .table-card-mode td {
    display: block;
    width: 100%;
  }

  .table-card-mode tbody tr {
    border: 1px solid var(--border);
    border-radius: 1rem;
    margin: 0.85rem;
    padding: 0.35rem 0.85rem;
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.06);
    background: color-mix(in oklab, var(--card) 97%, #ffffff 3%);
  }

  .table-card-mode tbody tr:hover {
    background: color-mix(in oklab, var(--card) 94%, #3b82f6 6%);
  }

  .table-card-mode td[data-label] {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr);
    gap: 0.7rem;
    padding: 0.55rem 0 !important;
    border-bottom: 1px dashed var(--border) !important;
  }

  .table-card-mode td[data-label]::before {
    content: attr(data-label);
    font-size: 0.73rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
  }

  .table-card-mode td[data-label]:last-child {
    border-bottom: 0 !important;
  }

  .bill-actions {
    min-width: 0;
  }

  .table-card-mode td[data-label="Aksi"] .btn,
  .table-card-mode td[data-label="Aksi"] button,
  .table-card-mode td[data-label="Aksi"] a,
  .table-card-mode td[data-label="Aksi"] input,
  .table-card-mode td[data-label="Aksi"] select {
    width: 100%;
  }

  .table-card-mode td[data-label="Aksi"] form {
    width: 100%;
  }
}

@media (max-width: 640px) {
  button,
  .btn,
  a.btn,
  input,
  select,
  textarea {
    min-height: 44px;
  }

  .dashboard-hero-card,
  .dashboard-update-card,
  .tutorial-step-card,
  .dashboard-feature-item,
  .dashboard-flow-item,
  .dashboard-shortcut-card {
    border-radius: 1rem;
  }

  .dashboard-section-head {
    flex-direction: column;
  }

  .dashboard-feature-item,
  .dashboard-flow-item,
  .tutorial-step-card {
    grid-template-columns: 1fr;
  }

  .dashboard-hero-compact-main {
    width: 100%;
  }

  .dashboard-hero-actions--compact {
    width: 100%;
    margin-top: 0.2rem;
  }

  .dashboard-feature-icon,
  .dashboard-flow-no,
  .tutorial-step-number {
    width: 42px;
    height: 42px;
    border-radius: 0.85rem;
  }

  .dashboard-hero-actions > *,
  .dashboard-shortcuts > * {
    width: 100%;
  }

  .stats-grid-4 {
    grid-template-columns: 1fr;
  }

  .app-topbar {
    padding: 0.65rem;
  }

  .app-topbar > div:last-child .btn,
  .app-topbar > div:last-child .badge {
    flex: 1 1 100%;
  }

  .app-main {
    padding: 0.65rem;
  }

  .bg-white,
  [class*="rounded-xl shadow"] {
    border-radius: 1rem !important;
  }

  .js-table-tools {
    gap: 0.65rem;
  }

  .js-table-pager {
    gap: 0.5rem;
  }

  .js-table-pager .btn,
  .js-page-size-wrap,
  .js-table-info {
    width: 100%;
    justify-content: center;
    text-align: center;
  }

  .table-card-mode tbody tr {
    margin: 0.75rem 0;
    padding: 0.2rem 0.75rem;
  }

  .table-card-mode td[data-label] {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .table-card-mode td[data-label]::before {
    margin-bottom: 0.15rem;
  }

  .name-cell {
    min-width: 0;
  }

  .address-cell {
    max-width: 100%;
  }

  .install-popup-backdrop {
    padding: 0.6rem;
  }

  .install-popup-card {
    border-radius: 1.25rem;
  }

  .install-popup-head,
  .install-popup-body {
    padding: 1rem;
  }

  .install-popup-title {
    font-size: 1.35rem;
  }

  .install-step {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .install-step-icon {
    width: 42px;
    height: 42px;
    border-radius: 0.9rem;
  }

  .install-popup-actions > * {
    width: 100%;
  }

  .announcement-banner {
    grid-template-columns: 1fr;
  }

  .announcement-banner-audience {
    text-align: left;
  }

  .announcement-login-wrap {
    left: 0.65rem;
    right: 0.65rem;
    bottom: 0.65rem;
  }

  .app-popup-backdrop {
    padding: 0.7rem;
  }

  .app-popup-actions .btn {
    width: 100%;
  }
}

:root {
  --brand-primary: #2563eb;
  --brand-secondary: #7c3aed;
  --brand-dark: #0f172a;
  --brand-soft: #eef4ff;
}

body {
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.12), transparent 30%),
    var(--bg);
}

.app-sidebar {
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.98) 0%, rgba(17, 24, 39, 0.96) 44%, rgba(37, 99, 235, 0.95) 100%),
    var(--sidebar);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-sidebar-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 0.85rem;
  align-items: center;
  padding: 0.95rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.24);
  position: relative;
  overflow: hidden;
}

.brand-sidebar-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    radial-gradient(circle at 20px 20px, rgba(255, 255, 255, 0.12) 0, rgba(255, 255, 255, 0.12) 7px, transparent 7px),
    linear-gradient(45deg, transparent 42%, rgba(250, 204, 21, 0.14) 43%, rgba(250, 204, 21, 0.14) 57%, transparent 58%);
  background-size: 80px 80px, 120px 120px;
}

.brand-sidebar-logo-wrap,
.dashboard-hero-logo-inline {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.brand-sidebar-logo {
  width: 54px;
  height: 54px;
  object-fit: contain;
}

.app-subtitle,
.topbar-tagline {
  line-height: 1.45;
}

.topbar-tagline {
  font-size: 0.72rem;
  color: var(--muted);
  max-width: 420px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-brand-wrap {
  min-width: 0;
}

.app-topbar,
.bg-white,
[class*="rounded-xl shadow"] {
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08) !important;
}

.btn-primary,
.login-submit-btn {
  background: linear-gradient(135deg, var(--brand-primary), var(--brand-secondary));
  border: 0;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.2);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444, #f97316);
  border: 0;
}

.badge.text-bg-success {
  background: linear-gradient(135deg, #0f766e, #14b8a6) !important;
}

.btn-primary:hover,
.login-submit-btn:hover {
  background: linear-gradient(135deg, #1d4ed8, #6d28d9);
}

.stat-card,
.info-card,
.dashboard-update-card,
.dashboard-hero-card,
.bg-white.rounded-xl.shadow {
  border-radius: 1.15rem !important;
}

.login-screen {
  min-height: 100vh;
  margin: 0;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.18), transparent 28%),
    radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.14), transparent 30%),
    #eff6ff;
}

.login-shell {
  width: min(1120px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 420px);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(148, 163, 184, 0.26);
  border-radius: 2rem;
  overflow: hidden;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.16);
  backdrop-filter: blur(16px);
}

.login-showcase {
  padding: 2.25rem;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.98), rgba(37, 99, 235, 0.95) 60%, rgba(124, 58, 237, 0.92));
  color: #fff;
}

.login-showcase-badge {
  display: inline-flex;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.login-showcase-logo-wrap {
  width: 108px;
  height: 108px;
  border-radius: 1.5rem;
  margin: 1.35rem 0 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
}

.login-brand-logo {
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.login-showcase-title {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.login-showcase-text,
.login-panel-text {
  margin-top: 0.9rem;
  font-size: 0.98rem;
  line-height: 1.7;
}

.login-showcase-points {
  display: grid;
  gap: 0.95rem;
  margin-top: 1.5rem;
}

.login-showcase-point {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 0.8rem;
  align-items: start;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.1);
}

.login-panel {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.9);
}

.login-panel-kicker {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand-primary);
  font-weight: 800;
}

.login-panel-title {
  margin: 0.4rem 0 0;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--brand-dark);
}

.login-default-note {
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: var(--brand-soft);
  color: var(--muted);
  font-size: 0.82rem;
}

.brand-logo-settings-card {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: color-mix(in oklab, var(--card) 92%, #eff6ff 8%);
}

body[data-theme="dark"]::before {
  opacity: 0.18;
  mix-blend-mode: screen;
}

body[data-theme="dark"] .app-topbar::before {
  opacity: 0.16;
}

body[data-theme="dark"] .bg-white.rounded-xl.shadow::after,
body[data-theme="dark"] section.bg-white.rounded-xl.shadow::after,
body[data-theme="dark"] .info-card::after {
  opacity: 0.12;
}

.brand-logo-settings-preview {
  width: 96px;
  height: 96px;
  border-radius: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  border: 1px solid var(--border);
}

.brand-logo-settings-preview img {
  max-width: 74px;
  max-height: 74px;
  object-fit: contain;
}

@media (max-width: 992px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .topbar-tagline {
    display: none;
  }
}

@media (max-width: 640px) {
  .brand-sidebar-card,
  .brand-logo-settings-card {
    grid-template-columns: 1fr;
  }

  .login-screen {
    padding: 0.75rem;
  }

  .login-showcase,
  .login-panel {
    padding: 1.25rem;
  }
}

.dashboard-hero-card--colorful {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.28), transparent 22%),
    radial-gradient(circle at left center, rgba(56, 189, 248, 0.2), transparent 26%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(237, 233, 254, 0.92) 48%, rgba(219, 234, 254, 0.94));
  border: 1px solid rgba(167, 139, 250, 0.22);
}

.dashboard-hero-card--colorful::before,
.dashboard-hero-card--colorful::after {
  content: '';
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.dashboard-hero-card--colorful::before {
  width: 180px;
  height: 180px;
  right: -48px;
  top: -58px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.26), rgba(96, 165, 250, 0));
}

.dashboard-hero-card--colorful::after {
  width: 160px;
  height: 160px;
  left: -56px;
  bottom: -78px;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.22), rgba(244, 114, 182, 0));
}

.dashboard-hero-card--colorful .dashboard-hero-kicker,
.dashboard-accent-card .dashboard-section-kicker {
  color: #4f46e5;
}

.dashboard-accent-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.18);
}

.dashboard-accent-card::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 1;
  pointer-events: none;
}

.dashboard-accent-card > * {
  position: relative;
  z-index: 1;
}

.dashboard-accent-card--indigo::before {
  background: linear-gradient(145deg, rgba(224, 231, 255, 0.96), rgba(240, 249, 255, 0.92) 58%, rgba(255, 255, 255, 0.9));
}

.dashboard-accent-card--violet::before {
  background: linear-gradient(145deg, rgba(250, 245, 255, 0.96), rgba(254, 242, 242, 0.9) 54%, rgba(255, 255, 255, 0.92));
}

.dashboard-update-badge {
  background: linear-gradient(135deg, #6366f1, #8b5cf6);
  color: #fff;
  box-shadow: 0 12px 22px rgba(99, 102, 241, 0.22);
}

.stat-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.stat-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 1;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: 16px;
  right: 16px;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.45);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.stat-card > * {
  position: relative;
  z-index: 1;
}

.stat-card--sky::before {
  background: linear-gradient(145deg, rgba(224, 242, 254, 0.98), rgba(239, 246, 255, 0.92));
}

.stat-card--amber::before {
  background: linear-gradient(145deg, rgba(254, 249, 195, 0.98), rgba(255, 251, 235, 0.92));
}

.stat-card--rose::before {
  background: linear-gradient(145deg, rgba(255, 228, 230, 0.98), rgba(255, 241, 242, 0.92));
}

.stat-card--violet::before {
  background: linear-gradient(145deg, rgba(237, 233, 254, 0.98), rgba(245, 243, 255, 0.92));
}

.stat-card--mint::before {
  background: linear-gradient(145deg, rgba(209, 250, 229, 0.98), rgba(236, 253, 245, 0.92));
}

.stat-card--indigo::before {
  background: linear-gradient(145deg, rgba(224, 231, 255, 0.98), rgba(238, 242, 255, 0.92));
}

.soft-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14) !important;
}

.soft-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.soft-panel > * {
  position: relative;
  z-index: 1;
}

.soft-panel--sky::before {
  background: linear-gradient(145deg, rgba(240, 249, 255, 0.94), rgba(224, 242, 254, 0.7));
}

.soft-panel--violet::before {
  background: linear-gradient(145deg, rgba(245, 243, 255, 0.94), rgba(250, 245, 255, 0.74));
}

.side-link {
  border: 1px solid transparent;
}

.side-link:hover,
.side-link.active {
  background: linear-gradient(135deg, rgba(96, 165, 250, 0.22), rgba(139, 92, 246, 0.28));
  border-color: rgba(255, 255, 255, 0.12);
  color: #fff;
  transform: translateX(2px);
}

.btn-outline-primary,
.btn-outline-secondary {
  background: rgba(255, 255, 255, 0.76);
  border-width: 1px;
}

.btn-outline-primary:hover {
  background: linear-gradient(135deg, #dbeafe, #ede9fe);
  color: #1d4ed8;
}

.btn-outline-secondary:hover {
  background: linear-gradient(135deg, #f8fafc, #ede9fe);
  color: #4338ca;
}

body[data-theme="dark"] .dashboard-hero-card--colorful {
  background:
    radial-gradient(circle at top right, rgba(250, 204, 21, 0.12), transparent 22%),
    radial-gradient(circle at left center, rgba(56, 189, 248, 0.12), transparent 26%),
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96) 52%, rgba(49, 46, 129, 0.9));
}

body[data-theme="dark"] .dashboard-accent-card--indigo::before {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.94), rgba(30, 64, 175, 0.22));
}

body[data-theme="dark"] .dashboard-accent-card--violet::before {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.94), rgba(109, 40, 217, 0.2));
}

body[data-theme="dark"] .stat-card::after {
  background: rgba(15, 23, 42, 0.28);
  border-color: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .stat-card--sky::before {
  background: linear-gradient(145deg, rgba(8, 47, 73, 0.9), rgba(15, 23, 42, 0.96));
}

body[data-theme="dark"] .stat-card--amber::before {
  background: linear-gradient(145deg, rgba(120, 53, 15, 0.88), rgba(15, 23, 42, 0.96));
}

body[data-theme="dark"] .stat-card--rose::before {
  background: linear-gradient(145deg, rgba(127, 29, 29, 0.88), rgba(15, 23, 42, 0.96));
}

body[data-theme="dark"] .stat-card--violet::before {
  background: linear-gradient(145deg, rgba(76, 29, 149, 0.88), rgba(15, 23, 42, 0.96));
}

body[data-theme="dark"] .stat-card--mint::before {
  background: linear-gradient(145deg, rgba(6, 78, 59, 0.88), rgba(15, 23, 42, 0.96));
}

body[data-theme="dark"] .stat-card--indigo::before {
  background: linear-gradient(145deg, rgba(30, 64, 175, 0.88), rgba(15, 23, 42, 0.96));
}

body[data-theme="dark"] .soft-panel--sky::before {
  background: linear-gradient(145deg, rgba(8, 47, 73, 0.7), rgba(15, 23, 42, 0.9));
}

body[data-theme="dark"] .soft-panel--violet::before {
  background: linear-gradient(145deg, rgba(76, 29, 149, 0.54), rgba(15, 23, 42, 0.9));
}

.page-ornament {
  position: relative;
  overflow: hidden;
  padding: 1.35rem 1.4rem;
  border-radius: 1.4rem;
  border: 1px solid rgba(250, 204, 21, 0.22);
  box-shadow: 0 22px 46px rgba(15, 23, 42, 0.12);
}

.page-ornament::before,
.page-ornament::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.page-ornament::before {
  background:
    radial-gradient(circle at 22px 22px, rgba(250, 204, 21, 0.2) 0, rgba(250, 204, 21, 0.2) 8px, transparent 8px),
    linear-gradient(45deg, transparent 42%, rgba(250, 204, 21, 0.16) 43%, rgba(250, 204, 21, 0.16) 57%, transparent 58%),
    linear-gradient(-45deg, transparent 42%, rgba(245, 158, 11, 0.12) 43%, rgba(245, 158, 11, 0.12) 57%, transparent 58%);
  background-size: 78px 78px, 140px 140px, 140px 140px;
  opacity: 0.85;
}

.page-ornament::after {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.96), rgba(31, 41, 55, 0.94) 44%, rgba(88, 28, 135, 0.9));
  z-index: -1;
}

.page-ornament--violet::after {
  background: linear-gradient(135deg, rgba(49, 46, 129, 0.96), rgba(88, 28, 135, 0.93) 48%, rgba(15, 23, 42, 0.94));
}

.page-ornament--rose::after {
  background: linear-gradient(135deg, rgba(76, 5, 25, 0.96), rgba(127, 29, 29, 0.92) 42%, rgba(15, 23, 42, 0.94));
}

.page-ornament-kicker,
.page-ornament-title,
.page-ornament-text {
  position: relative;
  z-index: 1;
}

.page-ornament-kicker {
  color: #fcd34d;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.page-ornament-title {
  color: #fff;
  margin: 0.45rem 0 0;
  font-size: clamp(1.55rem, 2vw, 2rem);
  font-weight: 900;
}

.page-ornament-text {
  margin-top: 0.55rem;
  color: rgba(255, 248, 220, 0.9);
  max-width: 780px;
  line-height: 1.7;
}

.luxe-card {
  border: 1px solid rgba(212, 175, 55, 0.18) !important;
  box-shadow: 0 22px 48px rgba(15, 23, 42, 0.1) !important;
}

.luxe-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    radial-gradient(circle at 24px 24px, rgba(245, 158, 11, 0.1) 0, rgba(245, 158, 11, 0.1) 7px, transparent 7px),
    linear-gradient(45deg, transparent 42%, rgba(139, 92, 246, 0.08) 43%, rgba(139, 92, 246, 0.08) 57%, transparent 58%),
    linear-gradient(-45deg, transparent 42%, rgba(59, 130, 246, 0.08) 43%, rgba(59, 130, 246, 0.08) 57%, transparent 58%);
  background-size: 88px 88px, 150px 150px, 150px 150px;
}

.luxe-card > * {
  position: relative;
  z-index: 1;
}

.luxe-card--form {
  background: linear-gradient(180deg, rgba(255, 251, 235, 0.94), rgba(255, 255, 255, 0.98)) !important;
}

.luxe-card--table {
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.97), rgba(255, 255, 255, 0.99)) !important;
}

.luxe-form label {
  font-weight: 700;
  color: #5b4636;
}

.luxe-form input,
.luxe-form select,
.luxe-form textarea,
.luxe-card .form-control,
.luxe-card .form-select {
  border-radius: 0.9rem !important;
  border: 1px solid rgba(212, 175, 55, 0.22) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 8px 18px rgba(15, 23, 42, 0.03);
}

.luxe-card .js-table-tools {
  background: linear-gradient(135deg, rgba(255, 248, 220, 0.7), rgba(237, 233, 254, 0.35));
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 1rem;
  padding: 0.85rem;
}

.luxe-card .table-soft thead th {
  color: #7c2d12;
}

.luxe-card .table-soft tbody tr:hover {
  background: linear-gradient(135deg, rgba(254, 249, 195, 0.35), rgba(237, 233, 254, 0.4));
}

.side-link i,
.btn i,
.page-ornament i {
  width: 1.1rem;
  text-align: center;
}

body[data-theme="dark"] .page-ornament::after {
  filter: saturate(0.88) brightness(0.86);
}

body[data-theme="dark"] .luxe-card--form,
body[data-theme="dark"] .luxe-card--table {
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(2, 6, 23, 0.98)) !important;
}

body[data-theme="dark"] .luxe-form label,
body[data-theme="dark"] .luxe-card .table-soft thead th {
  color: #fcd34d !important;
}

body[data-theme="dark"] .luxe-form input,
body[data-theme="dark"] .luxe-form select,
body[data-theme="dark"] .luxe-form textarea,
body[data-theme="dark"] .luxe-card .form-control,
body[data-theme="dark"] .luxe-card .form-select {
  background: rgba(15, 23, 42, 0.86) !important;
  border-color: rgba(250, 204, 21, 0.18) !important;
}

body[data-theme="dark"] .luxe-card .js-table-tools {
  background: linear-gradient(135deg, rgba(88, 28, 135, 0.16), rgba(15, 23, 42, 0.76));
  border-color: rgba(250, 204, 21, 0.14);
}

.app-sidebar {
  background:
    linear-gradient(180deg, rgba(27, 31, 39, 0.99), rgba(38, 42, 54, 0.98) 54%, rgba(46, 23, 10, 0.96)),
    var(--sidebar);
}

.app-sidebar::after {
  opacity: 0.18;
  background-image:
    radial-gradient(circle at 24px 24px, rgba(214, 167, 75, 0.16) 0, rgba(214, 167, 75, 0.16) 7px, transparent 7px),
    linear-gradient(45deg, transparent 42%, rgba(214, 167, 75, 0.12) 43%, rgba(214, 167, 75, 0.12) 57%, transparent 58%),
    linear-gradient(-45deg, transparent 42%, rgba(99, 102, 241, 0.12) 43%, rgba(99, 102, 241, 0.12) 57%, transparent 58%);
}

.brand-sidebar-card {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(214, 167, 75, 0.18);
}

.sidebar-user-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 0.8rem;
  align-items: center;
  padding: 0.8rem 0.9rem;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), rgba(214, 167, 75, 0.12));
  border: 1px solid rgba(214, 167, 75, 0.18);
}

.sidebar-user-card__avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #facc15, #f59e0b);
  color: #1f2937;
  font-size: 1.1rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.22);
}

.sidebar-user-card__name {
  color: #fff7d6;
  font-weight: 800;
  font-size: 0.92rem;
}

.sidebar-user-card__role {
  color: #d1d5db;
  font-size: 0.76rem;
}

.side-link {
  padding: 0.72rem 0.85rem;
  border-radius: 0.85rem;
  color: #e5e7eb;
}

.side-link:hover,
.side-link.active {
  background: linear-gradient(135deg, rgba(214, 167, 75, 0.22), rgba(59, 130, 246, 0.18));
  color: #fff7d6;
  border-color: rgba(214, 167, 75, 0.18);
}

.isp-dashboard-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1.35rem 1.4rem;
  border-radius: 1.4rem;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1f2937, #111827 55%, #4c1d0b);
  border: 1px solid rgba(214, 167, 75, 0.22);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

.isp-dashboard-head::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  background-image:
    radial-gradient(circle at 24px 24px, rgba(250, 204, 21, 0.16) 0, rgba(250, 204, 21, 0.16) 8px, transparent 8px),
    linear-gradient(45deg, transparent 42%, rgba(250, 204, 21, 0.12) 43%, rgba(250, 204, 21, 0.12) 57%, transparent 58%);
  background-size: 82px 82px, 140px 140px;
}

.isp-dashboard-head__left,
.isp-dashboard-head__right {
  position: relative;
  z-index: 1;
}

.isp-dashboard-head__badge {
  display: inline-flex;
  align-items: center;
  padding: 0.42rem 0.8rem;
  border-radius: 999px;
  background: rgba(250, 204, 21, 0.14);
  color: #fde68a;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.isp-dashboard-head__title {
  margin: 0.65rem 0 0;
  color: #fff;
  font-size: 2rem;
  font-weight: 900;
}

.isp-dashboard-head__text {
  margin-top: 0.45rem;
  color: rgba(255, 248, 220, 0.88);
  max-width: 740px;
  line-height: 1.7;
}

.isp-dashboard-head__right {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.isp-action-btn {
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  background: rgba(255, 255, 255, 0.12) !important;
  color: #fff !important;
  border-radius: 0.9rem !important;
}

.isp-action-btn:hover {
  background: rgba(250, 204, 21, 0.18) !important;
}

.isp-tile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.isp-stat-tile {
  position: relative;
  overflow: hidden;
  display: block;
  min-height: 138px;
  border-radius: 0.9rem;
  padding: 1rem 1rem 0.7rem;
  color: #fff;
  text-decoration: none;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
}

.isp-stat-tile::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.18;
  background-image:
    linear-gradient(45deg, transparent 43%, rgba(255, 255, 255, 0.18) 44%, rgba(255, 255, 255, 0.18) 56%, transparent 57%),
    radial-gradient(circle at right 30px top 30px, rgba(255, 255, 255, 0.15) 0, rgba(255, 255, 255, 0.15) 8px, transparent 8px);
  background-size: 120px 120px, 90px 90px;
}

.isp-stat-tile__value,
.isp-stat-tile__label,
.isp-stat-tile__sub,
.isp-stat-tile__icon,
.isp-stat-tile__footer {
  position: relative;
  z-index: 1;
}

.isp-stat-tile__value {
  font-size: 1.7rem;
  font-weight: 900;
  line-height: 1.15;
}

.isp-stat-tile__label {
  margin-top: 0.6rem;
  font-size: 1rem;
  font-weight: 700;
}

.isp-stat-tile__sub {
  margin-top: 0.2rem;
  font-size: 0.78rem;
  opacity: 0.9;
}

.isp-stat-tile__icon {
  position: absolute;
  right: 14px;
  top: 14px;
  font-size: 3.1rem;
  opacity: 0.18;
}

.isp-stat-tile__footer {
  margin-top: 1.1rem;
  padding-top: 0.55rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.82rem;
  font-weight: 700;
}

.isp-stat-tile--green { background: linear-gradient(180deg, #32b447, #23923a); }
.isp-stat-tile--blue { background: linear-gradient(180deg, #2892ff, #1670dd); }
.isp-stat-tile--red { background: linear-gradient(180deg, #ef4444, #d52b37); }
.isp-stat-tile--green-dark { background: linear-gradient(180deg, #22c55e, #159947); }
.isp-stat-tile--cyan { background: linear-gradient(180deg, #18b6c9, #1498a8); }
.isp-stat-tile--yellow { background: linear-gradient(180deg, #fbbf24, #eba500); color: #3f2b00; }
.isp-stat-tile--yellow .isp-stat-tile__footer { border-top-color: rgba(63, 43, 0, 0.15); }
.isp-stat-tile--navy { background: linear-gradient(180deg, #1f87ff, #0f67d8); }
.isp-stat-tile--pink { background: linear-gradient(180deg, #ef476f, #d92c5a); }

.isp-summary-tile,
.isp-panel-card {
  border-radius: 0.95rem;
  padding: 1.15rem;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
  position: relative;
  overflow: hidden;
}

.isp-summary-tile::before,
.isp-panel-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    radial-gradient(circle at 20px 20px, rgba(255, 255, 255, 0.18) 0, rgba(255, 255, 255, 0.18) 7px, transparent 7px),
    linear-gradient(45deg, transparent 42%, rgba(255, 255, 255, 0.14) 43%, rgba(255, 255, 255, 0.14) 57%, transparent 58%);
  background-size: 90px 90px, 145px 145px;
}

.isp-summary-tile > *,
.isp-panel-card > * { position: relative; z-index: 1; }

.isp-summary-tile--teal {
  background: linear-gradient(180deg, #1aa6b8, #18889a);
  color: #fffef7;
}

.isp-summary-tile__title { font-size: 1rem; font-weight: 800; }
.isp-summary-tile__big { font-size: 2.1rem; font-weight: 900; margin-top: 0.5rem; }
.isp-summary-tile__mini { font-size: 1.35rem; font-weight: 900; }
.isp-summary-tile__line { font-size: 0.92rem; opacity: 0.94; line-height: 1.6; }

.isp-panel-card--dark {
  background: linear-gradient(180deg, #1f2937, #111827);
  color: #fff;
  border: 1px solid rgba(214, 167, 75, 0.16);
}

.isp-panel-card--light {
  background: linear-gradient(180deg, #fff9e8, #ffffff);
  color: #3b2f1c;
  border: 1px solid rgba(214, 167, 75, 0.18);
}

.isp-panel-card__title {
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 0.7rem;
}

.isp-panel-list li {
  margin-bottom: 0.55rem;
  line-height: 1.65;
}

.isp-mini-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}

.isp-mini-card {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
  padding: 1rem 1rem 0.9rem;
  color: #fff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.1);
}

.isp-mini-card::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.16;
  background-image:
    radial-gradient(circle at 20px 20px, rgba(255, 255, 255, 0.18) 0, rgba(255, 255, 255, 0.18) 7px, transparent 7px),
    linear-gradient(45deg, transparent 42%, rgba(255, 255, 255, 0.14) 43%, rgba(255, 255, 255, 0.14) 57%, transparent 58%);
  background-size: 90px 90px, 145px 145px;
}

.isp-mini-card > * {
  position: relative;
  z-index: 1;
}

.isp-mini-card__label {
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 800;
}

.isp-mini-card__value {
  margin-top: 0.45rem;
  font-size: 1.5rem;
  line-height: 1.2;
  font-weight: 900;
}

.isp-mini-card__note {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  opacity: 0.92;
}

.isp-mini-card--emerald { background: linear-gradient(180deg, #10b981, #059669); }
.isp-mini-card--blue { background: linear-gradient(180deg, #3b82f6, #2563eb); }
.isp-mini-card--amber { background: linear-gradient(180deg, #f59e0b, #d97706); }
.isp-mini-card--red { background: linear-gradient(180deg, #ef4444, #dc2626); }
.isp-mini-card--violet { background: linear-gradient(180deg, #8b5cf6, #7c3aed); }
.isp-mini-card--slate { background: linear-gradient(180deg, #475569, #334155); }

@media (max-width: 1200px) {
  .isp-tile-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .isp-mini-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .isp-dashboard-head {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .isp-tile-grid {
    grid-template-columns: 1fr;
  }

  .isp-mini-grid {
    grid-template-columns: 1fr;
  }

  .isp-dashboard-head__right {
    width: 100%;
  }

  .isp-action-btn {
    width: 100%;
  }
}
