/* =========================================================
   ServisPro — Service Management
   Design tokens & global styles
   ========================================================= */

:root {
  --primary: #0d9488;
  --primary-strong: color-mix(in srgb, var(--primary) 80%, #001b1a);
  --primary-soft: color-mix(in srgb, var(--primary) 10%, transparent);
  --primary-soft-strong: color-mix(in srgb, var(--primary) 18%, transparent);
  --accent: #f59e0b;
  --accent-soft: #fef3c7;

  --bg: #f3f6f9;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #f1f5f9;
  --surface-glass: rgba(255, 255, 255, 0.82);
  --text: #0f172a;
  --text-2: #475569;
  --muted: #8592a5;
  --border: #e6eaf0;
  --border-strong: #d6dee8;

  --sidebar: #0b1220;
  --sidebar-2: #101b2e;
  --sidebar-text: #9fadc2;
  --sidebar-text-strong: #e9eff8;

  --success: #16a34a;
  --success-soft: #ecfdf3;
  --danger: #dc2626;
  --danger-soft: #fef2f2;
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --info: #2563eb;
  --info-soft: #eff6ff;
  --violet: #7c3aed;
  --violet-soft: #f5f3ff;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, 0.09);
  --shadow-lg: 0 24px 70px rgba(15, 23, 42, 0.18);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-xl: 28px;

  --font-sans: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --sidebar-width: 272px;
  --topbar-height: 78px;
}

[data-theme="dark"] {
  --bg: #070d18;
  --surface: #0f1929;
  --surface-2: #111e31;
  --surface-3: #162338;
  --surface-glass: rgba(13, 23, 39, 0.84);
  --text: #e8eef8;
  --text-2: #aebbd0;
  --muted: #7e8da5;
  --border: #1e2d44;
  --border-strong: #2a3c57;
  --sidebar: #050b14;
  --sidebar-2: #0b1524;
  --sidebar-text: #8fa0b8;
  --sidebar-text-strong: #f1f5fb;
  --success-soft: rgba(22, 163, 74, 0.12);
  --danger-soft: rgba(220, 38, 38, 0.12);
  --warning-soft: rgba(217, 119, 6, 0.13);
  --info-soft: rgba(37, 99, 235, 0.12);
  --violet-soft: rgba(124, 58, 237, 0.14);
  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.24);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 16px 40px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 30px 80px rgba(0, 0, 0, 0.52);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { height: 100%; scroll-behavior: smooth; }

body {
  min-height: 100%;
  margin: 0;
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
svg { display: block; }
h1, h2, h3, h4, p { margin: 0; }
ul, ol { margin: 0; }
table { border-collapse: collapse; width: 100%; }
::selection { background: var(--primary-soft-strong); }

.hidden { display: none !important; }
.text-muted { color: var(--muted); }
.tiny { font-size: 11.5px; }
.mono { font-family: var(--font-mono); }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.text-center { text-align: center; }
.w-full { width: 100%; }
.mt-1 { margin-top: 6px; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 18px; }
.mt-4 { margin-top: 24px; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 18px; }
.mb-4 { margin-bottom: 24px; }
.gap-1 { gap: 6px; }
.gap-2 { gap: 12px; }
.gap-3 { gap: 18px; }
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.flex-1 { flex: 1; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
*::-webkit-scrollbar { width: 8px; height: 8px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 99px; }
*::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* =========================================================
   Common components
   ========================================================= */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
}
.badge-neutral { background: var(--surface-3); color: var(--text-2); }
.badge-primary { background: var(--primary-soft); color: var(--primary); }
.badge-success { background: var(--success-soft); color: var(--success); }
.badge-warning { background: var(--warning-soft); color: var(--warning); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-info { background: var(--info-soft); color: var(--info); }
.badge-violet { background: var(--violet-soft); color: var(--violet); }
.badge-dot::before {
  content: "";
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}
.status-pill::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  flex: none;
}
.status-slate { background: var(--surface-3); color: var(--text-2); }
.status-blue { background: var(--info-soft); color: var(--info); }
.status-amber { background: var(--warning-soft); color: var(--warning); }
.status-violet { background: var(--violet-soft); color: var(--violet); }
.status-green { background: var(--success-soft); color: var(--success); }
.status-teal { background: var(--primary-soft); color: var(--primary); }
.status-red { background: var(--danger-soft); color: var(--danger); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .12s ease;
}
.button svg { width: 16px; height: 16px; flex: none; }
.button:hover { transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.button-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 5px 14px color-mix(in srgb, var(--primary) 25%, transparent);
}
.button-primary:hover { background: var(--primary-strong); }
.button-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-xs);
}
.button-secondary:hover { background: var(--surface-2); border-color: var(--border-strong); }
.button-ghost { background: transparent; color: var(--text-2); }
.button-ghost:hover { background: var(--surface-3); color: var(--text); }
.button-soft { background: var(--primary-soft); color: var(--primary); }
.button-soft:hover { background: var(--primary-soft-strong); }
.button-danger { background: var(--danger); color: #fff; }
.button-danger:hover { background: color-mix(in srgb, var(--danger) 82%, #000); }
.button-danger-soft { background: var(--danger-soft); color: var(--danger); }
.button-sm { min-height: 33px; padding: 6px 11px; border-radius: 9px; font-size: 12px; gap: 6px; }
.button-sm svg { width: 14px; height: 14px; }
.button-lg { min-height: 48px; padding: 13px 20px; font-size: 14px; border-radius: 12px; }
.button-block { width: 100%; }
.button-icon-only { width: 36px; min-height: 36px; padding: 0; }

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text-2);
  transition: background .18s ease, border-color .18s ease, color .18s ease;
  position: relative;
}
.icon-button:hover { background: var(--surface-2); color: var(--text); border-color: var(--border-strong); }
.icon-button svg { width: 19px; height: 19px; }
.icon-button.subtle { border-color: transparent; background: transparent; }
.icon-button.subtle:hover { background: rgba(148, 163, 184, .12); }
.icon-button.danger-hover:hover { color: var(--danger); background: var(--danger-soft); }

.link-button {
  border: 0;
  background: none;
  padding: 0;
  color: var(--primary);
  font-size: 12.5px;
  font-weight: 700;
}
.link-button:hover { text-decoration: underline; }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  flex: none;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--primary) 12%, transparent);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-sm { width: 32px; height: 32px; border-radius: 10px; font-size: 11px; }
.avatar-lg { width: 48px; height: 48px; border-radius: 14px; font-size: 15px; }
.avatar-square-lg { width: 52px; height: 52px; border-radius: 15px; font-size: 14px; }

.role-dot {
  display: inline-block;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--muted);
  flex: none;
}
.role-dot.owner { background: var(--primary); }
.role-dot.kasir { background: var(--info); }
.role-dot.teknisi { background: var(--violet); }
.role-dot.pramugari { background: var(--accent); }

.divider { height: 1px; background: var(--border); border: 0; margin: 0; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 7px; }
.field-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.field-label {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-2);
  display: flex;
  align-items: center;
  gap: 4px;
}
.field-label .required { color: var(--danger); }
.input,
.select,
.textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}
.textarea { min-height: 92px; resize: vertical; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}
.input:disabled, .select:disabled, .textarea:disabled {
  background: var(--surface-3);
  color: var(--muted);
  cursor: not-allowed;
}
.input-sm { min-height: 36px; font-size: 12.5px; padding: 6px 10px; }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238592a5' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
.input-icon { position: relative; display: block; }
.input-icon > svg {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}
.input-icon .input { padding-left: 40px; }
.input-action {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  border: 0;
  background: transparent;
  color: var(--muted);
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 8px;
}
.input-action:hover { background: var(--surface-3); color: var(--text); }
.input-action svg { width: 17px; height: 17px; }
.input-with-prefix { position: relative; display: flex; align-items: center; }
.input-with-prefix > span {
  position: absolute;
  left: 12px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  pointer-events: none;
}
.input-with-prefix .input { padding-left: 37px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-1 { grid-column: span 1; }
.form-section { display: flex; flex-direction: column; gap: 16px; }
.form-section + .form-section { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--border); }
.form-section-title { display: flex; align-items: flex-start; gap: 11px; }
.form-section-title .section-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary);
  flex: none;
}
.form-section-title .section-icon svg { width: 17px; height: 17px; }
.form-section-title strong { display: block; font-size: 13.5px; }
.form-section-title span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.form-row-split { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.check-row { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); cursor: pointer; user-select: none; }
.check-row input { width: 16px; height: 16px; accent-color: var(--primary); margin: 0; }
.helper-text { font-size: 11.5px; color: var(--muted); line-height: 1.5; }
.helper-text.warning { color: var(--warning); }
.helper-text.danger { color: var(--danger); }
.inline-error {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 11.5px;
  font-weight: 600;
}
.field-error .input, .field-error .select, .field-error .textarea { border-color: var(--danger); }

.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch-track {
  width: 38px;
  height: 22px;
  border-radius: 99px;
  background: var(--border-strong);
  position: relative;
  transition: background .18s ease;
  flex: none;
}
.switch-track::after {
  content: "";
  position: absolute;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .2);
  transition: transform .18s ease;
}
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch-label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }

.segmented {
  display: inline-flex;
  padding: 3px;
  background: var(--surface-3);
  border-radius: 10px;
  gap: 2px;
}
.segmented button {
  border: 0;
  background: transparent;
  border-radius: 7px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  transition: background .16s ease, color .16s ease, box-shadow .16s ease;
}
.segmented button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-xs); }

.alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 10px;
  font-size: 12.5px;
  line-height: 1.55;
  margin-bottom: 16px;
}
.alert svg { width: 17px; height: 17px; flex: none; margin-top: 1px; }
.alert-danger { background: var(--danger-soft); color: var(--danger); border: 1px solid color-mix(in srgb, var(--danger) 16%, transparent); }
.alert-warning { background: var(--warning-soft); color: var(--warning); border: 1px solid color-mix(in srgb, var(--warning) 16%, transparent); }
.alert-info { background: var(--info-soft); color: var(--info); border: 1px solid color-mix(in srgb, var(--info) 16%, transparent); }
.alert-success { background: var(--success-soft); color: var(--success); border: 1px solid color-mix(in srgb, var(--success) 16%, transparent); }

/* =========================================================
   Boot
   ========================================================= */

.boot-screen {
  position: fixed;
  inset: 0;
  background: var(--sidebar);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  z-index: 200;
}
.boot-mark { width: 60px; height: 60px; color: var(--primary); }
.boot-mark svg { width: 100%; height: 100%; }
.boot-text { font-size: 18px; font-weight: 800; letter-spacing: -.02em; }
.boot-loader { width: 130px; height: 3px; background: rgba(255,255,255,.1); border-radius: 99px; overflow: hidden; }
.boot-loader span { display: block; height: 100%; width: 45%; background: var(--primary); border-radius: inherit; animation: bootSlide 1s ease-in-out infinite alternate; }
@keyframes bootSlide { from { transform: translateX(-10%); } to { transform: translateX(135%); } }

/* =========================================================
   Auth / Login
   ========================================================= */

.auth-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(460px, .92fr);
  background: var(--surface);
}
.auth-story {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 34px 50px 26px;
  color: #e8eef8;
  background: var(--sidebar);
  overflow: hidden;
  isolation: isolate;
}
.auth-story::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(to bottom, #000, transparent 80%);
  z-index: -1;
}
.auth-story-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
  pointer-events: none;
  z-index: -1;
}
.auth-story-glow.one {
  width: 540px; height: 540px;
  top: -220px; left: -160px;
  background: radial-gradient(circle, color-mix(in srgb, var(--primary) 32%, transparent), transparent 66%);
}
.auth-story-glow.two {
  width: 480px; height: 480px;
  bottom: -210px; right: -150px;
  background: radial-gradient(circle, rgba(245, 158, 11, .12), transparent 66%);
}
.auth-story-brand { display: flex; align-items: center; gap: 12px; }
.auth-story-brand .brand-mark { width: 42px; height: 42px; color: var(--primary); }
.auth-story-brand .brand-mark svg { width: 100%; height: 100%; }
.auth-story-brand > div:last-child { display: flex; flex-direction: column; line-height: 1.2; }
.auth-story-brand strong { font-size: 17px; letter-spacing: -.02em; }
.auth-story-brand span { font-size: 10.5px; color: #8da0ba; letter-spacing: .12em; text-transform: uppercase; margin-top: 4px; font-weight: 600; }
.auth-story-content {
  width: 100%;
  max-width: 570px;
  margin: auto 0 0;
  padding: 40px 0 30px;
  position: relative;
  z-index: 2;
}
.story-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .16em;
  color: color-mix(in srgb, var(--primary) 62%, #fff);
  text-transform: uppercase;
  margin-bottom: 18px;
}
.story-eyebrow::before { content: ""; width: 20px; height: 1px; background: currentColor; }
.auth-story-content h1 {
  font-size: clamp(38px, 4.4vw, 61px);
  line-height: 1.04;
  letter-spacing: -.045em;
  font-weight: 800;
  color: #f4f7fb;
}
.auth-story-content h1 em {
  font-style: normal;
  color: color-mix(in srgb, var(--primary) 70%, #fff);
}
.auth-story-content p {
  max-width: 460px;
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.75;
  color: #9eadc3;
}
.story-points { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.story-points li { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: #c0cddd; font-weight: 500; }
.point-check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 18px; height: 18px; border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 22%, transparent);
  color: color-mix(in srgb, var(--primary) 58%, #fff);
  font-size: 10px; font-weight: 800; flex: none;
}
.auth-mock-card {
  width: 100%;
  max-width: 540px;
  background: rgba(255, 255, 255, .045);
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 28px 70px rgba(0, 0, 0, .24);
  backdrop-filter: blur(14px);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 30px;
  position: relative;
  z-index: 2;
}
.mock-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 13px; }
.mock-head > div { display: flex; flex-direction: column; gap: 2px; }
.mock-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: #7d8fa8; font-weight: 700; }
.mock-head strong { font-size: 14px; color: #eef4fb; }
.mock-live {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 9px; border-radius: 99px;
  background: rgba(22, 163, 74, .1);
  color: #75d99e; font-size: 10px; font-weight: 700;
}
.mock-live i { width: 5px; height: 5px; background: currentColor; border-radius: 50%; animation: pulseDot 2s ease-in-out infinite; }
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.mock-rows { display: flex; flex-direction: column; gap: 2px; }
.mock-row {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 8px; border-radius: 10px;
}
.mock-row:hover { background: rgba(255, 255, 255, .035); }
.mock-device {
  width: 32px; height: 32px; border-radius: 9px;
  background: rgba(255, 255, 255, .07);
  display: flex; align-items: center; justify-content: center;
  font-size: 8.5px; font-weight: 800; color: #a8b8cd; flex: none;
  letter-spacing: .04em;
}
.mock-row > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.mock-row strong { font-size: 11.5px; color: #dfe8f4; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.mock-row > div span { font-size: 9.5px; color: #7b8da6; }
.mock-row .status-pill { font-size: 9px; min-height: 20px; padding: 2px 7px; }
.mock-row .status-pill::before { width: 4px; height: 4px; }
.mock-row .status-proses { background: rgba(124, 58, 237, .16); color: #b9a1ff; }
.mock-row .status-diagnosa { background: rgba(37, 99, 235, .16); color: #8db8ff; }
.mock-row .status-selesai { background: rgba(22, 163, 74, .15); color: #75d99e; }
.auth-story-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 10.5px;
  color: #6e8099;
  border-top: 1px solid rgba(255, 255, 255, .06);
  padding-top: 20px;
  position: relative;
  z-index: 2;
}

.auth-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 36px 42px;
  background:
    radial-gradient(760px 420px at 82% -10%, var(--primary-soft), transparent 65%),
    var(--surface);
  position: relative;
}
.auth-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--border-strong) .7px, transparent .7px);
  background-size: 22px 22px;
  opacity: .30;
  mask-image: linear-gradient(to bottom, #000, transparent 55%);
  pointer-events: none;
}
.auth-mobile-brand { display: none; }
.auth-card {
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 2;
  animation: authIn .55s cubic-bezier(.2,.75,.25,1) both;
}
@keyframes authIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.auth-heading { margin-bottom: 24px; }
.auth-heading h2 { font-size: 27px; letter-spacing: -.035em; line-height: 1.2; margin-top: 8px; font-weight: 800; }
.auth-heading p { margin-top: 8px; color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.auth-card form { display: flex; flex-direction: column; gap: 15px; }
.auth-card .field-label { color: var(--text-2); }
.auth-card .input { min-height: 46px; border-radius: 11px; }
.auth-card .button-lg svg { width: 17px; height: 17px; transition: transform .18s ease; }
.auth-card .button-lg:hover svg { transform: translateX(2px); }
.login-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: var(--muted); font-size: 10.5px; font-weight: 600; }
.login-divider::before, .login-divider::after { content: ""; height: 1px; background: var(--border); flex: 1; }
.demo-panel {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-2);
  padding: 14px;
}
.demo-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 11px; }
.demo-head > div { display: flex; flex-direction: column; gap: 1px; }
.demo-head strong { font-size: 12px; }
.demo-head span:not(.badge) { font-size: 10.5px; color: var(--muted); }
.demo-head .badge { font-size: 9px; min-height: 20px; }
.demo-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
.demo-account {
  display: flex; align-items: center; gap: 8px;
  min-height: 43px; padding: 8px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  text-align: left;
  transition: border-color .16s ease, background .16s ease, transform .12s ease;
}
.demo-account:hover { border-color: var(--primary); transform: translateY(-1px); background: color-mix(in srgb, var(--primary) 3%, var(--surface)); }
.demo-account > span:last-child { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.demo-account strong { font-size: 11.5px; font-weight: 700; }
.demo-account small { font-size: 10px; color: var(--muted); }
.demo-hint { margin-top: 10px; font-size: 10px; color: var(--muted); line-height: 1.6; }
.demo-hint code {
  font-family: var(--font-mono);
  font-size: 9.5px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 3px;
}
.connection-button {
  width: 100%;
  display: flex; align-items: center; gap: 11px;
  margin-top: 16px; padding: 11px 13px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: transparent;
  text-align: left;
  color: var(--text);
  transition: border-color .16s, background .16s;
}
.connection-button:hover { border-color: var(--primary); background: var(--primary-soft); }
.connection-icon {
  width: 31px; height: 31px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary);
  flex: none;
}
.connection-icon svg { width: 16px; height: 16px; }
.connection-copy { flex: 1; display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.connection-copy strong { font-size: 11.5px; font-weight: 700; }
.connection-copy small { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.connection-arrow { width: 15px; height: 15px; color: var(--muted); flex: none; }
.connection-button.connected { border-style: solid; border-color: color-mix(in srgb, var(--success) 30%, var(--border)); background: var(--success-soft); }
.connection-button.connected .connection-icon { background: color-mix(in srgb, var(--success) 13%, transparent); color: var(--success); }
.auth-legal { margin-top: 17px; font-size: 10px; text-align: center; color: var(--muted); line-height: 1.6; }
.auth-panel-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  width: 100%; max-width: 420px;
  font-size: 10.5px; color: var(--muted);
  position: relative; z-index: 2;
}
.secure-note { display: inline-flex; align-items: center; gap: 5px; }
.secure-note svg { width: 12px; height: 12px; }

/* =========================================================
   App shell
   ========================================================= */

.app-shell { min-height: 100vh; background: var(--bg); }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  z-index: 45;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(360px 280px at 20% -10%, color-mix(in srgb, var(--primary) 16%, transparent), transparent 75%),
    linear-gradient(180deg, var(--sidebar-2), var(--sidebar) 55%);
  color: var(--sidebar-text);
  border-right: 1px solid rgba(255, 255, 255, .045);
  padding: 0 14px;
  transition: transform .25s cubic-bezier(.2,.7,.2,1);
}
.sidebar-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 6px 20px;
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.sidebar-logo {
  width: 37px; height: 37px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary);
  color: #fff; flex: none;
  box-shadow: 0 7px 20px color-mix(in srgb, var(--primary) 27%, transparent);
  overflow: hidden;
}
.sidebar-logo svg { width: 22px; height: 22px; }
.sidebar-logo img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-brand-copy { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.sidebar-brand-copy strong {
  font-size: 14px; color: var(--sidebar-text-strong); font-weight: 800;
  letter-spacing: -.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-brand-copy small {
  font-size: 9px; color: #73859c; text-transform: uppercase;
  letter-spacing: .1em; margin-top: 2px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sidebar-close { display: none; color: var(--sidebar-text); background: transparent; border-color: transparent; }
.sidebar-close:hover { color: var(--sidebar-text-strong); background: rgba(255,255,255,.07); border-color: transparent; }
.side-nav { flex: 1; overflow-y: auto; padding-bottom: 14px; scrollbar-width: none; }
.side-nav::-webkit-scrollbar { display: none; }
.nav-group { margin-top: 15px; }
.nav-group:first-child { margin-top: 2px; }
.nav-group-title {
  display: block;
  padding: 0 12px 6px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #5f7189;
}
.nav-link {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 38px;
  padding: 8px 11px;
  margin-bottom: 2px;
  border-radius: 9px;
  color: var(--sidebar-text);
  font-size: 12.5px;
  font-weight: 600;
  position: relative;
  transition: color .16s ease, background .16s ease;
}
.nav-link svg { width: 17px; height: 17px; flex: none; opacity: .85; }
.nav-link:hover { color: var(--sidebar-text-strong); background: rgba(255, 255, 255, .045); }
.nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, color-mix(in srgb, var(--primary) 30%, transparent), color-mix(in srgb, var(--primary) 7%, transparent));
  font-weight: 700;
}
.nav-link.active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: var(--primary);
}
.nav-link.active svg { opacity: 1; color: color-mix(in srgb, var(--primary) 55%, #fff); }
.nav-link .nav-count {
  margin-left: auto;
  min-width: 20px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  background: rgba(255, 255, 255, .08);
  color: #b7c5d8; font-size: 9.5px; font-weight: 700;
}
.nav-link.active .nav-count { background: rgba(255,255,255,.12); color: #fff; }
.nav-link .nav-arrow { margin-left: auto; width: 13px; height: 13px; opacity: .4; }
.sidebar-bottom { padding-bottom: 14px; }
.sidebar-kas {
  margin-bottom: 10px;
  padding: 13px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.06);
  background: linear-gradient(135deg, rgba(255,255,255,.055), rgba(255,255,255,.015));
  position: relative;
  overflow: hidden;
}
.sidebar-kas::after {
  content: ""; position: absolute; width: 90px; height: 90px; border-radius: 50%;
  top: -50px; right: -30px;
  background: color-mix(in srgb, var(--primary) 20%, transparent);
  filter: blur(12px);
}
.sidebar-kas-label { display: flex; align-items: center; justify-content: space-between; font-size: 9px; font-weight: 700; color: #7d8fa7; text-transform: uppercase; letter-spacing: .08em; }
.sidebar-kas-value { font-family: var(--font-mono); font-size: 16px; font-weight: 700; color: #f2f7fd; margin-top: 5px; letter-spacing: -.04em; }
.sidebar-kas-foot { margin-top: 7px; font-size: 9.5px; color: #778aa2; display: flex; align-items: center; gap: 4px; }
.sidebar-kas-foot a { color: color-mix(in srgb, var(--primary) 55%, #fff); font-weight: 600; }
.sidebar-user {
  display: flex; align-items: center; gap: 9px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  padding: 13px 4px 0;
}
.sidebar-user .avatar { background: rgba(255, 255, 255, .08); color: #d7e2ef; border-color: rgba(255,255,255,.06); }
.sidebar-user-copy { flex: 1; display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.sidebar-user-copy strong { font-size: 11.5px; color: var(--sidebar-text-strong); font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-copy small { font-size: 9.5px; color: #73859c; margin-top: 2px; }
.sidebar-user .icon-button { width: 30px; height: 30px; color: #7e91a9; }
.sidebar-user .icon-button svg { width: 16px; height: 16px; }
.sidebar-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 40;
  background: rgba(5, 11, 20, .55);
  backdrop-filter: blur(3px);
}

.app-main {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
  display: flex;
  flex-direction: column;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 30px;
  background: var(--surface-glass);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}
.topbar-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.menu-button { display: none; }
.breadcrumb {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 600; color: var(--muted);
  white-space: nowrap;
}
.breadcrumb svg { width: 12px; height: 12px; opacity: .6; }
.breadcrumb strong { color: var(--text); font-weight: 700; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.search-trigger {
  display: flex; align-items: center; gap: 8px;
  height: 38px; min-width: 235px;
  padding: 0 11px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  font-size: 11.5px;
  text-align: left;
  transition: border-color .16s, background .16s;
}
.search-trigger:hover { border-color: var(--border-strong); background: var(--surface); }
.search-trigger svg { width: 16px; height: 16px; flex: none; }
.search-trigger span { flex: 1; }
.search-trigger kbd {
  font-family: var(--font-sans);
  font-size: 9px;
  color: var(--muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 2px 5px;
  font-weight: 600;
}
.mode-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 26px; padding: 0 9px;
  border-radius: 7px;
  font-size: 9.5px; font-weight: 700;
  white-space: nowrap;
  background: var(--success-soft); color: var(--success);
}
.mode-chip::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.mode-chip.local { background: var(--surface-3); color: var(--text-2); }
.mode-chip.remote { background: var(--info-soft); color: var(--info); }
.theme-toggle { width: 38px; height: 38px; overflow: hidden; }
.theme-toggle .theme-icon { position: absolute; transition: transform .3s ease, opacity .3s ease; display: flex; }
.theme-toggle .theme-icon svg { width: 18px; height: 18px; }
.theme-toggle .sun { transform: translateY(0); opacity: 1; }
.theme-toggle .moon { transform: translateY(24px); opacity: 0; }
[data-theme="dark"] .theme-toggle .sun { transform: translateY(-24px); opacity: 0; }
[data-theme="dark"] .theme-toggle .moon { transform: translateY(0); opacity: 1; }
.notification-button { width: 38px; height: 38px; }
.notif-dot {
  position: absolute; top: 9px; right: 10px;
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--danger);
  border: 1.5px solid var(--surface);
}
.popover-wrap, .user-menu-wrap { position: relative; }
.user-menu-button {
  display: flex; align-items: center; gap: 9px;
  border: 0; background: transparent;
  padding: 4px 2px 4px 6px;
  border-radius: 10px;
  text-align: left;
  transition: background .16s;
}
.user-menu-button:hover { background: var(--surface-3); }
.user-menu-copy { display: flex; flex-direction: column; line-height: 1.2; max-width: 120px; }
.user-menu-copy strong { font-size: 11.5px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-menu-copy small { font-size: 9.5px; color: var(--muted); margin-top: 2px; }
.user-menu-button > svg { width: 14px; height: 14px; color: var(--muted); }
.popover {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  z-index: 60;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  box-shadow: var(--shadow-md);
  min-width: 232px;
  padding: 6px;
  animation: popIn .16s ease both;
}
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.985); } to { opacity: 1; transform: none; } }
.popover-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 9px 9px; }
.popover-head strong { font-size: 12px; }
.popover-head span { font-size: 10px; color: var(--muted); }
.popover-sep { height: 1px; background: var(--border); margin: 4px 0; }
.popover-item {
  display: flex; align-items: center; gap: 9px;
  width: 100%; padding: 9px;
  border: 0; background: transparent;
  border-radius: 8px;
  font-size: 12px; font-weight: 600;
  color: var(--text-2);
  text-align: left;
}
.popover-item svg { width: 15px; height: 15px; color: var(--muted); }
.popover-item:hover { background: var(--surface-2); color: var(--text); }
.popover-item.danger { color: var(--danger); }
.popover-item.danger svg { color: var(--danger); }
.popover-item.danger:hover { background: var(--danger-soft); }
.user-popover { width: 236px; }
.user-popover-head { display: flex; align-items: center; gap: 10px; padding: 9px; }
.user-popover-head > div { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.user-popover-head strong { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-popover-head small { color: var(--muted); font-size: 10px; }
.notif-popover { width: 330px; padding: 0; overflow: hidden; }
.notif-popover .popover-head { padding: 13px 14px 10px; border-bottom: 1px solid var(--border); }
.notif-list { max-height: 360px; overflow-y: auto; }
.notif-item {
  width: 100%; display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 14px;
  border: 0; border-bottom: 1px solid var(--border);
  background: transparent; text-align: left;
}
.notif-item:last-child { border-bottom: 0; }
.notif-item:hover { background: var(--surface-2); }
.notif-item-icon {
  width: 29px; height: 29px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary);
  flex: none;
}
.notif-item-icon svg { width: 14px; height: 14px; }
.notif-item-copy { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.notif-item-copy strong { font-size: 11.5px; font-weight: 700; }
.notif-item-copy span { font-size: 10.5px; color: var(--muted); line-height: 1.45; }
.notif-empty { padding: 30px 20px; text-align: center; font-size: 11.5px; color: var(--muted); }

.view {
  flex: 1;
  width: 100%;
  max-width: 1560px;
  margin: 0 auto;
  padding: 26px 30px 48px;
  outline: none;
}
.page { animation: pageIn .34s cubic-bezier(.2,.75,.25,1) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.page-title-block { min-width: 0; }
.page-kicker {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--primary); margin-bottom: 7px;
}
.page-kicker::before { content: ""; width: 15px; height: 1.5px; background: currentColor; border-radius: 3px; }
.page-title { font-size: 23px; font-weight: 800; letter-spacing: -.035em; line-height: 1.2; }
.page-subtitle { margin-top: 6px; font-size: 12px; color: var(--muted); max-width: 640px; line-height: 1.55; }
.page-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-meta { font-size: 10.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; margin-top: 9px; }
.page-meta svg { width: 13px; height: 13px; }

/* =========================================================
   Cards, KPI, dashboard
   ========================================================= */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-xs);
}
.card-pad { padding: 19px; }
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 17px 19px 13px;
}
.card-head-title { display: flex; flex-direction: column; gap: 2px; }
.card-head-title strong { font-size: 13px; font-weight: 700; letter-spacing: -.01em; }
.card-head-title span { font-size: 10.5px; color: var(--muted); }
.card-head-actions { display: flex; align-items: center; gap: 6px; }
.card-body { padding: 0 19px 19px; }
.card-body.pad-top { padding-top: 4px; }
.card-foot { padding: 11px 19px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi-card {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 17px;
  box-shadow: var(--shadow-xs);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.kpi-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); transform: translateY(-1px); }
.kpi-card.featured {
  background: linear-gradient(135deg, var(--sidebar-2), var(--sidebar));
  color: #fff;
  border-color: transparent;
}
.kpi-card.featured::after {
  content: ""; position: absolute; width: 140px; height: 140px; top: -75px; right: -55px;
  border-radius: 50%; background: color-mix(in srgb, var(--primary) 25%, transparent); filter: blur(9px);
}
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; position: relative; z-index: 1; }
.kpi-label { font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.kpi-card.featured .kpi-label { color: #93a5bc; }
.kpi-icon {
  width: 33px; height: 33px; border-radius: 9px;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.kpi-icon svg { width: 16px; height: 16px; }
.kpi-card.featured .kpi-icon { background: rgba(255,255,255,.08); color: color-mix(in srgb, var(--primary) 60%, #fff); }
.kpi-value {
  position: relative; z-index: 1;
  font-family: var(--font-mono);
  font-size: clamp(18px, 1.8vw, 23px);
  font-weight: 700;
  letter-spacing: -.055em;
  line-height: 1.2;
  white-space: nowrap;
}
.kpi-value small { font-family: var(--font-sans); font-size: 10px; color: var(--muted); font-weight: 600; letter-spacing: 0; margin-left: 4px; }
.kpi-foot { display: flex; align-items: center; gap: 5px; margin-top: 9px; font-size: 10px; color: var(--muted); position: relative; z-index: 1; }
.kpi-card.featured .kpi-foot { color: #8ea1b9; }
.kpi-trend { display: inline-flex; align-items: center; gap: 2px; font-weight: 700; }
.kpi-trend svg { width: 11px; height: 11px; }
.kpi-trend.up { color: var(--success); }
.kpi-trend.down { color: var(--danger); }
.kpi-card.featured .kpi-trend.up { color: #5fdc92; }
.kpi-card.featured .kpi-trend.down { color: #ff8d8d; }

.dash-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; }
.dash-grid.even { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.dash-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-bottom { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 16px; }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 18px 19px 4px; }
.chart-title { display: flex; flex-direction: column; gap: 2px; }
.chart-title strong { font-size: 13px; }
.chart-title span { font-size: 10.5px; color: var(--muted); }
.chart-total { text-align: right; display: flex; flex-direction: column; gap: 1px; }
.chart-total strong { font-family: var(--font-mono); font-size: 17px; letter-spacing: -.04em; }
.chart-total span { font-size: 10px; color: var(--muted); }
.bar-chart { display: flex; align-items: flex-end; gap: 8px; height: 190px; padding: 18px 19px 14px 6px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; min-width: 0; position: relative; }
.bar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; position: relative; }
.bar-fill {
  width: min(40px, 72%);
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 85%, #fff), var(--primary));
  min-height: 3px;
  transition: height .5s cubic-bezier(.2,.8,.2,1);
  position: relative;
}
.bar-col:hover .bar-fill { background: var(--primary-strong); }
.bar-col.today .bar-fill { background: linear-gradient(180deg, var(--accent), #fbbf24); }
.bar-col .bar-tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%) translateY(3px);
  background: var(--sidebar);
  color: #fff;
  border-radius: 6px;
  padding: 3px 6px;
  font-family: var(--font-mono);
  font-size: 8.5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
  z-index: 5;
}
.bar-col:hover .bar-tip { opacity: 1; transform: translateX(-50%) translateY(0); }
.bar-col > span { font-size: 9.5px; color: var(--muted); font-weight: 600; }
.bar-col.today > span { color: var(--text); font-weight: 800; }
.bar-grid-lines { position: absolute; inset: 18px 19px 34px 6px; display: flex; flex-direction: column; justify-content: space-between; pointer-events: none; }
.bar-grid-lines span { border-top: 1px dashed var(--border); height: 0; width: 100%; }

.donut-wrap { display: flex; align-items: center; gap: 22px; padding: 10px 19px 19px; }
.donut { width: 132px; height: 132px; border-radius: 50%; flex: none; position: relative; }
.donut::after {
  content: ""; position: absolute; inset: 24px; border-radius: 50%;
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--border);
}
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; z-index: 2; gap: 1px; }
.donut-center strong { font-family: var(--font-mono); font-size: 20px; letter-spacing: -.04em; }
.donut-center span { font-size: 8.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.legend { display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: 0; }
.legend-row { display: flex; align-items: center; gap: 8px; font-size: 10.5px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.legend-label { color: var(--text-2); flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend-value { font-family: var(--font-mono); font-weight: 700; font-size: 10px; color: var(--text); }

.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 6px 19px 19px; }
.quick-action {
  display: flex; align-items: center; gap: 10px;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-2);
  font-size: 11.5px; font-weight: 600;
  text-align: left;
  color: var(--text-2);
  transition: border-color .16s, background .16s, color .16s;
}
.quick-action:hover { border-color: color-mix(in srgb, var(--primary) 32%, var(--border)); background: var(--primary-soft); color: var(--text); }
.quick-action-icon {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.quick-action-icon svg { width: 15px; height: 15px; }

.attention-list { display: flex; flex-direction: column; padding: 3px 8px 9px; }
.attention-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 9px;
  width: 100%;
  border: 0; background: transparent; text-align: left;
}
.attention-item:hover { background: var(--surface-2); }
.attention-icon {
  width: 29px; height: 29px; border-radius: 8px; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.attention-icon svg { width: 14px; height: 14px; }
.attention-icon.warning { background: var(--warning-soft); color: var(--warning); }
.attention-icon.info { background: var(--info-soft); color: var(--info); }
.attention-icon.danger { background: var(--danger-soft); color: var(--danger); }
.attention-icon.success { background: var(--success-soft); color: var(--success); }
.attention-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.attention-copy strong { font-size: 11px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attention-copy span { font-size: 9.5px; color: var(--muted); }
.attention-item > svg { width: 13px; height: 13px; color: var(--muted); flex: none; }

.tech-performance { display: flex; flex-direction: column; gap: 13px; padding: 4px 19px 19px; }
.tech-row { display: flex; flex-direction: column; gap: 6px; }
.tech-row-head { display: flex; align-items: center; gap: 8px; }
.tech-row-head .avatar { width: 26px; height: 26px; border-radius: 8px; font-size: 9px; }
.tech-row-head strong { font-size: 11px; flex: 1; }
.tech-row-head span { font-size: 9.5px; color: var(--muted); font-family: var(--font-mono); }
.progress-track { height: 5px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; background: var(--primary); }
.tech-empty, .empty-inline { font-size: 11px; color: var(--muted); padding: 20px 0; text-align: center; }

.today-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  overflow: hidden;
  margin-bottom: 16px;
}
.today-item { padding: 14px 17px; display: flex; align-items: center; gap: 12px; border-right: 1px solid var(--border); }
.today-item:last-child { border-right: 0; }
.today-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex: none; background: var(--primary-soft); color: var(--primary);
}
.today-icon svg { width: 17px; height: 17px; }
.today-copy { display: flex; flex-direction: column; min-width: 0; }
.today-copy span { font-size: 10px; color: var(--muted); font-weight: 500; }
.today-copy strong { font-size: 12px; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* =========================================================
   Tables & toolbars
   ========================================================= */

.table-toolbar {
  display: flex; align-items: center; gap: 9px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.toolbar-search { position: relative; flex: 1; min-width: 190px; max-width: 360px; }
.toolbar-search svg {
  position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--muted); pointer-events: none;
}
.toolbar-search .input { height: 36px; min-height: 36px; padding-left: 34px; font-size: 12px; background: var(--surface-2); }
.toolbar-filters { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.toolbar-filters .select { width: auto; min-width: 115px; min-height: 36px; height: 36px; font-size: 11.5px; padding-top: 5px; padding-bottom: 5px; background-color: var(--surface-2); }
.filter-count { font-size: 10.5px; color: var(--muted); margin-left: auto; white-space: nowrap; font-weight: 600; }
.table-wrap { width: 100%; overflow-x: auto; }
.data-table { min-width: 700px; }
.data-table th {
  text-align: left;
  padding: 9px 16px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: .075em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  vertical-align: middle;
  color: var(--text-2);
}
.data-table tbody tr { transition: background .13s ease; }
.data-table tbody tr:hover { background: var(--surface-2); }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table .cell-primary { color: var(--text); font-weight: 700; font-size: 12px; }
.data-table .cell-sub { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; font-weight: 500; }
.data-table .cell-mono { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; color: var(--text-2); letter-spacing: -.02em; }
.data-table .cell-money { font-family: var(--font-mono); font-size: 11px; font-weight: 600; color: var(--text); white-space: nowrap; }
.data-table .cell-actions { width: 1%; white-space: nowrap; text-align: right; }
.data-table .cell-center { text-align: center; }
.data-table .cell-right { text-align: right; }
.table-user { display: flex; align-items: center; gap: 9px; min-width: 0; }
.table-user .avatar { width: 30px; height: 30px; border-radius: 9px; font-size: 9.5px; }
.table-user-copy { display: flex; flex-direction: column; min-width: 0; }
.table-user-copy strong { font-size: 11.5px; color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.table-user-copy span { font-size: 9.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 190px; }
.device-cell { display: flex; align-items: center; gap: 9px; min-width: 0; }
.device-icon {
  width: 31px; height: 31px; border-radius: 9px;
  background: var(--surface-3); color: var(--text-2);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.device-icon svg { width: 15px; height: 15px; }
.device-icon.hp { background: var(--info-soft); color: var(--info); }
.device-icon.laptop { background: var(--violet-soft); color: var(--violet); }
.device-icon.printer { background: var(--warning-soft); color: var(--warning); }
.device-icon.pc { background: var(--primary-soft); color: var(--primary); }
.row-actions { display: inline-flex; align-items: center; gap: 2px; justify-content: flex-end; }
.row-action {
  width: 28px; height: 28px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; background: transparent; border-radius: 7px;
  color: var(--muted);
  transition: background .14s, color .14s;
}
.row-action:hover { background: var(--surface-3); color: var(--text); }
.row-action svg { width: 14px; height: 14px; }
.row-action.danger:hover { background: var(--danger-soft); color: var(--danger); }
.row-action.primary:hover { background: var(--primary-soft); color: var(--primary); }
.row-action.success:hover { background: var(--success-soft); color: var(--success); }
.table-empty { padding: 44px 20px; text-align: center; }
.table-empty .empty-icon {
  width: 46px; height: 46px; margin: 0 auto 10px;
  border-radius: 13px; background: var(--surface-3); color: var(--muted);
  display: flex; align-items: center; justify-content: center;
}
.table-empty .empty-icon svg { width: 21px; height: 21px; }
.table-empty strong { display: block; font-size: 12.5px; color: var(--text); }
.table-empty span { display: block; font-size: 11px; color: var(--muted); margin-top: 4px; }
.table-empty .button { margin-top: 14px; }
.table-footer {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 16px;
  border-top: 1px solid var(--border);
  font-size: 10.5px;
  color: var(--muted);
}
.table-footer strong { color: var(--text-2); font-weight: 700; }
.table-card { overflow: hidden; }
.table-card .card-head { border-bottom: 1px solid var(--border); padding-bottom: 14px; }
.ticket-number { font-family: var(--font-mono); font-size: 10px; font-weight: 600; color: var(--text); letter-spacing: -.02em; }
.ticket-date { display: block; font-size: 9px; color: var(--muted); margin-top: 2px; }

/* =========================================================
   Tabs
   ========================================================= */

.tabs {
  display: flex; align-items: center; gap: 2px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative;
  display: inline-flex; align-items: center; gap: 6px;
  border: 0; background: transparent;
  padding: 11px 14px 12px;
  font-size: 12px; font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}
.tab svg { width: 15px; height: 15px; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--primary); font-weight: 700; }
.tab.active::after {
  content: ""; position: absolute; bottom: -1px; left: 9px; right: 9px;
  height: 2px; border-radius: 3px 3px 0 0; background: var(--primary);
}
.tab .tab-count {
  font-size: 9px; font-weight: 700;
  background: var(--surface-3); color: var(--muted);
  padding: 1px 5px; border-radius: 5px;
}
.tab.active .tab-count { background: var(--primary-soft); color: var(--primary); }

/* =========================================================
   Modals, drawers, overlay
   ========================================================= */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(5, 12, 22, .58);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: overlayIn .16s ease both;
}
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.overlay.drawer-overlay { justify-content: flex-end; align-items: stretch; padding: 0; }
.modal {
  width: min(620px, 100%);
  max-height: min(92vh, 900px);
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  animation: modalIn .2s cubic-bezier(.2,.8,.25,1) both;
  overflow: hidden;
}
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.modal.modal-sm { width: min(430px, 100%); }
.modal.modal-lg { width: min(800px, 100%); }
.modal.modal-xl { width: min(980px, 100%); }
.modal-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 19px 21px 16px;
  border-bottom: 1px solid var(--border);
  flex: none;
}
.modal-head-icon {
  width: 35px; height: 35px; border-radius: 10px;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.modal-head-icon svg { width: 17px; height: 17px; }
.modal-head-copy { flex: 1; min-width: 0; }
.modal-head-copy h3 { font-size: 15px; font-weight: 800; letter-spacing: -.02em; line-height: 1.3; }
.modal-head-copy p { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.45; }
.modal-close { flex: none; margin: -3px -4px 0 0; width: 33px; height: 33px; border: 0; background: transparent; border-radius: 8px; color: var(--muted); display: flex; align-items: center; justify-content: center; }
.modal-close:hover { background: var(--surface-3); color: var(--text); }
.modal-close svg { width: 18px; height: 18px; }
.modal-body { padding: 20px 21px; overflow-y: auto; flex: 1; }
.modal-body.flush { padding: 0; }
.modal-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 14px 21px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  flex: none;
}
.modal-foot .foot-left { margin-right: auto; display: flex; align-items: center; gap: 6px; }
.drawer {
  width: min(555px, 100%);
  height: 100%;
  max-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-lg);
  animation: drawerIn .24s cubic-bezier(.2,.8,.25,1) both;
  margin-left: auto;
}
@keyframes drawerIn { from { transform: translateX(30px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head { padding: 20px 22px 17px; border-bottom: 1px solid var(--border); flex: none; }
.drawer-head-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.drawer-head h3 { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.drawer-head .ticket-number { margin-bottom: 4px; display: inline-flex; align-items: center; gap: 6px; }
.drawer-head p { font-size: 11px; color: var(--muted); margin-top: 3px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px 28px; }
.drawer-foot {
  padding: 13px 22px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  flex: none;
}
.drawer-foot .spacer { flex: 1; }

.confirm-body { text-align: center; padding: 8px 4px; }
.confirm-icon {
  width: 52px; height: 52px; border-radius: 50%;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  background: var(--danger-soft); color: var(--danger);
}
.confirm-icon svg { width: 24px; height: 24px; }
.confirm-body h3 { font-size: 16px; font-weight: 800; letter-spacing: -.02em; }
.confirm-body p { margin-top: 6px; font-size: 12px; color: var(--muted); line-height: 1.6; }
.confirm-body .confirm-detail { margin-top: 14px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; font-size: 11.5px; color: var(--text-2); }

/* Toasts */
.toast-root {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(380px, calc(100vw - 30px));
  pointer-events: none;
}
.toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 11px 13px;
  border-radius: 11px;
  background: var(--sidebar-2);
  color: #e9eff8;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: var(--shadow-md);
  font-size: 12px;
  line-height: 1.5;
  animation: toastIn .25s cubic-bezier(.2,.8,.25,1) both;
  pointer-events: auto;
}
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.toast.leaving { animation: toastOut .2s ease both; }
@keyframes toastOut { from { opacity: 1; transform: none; } to { opacity: 0; transform: translateY(5px); } }
.toast-icon { width: 18px; height: 18px; flex: none; display: flex; align-items: center; justify-content: center; margin-top: 1px; }
.toast-icon svg { width: 17px; height: 17px; }
.toast.success .toast-icon { color: #5fdc92; }
.toast.error .toast-icon { color: #ff9c9c; }
.toast.info .toast-icon { color: #8db8ff; }
.toast.warning .toast-icon { color: #fcd34d; }
.toast-copy { flex: 1; }
.toast-copy strong { display: block; font-size: 11.5px; font-weight: 700; }
.toast-copy span { display: block; font-size: 10.5px; color: #9baec5; margin-top: 1px; }
.toast-close { border: 0; background: transparent; color: #7b8ea6; padding: 0; margin-top: 1px; }
.toast-close svg { width: 13px; height: 13px; }

/* =========================================================
   Order detail
   ========================================================= */

.detail-hero {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px;
  border-radius: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  margin-bottom: 18px;
}
.detail-hero .device-icon { width: 42px; height: 42px; border-radius: 11px; }
.detail-hero .device-icon svg { width: 20px; height: 20px; }
.detail-hero-copy { flex: 1; min-width: 0; }
.detail-hero-copy strong { display: block; font-size: 13.5px; font-weight: 700; }
.detail-hero-copy span { display: block; font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.detail-hero-status { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.detail-section + .detail-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.detail-section-title {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  font-size: 9.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.detail-item { display: flex; flex-direction: column; gap: 2px; }
.detail-item.full { grid-column: 1 / -1; }
.detail-item span { font-size: 9.5px; color: var(--muted); font-weight: 500; }
.detail-item strong { font-size: 11.5px; color: var(--text); font-weight: 600; line-height: 1.5; word-break: break-word; }
.detail-item strong.mono { font-family: var(--font-mono); font-size: 10.5px; }
.detail-note {
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  font-size: 11.5px;
  color: var(--text-2);
  line-height: 1.65;
}
.detail-costs { border: 1px solid var(--border); border-radius: 11px; overflow: hidden; }
.cost-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 12px;
  font-size: 11.5px;
  border-bottom: 1px solid var(--border);
}
.cost-row:last-child { border-bottom: 0; }
.cost-row span { color: var(--muted); }
.cost-row strong { font-family: var(--font-mono); font-size: 11px; color: var(--text-2); }
.cost-row.total { background: var(--surface-2); padding-top: 11px; padding-bottom: 11px; }
.cost-row.total span { color: var(--text); font-weight: 700; }
.cost-row.total strong { font-size: 14px; color: var(--text); }
.payment-banner {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  margin-top: 11px;
}
.payment-banner-icon { width: 31px; height: 31px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex: none; }
.payment-banner-icon svg { width: 15px; height: 15px; }
.payment-banner.unpaid .payment-banner-icon { background: var(--warning-soft); color: var(--warning); }
.payment-banner.paid .payment-banner-icon { background: var(--success-soft); color: var(--success); }
.payment-banner-copy { flex: 1; display: flex; flex-direction: column; }
.payment-banner-copy strong { font-size: 11px; }
.payment-banner-copy span { font-size: 9.5px; color: var(--muted); margin-top: 1px; }
.timeline { display: flex; flex-direction: column; }
.timeline-item { display: flex; gap: 10px; position: relative; padding-bottom: 15px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot-wrap { width: 17px; flex: none; display: flex; flex-direction: column; align-items: center; padding-top: 1px; }
.timeline-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); border: 2px solid var(--surface); box-shadow: 0 0 0 1.5px var(--border-strong); flex: none; }
.timeline-item.current .timeline-dot { background: var(--primary); box-shadow: 0 0 0 1.5px var(--primary); }
.timeline-line { flex: 1; width: 1px; background: var(--border); margin-top: 4px; }
.timeline-item:last-child .timeline-line { display: none; }
.timeline-copy { flex: 1; display: flex; flex-direction: column; gap: 1px; padding-bottom: 2px; }
.timeline-copy strong { font-size: 11px; font-weight: 700; }
.timeline-copy span { font-size: 9.5px; color: var(--muted); }
.timeline-copy p { font-size: 10.5px; color: var(--text-2); margin-top: 2px; line-height: 1.5; }

/* =========================================================
   Reports & finance
   ========================================================= */

.filter-bar {
  display: flex; align-items: flex-end; gap: 10px;
  padding: 13px 15px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.filter-field { display: flex; flex-direction: column; gap: 5px; min-width: 130px; }
.filter-field > span { font-size: 9.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.filter-field .input, .filter-field .select { min-height: 36px; height: 36px; font-size: 12px; }
.filter-bar .spacer { flex: 1; }
.report-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.summary-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  padding: 14px 15px;
}
.summary-card span { display: flex; align-items: center; gap: 6px; font-size: 10px; color: var(--muted); font-weight: 600; }
.summary-card span svg { width: 13px; height: 13px; }
.summary-card strong { display: block; font-family: var(--font-mono); font-size: 18px; letter-spacing: -.04em; margin-top: 7px; }
.summary-card small { display: block; font-size: 9.5px; color: var(--muted); margin-top: 3px; }
.summary-card.positive strong { color: var(--success); }
.summary-card.negative strong { color: var(--danger); }
.summary-card.highlight { background: linear-gradient(135deg, var(--sidebar-2), var(--sidebar)); border-color: transparent; color: #fff; }
.summary-card.highlight span, .summary-card.highlight small { color: #8fa2ba; }
.summary-card.highlight strong { color: #fff; }

.finance-layout { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 16px; margin-bottom: 16px; }
.finance-chart { padding: 18px 19px; }
.finance-bars { display: flex; align-items: flex-end; justify-content: space-around; gap: 12px; height: 194px; margin-top: 22px; position: relative; }
.finance-month { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; min-width: 0; }
.finance-bar-group { width: 100%; max-width: 54px; height: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 3px; }
.finance-bar { width: 45%; border-radius: 4px 4px 2px 2px; min-height: 3px; }
.finance-bar.revenue { background: var(--primary); }
.finance-bar.expense { background: color-mix(in srgb, var(--accent) 75%, var(--surface)); }
.finance-month > span { font-size: 9px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.finance-legend { display: flex; align-items: center; gap: 13px; margin-top: 11px; }
.finance-legend span { display: inline-flex; align-items: center; gap: 5px; font-size: 9.5px; color: var(--muted); }
.finance-legend i { width: 7px; height: 7px; border-radius: 2px; }
.breakdown { display: flex; flex-direction: column; gap: 0; padding: 7px 19px 17px; }
.breakdown-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 11px;
}
.breakdown-row:last-child { border-bottom: 0; }
.breakdown-row span { display: flex; align-items: center; gap: 7px; color: var(--muted); }
.breakdown-row span i { width: 6px; height: 6px; border-radius: 50%; }
.breakdown-row strong { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; }
.breakdown-row.total { border-top: 1px solid var(--border); border-bottom: 0; margin-top: 2px; padding-top: 12px; }
.breakdown-row.total span { color: var(--text); font-weight: 700; }
.breakdown-row.total strong { font-size: 13px; color: var(--text); }
.ledger-amount { font-family: var(--font-mono); font-size: 10.5px; font-weight: 600; white-space: nowrap; text-align: right; }
.ledger-amount.in { color: var(--success); }
.ledger-amount.out { color: var(--danger); }
.ledger-type {
  display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 2px 7px;
  border-radius: 6px; font-size: 9px; font-weight: 700;
}
.ledger-type.income { background: var(--success-soft); color: var(--success); }
.ledger-type.expense { background: var(--danger-soft); color: var(--danger); }
.ledger-type.salary { background: var(--info-soft); color: var(--info); }

/* Salary */
.salary-progress {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 13px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 13px;
  margin-bottom: 16px;
}
.salary-progress-copy { display: flex; flex-direction: column; gap: 1px; min-width: 150px; }
.salary-progress-copy strong { font-size: 11.5px; }
.salary-progress-copy span { font-size: 10px; color: var(--muted); }
.salary-progress .progress-track { flex: 1; min-width: 130px; height: 7px; }
.salary-progress .progress-fill { background: linear-gradient(90deg, var(--primary), color-mix(in srgb, var(--primary) 55%, var(--accent))); }

/* =========================================================
   Petty cash
   ========================================================= */

.kas-banner {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
  gap: 0;
  background: linear-gradient(135deg, var(--sidebar-2), var(--sidebar));
  color: #fff;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid rgba(255,255,255,.05);
}
.kas-banner-main { padding: 23px 24px; position: relative; overflow: hidden; }
.kas-banner-main::after {
  content: ""; position: absolute; width: 170px; height: 170px; border-radius: 50%;
  background: color-mix(in srgb, var(--primary) 20%, transparent);
  right: -70px; top: -90px; filter: blur(8px);
}
.kas-eyebrow { font-size: 9.5px; letter-spacing: .14em; text-transform: uppercase; color: #8ca0b9; font-weight: 700; display: flex; align-items: center; gap: 6px; }
.kas-saldo { font-family: var(--font-mono); font-size: clamp(26px, 3vw, 36px); letter-spacing: -.055em; font-weight: 700; margin-top: 8px; line-height: 1.15; position: relative; z-index: 1; }
.kas-banner-meta { display: flex; gap: 20px; margin-top: 14px; font-size: 10px; color: #93a5bc; flex-wrap: wrap; position: relative; z-index: 1; }
.kas-banner-meta strong { display: block; font-family: var(--font-mono); font-size: 12px; color: #e8eef8; margin-top: 2px; letter-spacing: -.03em; }
.kas-banner-meta .in strong { color: #6ee7a0; }
.kas-banner-meta .out strong { color: #fca5a5; }
.kas-banner-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 22px 24px; flex-wrap: wrap; position: relative; z-index: 1; }
.kas-banner-actions .button-secondary { background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.12); color: #e8eef8; }
.kas-banner-actions .button-secondary:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.18); }
.kas-banner-actions .button-primary { background: var(--primary); }
.kas-rule-card {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.kas-rule-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary);
  flex: none;
}
.kas-rule-icon svg { width: 18px; height: 18px; }
.kas-rule-copy { flex: 1; min-width: 200px; }
.kas-rule-copy strong { display: flex; align-items: center; gap: 7px; font-size: 12px; flex-wrap: wrap; }
.kas-rule-copy p { font-size: 10.5px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.kas-rule-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.kas-period { display: flex; align-items: center; gap: 7px; }
.kas-period .input { width: 145px; min-height: 36px; height: 36px; font-size: 11.5px; }
.kas-type-icon {
  width: 29px; height: 29px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex: none;
}
.kas-type-icon.in { background: var(--success-soft); color: var(--success); }
.kas-type-icon.out { background: var(--danger-soft); color: var(--danger); }
.kas-type-icon svg { width: 14px; height: 14px; }
.kas-amount { font-family: var(--font-mono); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.kas-amount.in { color: var(--success); }
.kas-amount.out { color: var(--danger); }
.source-badge { display: inline-flex; align-items: center; gap: 4px; font-size: 9px; font-weight: 700; padding: 2px 6px; border-radius: 5px; white-space: nowrap; }
.source-badge.auto { background: var(--primary-soft); color: var(--primary); }
.source-badge.manual { background: var(--surface-3); color: var(--muted); }
.kas-detail-toggle {
  border: 0; background: transparent; padding: 0; font-size: 9.5px; font-weight: 600; color: var(--primary);
  display: inline-flex; align-items: center; gap: 3px;
}
.kas-detail-toggle svg { width: 11px; height: 11px; transition: transform .15s; }
.kas-detail-toggle.open svg { transform: rotate(180deg); }
.purchase-detail-row td { background: var(--surface-2); padding-top: 0 !important; }
.purchase-details { display: flex; flex-direction: column; gap: 6px; padding: 6px 0 2px; }
.purchase-detail-head { display: grid; grid-template-columns: 1fr 55px 100px 110px; gap: 10px; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.purchase-detail-item { display: grid; grid-template-columns: 1fr 55px 100px 110px; gap: 10px; font-size: 10.5px; color: var(--text-2); }
.purchase-detail-item strong { font-family: var(--font-mono); font-size: 10px; font-weight: 600; text-align: right; }
.kas-form-total {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 13px;
  background: var(--primary-soft);
  border: 1px solid color-mix(in srgb, var(--primary) 20%, var(--border));
  border-radius: 10px;
  margin-top: 4px;
}
.kas-form-total span { font-size: 11.5px; font-weight: 600; color: var(--primary); }
.kas-form-total strong { font-family: var(--font-mono); font-size: 15px; color: var(--primary); }
.purchase-lines { display: flex; flex-direction: column; gap: 8px; }
.purchase-line { display: grid; grid-template-columns: minmax(0, 1fr) 70px 110px 32px; gap: 7px; align-items: center; }
.purchase-line .input { min-height: 36px; height: 36px; font-size: 11.5px; }
.purchase-line .row-action { width: 32px; height: 32px; background: var(--surface-2); border: 1px solid var(--border); }
.purchase-add { align-self: flex-start; margin-top: 2px; }

/* =========================================================
   Settings
   ========================================================= */

.settings-layout { display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 18px; align-items: start; }
.settings-nav {
  position: sticky; top: calc(var(--topbar-height) + 18px);
  display: flex; flex-direction: column; gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 7px;
}
.settings-nav button {
  display: flex; align-items: center; gap: 9px;
  border: 0; background: transparent;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 11.5px; font-weight: 600;
  color: var(--text-2);
  text-align: left;
  transition: background .15s, color .15s;
}
.settings-nav button svg { width: 16px; height: 16px; color: var(--muted); }
.settings-nav button:hover { background: var(--surface-2); color: var(--text); }
.settings-nav button.active { background: var(--primary-soft); color: var(--primary); }
.settings-nav button.active svg { color: var(--primary); }
.settings-content { min-width: 0; }
.settings-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.settings-head { padding: 18px 20px; border-bottom: 1px solid var(--border); }
.settings-head h3 { font-size: 14px; font-weight: 800; letter-spacing: -.02em; }
.settings-head p { font-size: 11px; color: var(--muted); margin-top: 3px; line-height: 1.55; }
.settings-body { padding: 20px; }
.settings-foot { padding: 13px 20px; border-top: 1px solid var(--border); background: var(--surface-2); display: flex; align-items: center; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.settings-foot .foot-left { margin-right: auto; font-size: 10.5px; color: var(--muted); }
.theme-options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.theme-option { border: 1.5px solid var(--border); border-radius: 10px; padding: 11px; cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s; }
.theme-option:hover { border-color: var(--border-strong); }
.theme-option.active { border-color: var(--primary); background: var(--primary-soft); }
.theme-option input { position: absolute; opacity: 0; }
.theme-option-preview {
  height: 47px; border-radius: 6px; border: 1px solid var(--border); overflow: hidden;
  display: flex; flex-direction: column; margin-bottom: 8px; background: #f4f6f9;
}
.theme-option-preview.dark { background: #0b1220; }
.theme-option-preview.system { background: linear-gradient(110deg, #f4f6f9 50%, #0b1220 50%); }
.theme-preview-bar { height: 9px; background: var(--primary); width: 34%; margin: 5px 5px 3px; border-radius: 2px; opacity: .8; }
.theme-preview-lines { flex: 1; padding: 0 5px 5px; display: flex; flex-direction: column; gap: 3px; }
.theme-preview-lines i { height: 4px; border-radius: 2px; background: rgba(133, 146, 165, .28); display: block; width: 78%; }
.theme-preview-lines i:nth-child(2) { width: 52%; }
.theme-preview-lines.dark i { background: rgba(200, 215, 235, .16); }
.theme-option-label { display: flex; flex-direction: column; gap: 1px; }
.theme-option-label strong { font-size: 11.5px; }
.theme-option-label span { font-size: 9px; color: var(--muted); }
.color-swatches { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.color-swatch { width: 31px; height: 31px; border-radius: 9px; border: 2px solid transparent; box-shadow: 0 0 0 1px var(--border); position: relative; transition: transform .14s; }
.color-swatch:hover { transform: scale(1.06); }
.color-swatch.active { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary); }
.color-swatch svg { width: 14px; height: 14px; color: #fff; position: absolute; inset: 0; margin: auto; }
.custom-color-wrap { display: inline-flex; align-items: center; gap: 8px; padding-left: 5px; border-left: 1px solid var(--border); margin-left: 3px; }
.custom-color-wrap label { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.custom-color-input { width: 33px; height: 31px; border: 0; padding: 0; background: transparent; cursor: pointer; }
.settings-preview { border-radius: 12px; border: 1px solid var(--border); overflow: hidden; position: relative; }
.settings-preview-top { height: 31px; background: var(--sidebar); display: flex; align-items: center; gap: 5px; padding: 0 9px; }
.settings-preview-top i { width: 5px; height: 5px; border-radius: 50%; background: rgba(255,255,255,.25); }
.settings-preview-top span { margin-left: 5px; font-size: 8px; color: rgba(255,255,255,.55); font-weight: 600; }
.settings-preview-body { display: flex; min-height: 114px; background: var(--bg); }
.settings-preview-side { width: 63px; background: var(--sidebar-2); padding: 8px 6px; display: flex; flex-direction: column; gap: 4px; }
.settings-preview-side i { height: 5px; border-radius: 2px; background: rgba(255,255,255,.14); display: block; }
.settings-preview-side i.active { background: var(--primary); width: 80%; }
.settings-preview-main { flex: 1; padding: 8px; }
.settings-preview-kpis { display: flex; gap: 4px; margin-bottom: 6px; }
.settings-preview-kpis i { flex: 1; height: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; display: flex; }
.settings-preview-kpis i:first-child { background: var(--primary); border-color: var(--primary); opacity: .9; }
.settings-preview-chart { height: 50px; background: var(--surface); border: 1px solid var(--border); border-radius: 4px; display: flex; align-items: flex-end; gap: 3px; padding: 7px; }
.settings-preview-chart i { flex: 1; background: var(--primary); opacity: .7; border-radius: 2px 2px 0 0; }
.settings-grid-2 { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; align-items: start; }
.avatar-upload { display: flex; align-items: center; gap: 12px; }
.logo-preview {
  width: 58px; height: 58px; border-radius: 15px;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; border: 1px dashed var(--border-strong);
  flex: none;
}
.logo-preview img { width: 100%; height: 100%; object-fit: cover; }
.logo-preview svg { width: 25px; height: 25px; }
.upload-actions { display: flex; flex-direction: column; gap: 5px; }
.upload-actions label { font-size: 11px; font-weight: 700; color: var(--primary); cursor: pointer; }
.upload-actions input[type=file] { display: none; }
.upload-actions span { font-size: 9.5px; color: var(--muted); }
.integration-status {
  display: flex; align-items: center; gap: 11px;
  padding: 13px; border-radius: 11px; border: 1px solid var(--border);
  background: var(--surface-2);
  margin-bottom: 18px;
}
.integration-status-icon {
  width: 35px; height: 35px; border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  background: var(--primary-soft); color: var(--primary); flex: none;
}
.integration-status-icon.success { background: var(--success-soft); color: var(--success); }
.integration-status-icon svg { width: 17px; height: 17px; }
.integration-status-copy { flex: 1; min-width: 0; }
.integration-status-copy strong { display: block; font-size: 11.5px; }
.integration-status-copy span { display: block; font-size: 10px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 1px; }
.setup-steps { display: flex; flex-direction: column; gap: 0; margin-top: 6px; }
.setup-step { display: flex; gap: 11px; position: relative; padding-bottom: 16px; }
.setup-step:last-child { padding-bottom: 0; }
.setup-step-num {
  width: 23px; height: 23px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800; flex: none;
  position: relative; z-index: 1;
}
.setup-step:not(:last-child)::before {
  content: ""; position: absolute; left: 11px; top: 23px; bottom: 0;
  width: 1px; background: var(--border);
}
.setup-step-copy { flex: 1; padding-top: 1px; }
.setup-step-copy strong { display: block; font-size: 11.5px; }
.setup-step-copy p { font-size: 10.5px; color: var(--muted); line-height: 1.55; margin-top: 2px; }
.setup-step-copy code {
  font-family: var(--font-mono); font-size: 9px; color: var(--text-2);
  background: var(--surface-3); padding: 1px 4px; border-radius: 4px;
}
.code-block {
  position: relative;
  background: var(--sidebar);
  color: #c8d6e8;
  border-radius: 9px;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 9.5px;
  line-height: 1.7;
  overflow-x: auto;
  margin-top: 7px;
}
.code-block code { white-space: pre; }
.code-copy { position: absolute; top: 6px; right: 6px; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.06); color: #b6c6da; padding: 3px 6px; border-radius: 4px; font-size: 8px; font-family: var(--font-sans); }
.danger-zone { border: 1px solid color-mix(in srgb, var(--danger) 25%, var(--border)); border-radius: 11px; padding: 14px; margin-top: 20px; }
.danger-zone h4 { color: var(--danger); font-size: 11.5px; display: flex; align-items: center; gap: 5px; }
.danger-zone p { font-size: 10.5px; color: var(--muted); margin-top: 3px; line-height: 1.5; }
.danger-zone .button { margin-top: 9px; }
.printer-note { display: flex; gap: 8px; background: var(--info-soft); border: 1px solid color-mix(in srgb, var(--info) 15%, var(--border)); border-radius: 9px; padding: 10px 11px; margin-top: 15px; }
.printer-note svg { width: 15px; height: 15px; color: var(--info); flex: none; margin-top: 1px; }
.printer-note p { font-size: 10.5px; color: var(--text-2); line-height: 1.55; }
.printer-note strong { color: var(--info); }

/* User profile mini modal */
.profile-hero {
  display: flex; align-items: center; gap: 13px;
  padding: 15px; border-radius: 11px;
  background: var(--surface-2); border: 1px solid var(--border);
  margin-bottom: 16px;
}
.profile-hero .avatar { width: 48px; height: 48px; border-radius: 14px; font-size: 14px; }
.profile-hero div { display: flex; flex-direction: column; gap: 2px; }
.profile-hero strong { font-size: 13px; }
.profile-hero span { font-size: 10.5px; color: var(--muted); }
.profile-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.profile-grid .field { gap: 3px; }
.profile-grid .field span { font-size: 9.5px; color: var(--muted); }
.profile-grid .field strong { font-size: 11.5px; font-weight: 600; }

/* =========================================================
   Receipt
   ========================================================= */

.receipt-root { display: none; }
.receipt-sheet {
  width: 76mm;
  margin: 0 auto;
  background: #fff;
  color: #111;
  font-family: var(--font-mono);
  font-size: 10.5px;
  line-height: 1.55;
  padding: 12px 10px;
}
.receipt-paper-58 .receipt-sheet { width: 54mm; font-size: 9.5px; padding: 10px 7px; }
.receipt-paper-80 .receipt-sheet { width: 76mm; }
.receipt-header { text-align: center; padding-bottom: 2px; }
.receipt-logo { width: 38px; height: 38px; border-radius: 8px; margin: 0 auto 5px; overflow: hidden; }
.receipt-logo img { width: 100%; height: 100%; object-fit: cover; }
.receipt-company { font-family: var(--font-sans); font-size: 14px; font-weight: 800; letter-spacing: -.03em; color: #111; }
.receipt-tagline { font-family: var(--font-sans); font-size: 8px; color: #666; margin-top: 1px; }
.receipt-addr { font-family: var(--font-sans); font-size: 8px; color: #555; margin-top: 4px; line-height: 1.5; }
.receipt-divider { border-top: 1px dashed #999; margin: 8px 0; }
.receipt-divider.solid { border-top-style: solid; border-top-color: #111; }
.receipt-meta { display: flex; flex-direction: column; gap: 2px; font-size: 9.5px; }
.receipt-meta-row { display: flex; justify-content: space-between; gap: 10px; }
.receipt-meta-row span:first-child { color: #555; }
.receipt-meta-row span:last-child { text-align: right; font-weight: 700; }
.receipt-items { display: flex; flex-direction: column; gap: 3px; }
.receipt-item { display: flex; justify-content: space-between; gap: 10px; }
.receipt-item span:last-child { white-space: nowrap; font-weight: 700; }
.receipt-total-row { display: flex; justify-content: space-between; font-weight: 800; font-size: 12px; padding: 2px 0; }
.receipt-payment { font-size: 9px; text-align: center; margin-top: 5px; letter-spacing: .05em; font-weight: 700; }
.receipt-payment.lunas { color: #111; }
.receipt-payment.unpaid { border: 1px solid #111; padding: 3px; letter-spacing: .12em; }
.receipt-footer { text-align: center; font-family: var(--font-sans); font-size: 8px; color: #555; line-height: 1.6; margin-top: 8px; }
.receipt-footer strong { display: block; font-size: 9px; color: #111; margin-bottom: 2px; }
.receipt-barcode { display: flex; gap: 1.5px; justify-content: center; align-items: stretch; height: 26px; margin: 9px auto 3px; width: 70%; }
.receipt-barcode i { background: #111; flex: 1; }
.receipt-barcode i:nth-child(3n) { flex: .55; }
.receipt-barcode i:nth-child(4n) { flex: .3; }
.receipt-ticket-code { text-align: center; font-size: 8px; letter-spacing: .16em; color: #555; }
.receipt-preview-wrap {
  background: var(--surface-3);
  padding: 22px;
  display: flex;
  justify-content: center;
  max-height: 55vh;
  overflow-y: auto;
}
.receipt-preview-wrap .receipt-sheet { box-shadow: 0 10px 36px rgba(0,0,0,.16); border-radius: 2px; }

@media print {
  @page { margin: 4mm; }
  body > * { display: none !important; }
  body > #receiptRoot { display: block !important; }
  body { background: #fff !important; }
  .receipt-root { display: block !important; }
  .receipt-sheet { box-shadow: none !important; width: 76mm !important; padding: 0 !important; }
  .receipt-paper-58 .receipt-sheet { width: 54mm !important; }
}

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 1360px) {
  .search-trigger { min-width: 180px; }
  .search-trigger kbd { display: none; }
  .user-menu-copy { max-width: 100px; }
}

@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid, .dash-grid.even, .dash-bottom { grid-template-columns: 1fr; }
  .dash-grid.three { grid-template-columns: 1fr 1fr; }
  .finance-layout { grid-template-columns: 1fr; }
  .settings-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 1080px) {
  :root { --sidebar-width: 250px; }
  .auth-screen { grid-template-columns: 1fr 440px; }
  .auth-story { padding: 28px 34px 22px; }
  .auth-story-content h1 { font-size: 42px; }
  .view { padding: 22px 22px 40px; }
  .topbar { padding: 0 22px; }
  .search-trigger { min-width: 150px; }
  .report-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kas-banner { grid-template-columns: 1fr; }
  .kas-banner-actions { justify-content: flex-start; padding-top: 0; padding-bottom: 20px; }
}

@media (max-width: 960px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-story { display: none; }
  .auth-panel { min-height: 100vh; padding: 32px 22px; justify-content: center; }
  .auth-mobile-brand {
    display: flex; align-items: center; gap: 10px;
    position: relative; z-index: 2;
    align-self: flex-start;
  }
  .auth-mobile-brand .brand-mark { width: 38px; height: 38px; color: var(--primary); }
  .auth-mobile-brand .brand-mark svg { width: 100%; height: 100%; }
  .auth-mobile-brand > div:last-child { display: flex; flex-direction: column; line-height: 1.2; }
  .auth-mobile-brand strong { font-size: 14px; }
  .auth-mobile-brand span { font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; margin-top: 2px; font-weight: 600; }
  .auth-card { margin-top: 12px; }
  .auth-panel-foot { margin-top: 4px; }

  .sidebar { transform: translateX(-102%); width: 276px; box-shadow: 0 24px 80px rgba(0,0,0,.4); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-close { display: inline-flex; }
  .sidebar-overlay.open { display: block; }
  .app-main { margin-left: 0; }
  .menu-button { display: inline-flex; width: 38px; height: 38px; }
  .view { padding: 20px 18px 40px; }
  .topbar { padding: 0 18px; gap: 12px; height: 68px; }
  .topbar-actions { gap: 6px; }
  .search-trigger { width: 38px; min-width: 38px; height: 38px; padding: 0; justify-content: center; }
  .search-trigger span, .search-trigger kbd { display: none; }
  .mode-chip { display: none; }
  .user-menu-copy, .user-menu-button > svg { display: none; }
  .user-menu-button { padding: 2px; }
  .settings-layout { grid-template-columns: 1fr; }
  .settings-nav { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; }
  .settings-nav::-webkit-scrollbar { display: none; }
  .settings-nav button { white-space: nowrap; }
  .notif-popover { right: -45px; }
}

@media (max-width: 720px) {
  .page-head { align-items: flex-start; margin-bottom: 18px; }
  .page-title { font-size: 20px; }
  .page-subtitle { font-size: 11.5px; }
  .page-actions { width: 100%; }
  .page-actions .button { flex: 1; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 9px; }
  .kpi-card { padding: 13px; border-radius: 13px; }
  .kpi-top { margin-bottom: 9px; }
  .kpi-label { font-size: 9px; letter-spacing: .04em; }
  .kpi-icon { width: 28px; height: 28px; border-radius: 8px; }
  .kpi-icon svg { width: 14px; height: 14px; }
  .kpi-value { font-size: 16px; }
  .kpi-value small { font-size: 8.5px; }
  .kpi-foot { font-size: 9px; flex-wrap: wrap; gap: 3px; margin-top: 7px; }
  .today-strip { grid-template-columns: 1fr; }
  .today-item { border-right: 0; border-bottom: 1px solid var(--border); padding: 11px 14px; }
  .today-item:last-child { border-bottom: 0; }
  .dash-grid.three { grid-template-columns: 1fr; }
  .chart-head { padding: 15px 14px 0; }
  .bar-chart { height: 160px; padding: 14px 10px 10px 2px; gap: 3px; }
  .bar-col > span { font-size: 8.5px; }
  .donut-wrap { padding: 8px 14px 16px; gap: 15px; flex-wrap: wrap; }
  .donut { width: 110px; height: 110px; }
  .donut::after { inset: 20px; }
  .legend { flex: 1; min-width: 120px; }
  .quick-actions { padding: 4px 14px 14px; }
  .attention-list { padding: 0 4px 6px; }
  .tech-performance { padding: 2px 14px 15px; }
  .card-head { padding: 14px 14px 11px; }
  .card-body { padding: 0 14px 14px; }
  .table-toolbar { padding: 11px 12px; }
  .toolbar-search { max-width: none; }
  .toolbar-filters { width: 100%; }
  .toolbar-filters .select { flex: 1; min-width: 0; }
  .filter-count { display: none; }
  .data-table th, .data-table td { padding-left: 12px; padding-right: 12px; }
  .filter-bar { padding: 11px 12px; gap: 8px; }
  .filter-field { flex: 1; min-width: 110px; }
  .report-summary { grid-template-columns: 1fr 1fr; gap: 8px; }
  .summary-card { padding: 12px; }
  .summary-card strong { font-size: 15px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span-2 { grid-column: span 1; }
  .settings-body { padding: 15px; }
  .settings-head { padding: 15px; }
  .theme-options { grid-template-columns: 1fr 1fr; }
  .kas-banner-main { padding: 18px; }
  .kas-banner-actions { padding: 0 18px 18px; }
  .kas-banner-actions .button { flex: 1; }
  .kas-rule-card { gap: 10px; }
  .kas-rule-actions { width: 100%; }
  .kas-rule-actions .button { flex: 1; }
  .kas-period { width: 100%; }
  .kas-period .input { flex: 1; width: auto; }
  .modal { max-height: 94vh; border-radius: 16px; }
  .overlay { padding: 10px; }
  .modal-head { padding: 15px 16px 13px; }
  .modal-body { padding: 16px; }
  .modal-foot { padding: 12px 16px; }
  .drawer { width: 100%; max-height: 100dvh; }
  .drawer-body { padding: 16px 18px 24px; }
  .drawer-head { padding: 16px 18px 14px; }
  .drawer-foot { padding: 11px 18px; }
  .detail-grid { grid-template-columns: 1fr 1fr; }
  .purchase-line { grid-template-columns: 1fr 55px 90px 30px; }
  .purchase-detail-head, .purchase-detail-item { grid-template-columns: 1fr 35px 80px 85px; }
  .topbar { height: 62px; padding: 0 13px; }
  .breadcrumb > span:first-child, .breadcrumb svg { display: none; }
  .view { padding: 16px 13px 36px; }
  .notif-popover { position: fixed; top: 58px; left: 12px; right: 12px; width: auto; }
  .user-popover { right: -2px; }
  .toast-root { right: 12px; bottom: 12px; left: 12px; max-width: none; }
  .profile-grid { grid-template-columns: 1fr; }
  .finance-bars { height: 160px; gap: 6px; }
  .finance-month > span { font-size: 8px; }
  .settings-grid-2 { gap: 16px; }
  .auth-heading h2 { font-size: 23px; }
  .auth-card { max-width: 100%; }
  .auth-panel { padding: 24px 18px; }
  .auth-panel-foot { gap: 10px; }
  .auth-panel-foot > span:first-child { display: none; }
  .auth-panel-foot { justify-content: center; }
  .demo-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 420px) {
  .kpi-grid { grid-template-columns: 1fr; gap: 8px; }
  .kpi-card { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px; }
  .kpi-top { margin: 0; }
  .kpi-label { }
  .kpi-icon { grid-row: span 2; }
  .kpi-value { grid-column: 1; }
  .kpi-foot { grid-column: 1 / -1; margin-top: 1px; }
  .demo-grid { grid-template-columns: 1fr; }
  .report-summary { grid-template-columns: 1fr; }
  .theme-options { grid-template-columns: 1fr; }
  .page-actions { flex-wrap: wrap; }
  .page-actions .button { flex: unset; }
}

/* =========================================================
   Tambahan modul: pencarian global, input barang, nota settings
   ========================================================= */

@keyframes spin { to { transform: rotate(360deg); } }

.search-results { display: flex; flex-direction: column; gap: 4px; max-height: 380px; overflow-y: auto; padding-right: 2px; }
.search-group-title {
  font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: var(--muted); padding: 10px 5px 4px;
}
.search-group-title:first-child { padding-top: 0; }
.search-result {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border-radius: 10px;
  border: 1px solid transparent; background: var(--surface-2);
  text-align: left; transition: background .14s, border-color .14s;
}
.search-result:hover { background: var(--surface-3); border-color: var(--border-strong); }
.search-result-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.search-result-copy strong { font-size: 11.5px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-copy span { font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result > svg:last-child { color: var(--muted); flex: none; }

.device-selector {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%; gap: 4px;
}
.device-selector button {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 5px; min-height: 40px;
}
.device-selector button svg { width: 14px; height: 14px; }
.device-selector button.active { color: var(--primary); }
.order-tabs { margin-bottom: 16px; }

.receipt-settings-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) 330px;
  gap: 22px; align-items: start;
}
.receipt-preview-panel {
  display: flex; justify-content: center;
  padding: 14px; border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-3);
  max-height: 520px; overflow: auto;
}
.receipt-preview-panel .receipt-sheet { box-shadow: 0 8px 26px rgba(5, 12, 22, .18); border-radius: 2px; }

@media (max-width: 1200px) {
  .receipt-settings-grid { grid-template-columns: 1fr; }
  .receipt-preview-panel { max-width: 340px; width: 100%; margin: 0 auto; }
}
@media (max-width: 560px) {
  .device-selector { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .receipt-preview-panel { padding: 10px; }
}
