:root {
  --bg: #080b10;
  --panel: #101722;
  --panel-strong: #151f2d;
  --line: #253247;
  --text: #f3f7fb;
  --muted: #94a5ba;
  --primary: #2f8cff;
  --primary-dark: #0f62cc;
  --primary-soft: #132b49;
  --accent: #c7a86b;
  --success: #4bd2a2;
  --warning: #e2b65e;
  --danger: #ff7066;
  --sidebar: #080c13;
  --sidebar-soft: #111a27;
  --surface: #0d141e;
  --field: #0c121b;
  --field-strong: #111a26;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.42);
  --radius: 8px;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #111a25 0%, var(--bg) 310px),
    var(--bg);
  color: var(--text);
}

button,
input,
select,
textarea {
  font: inherit;
  max-width: 100%;
  min-width: 0;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    linear-gradient(90deg, rgba(47, 140, 255, 0.12) 1px, transparent 1px),
    linear-gradient(180deg, rgba(47, 140, 255, 0.08) 1px, transparent 1px),
    radial-gradient(circle at 50% 0%, rgba(47, 140, 255, 0.18), transparent 34%),
    linear-gradient(145deg, #070a0f 0%, #0d1520 58%, #070a0f 100%);
  background-size:
    56px 56px,
    56px 56px,
    auto,
    auto;
  overflow: hidden;
  position: relative;
}

.auth-shell::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: linear-gradient(115deg, transparent 38%, rgba(199, 168, 107, 0.12) 50%, transparent 62%);
  animation: loginSweep 8s linear infinite;
}

.auth-shell::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 32%;
  background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.5));
  pointer-events: none;
}

.auth-card {
  width: min(480px, 100%);
  background: rgba(16, 23, 34, 0.86);
  border: 1px solid rgba(143, 170, 202, 0.2);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(18px);
  animation: loginCardIn 0.62s ease both;
  z-index: 1;
}

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--primary), #87c6ff);
}

.auth-card::after {
  content: "";
  position: absolute;
  inset: 4px 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.46), transparent);
  animation: headerPulse 3.2s ease-in-out infinite;
}

.brand-mark,
.company-logo {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, #07101d, var(--primary-dark) 48%, var(--primary));
  color: #fff;
  font-weight: 800;
  letter-spacing: 0.02em;
  box-shadow:
    0 12px 28px rgba(47, 140, 255, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  animation: brandFloat 4s ease-in-out infinite;
}

.auth-card h1,
.topbar h2 {
  margin: 4px 0 10px;
  letter-spacing: 0;
}

.auth-copy,
.auth-note,
.muted,
.sidebar-brand span,
.eyebrow {
  color: var(--muted);
}

.eyebrow {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.auth-note {
  margin-top: 18px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(19, 43, 73, 0.52);
  font-size: 0.92rem;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 18px 0 14px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(8, 12, 19, 0.78);
}

.auth-tabs button {
  border: 0;
  border-radius: 6px;
  padding: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.auth-tabs button.active {
  background: linear-gradient(180deg, #17273a, #101b2a);
  color: #f7fbff;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.password-control {
  position: relative;
  display: block;
}

.password-control input {
  padding-right: 48px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  transform: translateY(-50%);
}

.password-toggle:hover,
.password-toggle[aria-pressed="true"] {
  background: var(--primary-soft);
  color: var(--primary);
}

.eye-icon {
  position: relative;
  display: block;
  width: 18px;
  height: 18px;
  border: 2px solid currentColor;
  border-radius: 75% 0;
  transform: rotate(45deg);
}

.eye-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.password-toggle[aria-pressed="true"] .eye-icon::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -4px;
  width: 24px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: translateY(-50%) rotate(90deg);
}

.caps-warning {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  margin-top: 2px;
  padding: 5px 8px;
  border: 1px solid rgba(226, 182, 94, 0.42);
  border-radius: 6px;
  background: rgba(226, 182, 94, 0.12);
  color: #f6d58b;
  font-size: 0.78rem;
  font-weight: 800;
}

.app-shell {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 18px;
  background:
    linear-gradient(180deg, #0b1018 0%, var(--sidebar) 64%, #05070b 100%);
  color: #fff;
  overflow-y: auto;
  border-right: 1px solid rgba(143, 170, 202, 0.12);
  box-shadow: 16px 0 40px rgba(0, 0, 0, 0.18);
}

.sidebar-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(143, 170, 202, 0.12);
}

.sidebar-brand span {
  display: block;
  margin-top: 3px;
  font-size: 0.85rem;
}

.company-logo.has-image {
  background-size: cover;
  background-position: center;
  color: transparent;
}

.nav-list {
  display: grid;
  gap: 6px;
  margin-top: 18px;
}

.nav-list button {
  width: 100%;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(234, 242, 252, 0.7);
  text-align: left;
  font-weight: 700;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.nav-list svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: rgba(135, 198, 255, 0.78);
}

.nav-list button:hover,
.nav-list button.active {
  background: rgba(47, 140, 255, 0.11);
  border-color: rgba(135, 198, 255, 0.18);
  color: #fff;
  transform: translateX(2px);
}

.nav-list button.active {
  box-shadow:
    inset 3px 0 0 var(--accent),
    0 10px 24px rgba(0, 0, 0, 0.14);
}

.nav-list button.active svg {
  color: #f2c878;
}

.mobile-bottom-nav,
.mobile-menu-panel {
  display: none;
}

.main-panel {
  min-width: 0;
  background:
    linear-gradient(180deg, rgba(47, 140, 255, 0.07), transparent 260px),
    var(--bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 24px;
  background: rgba(8, 12, 18, 0.82);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.topbar-meta .eyebrow {
  margin: 0;
}

.topbar-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.topbar-date::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 18px rgba(199, 168, 107, 0.42);
}

.topbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.view-root {
  padding: 24px;
}

.view-root > * {
  animation: contentIn 0.32s ease both;
}

.grid {
  display: grid;
  gap: 16px;
}

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

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

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

.card,
.table-card,
.form-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.card,
.table-card,
.form-card,
.status-column,
.mini-card {
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.card:hover,
.form-card:hover,
.status-column:hover {
  border-color: rgba(135, 198, 255, 0.22);
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  transform: translateY(-1px);
}

.card,
.form-card {
  padding: 20px;
  min-width: 0;
}

.settings-data-tools {
  margin-top: 16px;
}

.settings-data-tools .card {
  min-height: 100%;
}

.danger-zone-card {
  border-color: rgba(255, 112, 102, 0.24);
  background:
    linear-gradient(180deg, rgba(255, 112, 102, 0.05), transparent 48%),
    var(--panel);
}

.danger-zone-card .muted strong {
  color: var(--danger);
  font-weight: 800;
}

.user-access-card {
  background:
    linear-gradient(180deg, rgba(47, 140, 255, 0.07), transparent 48%),
    var(--panel);
}

.user-access-card .split-line strong {
  text-align: right;
}

.metric {
  display: grid;
  gap: 8px;
  border-top: 3px solid var(--accent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 52%),
    var(--panel);
}

.metric strong {
  font-size: 1.78rem;
  letter-spacing: 0;
}

.metric small {
  color: var(--muted);
}

.report-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(88px, 116px));
  gap: 8px;
  width: max-content;
  max-width: 100%;
  margin-bottom: 16px;
  overflow: visible;
}

.report-filter-btn {
  display: grid;
  gap: 3px;
  min-height: 58px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    var(--panel);
  color: var(--text);
  text-align: left;
}

.report-filter-btn strong {
  font-size: 0.9rem;
}

.report-filter-btn span {
  color: var(--muted);
  font-size: 0.74rem;
}

.report-filter-btn.active {
  border-color: rgba(199, 168, 107, 0.55);
  background:
    linear-gradient(180deg, rgba(199, 168, 107, 0.15), transparent),
    #101722;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

.report-custom-range {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.report-metrics {
  margin-top: 16px;
}

.report-stock-head,
.report-stock-metrics {
  margin-top: 16px;
}

.report-chart-card {
  margin-top: 16px;
  overflow: visible;
}

.report-chart-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.report-chart-head h3 {
  margin: 0 0 4px;
}

.report-chart-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.report-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 9px;
  border: 1px solid rgba(143, 170, 202, 0.14);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.82rem;
  font-weight: 800;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #56aef5;
}

.legend-dot.revenue {
  background: #169285;
}

.legend-dot.cost {
  background: #d9993a;
}

.legend-dot.profit {
  background: #56aef5;
}

.report-margin-badge {
  min-width: 150px;
  padding: 12px;
  border: 1px solid rgba(75, 210, 162, 0.24);
  border-radius: var(--radius);
  background: rgba(75, 210, 162, 0.08);
  text-align: right;
}

.report-margin-badge.danger {
  border-color: rgba(255, 112, 102, 0.3);
  background: rgba(255, 112, 102, 0.08);
}

.report-margin-badge span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.report-margin-badge strong {
  display: block;
  margin-top: 3px;
  font-size: 1.65rem;
  color: var(--success);
}

.report-margin-badge.danger strong {
  color: var(--danger);
}

.report-chart-body {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
  align-items: end;
  min-height: 320px;
  padding: 28px 6px 4px;
  overflow: visible;
}

.report-bar-item {
  display: grid;
  gap: 8px;
  min-width: 0;
  text-align: center;
}

.report-bar-track {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  height: 240px;
  padding: 0 18px 12px;
  border: 1px solid rgba(143, 170, 202, 0.13);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    #0b121c;
  overflow: visible;
}

.report-bar-fill {
  width: min(94px, 72%);
  height: var(--bar-height);
  min-height: 10px;
  border-radius: 8px 8px 2px 2px;
  background: linear-gradient(180deg, #1fb6a6, #169285);
  box-shadow: 0 14px 30px rgba(22, 146, 133, 0.2);
}

.report-bar-item.cost .report-bar-fill {
  background: linear-gradient(180deg, #e9ba64, #d9993a);
  box-shadow: 0 14px 30px rgba(217, 153, 58, 0.18);
}

.report-bar-item.profit .report-bar-fill {
  background: linear-gradient(180deg, #7be0b7, #37b981);
  box-shadow: 0 14px 30px rgba(75, 210, 162, 0.18);
}

.report-bar-item.loss .report-bar-fill {
  background: linear-gradient(180deg, #ff8f86, #dc4e46);
  box-shadow: 0 14px 30px rgba(255, 112, 102, 0.2);
}

.report-bar-item > strong {
  font-size: 0.92rem;
}

.report-bar-item > span {
  color: var(--muted);
  font-size: 0.9rem;
}

.report-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(var(--bar-height) + 24px);
  z-index: 5;
  width: max-content;
  max-width: min(260px, 82vw);
  padding: 8px 10px;
  border: 1px solid rgba(143, 170, 202, 0.2);
  border-radius: 8px;
  background: #060a10;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(6px);
  transition: 0.16s ease;
}

.report-bar-track:hover .report-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.report-bar-item.edge-left .report-tooltip {
  left: 0;
  transform: translateX(0) translateY(6px);
}

.report-bar-item.edge-left .report-bar-track:hover .report-tooltip {
  transform: translateX(0) translateY(0);
}

.report-bar-item.edge-right .report-tooltip {
  right: 0;
  left: auto;
  transform: translateX(0) translateY(6px);
}

.report-bar-item.edge-right .report-bar-track:hover .report-tooltip {
  transform: translateX(0) translateY(0);
}

.timeline-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 2px 0;
}

.timeline-plot {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--timeline-count), minmax(62px, 1fr));
  gap: 8px;
  min-width: max(100%, calc(var(--timeline-count) * 68px));
  min-height: 280px;
  padding: 2px 0 0;
  border-bottom: 1px solid rgba(143, 170, 202, 0.18);
  background:
    linear-gradient(to bottom, transparent 0 21%, rgba(143, 170, 202, 0.055) 21% calc(21% + 1px), transparent calc(21% + 1px) 100%),
    linear-gradient(to bottom, transparent 0 44%, rgba(143, 170, 202, 0.055) 44% calc(44% + 1px), transparent calc(44% + 1px) 100%),
    linear-gradient(to bottom, transparent 0 68%, rgba(143, 170, 202, 0.055) 68% calc(68% + 1px), transparent calc(68% + 1px) 100%);
}

.timeline-bucket {
  position: relative;
  display: grid;
  grid-template-rows: 32px 210px auto;
  gap: 6px;
  align-items: end;
  min-width: 0;
  text-align: center;
}

.timeline-top-marker {
  display: grid;
  place-items: center;
  min-height: 28px;
}

.timeline-dash {
  display: block;
  width: 34px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.timeline-margin-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(86, 174, 245, 0.2);
  color: #9fd1ff;
  font-size: 0.76rem;
  font-weight: 900;
}

.timeline-bar-group {
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 5px;
  height: 210px;
  overflow: visible;
}

.timeline-bar-wrap {
  position: relative;
  display: flex;
  align-items: flex-end;
  height: 210px;
  width: 13px;
  overflow: visible;
}

.timeline-bar {
  width: 100%;
  height: var(--bar-height);
  min-height: 4px;
  border-radius: 7px 7px 1px 1px;
  background: rgba(255, 255, 255, 0.12);
}

.timeline-bar.revenue {
  background: linear-gradient(180deg, #1fb6a6, #169285);
  box-shadow: 0 12px 24px rgba(22, 146, 133, 0.22);
}

.timeline-bar.cost {
  background: linear-gradient(180deg, #e9ba64, #d9993a);
  box-shadow: 0 12px 24px rgba(217, 153, 58, 0.18);
}

.timeline-bar.profit {
  background: linear-gradient(180deg, #63c3ff, #2f8cff);
  box-shadow: 0 12px 24px rgba(47, 140, 255, 0.2);
}

.timeline-bar.loss {
  background: linear-gradient(180deg, #ff8f86, #dc4e46);
  box-shadow: 0 12px 24px rgba(255, 112, 102, 0.2);
}

.timeline-bucket > strong {
  color: var(--muted);
  font-size: 0.8rem;
}

.timeline-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(var(--bar-height) + 12px);
  z-index: 6;
  width: max-content;
  max-width: 230px;
  padding: 8px 9px;
  border: 1px solid rgba(143, 170, 202, 0.2);
  border-radius: 8px;
  background: #05090f;
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.35;
  font-weight: 800;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(6px);
  transition: 0.16s ease;
}

.timeline-bar-wrap:hover .timeline-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.timeline-bar-wrap.edge-left .timeline-tooltip {
  left: 0;
  transform: translateX(0) translateY(6px);
}

.timeline-bar-wrap.edge-left:hover .timeline-tooltip {
  transform: translateX(0) translateY(0);
}

.timeline-bar-wrap.edge-right .timeline-tooltip {
  right: 0;
  left: auto;
  transform: translateX(0) translateY(6px);
}

.timeline-bar-wrap.edge-right:hover .timeline-tooltip {
  transform: translateX(0) translateY(0);
}

.report-insight-grid {
  margin-top: 16px;
  align-items: start;
}

.report-insight-card {
  min-height: 100%;
}

.report-insight-card .section-head {
  align-items: flex-start;
}

.report-insight-card h3 {
  white-space: normal;
}

.report-ranking-list {
  display: grid;
  gap: 10px;
}

.report-ranking-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(143, 170, 202, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
    #0b121c;
}

.report-ranking-row strong {
  display: block;
}

.report-ranking-row .muted {
  display: block;
  margin-top: 3px;
  font-size: 0.84rem;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 14px;
}

.section-head h3 {
  margin: 0;
}

.button-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.primary-btn,
.ghost-btn,
.danger-btn,
.success-btn {
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 11px 14px;
  font-weight: 700;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.primary-btn {
  background: linear-gradient(180deg, #3a9aff, var(--primary-dark));
  color: #fff;
  box-shadow:
    0 12px 28px rgba(47, 140, 255, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.primary-btn:hover {
  background: linear-gradient(180deg, #65adff, #105fc1);
  transform: translateY(-1px);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-color: var(--line);
}

.ghost-btn:hover {
  background: rgba(47, 140, 255, 0.12);
  border-color: rgba(135, 198, 255, 0.24);
  transform: translateY(-1px);
}

.danger-btn {
  background: rgba(255, 112, 102, 0.1);
  color: var(--danger);
  border-color: rgba(255, 112, 102, 0.25);
}

.success-btn {
  background: rgba(75, 210, 162, 0.1);
  color: var(--success);
  border-color: rgba(75, 210, 162, 0.25);
}

.compact {
  padding: 8px 11px;
  font-size: 0.92rem;
}

.form-grid {
  display: grid;
  gap: 12px;
}

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

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

label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-weight: 700;
  font-size: 0.9rem;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 11px 12px;
  color: var(--text);
  background: var(--field);
  outline: 0;
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

textarea {
  min-height: 92px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  background: var(--field-strong);
  box-shadow: 0 0 0 3px rgba(47, 140, 255, 0.16);
}

input::placeholder,
textarea::placeholder {
  color: #68788d;
}

input[disabled][data-product-profit-preview] {
  opacity: 1;
  color: var(--success);
  font-weight: 900;
  background: rgba(55, 214, 142, 0.08);
  border-color: rgba(55, 214, 142, 0.34);
}

.table-card {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: #0c131d;
  white-space: nowrap;
}

tbody tr:hover {
  background: rgba(47, 140, 255, 0.05);
}

tr:last-child td {
  border-bottom: 0;
}

.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.8rem;
  font-weight: 800;
  background: var(--primary-soft);
  color: #9fcbff;
  border: 1px solid rgba(47, 140, 255, 0.2);
}

.tag.success {
  background: rgba(75, 210, 162, 0.1);
  color: var(--success);
  border-color: rgba(75, 210, 162, 0.2);
}

.tag.warning {
  background: rgba(226, 182, 94, 0.12);
  color: var(--warning);
  border-color: rgba(226, 182, 94, 0.2);
}

.tag.danger {
  background: rgba(255, 112, 102, 0.1);
  color: var(--danger);
  border-color: rgba(255, 112, 102, 0.2);
}

.empty-state {
  padding: 30px;
  text-align: center;
  color: var(--muted);
}

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
}

.modal-card {
  width: min(780px, 100%);
  max-height: 92vh;
  overflow: auto;
  background: var(--panel);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 20px;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

.modal-head h3 {
  margin: 0;
}

.sale-success-modal {
  width: min(460px, 100%);
  text-align: center;
  padding: 30px;
  background:
    linear-gradient(145deg, rgba(75, 210, 162, 0.1), transparent 38%),
    var(--panel);
}

.sale-success-check {
  position: relative;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  margin: 0 auto 18px;
  border-radius: 999px;
  background: linear-gradient(180deg, #4bd2a2, #18a779);
  box-shadow:
    0 18px 42px rgba(75, 210, 162, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.sale-success-check::before {
  content: "";
  width: 20px;
  height: 38px;
  border-right: 6px solid #fff;
  border-bottom: 6px solid #fff;
  transform: translateY(-4px) rotate(45deg);
}

.sale-success-modal h2 {
  margin: 0 0 8px;
  letter-spacing: 0.04em;
}

.sale-success-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 20px;
}

.sale-info-modal {
  width: min(1180px, 100%);
}

.sale-info-metrics,
.sale-info-sections,
.sale-info-items,
.sale-info-observations {
  margin-top: 16px;
}

.sale-info-table table {
  min-width: 960px;
}

.sale-info-table td:first-child,
.sale-info-table th:first-child,
.sale-info-table td:nth-child(3),
.sale-info-table th:nth-child(3),
.sale-info-table td:nth-child(4),
.sale-info-table th:nth-child(4) {
  text-align: center;
  width: 64px;
}

.sale-info-table td:nth-child(5),
.sale-info-table th:nth-child(5),
.sale-info-table td:nth-child(6),
.sale-info-table th:nth-child(6) {
  text-align: right;
  white-space: nowrap;
}

.sale-info-note {
  padding: 12px;
  border: 1px solid rgba(143, 170, 202, 0.14);
  border-radius: var(--radius);
  background: #0b121c;
}

.sale-info-note + .sale-info-note {
  margin-top: 10px;
}

.sale-info-note p {
  margin: 6px 0 0;
  color: var(--muted);
}

.sale-info-actions {
  justify-content: flex-end;
  margin-top: 16px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  max-width: 360px;
  padding: 13px 15px;
  border-radius: var(--radius);
  border: 1px solid rgba(143, 170, 202, 0.16);
  background: #111b28;
  color: #fff;
  box-shadow: var(--shadow);
  transform: translateY(20px);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  border-color: rgba(75, 210, 162, 0.42);
  background:
    linear-gradient(180deg, rgba(75, 210, 162, 0.18), transparent),
    #10221b;
  color: #dffcef;
}

.toast.danger {
  border-color: rgba(255, 112, 102, 0.46);
  background:
    linear-gradient(180deg, rgba(255, 112, 102, 0.18), transparent),
    #261414;
  color: #ffe6e3;
}

.split-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.split-line > * {
  min-width: 0;
  overflow-wrap: anywhere;
}

.split-line:last-child {
  border-bottom: 0;
}

.total-line {
  font-size: 1.2rem;
  font-weight: 800;
}

.status-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.status-column {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
}

.status-column h4 {
  margin: 0 0 10px;
}

.mini-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px;
  margin-bottom: 8px;
  background: #0d141e;
}

.mini-card strong {
  display: block;
  margin-bottom: 4px;
}

.customer-search-card {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.product-stock-summary {
  margin: 16px 0;
}

.product-search-card {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.operational-cost-metrics {
  margin-bottom: 16px;
}

.operational-category-card {
  margin-bottom: 16px;
}

.operational-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.operational-cost-table {
  margin-top: 16px;
}

.customer-birthday-panel {
  margin-top: 16px;
}

.birthday-list,
.ranking-list {
  display: grid;
  gap: 10px;
}

.birthday-item,
.ranking-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(143, 170, 202, 0.14);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent),
    #0d141e;
}

.birthday-item strong,
.ranking-item strong {
  display: block;
}

.birthday-item .muted,
.ranking-item .muted {
  display: block;
  margin-top: 3px;
  font-size: 0.88rem;
}

.customer-insights {
  margin-top: 16px;
  align-items: start;
}

.customer-total-metric {
  align-self: start;
  justify-items: center;
  text-align: center;
}

.sales-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(340px, 0.8fr);
  gap: 16px;
  align-items: start;
}

.sales-pdv-panel {
  display: grid;
  gap: 12px;
}

.sale-customer-field {
  display: grid;
  gap: 6px;
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
}

.sale-mini-btn {
  padding: 6px 9px;
  font-size: 0.78rem;
  white-space: nowrap;
}

.sale-customer-selected,
.sale-customer-option {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid rgba(143, 170, 202, 0.16);
  border-radius: var(--radius);
  background: #0b121c;
}

.sale-customer-selected {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  border-color: rgba(75, 210, 162, 0.28);
  background:
    linear-gradient(180deg, rgba(75, 210, 162, 0.09), transparent),
    #0b121c;
}

.sale-customer-selected span,
.sale-customer-option span {
  color: var(--muted);
  font-size: 0.86rem;
}

.sale-customer-results {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  padding-right: 4px;
}

.sale-customer-option {
  width: 100%;
  color: var(--text);
  text-align: left;
}

.sale-customer-option:hover {
  border-color: rgba(199, 168, 107, 0.42);
  background:
    linear-gradient(180deg, rgba(199, 168, 107, 0.1), transparent),
    #0d141e;
}

.sale-customer-empty {
  margin: 0;
}

.sale-controls {
  margin-top: 2px;
}

.gift-toggle {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  grid-template-columns: auto 1fr;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(199, 168, 107, 0.3);
  border-radius: var(--radius);
  background: rgba(199, 168, 107, 0.08);
}

.gift-toggle input {
  width: auto;
}

.sale-notice {
  padding: 11px 12px;
  border: 1px solid rgba(226, 182, 94, 0.28);
  border-radius: var(--radius);
  background: rgba(226, 182, 94, 0.1);
  color: #f2d08c;
  font-weight: 800;
}

.sale-notice.success {
  border-color: rgba(75, 210, 162, 0.3);
  background: rgba(75, 210, 162, 0.1);
  color: var(--success);
}

.sale-notice.danger {
  border-color: rgba(255, 112, 102, 0.34);
  background: rgba(255, 112, 102, 0.1);
  color: var(--danger);
}

.sale-results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.sale-results-hint {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px dashed rgba(143, 170, 202, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.sale-comments textarea {
  min-height: 76px;
}

.sale-item-card {
  display: grid;
  gap: 7px;
  min-height: 150px;
  padding: 13px;
  border: 1px solid rgba(143, 170, 202, 0.15);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    #0b121c;
  color: var(--text);
  text-align: left;
}

.sale-item-card:hover {
  border-color: rgba(135, 198, 255, 0.28);
  transform: translateY(-1px);
}

.sale-item-card.stock-empty {
  border-color: rgba(255, 112, 102, 0.24);
  opacity: 0.74;
}

.sale-item-price {
  align-self: end;
  color: #f2c878;
  font-size: 1.12rem;
  font-weight: 900;
}

.sale-cart-panel {
  position: sticky;
  top: 92px;
}

.sale-cart-list {
  display: grid;
  gap: 10px;
  max-height: 360px;
  overflow: auto;
  padding-right: 4px;
}

.sale-cart-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(143, 170, 202, 0.14);
  border-radius: var(--radius);
  background: #0b121c;
}

.sale-cart-line.gift-line {
  border-color: rgba(199, 168, 107, 0.28);
  background:
    linear-gradient(180deg, rgba(199, 168, 107, 0.08), transparent),
    #0b121c;
}

.sale-cart-line-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.sale-summary {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.sales-history-search {
  margin-top: 16px;
}

.sale-discount-row {
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.sale-discount-field {
  flex: 0 0 132px;
}

.sale-discount-field input {
  padding: 9px 10px;
}

.finish-sale-btn {
  width: 100%;
  margin-top: 14px;
}

.charges-panel {
  margin-top: 16px;
}

.purchase-panels,
.supplier-history-sections {
  margin-top: 16px;
}

.purchase-entry-modal,
.supplier-history-modal {
  width: min(1080px, 100%);
}

.purchase-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  grid-column: 1 / -1;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  grid-template-columns: auto 1fr;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(143, 170, 202, 0.16);
  border-radius: var(--radius);
  background: #0b121c;
}

.inline-check input {
  width: auto;
}

.purchase-lines-panel {
  grid-column: 1 / -1;
  padding: 14px;
  border: 1px solid rgba(143, 170, 202, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.purchase-lines {
  display: grid;
  gap: 10px;
}

.purchase-line {
  display: grid;
  grid-template-columns: minmax(220px, 1.3fr) minmax(90px, 0.6fr) minmax(120px, 0.7fr) minmax(120px, 0.7fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(143, 170, 202, 0.14);
  border-radius: var(--radius);
  background: #0b121c;
}

.purchase-product-picker {
  display: grid;
  gap: 8px;
}

.purchase-product-results {
  grid-template-columns: 1fr;
  max-height: 180px;
  padding-right: 0;
}

.purchase-selected-product {
  padding: 10px;
}

.purchase-total {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.purchase-total strong {
  color: #f2c878;
  font-size: 1.18rem;
}

.stock-movement-list {
  display: grid;
  gap: 10px;
  max-height: 560px;
  overflow: auto;
  padding-right: 4px;
}

.stock-movement-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(143, 170, 202, 0.14);
  border-radius: var(--radius);
  background: #0b121c;
}

.stock-movement-item .muted {
  display: block;
  margin-top: 3px;
  font-size: 0.86rem;
}

.ranking-item {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.rank-badge {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(199, 168, 107, 0.14);
  color: #f2c878;
  border: 1px solid rgba(199, 168, 107, 0.28);
  font-weight: 900;
  font-size: 0.82rem;
}

.modal-birthday-list {
  max-height: 62vh;
  overflow: auto;
  padding-right: 4px;
}

.customer-profile-modal {
  width: min(1120px, 100%);
  background:
    linear-gradient(145deg, rgba(47, 140, 255, 0.08), transparent 34%),
    var(--panel);
}

.profile-metrics {
  grid-template-columns: repeat(3, minmax(145px, 1fr));
}

.customer-profile-modal .metric strong {
  font-size: clamp(1.2rem, 2vw, 1.58rem);
  overflow-wrap: anywhere;
}

.profile-sections,
.profile-history {
  margin-top: 16px;
}

.customer-profile-modal .split-line {
  align-items: flex-start;
}

.customer-profile-modal .split-line strong {
  text-align: right;
  overflow-wrap: anywhere;
}

.receivable-list {
  display: grid;
  gap: 10px;
}

.receivable-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid rgba(143, 170, 202, 0.15);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    #0b121c;
}

.receivable-item strong {
  display: block;
}

.receivable-item .muted {
  display: block;
  margin-top: 4px;
  font-size: 0.88rem;
}

.receivable-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
}

.embedded-table {
  max-height: 340px;
}

.embedded-table table {
  min-width: 560px;
}

.charge-modal {
  width: min(980px, 100%);
}

.receive-charge-modal {
  width: min(920px, 100%);
}

.receive-installments-card {
  margin-top: 16px;
}

.customer-pick-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-height: 210px;
  overflow: auto;
  padding-right: 4px;
}

.customer-pick-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(143, 170, 202, 0.15);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    #0b121c;
  color: var(--text);
  text-align: left;
}

.customer-pick-card span {
  color: var(--muted);
  font-size: 0.86rem;
}

.charge-selected-customer {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(75, 210, 162, 0.32);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(75, 210, 162, 0.1), transparent),
    #0b121c;
}

.charge-selected-customer span {
  color: var(--muted);
  font-size: 0.9rem;
}

.customer-pick-card:hover,
.customer-pick-card.selected {
  border-color: rgba(199, 168, 107, 0.52);
  background:
    linear-gradient(180deg, rgba(199, 168, 107, 0.12), transparent),
    #0d141e;
}

.installments-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-top: 4px;
}

.installments-head h4 {
  margin: 0 0 3px;
}

.installments-editor {
  display: grid;
  gap: 10px;
}

.installment-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(130px, 1fr) minmax(150px, 1fr);
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(143, 170, 202, 0.15);
  border-radius: var(--radius);
  background: #0b121c;
}

.installment-row strong {
  align-self: center;
}

.print-area {
  display: none;
}

@media print {
  body * {
    visibility: hidden;
  }

  .print-area,
  .print-area * {
    visibility: visible;
  }

  .print-area {
    display: block;
    position: absolute;
    inset: 0;
    padding: 24px;
  }
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
    padding-bottom: 86px;
  }

  .sidebar {
    display: none;
  }

  .topbar {
    position: sticky;
    align-items: flex-start;
    flex-direction: column;
    background: #0b1018;
  }

  .mobile-bottom-nav {
    position: fixed;
    right: 12px;
    bottom: 12px;
    left: 12px;
    z-index: 18;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 4px;
    padding: 8px;
    border: 1px solid rgba(143, 170, 202, 0.18);
    border-radius: 12px;
    background: rgba(8, 12, 18, 0.94);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.42);
    backdrop-filter: blur(16px);
  }

  .mobile-bottom-nav button,
  .mobile-menu-grid button {
    display: grid;
    place-items: center;
    gap: 4px;
    min-width: 0;
    border: 1px solid transparent;
    border-radius: var(--radius);
    background: transparent;
    color: var(--muted);
    font-size: 0.7rem;
    font-weight: 800;
  }

  .mobile-bottom-nav button {
    min-height: 54px;
    padding: 7px 4px;
  }

  .mobile-bottom-nav svg,
  .mobile-menu-grid svg {
    width: 18px;
    height: 18px;
    color: rgba(135, 198, 255, 0.85);
  }

  .mobile-bottom-nav button.active,
  .mobile-menu-grid button.active {
    border-color: rgba(199, 168, 107, 0.32);
    background: rgba(199, 168, 107, 0.1);
    color: #fff;
  }

  .mobile-bottom-nav button.active svg,
  .mobile-menu-grid button.active svg {
    color: #f2c878;
  }

  .mobile-menu-panel {
    position: fixed;
    inset: 0;
    z-index: 17;
    display: grid;
    align-items: end;
    padding: 16px 12px 92px;
    background: rgba(0, 0, 0, 0.42);
  }

  .mobile-menu-card {
    max-height: min(72vh, 560px);
    overflow: auto;
    padding: 16px;
    border: 1px solid rgba(143, 170, 202, 0.18);
    border-radius: 12px;
    background: rgba(16, 23, 34, 0.98);
    box-shadow: var(--shadow);
  }

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

  .mobile-menu-grid button {
    min-height: 70px;
    padding: 10px 6px;
    background: rgba(255, 255, 255, 0.035);
    text-align: center;
  }

  .sales-workspace {
    grid-template-columns: 1fr;
  }

  .purchase-line {
    grid-template-columns: 1fr 1fr;
  }

  .report-filter-grid,
  .report-custom-range {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-chart-legend {
    justify-content: flex-start;
  }

  .report-chart-head {
    flex-direction: column;
  }

  .sale-cart-panel {
    position: static;
  }

  .grid.cols-2,
  .grid.cols-3,
  .grid.cols-4,
  .form-grid.two,
  .form-grid.three {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 560px) {
  .view-root,
  .topbar,
  .auth-card {
    padding: 16px;
  }

  .modal-root {
    align-items: start;
    overflow: auto;
    padding: 12px;
  }

  .modal-card {
    width: 100%;
    max-height: calc(100dvh - 24px);
    padding: 16px;
  }

  .toast {
    right: 16px;
    left: 16px;
    max-width: none;
  }

  .section-head,
  .modal-head,
  .label-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .gift-toggle,
  .inline-check {
    width: 100%;
  }

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

  .topbar-actions,
  .button-row {
    width: 100%;
  }

  .topbar-actions button,
  .button-row button {
    flex: 1 1 auto;
  }

  .birthday-item,
  .ranking-item,
  .receivable-item,
  .sale-cart-line,
  .customer-pick-list,
  .installment-row,
  .purchase-line,
  .stock-movement-item,
  .report-filter-grid,
  .report-custom-range,
  .report-chart-body,
  .report-ranking-row,
  .sale-success-actions {
    grid-template-columns: 1fr;
  }

  .report-margin-badge {
    width: 100%;
    text-align: left;
  }

  .report-filter-grid,
  .report-custom-range {
    width: 100%;
  }

  .timeline-plot {
    min-width: max(100%, calc(var(--timeline-count) * 58px));
  }

  .report-tooltip,
  .report-bar-item.edge-left .report-tooltip,
  .report-bar-item.edge-right .report-tooltip {
    left: 50%;
    right: auto;
    transform: translateX(-50%) translateY(6px);
  }

  .report-bar-track:hover .report-tooltip,
  .report-bar-item.edge-left .report-bar-track:hover .report-tooltip,
  .report-bar-item.edge-right .report-bar-track:hover .report-tooltip {
    transform: translateX(-50%) translateY(0);
  }

  .sale-cart-line-actions {
    justify-content: flex-start;
  }

  .installments-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .profile-metrics {
    grid-template-columns: 1fr;
  }

  .receivable-actions {
    justify-content: flex-start;
  }

  .auth-card {
    padding: 24px;
  }

  .brand-mark {
    width: 44px;
    height: 44px;
  }
}

@keyframes loginCardIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes loginSweep {
  from {
    transform: translateX(-18%) rotate(0deg);
  }

  to {
    transform: translateX(18%) rotate(0deg);
  }
}

@keyframes headerPulse {
  0%,
  100% {
    opacity: 0.28;
  }

  50% {
    opacity: 0.82;
  }
}

@keyframes brandFloat {
  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-3px);
  }
}

@keyframes contentIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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