/* GestorPro V95.0 — base estrutural compartilhada */
* {
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(22, 141, 76, 0.62) rgba(255, 255, 255, 0.045);
}

*::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

*::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.045);
  border-radius: 999px;
}

*::-webkit-scrollbar-thumb {
  border: 2px solid rgba(5, 7, 11, 0.78);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(22, 141, 76, 0.88), rgba(159, 119, 52, 0.82));
}

*::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(255, 226, 166, 0.98), rgba(210, 174, 104, 0.92));
}

*::-webkit-scrollbar-corner {
  background: rgba(5, 7, 11, 0.86);
}

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

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 20% 0%, rgba(22, 141, 76, 0.08), transparent 26%),
    radial-gradient(circle at 82% 8%, rgba(255, 255, 255, 0.035), transparent 24%),
    linear-gradient(180deg, #111820 0%, var(--bg) 330px),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

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:
    radial-gradient(circle at 50% 10%, rgba(22, 141, 76, 0.16), transparent 30%),
    radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.08), transparent 24%),
    radial-gradient(circle at 80% 76%, rgba(22, 141, 76, 0.08), transparent 32%),
    linear-gradient(145deg, #17191d 0%, #101216 42%, #07080a 100%);
  overflow: hidden;
  position: relative;
}

.auth-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 0%, rgba(0, 0, 0, 0.18) 52%, rgba(0, 0, 0, 0.64) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent 38%);
  pointer-events: none;
}

.auth-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.16) 1px, transparent 1px);
  background-size: 100% 5px, 6px 100%;
  opacity: 0.18;
  pointer-events: none;
}

.auth-card {
  width: min(480px, 100%);
  background:
    linear-gradient(180deg, rgba(30, 32, 36, 0.94), rgba(13, 15, 18, 0.96)),
    #111317;
  border: 1px solid rgba(22, 141, 76, 0.34);
  border-radius: var(--radius);
  box-shadow:
    0 34px 90px rgba(0, 0, 0, 0.58),
    0 0 0 1px rgba(255, 255, 255, 0.035),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  padding: 34px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(20px);
  animation: loginCardIn 0.62s ease both;
  z-index: 1;
}

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

.auth-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, transparent, #0F6E3A 14%, var(--accent) 50%, #22A95C 78%, transparent);
  z-index: 2;
}

.auth-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 0%, rgba(22, 141, 76, 0.16), transparent 30%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.045), transparent 36%);
  pointer-events: none;
  z-index: 0;
}

.online-users-badge {
  position: absolute;
  top: 22px;
  right: 24px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid rgba(22, 141, 76, 0.3);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(29, 31, 35, 0.92), rgba(11, 13, 16, 0.84));
  color: #eafff8;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow:
    0 14px 34px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.online-users-badge strong {
  min-width: 24px;
  color: #fff;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.online-users-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 4px rgba(75, 210, 162, 0.12), 0 0 14px rgba(75, 210, 162, 0.78);
  animation: onlinePulse 1.8s 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, #0a0b0d 0%, #17191d 42%, #2a2112 100%),
    #111317;
  border: 1px solid rgba(22, 141, 76, 0.42);
  color: #F7FAFB;
  font-weight: 600;
  letter-spacing: 0.02em;
  box-shadow:
    0 16px 34px rgba(22, 141, 76, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.14);
  animation: brandFloat 4s ease-in-out infinite;
}

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

.auth-card h1 {
  color: #F7FAFB;
  text-shadow: 0 10px 28px rgba(22, 141, 76, 0.14);
}

.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;
  color: #c7a86b;
}

.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 rgba(22, 141, 76, 0.18);
  border-radius: var(--radius);
  background: rgba(6, 7, 9, 0.66);
}

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

.auth-tabs button.active {
  background: linear-gradient(180deg, rgba(22, 141, 76, 0.22), rgba(118, 88, 36, 0.18));
  color: #fff6dc;
  box-shadow:
    0 10px 24px rgba(22, 141, 76, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.11);
}

.auth-secondary-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: -2px;
}

.auth-link-btn {
  border: 0;
  background: transparent;
  color: #DEE1E8;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.auth-link-btn:hover {
  color: #F7FAFB;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.auth-card label {
  color: #DEE1E8;
}

.auth-card input {
  border-color: rgba(22, 141, 76, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    #090a0d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.045);
}

.auth-card input:focus {
  border-color: rgba(22, 141, 76, 0.8);
  background: #0f1115;
  box-shadow:
    0 0 0 3px rgba(22, 141, 76, 0.13),
    0 10px 24px rgba(0, 0, 0, 0.2);
}

.auth-card .primary-btn {
  margin-top: 2px;
  border-color: rgba(255, 239, 190, 0.22);
  background: linear-gradient(180deg, #22A95C 0%, #168D4C 48%, #0F6E3A 100%);
  box-shadow:
    0 16px 34px rgba(22, 141, 76, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.auth-card .primary-btn:hover {
  background: linear-gradient(180deg, #31BA6D 0%, #168D4C 48%, #0F6E3A 100%);
}

.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(22, 141, 76, 0.42);
  border-radius: 6px;
  background: rgba(22, 141, 76, 0.12);
  color: #DEE1E8;
  font-size: 0.78rem;
  font-weight: 600;
}

.app-shell {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100dvh;
}

.app-shell::before {
  content: "";
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 0;
  width: var(--sidebar-width);
  border-right: 1px solid rgba(22, 141, 76, 0.24);
  background:
    radial-gradient(circle at 50% 0%, rgba(22, 141, 76, 0.08), transparent 36%),
    linear-gradient(180deg, #0a0f16 0%, var(--sidebar) 64%, #030406 100%);
  box-shadow:
    inset -1px 0 0 rgba(22, 141, 76, 0.08),
    16px 0 40px rgba(0, 0, 0, 0.18);
  pointer-events: none;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100dvh;
  padding: 18px;
  background: transparent;
  color: #fff;
  overflow-y: auto;
}

.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: flex;
  flex: 1;
  flex-direction: column;
  gap: 6px;
  margin-top: 18px;
}

.sidebar-logout {
  margin-top: auto;
  border-color: rgba(255, 112, 102, 0.22) !important;
  color: #ffb7b0 !important;
}

.sidebar-logout svg {
  color: var(--danger) !important;
}

.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(22, 141, 76, 0.78);
}

.nav-list button:hover,
.nav-list button.active {
  background: rgba(22, 141, 76, 0.1);
  border-color: rgba(22, 141, 76, 0.22);
  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: #DEE1E8;
}

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

.main-panel {
  position: relative;
  z-index: 1;
  min-width: 0;
  min-height: 100dvh;
  background:
    radial-gradient(circle at 18% 0%, rgba(22, 141, 76, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(22, 141, 76, 0.055), 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: 600;
  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(22, 141, 76, 0.42);
}

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

.topbar-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  padding-inline: 0;
}

.topbar-icon-btn svg {
  width: 18px;
  height: 18px;
}

.view-root {
  padding: 24px;
}

.view-root > * {
  animation: contentIn 0.34s cubic-bezier(0.2, 0.72, 0.2, 1) 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:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent 54%),
    var(--panel);
  border: 1px solid rgba(22, 141, 76, 0.14);
  border-radius: var(--radius);
  box-shadow:
    var(--shadow-soft),
    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(22, 141, 76, 0.32);
  box-shadow:
    0 22px 56px rgba(0, 0, 0, 0.34),
    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: 600;
}

.user-access-card {
  background:
    linear-gradient(180deg, rgba(22, 141, 76, 0.065), 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);
}

.metric.danger-metric {
  border-top-color: var(--danger);
}

.metric.warning-metric {
  border-top-color: var(--warning);
}

.metric.success-metric {
  border-top-color: var(--success);
}

.metric.danger-metric strong {
  color: var(--danger);
}

.metric.warning-metric strong {
  color: var(--warning);
}

.metric.success-metric strong {
  color: var(--success);
}

.dashboard-command {
  display: grid;
  gap: 18px;
}

.dashboard-hero-card,
.dashboard-card,
.dashboard-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(22, 141, 76, 0.18);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.034), transparent 54%),
    linear-gradient(135deg, #121820 0%, #0a0f16 52%, #070a0e 100%);
  box-shadow:
    0 22px 60px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.dashboard-hero-card::before,
.dashboard-card::before,
.dashboard-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(22, 141, 76, 0.64), transparent);
  opacity: 0.78;
}

.dashboard-hero-card,
.dashboard-panel,
.dashboard-card {
  padding: 22px;
}

.dashboard-hero-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 136px;
  background:
    radial-gradient(circle at 18% 0%, rgba(22, 141, 76, 0.13), transparent 34%),
    linear-gradient(135deg, #171d24 0%, #0c1118 54%, #07090d 100%);
}

.dashboard-hero-card h3 {
  margin: 4px 0 6px;
  font-size: 1.75rem;
  color: #fff5df;
}

.dashboard-hero-status {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 10px;
  width: min(560px, 100%);
}

.dashboard-hero-pill {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(22, 141, 76, 0.18);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.035);
}

.dashboard-hero-pill svg,
.dashboard-card-icon svg,
.dashboard-shortcut svg {
  width: 20px;
  height: 20px;
}

.dashboard-hero-pill span,
.dashboard-kpi small,
.dashboard-mini-metric span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.dashboard-hero-pill strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.dashboard-hero-pill small {
  color: rgba(226, 232, 240, 0.68);
  font-size: 0.75rem;
  line-height: 1.35;
}

.dashboard-hero-pill.success svg,
.dashboard-mini-metric.success strong {
  color: var(--success);
}

.dashboard-hero-pill.warning svg,
.dashboard-mini-metric.warning strong {
  color: var(--warning);
}

.dashboard-hero-pill.danger svg,
.dashboard-mini-metric.danger strong {
  color: var(--danger);
}

.dashboard-main-grid {
  display: grid;
  grid-template-columns: minmax(170px, 0.85fr) minmax(170px, 0.85fr) minmax(260px, 1.2fr) minmax(260px, 1.2fr);
  gap: 16px;
}

.dashboard-ops-grid,
.dashboard-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.75fr);
  gap: 16px;
}

.dashboard-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.dashboard-card-head h3 {
  margin: 0;
}

.dashboard-card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  border: 1px solid rgba(22, 141, 76, 0.28);
  border-radius: var(--radius);
  background: rgba(22, 141, 76, 0.1);
  color: #DEE1E8;
}

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

.dashboard-kpi {
  display: grid;
  align-content: space-between;
  min-height: 188px;
  gap: 10px;
}

.dashboard-kpi strong {
  font-size: clamp(2.3rem, 5vw, 3.2rem);
  line-height: 0.96;
  color: #fff8e8;
  font-variant-numeric: tabular-nums;
}

.dashboard-kpi.success .dashboard-card-icon,
.dashboard-kpi.success strong {
  color: var(--success);
}

.dashboard-kpi.warning .dashboard-card-icon,
.dashboard-kpi.warning strong {
  color: var(--warning);
}

.dashboard-kpi.danger .dashboard-card-icon,
.dashboard-kpi.danger strong {
  color: var(--danger);
}

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

.dashboard-row,
.trash-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(143, 170, 202, 0.13);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.026);
}

.dashboard-row strong,
.trash-item strong {
  display: block;
  margin-bottom: 4px;
}

.dashboard-row .muted,
.trash-item .muted {
  display: block;
  font-size: 0.84rem;
}

.dashboard-row .tag {
  flex: 0 0 auto;
  white-space: nowrap;
}

.dashboard-empty {
  margin: 0;
  padding: 14px;
  border: 1px dashed rgba(22, 141, 76, 0.18);
  border-radius: var(--radius);
}

.dashboard-large-card {
  min-height: 330px;
}

.dashboard-large-card .dashboard-list {
  grid-auto-rows: minmax(48px, auto);
}

.dashboard-shortcuts {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
}

.dashboard-shortcut {
  display: grid;
  place-items: center;
  gap: 10px;
  min-height: 96px;
  padding: 16px 12px;
  border: 1px solid rgba(22, 141, 76, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(22, 141, 76, 0.085), transparent),
    rgba(255, 255, 255, 0.03);
  color: var(--text);
  font-weight: 700;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dashboard-shortcut:hover {
  border-color: rgba(22, 141, 76, 0.42);
  background:
    linear-gradient(180deg, rgba(22, 141, 76, 0.16), transparent),
    rgba(255, 255, 255, 0.045);
  transform: translateY(-1px);
}

.dashboard-shortcut svg {
  color: #DEE1E8;
}

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

.dashboard-mini-metric {
  display: grid;
  gap: 8px;
  min-height: 146px;
  padding: 16px;
  border: 1px solid rgba(22, 141, 76, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.026);
}

.dashboard-mini-metric strong {
  font-size: 2.1rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.dashboard-mini-metric small,
.dashboard-trash-card small {
  color: var(--muted);
}

.dashboard-activity-list .dashboard-row {
  align-items: flex-start;
}

.dashboard-trash-card {
  display: grid;
  align-content: start;
  gap: 12px;
}

.dashboard-trash-card > strong {
  font-size: 3rem;
  line-height: 0.95;
  color: var(--danger);
}

.trash-modal {
  width: min(860px, 100%);
}

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

.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(22, 141, 76, 0.55);
  background:
    linear-gradient(180deg, rgba(22, 141, 76, 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: 600;
}

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

.legend-dot.revenue {
  background: #168D4C;
}

.legend-dot.cost {
  background: #168D4C;
}

.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, #22A95C, #168D4C);
  box-shadow: 0 14px 30px rgba(22, 146, 133, 0.2);
}

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

.report-bar-item.profit .report-bar-fill {
  background: linear-gradient(180deg, #9fd1ff, #56aef5);
  box-shadow: 0 14px 30px rgba(86, 174, 245, 0.2);
}

.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: 600;
  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: 700;
}

.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, #22A95C, #168D4C);
  box-shadow: 0 12px 24px rgba(22, 146, 133, 0.22);
}

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

.timeline-bar.profit {
  background: linear-gradient(180deg, #9fd1ff, #56aef5);
  box-shadow: 0 12px 24px rgba(86, 174, 245, 0.22);
}

.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: 600;
  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;
  letter-spacing: 0.01em;
}

.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,
    filter 0.18s ease;
}

.primary-btn {
  background: linear-gradient(180deg, #22A95C, #0F6E3A);
  color: #110d07;
  box-shadow:
    0 12px 28px rgba(22, 141, 76, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.primary-btn:hover {
  background: linear-gradient(180deg, #2AB465, #168D4C);
  transform: translateY(-1px);
  filter: saturate(1.08);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.035);
  color: var(--text);
  border-color: rgba(22, 141, 76, 0.16);
}

.ghost-btn:hover {
  background: rgba(22, 141, 76, 0.1);
  border-color: rgba(22, 141, 76, 0.3);
  transform: translateY(-1px);
}

.primary-btn:active,
.ghost-btn:active,
.danger-btn:active,
.success-btn:active {
  transform: translateY(0) scale(0.99);
}

.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));
}

.form-grid.four {
  grid-template-columns: minmax(240px, 1.6fr) repeat(3, minmax(110px, 0.7fr));
}

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:
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), transparent),
    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(--accent);
  background: var(--field-strong);
  box-shadow: 0 0 0 3px rgba(22, 141, 76, 0.14);
}

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

input.input-error,
input.input-error:focus {
  border-color: var(--danger);
  background: rgba(255, 112, 102, 0.08);
  box-shadow: 0 0 0 3px rgba(255, 112, 102, 0.16);
}

.field-warning {
  color: var(--danger);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.35;
}

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

.table-card {
  max-height: var(--table-scroll-max);
  overflow: auto;
  scrollbar-gutter: stable;
}

.table-card,
.birthday-list,
.ranking-list,
.receivable-list,
.report-ranking-list,
.sale-cart-list,
.sale-results-grid,
.sale-customer-results,
.purchase-product-results,
.customer-pick-list,
.stock-movement-list,
.modal-birthday-list {
  scrollbar-width: thin;
  scrollbar-color: rgba(22, 141, 76, 0.62) rgba(255, 255, 255, 0.045);
}

.table-card::-webkit-scrollbar,
.birthday-list::-webkit-scrollbar,
.ranking-list::-webkit-scrollbar,
.receivable-list::-webkit-scrollbar,
.report-ranking-list::-webkit-scrollbar,
.sale-cart-list::-webkit-scrollbar,
.sale-results-grid::-webkit-scrollbar,
.sale-customer-results::-webkit-scrollbar,
.purchase-product-results::-webkit-scrollbar,
.customer-pick-list::-webkit-scrollbar,
.stock-movement-list::-webkit-scrollbar,
.modal-birthday-list::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.table-card::-webkit-scrollbar-track,
.birthday-list::-webkit-scrollbar-track,
.ranking-list::-webkit-scrollbar-track,
.receivable-list::-webkit-scrollbar-track,
.report-ranking-list::-webkit-scrollbar-track,
.sale-cart-list::-webkit-scrollbar-track,
.sale-results-grid::-webkit-scrollbar-track,
.sale-customer-results::-webkit-scrollbar-track,
.purchase-product-results::-webkit-scrollbar-track,
.customer-pick-list::-webkit-scrollbar-track,
.stock-movement-list::-webkit-scrollbar-track,
.modal-birthday-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.045);
}

.table-card::-webkit-scrollbar-thumb,
.birthday-list::-webkit-scrollbar-thumb,
.ranking-list::-webkit-scrollbar-thumb,
.receivable-list::-webkit-scrollbar-thumb,
.report-ranking-list::-webkit-scrollbar-thumb,
.sale-cart-list::-webkit-scrollbar-thumb,
.sale-results-grid::-webkit-scrollbar-thumb,
.sale-customer-results::-webkit-scrollbar-thumb,
.purchase-product-results::-webkit-scrollbar-thumb,
.customer-pick-list::-webkit-scrollbar-thumb,
.stock-movement-list::-webkit-scrollbar-thumb,
.modal-birthday-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(22, 141, 76, 0.88), rgba(159, 119, 52, 0.82));
}

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 {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background:
    linear-gradient(180deg, rgba(22, 141, 76, 0.055), transparent),
    #090e15;
  white-space: nowrap;
}

tbody tr:hover {
  background: rgba(22, 141, 76, 0.045);
}

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: 600;
  background: var(--primary-soft);
  color: #22A95C;
  border: 1px solid rgba(22, 141, 76, 0.24);
}

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

.tag.warning {
  background: rgba(22, 141, 76, 0.12);
  color: var(--warning);
  border-color: rgba(22, 141, 76, 0.2);
}

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

.danger-text {
  color: var(--danger) !important;
}

.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:
    radial-gradient(circle at 50% 0%, rgba(22, 141, 76, 0.08), transparent 34%),
    rgba(0, 0, 0, 0.76);
  backdrop-filter: blur(8px);
}

.modal-card {
  width: min(780px, 100%);
  max-height: 92vh;
  overflow: auto;
  background:
    linear-gradient(180deg, rgba(22, 141, 76, 0.055), transparent 38%),
    var(--panel);
  border-radius: var(--radius);
  border: 1px solid var(--metal-line);
  box-shadow: var(--shadow);
  padding: 20px;
  animation: modalIn 0.22s ease both;
}

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

.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, #22A95C, #168D4C);
  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(22, 141, 76, 0.24);
  background:
    linear-gradient(180deg, rgba(22, 141, 76, 0.08), transparent),
    #0d131c;
  color: #fff;
  box-shadow: var(--shadow);
  transform: translateY(20px) scale(0.98);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

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

.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 strong,
.money-nowrap {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

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

.payment-preview-panel {
  grid-column: 1 / -1;
  align-self: end;
}

.payment-preview {
  padding: 14px;
  border: 1px solid rgba(22, 141, 76, 0.18);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, rgba(22, 141, 76, 0.12), transparent 34%),
    #090e15;
}

.payment-preview .split-line:first-child {
  padding-top: 0;
}

.payment-preview .split-line strong {
  color: #22A95C;
}

.payment-calculator-modal {
  width: min(620px, 100%);
}

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

.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;
}

.product-stock-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stock-filter-option {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(22, 141, 76, 0.22);
  border-radius: 999px;
  background: rgba(22, 141, 76, 0.07);
  color: var(--text);
  font-size: 0.84rem;
  font-weight: 600;
}

.stock-filter-option input {
  width: auto;
}

.product-list-name {
  display: inline-block;
  max-width: min(380px, 58vw);
  font-size: 0.91rem;
  line-height: 1.23;
  word-break: normal;
  overflow-wrap: anywhere;
}

.purchase-entry-filter-card {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.mercadoria-supplier-section {
  margin-top: 16px;
}

.purchase-filter-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.4fr) minmax(180px, 1fr) minmax(140px, 0.7fr) minmax(140px, 0.7fr);
  gap: 12px;
}

.filter-status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

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

.operational-top-costs-card {
  overflow: hidden;
}

.operational-top-cost-list {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.operational-top-cost-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  line-height: 1.15;
}

.operational-top-cost-row span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.operational-top-cost-row strong {
  color: #DEE1E8;
  font-size: 0.82rem;
  white-space: nowrap;
}

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

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

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

.payable-metrics,
.payable-search-card {
  margin-bottom: 16px;
}

.payables-table {
  margin-top: 16px;
}

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

.payable-cost-toggle {
  align-items: flex-start;
  border: 1px solid rgba(22, 141, 76, 0.18);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(22, 141, 76, 0.06);
}

.payable-installments-panel {
  display: grid;
  gap: 12px;
  border: 1px solid rgba(22, 141, 76, 0.16);
  border-radius: var(--radius);
  padding: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.026), transparent 54%),
    rgba(8, 12, 18, 0.72);
}

.payable-installments-panel .section-head {
  margin-bottom: 0;
}

.payable-installment-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(22, 141, 76, 0.12);
}

.payable-installment-row:first-child {
  border-top: 0;
}

.payable-installment-row > strong {
  padding-bottom: 11px;
  color: #DEE1E8;
}

.pin-lock-modal {
  width: min(520px, 100%);
}

.pin-input {
  text-align: center;
  letter-spacing: 0.32em;
  font-size: 1.18rem;
  font-weight: 700;
}

.pin-settings-actions {
  margin-top: 14px;
}

.app-password-card .primary-btn {
  width: fit-content;
}

.password-recovery-modal {
  width: min(560px, 100%);
}

.password-recovery-hint {
  border: 1px solid rgba(22, 141, 76, 0.2);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: rgba(22, 141, 76, 0.07);
}

.security-pin-warning,
.pin-recovery-question {
  border: 1px solid rgba(22, 141, 76, 0.24);
  border-radius: var(--radius);
  padding: 12px;
  background: rgba(22, 141, 76, 0.08);
}

.pin-recovery-question {
  color: #DEE1E8;
  font-weight: 600;
}

.agenda-metrics,
.agenda-filter-card {
  margin-bottom: 16px;
}

.agenda-head-actions,
.agenda-history-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.agenda-history-button svg {
  width: 16px;
  height: 16px;
}

.agenda-history-modal {
  width: min(1040px, 100%);
}

.agenda-history-search {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

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

.agenda-table strong {
  color: var(--text);
}

.agenda-table .button-row,
.agenda-history-table .button-row {
  flex-wrap: nowrap;
}

.agenda-modal textarea {
  min-height: 96px;
}

.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.55fr) minmax(360px, 0.82fr);
  gap: 18px;
  align-items: start;
}

.sales-pdv-panel {
  display: grid;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.sales-pdv-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0.9;
}

.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(22, 141, 76, 0.14);
  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-barcode-field {
  position: relative;
  padding: 14px;
  border: 1px solid rgba(22, 141, 76, 0.2);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(22, 141, 76, 0.07), transparent),
    #090e15;
}

.sale-barcode-field input {
  min-height: 50px;
  border-color: rgba(22, 141, 76, 0.24);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.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(22, 141, 76, 0.42);
  background:
    linear-gradient(180deg, rgba(22, 141, 76, 0.1), transparent),
    #0d141e;
}

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

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

.sale-search-field {
  grid-column: span 1;
}

.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(22, 141, 76, 0.3);
  border-radius: var(--radius);
  background: rgba(22, 141, 76, 0.08);
}

.gift-toggle input {
  width: auto;
}

.sale-notice {
  padding: 11px 12px;
  border: 1px solid rgba(22, 141, 76, 0.28);
  border-radius: var(--radius);
  background: rgba(22, 141, 76, 0.1);
  color: #22A95C;
  font-weight: 600;
}

.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(210px, 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(22, 141, 76, 0.13);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), transparent),
    #0b121c;
  color: var(--text);
  text-align: left;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease,
    background 0.18s ease;
}

.sale-item-card:hover {
  border-color: rgba(22, 141, 76, 0.34);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.28);
  transform: translateY(-2px);
}

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

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

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

.sale-cart-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, #0F6E3A, #22A95C, #0F6E3A);
}

.sale-cart-total-card {
  display: grid;
  gap: 4px;
  margin-bottom: 14px;
  padding: 15px;
  border: 1px solid rgba(22, 141, 76, 0.22);
  border-radius: var(--radius);
  background:
    radial-gradient(circle at 100% 0%, rgba(22, 141, 76, 0.14), transparent 38%),
    #090e15;
}

.sale-cart-total-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.sale-cart-total-card strong {
  color: #22A95C;
  font-size: clamp(2rem, 4vw, 2.7rem);
  line-height: 1;
}

.sale-cart-total-card small {
  color: var(--muted);
  line-height: 1.35;
}

.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(22, 141, 76, 0.12);
  border-radius: var(--radius);
  background: #0b121c;
}

.sale-cart-line.gift-line {
  border-color: rgba(22, 141, 76, 0.28);
  background:
    linear-gradient(180deg, rgba(22, 141, 76, 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);
  border-radius: var(--radius);
}

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

.sale-discount-row {
  display: flex;
  align-items: end;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid rgba(22, 141, 76, 0.14);
}

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

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

.finish-sale-btn {
  width: 100%;
  margin-top: 14px;
  min-height: 50px;
  font-size: 1rem;
}

.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(105px, 0.45fr) minmax(220px, 1.35fr) minmax(90px, 0.55fr) minmax(120px, 0.65fr) minmax(120px, 0.65fr) minmax(96px, auto);
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(143, 170, 202, 0.14);
  border-radius: var(--radius);
  background: #0b121c;
}

.purchase-line > * {
  min-width: 0;
}

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

.purchase-product-results {
  display: grid;
  grid-template-columns: 1fr;
  max-height: 180px;
  overflow-y: auto;
  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: #DEE1E8;
  font-size: 1.18rem;
}

.order-supplies-panel {
  padding: 14px;
  border: 1px solid rgba(143, 170, 202, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

.order-checklist-panel,
.device-marking-panel {
  padding: 14px;
  border: 1px solid rgba(143, 170, 202, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

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

.checklist-option {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(143, 170, 202, 0.14);
  border-radius: var(--radius);
  background: #0b121c;
  font-size: 0.86rem;
}

.checklist-option input {
  width: auto;
  min-width: 16px;
}

.device-marking-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.device-frame {
  position: relative;
  width: 190px;
  aspect-ratio: 9 / 16;
  margin: 0 auto;
  border: 2px solid rgba(22, 141, 76, 0.55);
  border-radius: 28px;
  background:
    radial-gradient(circle at 50% 18%, rgba(22, 141, 76, 0.12), transparent 26%),
    linear-gradient(180deg, #0c121b, #05070b);
  box-shadow:
    inset 0 0 0 8px rgba(255, 255, 255, 0.025),
    0 18px 44px rgba(0, 0, 0, 0.32);
}

.device-frame::after {
  content: "";
  position: absolute;
  inset: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  pointer-events: none;
}

.device-speaker {
  position: absolute;
  top: 11px;
  left: 50%;
  width: 44px;
  height: 5px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(22, 141, 76, 0.55);
}

.device-home-indicator {
  position: absolute;
  bottom: 12px;
  left: 50%;
  width: 54px;
  height: 4px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
}

.device-mark {
  position: absolute;
  z-index: 2;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  border-radius: 999px;
  border: 2px solid rgba(22, 141, 76, 0.85);
  background: rgba(22, 141, 76, 0.14);
  box-shadow: 0 0 0 4px rgba(22, 141, 76, 0.08);
}

.device-mark.active {
  border-color: var(--danger);
  background: rgba(255, 112, 102, 0.68);
  box-shadow:
    0 0 0 5px rgba(255, 112, 102, 0.16),
    0 0 18px rgba(255, 112, 102, 0.42);
}

.device-mark-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.device-mark-chip {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid rgba(143, 170, 202, 0.16);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.025);
  font-size: 0.82rem;
  font-weight: 600;
}

.device-mark-chip.active {
  color: #ffe1df;
  border-color: rgba(255, 112, 102, 0.36);
  background: rgba(255, 112, 102, 0.12);
}

.order-kit-loader {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
}

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

.order-supply-line {
  display: grid;
  grid-template-columns: minmax(190px, 1.35fr) repeat(3, minmax(92px, 0.65fr)) minmax(96px, auto);
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(143, 170, 202, 0.14);
  border-radius: var(--radius);
  background: #0b121c;
}

.order-supply-line > * {
  min-width: 0;
}

.order-supply-meta {
  grid-column: 1 / -2;
  align-self: center;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.order-supply-line .danger-btn {
  grid-column: -2 / -1;
  justify-self: end;
  width: 100%;
}

.order-financial-preview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.order-financial-preview strong {
  color: #DEE1E8;
}

.supply-kit-section,
.order-summary-cards,
.archived-order-search {
  margin-top: 16px;
}

.order-summary-cards {
  margin-bottom: 16px;
}

.order-summary-cards .metric,
.operational-cost-metrics .metric {
  min-height: 126px;
}

.operational-cost-metrics .metric {
  height: 126px;
}

.supply-kit-panel {
  padding: 14px;
  border: 1px solid rgba(143, 170, 202, 0.16);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.025);
}

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

.supply-kit-line {
  display: grid;
  grid-template-columns: minmax(210px, 1.4fr) minmax(86px, 0.55fr) minmax(110px, 0.65fr) minmax(110px, 0.65fr) minmax(96px, auto);
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(143, 170, 202, 0.14);
  border-radius: var(--radius);
  background: #0b121c;
}

.supply-kit-line > * {
  min-width: 0;
}

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

.kit-total-row strong {
  color: #DEE1E8;
}

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

.archived-orders-table {
  margin-top: 14px;
}

.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(22, 141, 76, 0.14);
  color: #DEE1E8;
  border: 1px solid rgba(22, 141, 76, 0.28);
  font-weight: 700;
  font-size: 0.82rem;
}

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

.birthday-list,
.ranking-list,
.receivable-list,
.report-ranking-list,
.stock-movement-list,
.sale-results-grid {
  max-height: var(--list-scroll-max);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.customer-profile-modal {
  width: min(1120px, 100%);
  background:
    linear-gradient(145deg, rgba(22, 141, 76, 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(22, 141, 76, 0.52);
  background:
    linear-gradient(180deg, rgba(22, 141, 76, 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;
  }

  .app-shell::before {
    display: none;
  }

  .sidebar {
    display: none;
  }

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

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

  .device-marking-layout {
    grid-template-columns: 1fr;
  }

  .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: 600;
  }

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

  .mobile-bottom-nav svg,
  .mobile-menu-grid svg {
    width: 18px;
    height: 18px;
    color: rgba(22, 141, 76, 0.85);
  }

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

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

  .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;
  }

  .order-supply-line,
  .order-financial-preview,
  .supply-kit-line,
  .payable-installment-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-filter-grid,
  .report-custom-range,
  .purchase-filter-grid {
    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;
  }

  .dashboard-hero-card,
  .dashboard-row,
  .trash-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-hero-status,
  .dashboard-main-grid,
  .dashboard-ops-grid,
  .dashboard-bottom-grid,
  .dashboard-payable-grid {
    grid-template-columns: 1fr;
  }

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

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

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

@media (max-width: 560px) {
  :root {
    --list-scroll-max: 360px;
    --table-scroll-max: 410px;
  }

  .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;
  }

  .order-checklist-grid {
    grid-template-columns: 1fr;
  }

  .device-frame {
    width: min(190px, 100%);
  }

  .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));
  }

  .dashboard-hero-card,
  .dashboard-card,
  .dashboard-panel {
    padding: 16px;
  }

  .dashboard-hero-card h3 {
    font-size: 1.35rem;
  }

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

  .dashboard-shortcut {
    min-height: 78px;
  }

  .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,
    .order-supply-line,
    .order-financial-preview,
    .order-kit-loader,
    .supply-kit-line,
    .stock-movement-item,
    .purchase-filter-grid,
    .payable-installment-row,
  .report-filter-grid,
  .report-custom-range,
  .report-chart-body,
  .report-ranking-row,
  .sale-success-actions {
    grid-template-columns: 1fr;
  }

  .order-supply-meta,
  .order-supply-line .danger-btn {
    grid-column: auto;
    width: 100%;
  }

  .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;
  }

  .online-users-badge {
    top: 18px;
    right: 18px;
    padding: 7px 9px;
    font-size: 0.68rem;
  }
}

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

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

@keyframes onlinePulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 1;
  }

  50% {
    transform: scale(0.72);
    opacity: 0.68;
  }
}

@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);
  }
}

@keyframes modalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }

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

@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;
  }
}

