/* ==========================================================================
   DASHBOARD MONITORING EDC & QRIS BRI
   BO YOGYAKARTA CIK DITIRO
   ========================================================================== */

:root {
  --bri-950: #001f45;
  --bri-900: #002b5c;
  --bri-800: #00366f;
  --bri-700: #00468c;
  --bri-600: #0057a8;
  --bri-500: #0b6bcb;
  --bri-400: #3d8fe0;
  --bri-100: #e6f1fc;
  --bri-50: #f2f8fe;

  --orange-600: #dd5f12;
  --orange-500: #f37021;
  --orange-100: #fef0e6;

  --green-600: #15803d;
  --green-500: #16a34a;
  --green-100: #e8f7ee;

  --cyan-600: #0e7490;
  --cyan-500: #0891b2;
  --cyan-100: #e5f6fb;

  --red-600: #dc2626;
  --red-100: #feecec;

  --amber-600: #b45309;
  --amber-500: #d97706;
  --amber-100: #fef3c7;

  --bg: #f4f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --border: #e3eaf2;
  --border-strong: #d3deeb;
  --text: #0e1b2e;
  --text-soft: #334155;
  --muted: #64748b;
  --muted-light: #94a3b8;

  --shadow-xs: 0 1px 2px rgba(15, 32, 55, 0.05);
  --shadow-sm: 0 2px 8px rgba(15, 32, 55, 0.05);
  --shadow-md: 0 10px 30px rgba(15, 32, 55, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 32, 55, 0.16);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --sidebar-width: 274px;
  --topbar-height: 76px;

  --font: "Segoe UI", "Inter", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "SF Mono", Consolas, "Courier New", monospace;
}

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

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

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

h1, h2, h3, h4, p, ul, ol, dl, dd {
  margin: 0;
}

ul, ol {
  padding: 0;
  list-style: none;
}

a {
  color: inherit;
  text-decoration: none;
}

img, svg {
  max-width: 100%;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

::selection {
  background: rgba(11, 107, 203, 0.2);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #c8d4e3;
  border-radius: 20px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: #a9bacf;
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */
.icon {
  display: inline-block;
  flex-shrink: 0;
  vertical-align: middle;
}

.mono {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: -0.01em;
}

.nowrap {
  white-space: nowrap;
}

.text-right { text-align: right; }
.text-center { text-align: center; }
.text-green { color: var(--green-600) !important; }
.text-blue { color: var(--bri-600) !important; }
.text-cyan { color: var(--cyan-600) !important; }
.text-orange { color: var(--orange-600) !important; }
.text-red { color: var(--red-600) !important; }

.muted-text {
  color: var(--muted);
  font-size: 13px;
}

.dot-sep {
  color: var(--muted-light);
  margin: 0 6px;
}

/* --------------------------------------------------------------------------
   Spinner / skeleton / loading
   -------------------------------------------------------------------------- */
.spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(11, 107, 203, 0.2);
  border-top-color: var(--bri-600);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-sm {
  width: 14px;
  height: 14px;
  border-color: rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
}

.spinner-lg {
  width: 34px;
  height: 34px;
  border-width: 3px;
}

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

.loading-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 160px;
  color: var(--muted);
  font-size: 13px;
}

.page-render-loading {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}

.skeleton {
  display: block;
  background: linear-gradient(90deg, #edf2f8 25%, #f6f9fc 37%, #edf2f8 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
  border-radius: 7px;
}

.skeleton-card {
  height: 150px;
  border-radius: var(--radius-lg);
}

.skeleton-text {
  height: 11px;
  width: 80%;
}

.skeleton-value {
  height: 24px;
  width: 55%;
}

.table-skeleton {
  padding: 8px 0;
}

.skeleton-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 24px;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f4f9;
}

.table-skeleton .skeleton-row:first-child {
  background: #f8fafc;
}

@keyframes shimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.button:active:not(:disabled) {
  transform: translateY(1px);
}

.button:disabled {
  opacity: 0.55;
}

.button-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--bri-600), var(--bri-800));
  box-shadow: 0 4px 12px rgba(0, 70, 140, 0.2);
}

.button-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--bri-500), var(--bri-700));
  box-shadow: 0 7px 18px rgba(0, 70, 140, 0.26);
  transform: translateY(-1px);
}

.button-secondary {
  color: var(--bri-700);
  background: #fff;
  border-color: var(--border-strong);
  box-shadow: var(--shadow-xs);
}

.button-secondary:hover:not(:disabled) {
  border-color: var(--bri-400);
  background: var(--bri-50);
}

.button-ghost {
  color: var(--text-soft);
  background: transparent;
  border-color: transparent;
}

.button-ghost:hover:not(:disabled) {
  background: #eef3f9;
}

.button-danger {
  color: #fff;
  background: linear-gradient(135deg, #ef4444, #b91c1c);
  box-shadow: 0 4px 12px rgba(220, 38, 38, 0.22);
}

.button-danger:hover:not(:disabled) {
  background: linear-gradient(135deg, #f05252, #dc2626);
}

.button-block {
  width: 100%;
}

.button-sm {
  height: 34px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 8px;
}

.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 9px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.icon-button:hover {
  color: var(--bri-600);
  background: var(--bri-50);
  border-color: var(--bri-100);
}

.icon-button.danger-hover:hover {
  color: var(--red-600);
  background: var(--red-100);
  border-color: #fecaca;
}

.icon-button.success-hover:hover {
  color: var(--green-600);
  background: var(--green-100);
  border-color: #bbf7d0;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--bri-600);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.15s ease, gap 0.15s ease;
}

.text-link:hover {
  color: var(--bri-800);
  gap: 8px;
}

/* --------------------------------------------------------------------------
   Badges / chips
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  background: #f1f5f9;
  color: #475569;
}

.badge-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.badge-success, .badge-green { background: var(--green-100); color: var(--green-600); }
.badge-warning { background: var(--amber-100); color: var(--amber-600); }
.badge-orange { background: var(--orange-100); color: var(--orange-600); }
.badge-danger { background: var(--red-100); color: var(--red-600); }
.badge-info, .badge-blue { background: var(--bri-100); color: var(--bri-700); }
.badge-cyan { background: var(--cyan-100); color: var(--cyan-600); }
.badge-neutral { background: #f1f5f9; color: var(--muted); }

.role-chip {
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.role-admin { color: var(--bri-700); background: var(--bri-100); }
.role-viewer { color: #475569; background: #eef2f7; }

.mini-badge {
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.mini-badge-green {
  color: #bbf7d0;
  background: rgba(22, 163, 74, 0.22);
  border: 1px solid rgba(74, 222, 128, 0.24);
}

.mini-badge-orange {
  color: #fed7aa;
  background: rgba(243, 112, 33, 0.2);
  border: 1px solid rgba(251, 146, 60, 0.28);
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 8px;
  color: var(--muted);
  background: var(--surface-soft);
  border: 1px solid var(--border);
  font-size: 10.5px;
  font-weight: 600;
  white-space: nowrap;
}

.self-chip {
  display: inline-block;
  margin-left: 5px;
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--bri-700);
  background: var(--bri-100);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  vertical-align: middle;
}

/* --------------------------------------------------------------------------
   App shell / sidebar
   -------------------------------------------------------------------------- */
.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-width);
  color: #fff;
  background:
    radial-gradient(circle at 15% 4%, rgba(61, 143, 224, 0.24), transparent 34%),
    radial-gradient(circle at 100% 80%, rgba(243, 112, 33, 0.12), transparent 36%),
    linear-gradient(178deg, #003a76 0%, #002b5c 45%, #001d40 100%);
  box-shadow: 8px 0 32px rgba(0, 31, 69, 0.12);
}

.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  background-image: radial-gradient(rgba(255, 255, 255, 0.14) 0.7px, transparent 0.7px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 60%);
}

.sidebar-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 20px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
}

.brand-logo {
  flex-shrink: 0;
  border-radius: 11px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.brand-copy {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.22;
}

.brand-kicker {
  color: rgba(255, 255, 255, 0.58);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.15em;
}

.brand-title {
  margin-top: 2px;
  color: #fff;
  font-size: 15.5px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.brand-subtitle {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.sidebar-scroll {
  position: relative;
  flex: 1;
  overflow-y: auto;
  padding: 18px 0 12px;
  scrollbar-width: thin;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-color: transparent;
}

.nav-section {
  margin-bottom: 22px;
}

.nav-section-label {
  padding: 0 22px 8px;
  color: rgba(255, 255, 255, 0.38);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.17em;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 42px;
  margin: 3px 12px;
  padding: 8px 11px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 12.3px;
  font-weight: 500;
  transition: color 0.16s ease, background 0.16s ease;
}

.nav-item:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.07);
}

.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.06));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--orange-500);
  box-shadow: 0 0 12px rgba(243, 112, 33, 0.55);
}

.nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item.active .nav-icon {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.nav-label {
  flex: 1;
  min-width: 0;
}

.nav-badge {
  padding: 2px 5px;
  border: 1px solid rgba(251, 146, 60, 0.4);
  border-radius: 4px;
  color: #fdba74;
  background: rgba(243, 112, 33, 0.12);
  font-size: 7.5px;
  font-weight: 800;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.sidebar-panel {
  margin: 8px 16px 0;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  background: rgba(0, 15, 36, 0.28);
}

.sidebar-panel-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.pulse-dot {
  position: relative;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.13);
}

.module-status {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.module-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.module-name {
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 500;
}

.sidebar-footer {
  position: relative;
  padding: 16px 20px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-footer-line {
  color: rgba(255, 255, 255, 0.55);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.07em;
}

.sidebar-footer-muted {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.3);
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

.sidebar-backdrop {
  display: none;
}

.app-main {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

/* --------------------------------------------------------------------------
   Topbar
   -------------------------------------------------------------------------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 45;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: var(--topbar-height);
  padding: 0 30px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.menu-toggle {
  display: none;
}

.topbar-context {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted-light);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.breadcrumb-sep {
  color: #cbd5e1;
}

.breadcrumb-current {
  color: var(--text-soft);
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 10.5px;
  font-weight: 600;
}

.topbar-date {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 10.5px;
}

.date-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--green-500);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
}

.topbar-clock {
  display: flex;
  align-items: center;
  gap: 6px;
  padding-right: 19px;
  border-right: 1px solid var(--border);
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}

.user-menu {
  position: relative;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 7px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.user-chip:hover {
  background: var(--surface-soft);
  border-color: var(--border);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, var(--bri-500), var(--bri-800));
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  box-shadow: 0 3px 8px rgba(0, 70, 140, 0.22);
}

.avatar-sm {
  width: 34px;
  height: 34px;
  font-size: 10px;
}

.avatar-lg {
  width: 44px;
  height: 44px;
  font-size: 12px;
}

.user-chip-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
}

.user-chip-copy strong {
  max-width: 165px;
  overflow: hidden;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 650;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip-copy span {
  color: var(--muted);
  font-size: 9.5px;
}

.user-chip > .icon {
  color: var(--muted-light);
}

.user-dropdown {
  position: absolute;
  top: calc(100% + 9px);
  right: 0;
  width: 282px;
  padding: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  animation: dropdownIn 0.16s ease;
}

.user-dropdown[hidden] {
  display: none;
}

@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-5px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.user-dropdown-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 9px 13px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}

.user-dropdown-head > div {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.user-dropdown-head strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-dropdown-head div span {
  color: var(--muted);
  font-size: 10px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-soft);
  font-size: 12px;
  text-align: left;
  transition: background 0.14s ease, color 0.14s ease;
}

.dropdown-item:hover {
  background: var(--surface-soft);
  color: var(--bri-700);
}

.dropdown-danger {
  color: var(--red-600);
}

.dropdown-danger:hover {
  background: var(--red-100);
  color: var(--red-600);
}

/* --------------------------------------------------------------------------
   Page layout
   -------------------------------------------------------------------------- */
.page-content {
  flex: 1;
  width: 100%;
  max-width: 1640px;
  margin: 0 auto;
  padding: 28px 32px 44px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.page-header-text {
  min-width: 0;
}

.eyebrow {
  margin-bottom: 7px;
  color: var(--bri-600);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.page-header h1 {
  color: var(--text);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
}

.page-header p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12.5px;
}

.page-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
  flex-shrink: 0;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 32px 22px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  background: transparent;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.footer-brand strong {
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.footer-brand span,
.footer-meta {
  font-size: 9px;
}

.footer-meta {
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.footer-sep {
  color: #cbd5e1;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.card {
  position: relative;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.card-title {
  color: var(--text);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.card-subtitle {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.card-footnote {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid #eef3f8;
  color: var(--muted);
  font-size: 10.5px;
}

.card-footnote strong {
  color: var(--text-soft);
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Stat cards
   -------------------------------------------------------------------------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.stat-grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.stat-grid-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.stat-grid-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.stat-grid-7 {
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 19px 20px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -35px;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--bri-50);
  opacity: 0.65;
}

.stat-green::after { background: var(--green-100); }
.stat-cyan::after { background: var(--cyan-100); }
.stat-orange::after { background: var(--orange-100); }
.stat-red::after { background: var(--red-100); }

.stat-card-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.stat-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  color: var(--bri-600);
  background: var(--bri-100);
}

.stat-green .stat-icon { color: var(--green-600); background: var(--green-100); }
.stat-cyan .stat-icon { color: var(--cyan-600); background: var(--cyan-100); }
.stat-orange .stat-icon { color: var(--orange-600); background: var(--orange-100); }
.stat-red .stat-icon { color: var(--red-600); background: var(--red-100); }

.stat-trend {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 7px;
  border-radius: 20px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 9.5px;
  font-weight: 700;
}

.stat-trend.up {
  color: var(--green-600);
  background: var(--green-100);
}

.stat-label {
  position: relative;
  z-index: 1;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.stat-value {
  position: relative;
  z-index: 1;
  margin-top: 5px;
  color: var(--text);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.1;
}

.stat-value-sm {
  font-size: 19px;
  letter-spacing: -0.02em;
}

.stat-meta {
  position: relative;
  z-index: 1;
  margin-top: 8px;
  color: var(--muted);
  font-size: 10.5px;
}

.stat-meta span {
  display: inline;
}

.stat-meta .dot-sep {
  margin: 0 4px;
}

/* --------------------------------------------------------------------------
   Dashboard charts
   -------------------------------------------------------------------------- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-grid .span-2 {
  grid-column: span 2;
}

.chart-wrap {
  min-height: 230px;
  margin: 2px -6px 0;
}

.line-chart {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-axis-label {
  fill: #94a3b8;
  font-size: 10px;
  font-family: var(--font);
}

.chart-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #eef3f8;
  color: var(--muted);
  font-size: 10.5px;
}

.chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-total {
  font-weight: 600;
}

.legend-swatch {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--bri-500);
}

.legend-swatch.green { background: var(--green-500); }
.legend-swatch.orange { background: var(--orange-500); }
.legend-swatch.red { background: var(--red-600); }
.legend-swatch.blue { background: var(--bri-500); }

.donut-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.donut-wrap {
  position: relative;
  flex-shrink: 0;
}

.donut {
  display: block;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.donut-center strong {
  color: var(--text);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.donut-center span {
  margin-top: 1px;
  color: var(--muted);
  font-size: 9.5px;
}

.donut-legend {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--surface-soft);
}

.legend-name {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  font-size: 11px;
}

.legend-value {
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
}

.legend-value small {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 500;
}

.insight-box {
  display: flex;
  gap: 9px;
  margin-top: 16px;
  padding: 11px 12px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: var(--bri-50);
  color: var(--bri-700);
}

.insight-box .icon {
  margin-top: 1px;
  flex-shrink: 0;
}

.insight-box p {
  color: #335577;
  font-size: 10.5px;
  line-height: 1.5;
}

.insight-box.insight-warning {
  border-color: #fbdba4;
  background: #fff8ec;
  color: var(--orange-600);
}

.insight-box.insight-warning p {
  color: #8a5310;
}

/* Productivity summary (dashboard EDC) */
.productivity-card {
  margin-bottom: 20px;
}

.productivity-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.productivity-item {
  position: relative;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}

.productivity-item .productivity-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

.productivity-item strong {
  display: block;
  margin-top: 7px;
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.productivity-item .productivity-pct {
  position: absolute;
  top: 15px;
  right: 16px;
  font-size: 13px;
  font-weight: 700;
}

.productivity-item small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 9.5px;
}

.productivity-bar {
  overflow: hidden;
  height: 6px;
  margin-top: 8px;
  border-radius: 99px;
  background: var(--surface-alt, #f1f5f9);
}

.productivity-bar > span {
  display: block;
  height: 100%;
  border-radius: 99px;
  transition: width 0.4s ease;
}

.productivity-green {
  border-color: #c9ecd7;
  background: linear-gradient(180deg, #ffffff 0%, var(--green-100) 100%);
}

.productivity-green strong,
.productivity-green .productivity-pct {
  color: var(--green-600);
}

.productivity-green .productivity-bar > span {
  background: var(--green-500);
}

.productivity-red {
  border-color: #f7d3d3;
  background: linear-gradient(180deg, #ffffff 0%, var(--red-100) 100%);
}

.productivity-red strong,
.productivity-red .productivity-pct {
  color: var(--red-600);
}

.productivity-red .productivity-bar > span {
  background: var(--red-600);
}

.productivity-total .productivity-pct {
  color: var(--bri-600);
}

.productivity-bar-total > span {
  background: var(--bri-500);
}

.hbar-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.hbar-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hbar-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 11px;
}

.hbar-label > span {
  overflow: hidden;
  color: var(--text-soft);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hbar-label strong {
  flex-shrink: 0;
  color: var(--text);
  font-size: 10.5px;
  font-weight: 700;
}

.hbar-track {
  height: 7px;
  overflow: hidden;
  border-radius: 6px;
  background: #eef3f9;
}

.hbar-fill {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, var(--bri-500), var(--bri-400));
  transition: width 0.5s ease;
}

.hbar-fill.bar-orange {
  background: linear-gradient(90deg, var(--orange-500), #f9a25f);
}

.hbar-meta {
  display: flex;
  align-items: center;
  color: var(--muted);
  font-size: 9.5px;
}

.inline-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 90px;
  color: var(--muted);
  font-size: 12px;
}

/* --------------------------------------------------------------------------
   Tables
   -------------------------------------------------------------------------- */
.table-card {
  padding: 0;
  overflow: hidden;
}

.table-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 19px 22px 15px;
}

.table-size {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}

.table-size select {
  height: 32px;
  padding: 0 26px 0 9px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: #fff;
  font-size: 11px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.data-table th {
  padding: 10px 14px;
  color: var(--muted);
  background: #f8fafc;
  border-top: 1px solid #eef3f8;
  border-bottom: 1px solid var(--border);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: left;
  text-transform: uppercase;
  white-space: nowrap;
}

.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #f0f4f9;
  color: var(--text-soft);
  vertical-align: middle;
}

.data-table tbody tr {
  transition: background 0.12s ease;
}

.data-table tbody tr:hover {
  background: #f9fbfe;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table .text-right { text-align: right; }
.data-table .text-center { text-align: center; }

.sort-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  letter-spacing: inherit;
  text-transform: inherit;
  white-space: nowrap;
}

.sort-button:hover {
  color: var(--bri-600);
}

.sort-idle {
  opacity: 0.35;
}

.sort-up {
  transform: rotate(180deg);
  color: var(--bri-600);
  opacity: 1;
}

.sort-down {
  color: var(--bri-600);
  opacity: 1;
}

.report-table {
  min-width: 1160px;
}

.history-table {
  min-width: 1040px;
}

.login-history-table {
  min-width: 880px;
}

.login-history-card {
  margin-top: 18px;
}

.filter-select-sm {
  min-width: 150px;
}

.filter-select-sm > .icon {
  left: 9px;
}

.filter-select-sm select {
  height: 34px;
  padding: 0 28px 0 30px;
  font-size: 10.5px;
  background-position: calc(100% - 13px) 13px, calc(100% - 8px) 13px;
}

.history-info {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  font-size: 11px;
}

.history-info .icon {
  flex-shrink: 0;
  color: var(--bri-500);
}

.history-sub,
.history-ip {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
}

.modal-history-note {
  margin: 10px 16px 0;
  color: var(--muted);
  font-size: 10px;
}

.users-table {
  min-width: 830px;
}

.compact-table .data-table td {
  padding-top: 10px;
  padding-bottom: 10px;
}

.merchant-cell {
  display: flex;
  flex-direction: column;
  max-width: 250px;
  gap: 2px;
}

.merchant-cell strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merchant-cell .merchant-name-link {
  max-width: 100%;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merchant-cell .merchant-name-link:hover,
.merchant-cell .merchant-name-link:focus-visible {
  color: var(--bri-600);
  text-decoration: underline;
}

.merchant-cell span {
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cell-link {
  padding: 0;
  color: inherit;
  font: inherit;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}

.cell-link:hover,
.cell-link:focus-visible {
  color: var(--bri-600);
  text-decoration: underline;
}

.cell-truncate {
  display: block;
  max-width: 165px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 250px;
}

.file-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 6px;
  color: var(--bri-600);
  background: var(--bri-50);
}

.file-name {
  overflow: hidden;
  color: var(--text-soft);
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.date-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.date-cell strong {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 500;
}

.date-cell span {
  color: var(--muted);
  font-size: 9.5px;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-cell > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.user-cell strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
}

.user-cell span {
  color: var(--muted);
  font-size: 10px;
}

.row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.table-empty {
  padding: 20px 22px 32px;
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 22px;
  border-top: 1px solid #eef3f8;
}

.pagination-info {
  color: var(--muted);
  font-size: 10.5px;
}

.pagination-info strong {
  color: var(--text-soft);
  font-weight: 600;
}

.pagination-controls {
  display: flex;
  align-items: center;
  gap: 4px;
}

.page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 31px;
  height: 31px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: 7px;
  color: var(--text-soft);
  background: #fff;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.14s ease;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--bri-400);
  color: var(--bri-600);
  background: var(--bri-50);
}

.page-btn.active {
  border-color: var(--bri-600);
  color: #fff;
  background: var(--bri-600);
  box-shadow: 0 3px 8px rgba(11, 107, 203, 0.24);
}

.page-btn:disabled {
  opacity: 0.4;
}

.page-ellipsis {
  padding: 0 4px;
  color: var(--muted-light);
  font-size: 11px;
}

/* Period banner */
.period-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-bottom: 18px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: linear-gradient(120deg, var(--bri-50), #fff 65%);
  color: var(--muted);
  font-size: 11.5px;
  box-shadow: var(--shadow-xs);
}

.period-banner .icon {
  flex-shrink: 0;
}

.period-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--bri-600);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.period-meta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
}

.period-meta strong {
  color: var(--text-soft);
  font-weight: 600;
}

.period-meta-end {
  margin-left: auto;
}

.dashboard-period {
  min-width: 190px;
}

.dashboard-period select {
  height: 38px;
}

@media (max-width: 720px) {
  .period-meta-end {
    margin-left: 0;
  }

  .dashboard-period {
    width: 100%;
  }
}

/* Summary strip */
.summary-wrapper {
  margin-bottom: 18px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.summary-strip-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.summary-strip-6 {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.summary-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 5px;
  padding: 13px 17px;
  background: #fff;
}

.summary-label {
  width: 100%;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.summary-item strong {
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.summary-item small {
  color: var(--muted);
  font-size: 9.5px;
}

.summary-green strong { color: var(--green-600); }
.summary-orange strong { color: var(--orange-600); }
.summary-red strong { color: var(--red-600); }
.summary-blue strong { color: var(--bri-600); }

.summary-loading .summary-item {
  display: block;
}

.summary-loading .skeleton-text {
  width: 45%;
  margin-bottom: 8px;
}

.summary-loading .skeleton-value {
  width: 60%;
}

/* Filters */
.filter-card {
  margin-bottom: 18px;
  padding: 15px 16px;
}

.filter-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.filter-row-secondary {
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px dashed var(--border);
}

.search-field {
  position: relative;
  flex: 1 1 280px;
  min-width: 230px;
}

.search-field > .icon {
  position: absolute;
  top: 50%;
  left: 12px;
  color: var(--muted-light);
  transform: translateY(-50%);
  pointer-events: none;
}

.search-field input {
  width: 100%;
  height: 39px;
  padding: 0 13px 0 37px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: #fff;
  font-size: 11.5px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.search-field input:focus {
  border-color: var(--bri-400);
  box-shadow: 0 0 0 3px rgba(11, 107, 203, 0.1);
}

.search-field-sm {
  flex: 0 1 250px;
  min-width: 190px;
}

.search-field-sm input {
  height: 34px;
  font-size: 11px;
}

.filter-select {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 178px;
}

.filter-select > .icon {
  position: absolute;
  left: 11px;
  z-index: 1;
  color: var(--muted-light);
  pointer-events: none;
}

.filter-select select {
  width: 100%;
  height: 39px;
  padding: 0 30px 0 34px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--text-soft);
  font-size: 11px;
  outline: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #94a3b8 50%), linear-gradient(135deg, #94a3b8 50%, transparent 50%);
  background-position: calc(100% - 15px) 16px, calc(100% - 10px) 16px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.filter-select select:focus {
  border-color: var(--bri-400);
  box-shadow: 0 0 0 3px rgba(11, 107, 203, 0.1);
}

.filter-reset {
  height: 39px;
  font-size: 11px;
}

.filter-reset.has-filters {
  color: var(--red-600);
  background: var(--red-100);
}

.date-field {
  display: flex;
  align-items: center;
  gap: 8px;
}

.date-field label {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.date-field input {
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text-soft);
  font-size: 10.5px;
  outline: none;
}

.date-field input:focus {
  border-color: var(--bri-400);
  box-shadow: 0 0 0 3px rgba(11, 107, 203, 0.1);
}

.filter-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--muted);
  font-size: 10px;
}

.history-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-select {
  height: 34px;
  padding: 0 30px 0 10px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: #fff;
  color: var(--text-soft);
  font-size: 11px;
  outline: none;
}

/* --------------------------------------------------------------------------
   Empty / error states
   -------------------------------------------------------------------------- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 46px 24px;
  text-align: center;
}

.empty-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  margin-bottom: 14px;
  border: 1px solid var(--bri-100);
  border-radius: 18px;
  color: var(--bri-600);
  background: var(--bri-50);
}

.empty-state h3 {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.empty-state p {
  max-width: 470px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.empty-action {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
}

.empty-dashboard {
  padding: 10px 24px 26px;
}

.empty-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  max-width: 850px;
  margin: 0 auto;
  padding-top: 22px;
  border-top: 1px solid #eef3f8;
}

.empty-step {
  display: flex;
  gap: 10px;
}

.empty-step > span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  flex-shrink: 0;
  border-radius: 50%;
  color: var(--bri-700);
  background: var(--bri-100);
  font-size: 10px;
  font-weight: 800;
}

.empty-step strong {
  display: block;
  color: var(--text-soft);
  font-size: 11px;
}

.empty-step p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.error-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.error-card-inline {
  padding: 30px 20px;
}

.error-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 13px;
  border-radius: 16px;
  color: var(--red-600);
  background: var(--red-100);
}

.error-card h3 {
  font-size: 16px;
  font-weight: 700;
}

.error-card p {
  max-width: 480px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
}

.error-actions {
  margin-top: 18px;
}

.permission-card .error-icon {
  color: var(--orange-600);
  background: var(--orange-100);
}

.permission-code {
  color: var(--muted-light);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.permission-card h3 {
  margin-top: 5px;
}

/* --------------------------------------------------------------------------
   Callouts / hints / forms
   -------------------------------------------------------------------------- */
.callout {
  display: flex;
  gap: 11px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border: 1px solid #fde68a;
  border-radius: var(--radius-md);
  background: #fffbeb;
  color: #92400e;
}

.callout-info {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e4e8c;
}

.callout-compact {
  padding: 11px 13px;
  margin-bottom: 0;
}

.callout-icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.callout strong {
  display: block;
  margin-bottom: 3px;
  font-size: 11.5px;
}

.callout p,
.callout li {
  font-size: 10.5px;
  line-height: 1.55;
}

.callout ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.callout li::before {
  content: "•";
  margin-right: 6px;
  opacity: 0.6;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.field label {
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: #fff;
  color: var(--text);
  font-size: 12px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field select {
  padding-right: 32px;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #94a3b8 50%), linear-gradient(135deg, #94a3b8 50%, transparent 50%);
  background-position: calc(100% - 17px) 18px, calc(100% - 12px) 18px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--bri-400);
  box-shadow: 0 0 0 3px rgba(11, 107, 203, 0.1);
}

.field input:disabled,
.field select:disabled {
  color: var(--muted);
  background: #f1f5f9;
  cursor: not-allowed;
}

.field input::placeholder {
  color: var(--muted-light);
}

.field-hint {
  color: var(--muted);
  font-size: 9.5px;
}

.input-with-action {
  position: relative;
}

.input-with-action input {
  padding-right: 42px;
}

.input-action {
  position: absolute;
  top: 50%;
  right: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  color: var(--muted);
  background: transparent;
  transform: translateY(-50%);
}

.input-action:hover {
  color: var(--bri-600);
  background: var(--bri-50);
}

.input-with-icon {
  position: relative;
}

.input-with-icon > .icon {
  position: absolute;
  top: 50%;
  left: 12px;
  color: var(--muted-light);
  transform: translateY(-50%);
  pointer-events: none;
}

.input-with-icon input {
  padding-left: 38px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-soft);
  font-size: 11px;
  cursor: pointer;
}

.checkbox-label input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--bri-600);
}

.form-error {
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: var(--red-600);
  background: var(--red-100);
  font-size: 11px;
  line-height: 1.45;
}

.form-hint {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.form-hint .icon {
  margin-top: 1px;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   Toasts
   -------------------------------------------------------------------------- */
.toast-root {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 9px;
  width: min(370px, calc(100vw - 32px));
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 12px 12px 13px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--bri-500);
  border-radius: 11px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  pointer-events: auto;
  animation: toastIn 0.22s ease;
}

.toast-success { border-left-color: var(--green-500); }
.toast-error { border-left-color: var(--red-600); }
.toast-warning { border-left-color: var(--orange-500); }
.toast-info { border-left-color: var(--bri-500); }

.toast-icon {
  display: flex;
  margin-top: 1px;
  color: var(--bri-500);
}

.toast-success .toast-icon { color: var(--green-500); }
.toast-error .toast-icon { color: var(--red-600); }
.toast-warning .toast-icon { color: var(--orange-500); }

.toast-body {
  flex: 1;
  min-width: 0;
}

.toast-title {
  margin-bottom: 1px;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
}

.toast-message {
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.45;
}

.toast-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: var(--muted-light);
  background: transparent;
}

.toast-close:hover {
  color: var(--text);
  background: var(--surface-soft);
}

.toast-out {
  opacity: 0;
  transform: translateX(12px);
  transition: all 0.18s ease;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* --------------------------------------------------------------------------
   Modals
   -------------------------------------------------------------------------- */
body.modal-open {
  overflow: hidden;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  overflow-y: auto;
  background: rgba(7, 21, 42, 0.56);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.16s ease;
}

.modal {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-height: calc(100vh - 48px);
  background: #fff;
  border-radius: var(--radius-xl);
  box-shadow: 0 30px 80px rgba(0, 20, 45, 0.28);
  animation: modalIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.modal-sm { max-width: 450px; }
.modal-md { max-width: 640px; }
.modal-lg { max-width: 850px; }

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 15px;
  border-bottom: 1px solid var(--border);
}

.modal-title {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.modal-subtitle {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.modal-close {
  margin: -4px -5px 0 0;
}

.modal-body {
  padding: 20px 22px;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding: 14px 22px 18px;
  border-top: 1px solid var(--border);
  background: #fbfcfe;
}

.modal-out {
  opacity: 0;
  transition: opacity 0.15s ease;
}

.confirm-message {
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.6;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

.detail-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 16px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--border);
}

.detail-item {
  padding: 10px 12px;
  background: #fff;
}

.detail-item dt {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.detail-item dd {
  margin-top: 3px;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 500;
  word-break: break-word;
}

/* --------------------------------------------------------------------------
   Login
   -------------------------------------------------------------------------- */
.login-body {
  background: #eef3f9;
}

.login-page {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(430px, 0.95fr);
  min-height: 100vh;
}

.login-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  padding: 52px 58px 36px;
  overflow: hidden;
  color: #fff;
  background:
    radial-gradient(circle at 82% 9%, rgba(61, 143, 224, 0.38), transparent 34%),
    radial-gradient(circle at 10% 92%, rgba(243, 112, 33, 0.2), transparent 36%),
    linear-gradient(155deg, #00498f 0%, #00366f 46%, #001f45 100%);
}

.login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.24;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.09) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(circle at 30% 30%, #000, transparent 76%);
}

.login-brand::after {
  content: "";
  position: absolute;
  right: -130px;
  bottom: -180px;
  width: 480px;
  height: 480px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 50%;
  box-shadow: 0 0 0 60px rgba(255, 255, 255, 0.025), 0 0 0 120px rgba(255, 255, 255, 0.018);
  pointer-events: none;
}

.login-brand-top {
  position: relative;
  z-index: 1;
  max-width: 630px;
}

.login-logo-row {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 52px;
}

.login-logo-row img {
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
}

.login-brand-kicker {
  color: rgba(255, 255, 255, 0.52);
  font-size: 8.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.login-brand-name {
  margin-top: 2px;
  color: #fff;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.015em;
  line-height: 1.15;
}

.login-brand-unit {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.65);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
}

.login-headline {
  max-width: 580px;
  color: #fff;
  font-size: clamp(28px, 3.1vw, 42px);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.14;
}

.login-description {
  max-width: 540px;
  margin-top: 16px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 13px;
  line-height: 1.65;
}

.login-module-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  max-width: 580px;
  margin-top: 34px;
}

.login-module-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  backdrop-filter: blur(4px);
}

.login-module-card.active {
  border-color: rgba(74, 222, 128, 0.28);
  background: rgba(22, 163, 74, 0.1);
}

.login-module-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
  border-radius: 9px;
  color: #bfdbfe;
  background: rgba(255, 255, 255, 0.1);
}

.login-module-icon.orange {
  color: #fdba74;
  background: rgba(243, 112, 33, 0.14);
}

.login-module-copy {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  line-height: 1.3;
}

.login-module-copy strong {
  font-size: 11px;
  font-weight: 650;
}

.login-module-copy span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 8.5px;
}

.login-module-status {
  flex-shrink: 0;
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.login-module-status.green {
  color: #bbf7d0;
  background: rgba(22, 163, 74, 0.2);
}

.login-module-status.orange {
  color: #fdba74;
  background: rgba(243, 112, 33, 0.15);
}

.login-features {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  max-width: 600px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.login-features li {
  display: flex;
  align-items: center;
  gap: 7px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 9.5px;
}

.login-features .icon {
  color: #93c5fd;
}

.login-brand-footer {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  color: rgba(255, 255, 255, 0.34);
  font-size: 8.5px;
  letter-spacing: 0.04em;
}

.login-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  padding: 42px;
  background:
    radial-gradient(circle at 90% 10%, rgba(11, 107, 203, 0.07), transparent 34%),
    #f5f8fc;
}

.login-card {
  width: 100%;
  max-width: 408px;
  padding: 34px 32px 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  background: #fff;
  box-shadow: 0 20px 60px rgba(15, 45, 85, 0.09);
}

.login-card-head {
  margin-bottom: 24px;
  text-align: left;
}

.login-welcome-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  margin-bottom: 15px;
  border-radius: 13px;
  color: var(--bri-700);
  background: var(--bri-100);
}

.login-card-head h2 {
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.login-card-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11.5px;
}

.login-card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.login-card .field label {
  font-size: 11px;
}

.login-form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -2px;
}

.login-help {
  color: var(--muted);
  font-size: 9.5px;
}

.login-submit {
  height: 44px;
  margin-top: 5px;
  border-radius: 10px;
  font-size: 12.5px;
}

.login-security-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid #eef3f8;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.login-security-note .icon {
  margin-top: 1px;
  flex-shrink: 0;
  color: var(--muted-light);
}

.login-page-footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: var(--muted-light);
  font-size: 8.5px;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Upload page
   -------------------------------------------------------------------------- */
.upload-steps {
  display: flex;
  align-items: center;
  margin-bottom: 22px;
  padding: 16px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
  box-shadow: var(--shadow-xs);
}

.step-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.step-number {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 11px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.step-item > div {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.step-item strong {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.step-item span {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.step-item.active .step-number {
  border-color: var(--bri-600);
  color: #fff;
  background: var(--bri-600);
  box-shadow: 0 4px 10px rgba(11, 107, 203, 0.25);
}

.step-item.active strong {
  color: var(--bri-700);
}

.step-item.done .step-number {
  border-color: var(--green-500);
  color: #fff;
  background: var(--green-500);
}

.step-line {
  flex: 1;
  height: 1px;
  min-width: 30px;
  margin: 0 16px;
  background: var(--border);
}

.upload-card {
  padding: 26px;
}

.upload-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.85fr);
  gap: 28px;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 270px;
  padding: 30px;
  border: 2px dashed #c4d5e8;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 50% 0%, rgba(11, 107, 203, 0.055), transparent 55%),
    #fafcff;
  text-align: center;
  cursor: pointer;
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.dropzone:hover,
.dropzone:focus-visible,
.dropzone.dragover {
  border-color: var(--bri-500);
  background: var(--bri-50);
}

.dropzone.dragover {
  transform: scale(1.005);
  box-shadow: inset 0 0 0 4px rgba(11, 107, 203, 0.06);
}

.dropzone-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  height: 66px;
  margin-bottom: 15px;
  border: 1px solid var(--bri-100);
  border-radius: 18px;
  color: var(--bri-600);
  background: #fff;
  box-shadow: 0 8px 20px rgba(11, 107, 203, 0.1);
}

.dropzone h3 {
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
}

.dropzone p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11.5px;
}

.link-look {
  color: var(--bri-600);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.dropzone-meta {
  margin-top: 14px;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--muted-light);
  background: #fff;
  font-size: 9px;
}

.upload-actions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 15px;
}

.upload-supported {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 9.5px;
}

#upload-error {
  margin-top: 13px;
}

.upload-guide {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface-soft);
}

.upload-guide h3 {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
}

.upload-guide > p {
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}

.guide-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin-top: 14px;
  border-top: 1px solid var(--border);
}

.guide-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
}

.guide-key {
  flex: 0 0 88px;
  color: var(--text-soft);
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.45;
}

.guide-key.required::after {
  content: " *";
  color: var(--red-600);
}

.guide-row > span:last-child {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.45;
}

.guide-tip {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  padding: 10px 11px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  color: #1e4e8c;
  background: #eff6ff;
  font-size: 9.5px;
  line-height: 1.5;
}

.guide-tip .icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.upload-processing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 360px;
  text-align: center;
}

.upload-processing h3 {
  margin-top: 16px;
  font-size: 15px;
  font-weight: 700;
}

.upload-processing p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
}

.processing-hint {
  margin-top: 18px;
  color: var(--muted-light);
  font-size: 9.5px;
}

.file-summary-card {
  margin-bottom: 16px;
  padding: 16px 18px;
}

.file-summary {
  display: flex;
  align-items: center;
  gap: 12px;
}

.file-summary-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 10px;
  color: var(--bri-600);
  background: var(--bri-50);
}

.file-summary-copy {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
  gap: 2px;
}

.file-summary-copy strong {
  overflow: hidden;
  color: var(--text);
  font-size: 12.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-summary-copy span {
  color: var(--muted);
  font-size: 10px;
}

.preview-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--border);
}

.preview-stat {
  padding: 12px 14px;
  background: #fff;
}

.preview-stat span {
  display: block;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
}

.preview-stat strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.mapping-card {
  margin-bottom: 16px;
}

.mapping-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.mapping-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mapping-field label {
  color: var(--text-soft);
  font-size: 9.5px;
  font-weight: 650;
}

.required-mark {
  color: var(--red-600);
}

.mapping-field select {
  width: 100%;
  height: 35px;
  padding: 0 27px 0 9px;
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  background: #fff;
  color: var(--text-soft);
  font-size: 10.5px;
  outline: none;
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #94a3b8 50%), linear-gradient(135deg, #94a3b8 50%, transparent 50%);
  background-position: calc(100% - 14px) 15px, calc(100% - 9px) 15px;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.mapping-field.required select {
  border-color: #bfdbfe;
  background-color: #fafdff;
}

.mapping-field select:focus {
  border-color: var(--bri-400);
  box-shadow: 0 0 0 3px rgba(11, 107, 203, 0.08);
}

.mapping-desc {
  color: var(--muted-light);
  font-size: 8.5px;
  line-height: 1.35;
}

.preview-card {
  margin-bottom: 16px;
}

.preview-table {
  min-width: 820px;
}

.preview-table td {
  font-size: 10.5px;
}

.preview-table td strong {
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 600;
}

.import-options-card {
  margin-bottom: 10px;
}

.import-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.radio-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--border-strong);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.radio-card:hover {
  border-color: var(--bri-400);
}

.radio-card.selected {
  border-color: var(--bri-500);
  background: var(--bri-50);
  box-shadow: 0 0 0 2px rgba(11, 107, 203, 0.08);
}

.radio-card input {
  margin: 4px 0 0;
  accent-color: var(--bri-600);
}

.radio-card-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 8px;
}

.radio-card-icon.green {
  color: var(--green-600);
  background: var(--green-100);
}

.radio-card-icon.orange {
  color: var(--orange-600);
  background: var(--orange-100);
}

.radio-card-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.radio-card-copy strong {
  color: var(--text);
  font-size: 11.5px;
  font-weight: 650;
}

.radio-card-copy span {
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.5;
}

.import-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid #eef3f8;
}

.import-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.45;
}

.import-note .icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.import-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.result-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 44px 28px;
  text-align: center;
}

.result-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  margin-bottom: 18px;
  border: 1px solid #bbf7d0;
  border-radius: 50%;
  color: var(--green-600);
  background: var(--green-100);
  box-shadow: 0 0 0 8px rgba(22, 163, 74, 0.06);
}

.result-card h2 {
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.result-card > p {
  max-width: 560px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.result-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  max-width: 680px;
  margin-top: 24px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.result-stats > div {
  padding: 15px 10px;
  border-right: 1px solid var(--border);
  background: #fff;
}

.result-stats > div:last-child {
  border-right: 0;
}

.result-stats span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.result-stats strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.result-warning {
  width: 100%;
  max-width: 680px;
  margin-top: 20px;
  margin-bottom: 0;
  text-align: left;
}

.result-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 24px;
}

/* --------------------------------------------------------------------------
   QRIS coming soon
   -------------------------------------------------------------------------- */
.coming-soon-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 46px 28px 38px;
  margin-bottom: 18px;
  text-align: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 0%, rgba(11, 107, 203, 0.06), transparent 42%),
    #fff;
}

.coming-illustration {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 156px;
  height: 156px;
  margin-bottom: 18px;
}

.coming-ring {
  position: absolute;
  border: 1px dashed #cfe0f2;
  border-radius: 50%;
}

.ring-1 {
  inset: 8px;
  animation: slowSpin 28s linear infinite;
}

.ring-2 {
  inset: 25px;
  border-style: solid;
  border-color: #e6eef7;
}

.coming-icon {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 82px;
  height: 82px;
  border: 1px solid var(--bri-100);
  border-radius: 24px;
  color: var(--bri-600);
  background: linear-gradient(145deg, #fff, var(--bri-50));
  box-shadow: 0 16px 40px rgba(11, 107, 203, 0.12);
}

.coming-spark {
  position: absolute;
  color: var(--orange-500);
  opacity: 0.7;
}

.spark-1 { top: 12px; right: 6px; }
.spark-2 { bottom: 18px; left: 2px; color: var(--bri-400); }

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

.coming-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid #fed7aa;
  border-radius: 20px;
  color: var(--orange-600);
  background: var(--orange-100);
  font-size: 8.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.coming-soon-card h2 {
  max-width: 650px;
  margin-top: 14px;
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.25;
}

.coming-description {
  max-width: 640px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.coming-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  max-width: 660px;
  margin-top: 20px;
  padding: 11px 14px;
  border: 1px solid #dbeafe;
  border-radius: 9px;
  color: #1e4e8c;
  background: #eff6ff;
  font-size: 10px;
  line-height: 1.5;
  text-align: left;
}

.coming-note .icon {
  flex-shrink: 0;
  margin-top: 1px;
}

.coming-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin-top: 22px;
}

.coming-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.check-list {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--text-soft);
  font-size: 11.5px;
}

.check-list .icon {
  flex-shrink: 0;
  margin-top: 1px;
  color: var(--green-500);
}

.principle-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.principle-item {
  display: flex;
  gap: 11px;
}

.principle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 9px;
}

.principle-icon.blue { color: var(--bri-600); background: var(--bri-100); }
.principle-icon.orange { color: var(--orange-600); background: var(--orange-100); }
.principle-icon.green { color: var(--green-600); background: var(--green-100); }

.principle-item strong {
  display: block;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 650;
}

.principle-item p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

/* --------------------------------------------------------------------------
   Boot screen
   -------------------------------------------------------------------------- */
.boot-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 8px;
  background:
    radial-gradient(circle at 50% 30%, rgba(11, 107, 203, 0.08), transparent 40%),
    var(--bg);
}

.boot-screen img {
  margin-bottom: 8px;
  border-radius: 15px;
  box-shadow: 0 12px 30px rgba(0, 70, 140, 0.2);
}

.boot-title {
  color: var(--bri-800);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.boot-subtitle {
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 600;
  letter-spacing: 0.14em;
}

.boot-screen .spinner {
  margin-top: 18px;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1280px) {
  .stat-grid-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .stat-grid-6 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .page-content {
    padding: 26px 24px 38px;
  }

  .topbar {
    padding: 0 24px;
  }

  .topbar-clock {
    display: none;
  }

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

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

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

  .dashboard-grid .span-2 {
    grid-column: auto;
  }

  .donut-section {
    flex-direction: row;
    justify-content: center;
    align-items: center;
  }

  .donut-legend {
    max-width: 260px;
  }

  .upload-grid {
    grid-template-columns: 1fr;
  }

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

  .coming-grid {
    grid-template-columns: 1fr;
  }

  .login-page {
    grid-template-columns: minmax(0, 1fr) minmax(400px, 0.95fr);
  }

  .login-brand {
    padding: 42px 40px 30px;
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar-width: 0px;
  }

  .sidebar {
    width: 280px;
    transform: translateX(-101%);
    transition: transform 0.24s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    z-index: 55;
    display: block;
    background: rgba(5, 18, 38, 0.5);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }

  .app-shell.sidebar-open .sidebar-backdrop {
    opacity: 1;
    visibility: visible;
  }

  .app-main {
    margin-left: 0;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .topbar {
    padding: 0 18px;
    min-height: 68px;
  }

  .page-content {
    padding: 22px 18px 34px;
  }

  .app-footer {
    padding: 16px 18px 20px;
  }

  .topbar-date {
    display: none;
  }

  .login-page {
    grid-template-columns: 1fr;
  }

  .login-brand {
    padding: 30px 26px 26px;
  }

  .login-logo-row {
    margin-bottom: 24px;
  }

  .login-headline {
    font-size: 26px;
  }

  .login-description {
    font-size: 12px;
  }

  .login-features,
  .login-brand-footer {
    display: none;
  }

  .login-module-cards {
    margin-top: 20px;
  }

  .login-panel {
    padding: 28px 20px 36px;
  }

  .login-card {
    max-width: 460px;
  }

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

  /* Jumlah item ganjil: sel terakhir melebar agar tidak menyisakan blok kosong. */
  .summary-strip-5 > .summary-item:last-child:nth-child(odd) {
    grid-column: span 2;
  }

  .productivity-grid {
    grid-template-columns: 1fr;
  }

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

  .import-mode-grid {
    grid-template-columns: 1fr;
  }

  .import-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .import-buttons {
    width: 100%;
    justify-content: flex-end;
  }

  .empty-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .page-actions {
    width: 100%;
  }

  .page-header h1 {
    font-size: 22px;
  }

  .stat-grid,
  .stat-grid-3 {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 16px 17px;
  }

  .stat-value {
    font-size: 24px;
  }

  .donut-section {
    flex-direction: column;
  }

  .chart-legend {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .card {
    padding: 18px;
  }

  .table-card {
    padding: 0;
  }

  .table-card-head {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 18px 13px;
  }

  .history-toolbar {
    width: 100%;
  }

  .search-field-sm {
    flex: 1;
    min-width: 0;
  }

  .pagination {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
  }

  .pagination-controls {
    flex-wrap: wrap;
  }

  .filter-meta {
    width: 100%;
    margin-left: 0;
    margin-top: 4px;
  }

  .filter-select {
    flex: 1 1 150px;
    min-width: 0;
  }

  .filter-row-secondary {
    align-items: flex-end;
  }

  .date-field {
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .date-field input {
    width: 100%;
  }

  .topbar-actions {
    gap: 8px;
  }

  .user-chip-copy {
    display: none;
  }

  .user-chip {
    gap: 4px;
  }

  .app-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .upload-steps {
    padding: 13px 16px;
  }

  .step-item > div {
    display: none;
  }

  .step-line {
    margin: 0 10px;
  }

  .upload-card {
    padding: 18px;
  }

  .dropzone {
    min-height: 220px;
    padding: 24px 18px;
  }

  .upload-actions-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .mapping-grid {
    grid-template-columns: 1fr;
  }

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

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

  .result-stats > div:nth-child(2) {
    border-right: 0;
  }

  .result-stats > div:nth-child(-n+2) {
    border-bottom: 1px solid var(--border);
  }

  .coming-soon-card {
    padding: 34px 18px 28px;
  }

  .coming-soon-card h2 {
    font-size: 20px;
  }

  .login-module-cards {
    grid-template-columns: 1fr;
  }

  .login-brand {
    padding: 28px 20px;
  }

  .login-panel {
    padding: 24px 16px 30px;
  }

  .login-card {
    padding: 26px 22px 22px;
  }

  .login-form-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }
}

@media (max-width: 520px) {
  .summary-strip {
    grid-template-columns: 1fr;
  }

  .summary-strip-5 > .summary-item:last-child:nth-child(odd) {
    grid-column: span 1;
  }

  .topbar {
    min-height: 62px;
  }

  .breadcrumb {
    font-size: 8.5px;
  }

  .breadcrumb-current {
    font-size: 9.5px;
  }

  .page-content {
    padding: 18px 14px 30px;
  }

  .page-header h1 {
    font-size: 20px;
  }

  .page-header p {
    font-size: 11.5px;
  }

  .page-actions .button {
    flex: 1;
  }

  .login-headline {
    font-size: 23px;
  }

  .login-features {
    display: none;
  }

  .login-card-head h2 {
    font-size: 22px;
  }

  .modal-backdrop {
    padding: 12px;
  }

  .modal {
    max-height: calc(100vh - 24px);
  }

  .modal-body {
    padding: 16px;
  }

  .modal-header {
    padding: 16px;
  }

  .modal-footer {
    padding: 12px 16px 16px;
  }

  .import-buttons {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .import-buttons .button {
    width: 100%;
  }
}

/* --------------------------------------------------------------------------
   Perbandingan CASA bulanan (MoM)
   -------------------------------------------------------------------------- */
.text-muted {
  color: var(--muted-light) !important;
}

.stat-trend.down {
  color: var(--red-600);
  background: var(--red-100);
}

.period-chip-compare {
  background: var(--cyan-600, #0e7490);
}

.comparison-card {
  margin-bottom: 20px;
}

.comparison-table td,
.comparison-table th {
  vertical-align: middle;
}

.comparison-table .merchant-cell span {
  font-size: 9.5px;
}

.delta-pill {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--muted);
  background: var(--surface-soft);
  font-size: 10px;
  font-weight: 700;
}

.delta-pill.up {
  color: var(--green-600);
  background: var(--green-100);
}

.delta-pill.down {
  color: var(--red-600);
  background: var(--red-100);
}

.merchant-compare-section {
  margin-bottom: 20px;
}

.compare-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.compare-toolbar .search-field {
  flex: 1 1 260px;
}

.compare-toolbar .filter-select {
  min-width: 200px;
}

.compare-count {
  color: var(--muted);
  font-size: 10.5px;
}

.merchant-compare-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.merchant-compare-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: #fff;
}

.merchant-compare-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(120deg, var(--bri-50), #fff 70%);
}

.merchant-compare-title {
  min-width: 0;
  padding: 0;
  font: inherit;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
}

.merchant-compare-title:hover strong,
.merchant-compare-title:focus-visible strong {
  color: var(--bri-600);
  text-decoration: underline;
}

.merchant-compare-title:focus-visible {
  outline: 2px solid var(--bri-400);
  outline-offset: 2px;
  border-radius: 4px;
}

.merchant-compare-title strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merchant-compare-title span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merchant-compare-badges {
  flex-shrink: 0;
}

.merchant-compare-card .table-wrap {
  margin: 0;
  overflow-x: auto;
}

.compare-table {
  min-width: 100%;
  font-size: 10.5px;
}

.compare-table th {
  padding: 8px 12px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--surface-soft);
  white-space: nowrap;
}

.compare-table td {
  padding: 8px 12px;
  white-space: nowrap;
}

.compare-table tbody tr:first-child td {
  color: var(--muted);
}

.compare-table .compare-delta-row td {
  border-top: 1px dashed var(--border);
  background: var(--surface-soft);
  color: var(--text-soft);
  font-weight: 600;
}

.merchant-compare-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
  margin-top: auto;
  padding: 9px 15px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 9.5px;
}

.merchant-compare-foot span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.compare-pagination {
  margin-top: 14px;
}

/* Upload dua file */
.upload-mode-switch {
  display: inline-flex;
  gap: 4px;
  margin-bottom: 20px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
}

.upload-mode {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border: none;
  border-radius: 999px;
  color: var(--muted);
  background: transparent;
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.16s ease, color 0.16s ease;
}

.upload-mode:hover {
  color: var(--bri-600);
}

.upload-mode.active {
  color: #fff;
  background: var(--bri-600);
  box-shadow: 0 4px 10px rgba(11, 107, 203, 0.22);
}

.upload-slot-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.upload-slot {
  padding: 15px;
  border: 2px dashed #c4d5e8;
  border-radius: var(--radius-lg);
  background: #fafcff;
  outline: none;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.upload-slot:hover,
.upload-slot.dragover {
  border-color: var(--bri-500);
  background: var(--bri-50);
}

.upload-slot:has(.upload-slot-file) {
  cursor: default;
  border-style: solid;
  border-color: var(--border);
  background: #fff;
}

.upload-slot-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.upload-slot-title {
  display: flex;
  gap: 9px;
}

.upload-slot-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  color: var(--bri-600);
  background: var(--bri-100);
}

.upload-slot-cyan .upload-slot-icon {
  color: var(--cyan-600);
  background: var(--cyan-100);
}

.upload-slot-title strong {
  display: block;
  color: var(--text);
  font-size: 11.5px;
  font-weight: 700;
}

.upload-slot-title span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.45;
}

.upload-slot-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 120px;
  padding: 14px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: #fff;
  text-align: center;
  font-size: 10.5px;
}

.upload-slot-empty small {
  color: var(--muted-light);
  font-size: 9px;
}

.upload-slot-empty-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 3px;
  border-radius: 50%;
  color: var(--bri-600);
  background: var(--bri-100);
}

.upload-slot-file {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}

.upload-single-file {
  margin-top: 14px;
}

.upload-slot-file-copy {
  min-width: 0;
  flex: 1;
}

.upload-slot-file-copy strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upload-slot-file-copy span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.upload-slot-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--border);
}

.upload-slot-stats > div {
  padding: 8px 10px;
  background: #fff;
}

.upload-slot-stats span {
  display: block;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 600;
}

.upload-slot-stats strong {
  display: block;
  margin-top: 2px;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.upload-slot-warning {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 10px;
  padding: 8px 10px;
  border: 1px solid #fbdba4;
  border-radius: 8px;
  color: #8a5310;
  background: #fff8ec;
  font-size: 9.5px;
  line-height: 1.45;
}

.upload-slot-error {
  margin-top: 10px;
}

.upload-continue {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.upload-continue-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 9.5px;
}

.compare-file-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.compare-file-grid .file-summary-card {
  margin-bottom: 0;
}

.compare-file-grid .callout {
  margin-bottom: 0;
}

.file-summary-comparison .file-summary-icon {
  color: var(--cyan-600);
  background: var(--cyan-100);
}

.result-file-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
  text-align: left;
}

.result-file {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
}

.result-file-head {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 11px;
}

.result-file-head > div {
  min-width: 0;
  flex: 1;
}

.result-file-head strong {
  display: block;
  color: var(--text);
  font-size: 11.5px;
}

.result-file-head span {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.result-file .result-stats {
  margin: 0;
  border-radius: 9px;
}

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

.result-stats-4 > div:nth-child(2) {
  border-right: 1px solid var(--border);
}

.result-file-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 9px;
}

.result-file-stats strong {
  color: var(--text-soft);
  font-weight: 600;
}

.upload-processing-files {
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 10.5px;
}

@media (max-width: 1100px) {
  .merchant-compare-list,
  .upload-slot-grid,
  .compare-file-grid,
  .result-file-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .upload-mode-switch {
    display: flex;
    width: 100%;
  }

  .upload-mode {
    flex: 1;
    justify-content: center;
  }

  .upload-continue {
    flex-direction: column;
    align-items: stretch;
  }

  .upload-continue .button {
    width: 100%;
  }

  .compare-toolbar .filter-select {
    min-width: 0;
    width: 100%;
  }
}

/* Report: catatan perbandingan */
.summary-delta {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 9.5px !important;
  font-weight: 600;
}

.summary-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  padding-left: 2px;
  color: var(--muted);
  font-size: 10px;
}

.summary-note strong {
  color: var(--text-soft);
  font-weight: 600;
}

.detail-compare {
  margin-bottom: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}

.detail-compare-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-soft);
}

.detail-compare-head strong {
  color: var(--text-soft);
  font-size: 11px;
}

.detail-compare-table {
  font-size: 10.5px;
}

.detail-compare-note {
  display: block;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 9px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
