@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Space+Grotesk:wght@500;700&display=swap");

/* Botões de ação no tema dark */
.dark-btn {
  background: #23273a;
  color: #f6f7fb;
  border: 1px solid #2a3241;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(12, 15, 20, 0.12);
  transition: background 0.2s, color 0.2s;
}
.dark-btn:hover {
  background: #2a3241;
  color: #ff7a18;
  border-color: #ff7a18;
}

:root {
  --bg: #0c0f14;
  --bg-soft: #121621;
  --bg-dark: #0a0c10;
  --bg1: #121621;
  --card: #161b25;
  --card-strong: #1c2230;
  --accent: #ff7a18;
  --accent-soft: #ffbf7a;
  --accent-2: #2fb7a8;
  --accent-dark: #c6550e;
  --accent-glow: rgba(255, 122, 24, 0.2);
  --accent-cyan-glow: rgba(47, 183, 168, 0.18);
  --ink: #f6f7fb;
  --fg: #f6f7fb;
  --muted: #b1b8c5;
  --border: #2a3241;
  --shadow: 0 30px 70px rgba(5, 7, 12, 0.55);
  --panel-glass: rgba(10, 14, 23, 0.72);
  --panel-strong: rgba(14, 19, 29, 0.92);
  --radius: 20px;
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 20px;
  --control-h: 42px;
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.12);
}

[data-theme="light"] .form-error {
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
}

[data-theme="light"] .input-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px var(--danger-bg);
}

.form-error {
  color: var(--accent);
  font-size: 12px;
  margin-top: 4px;
}

.input-error {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
/* Tema Claro - Aprimorado */
[data-theme="light"] {
  --bg: #f5f5f5;
  --bg-soft: #ffffff;
  --bg-dark: #f9fafb;
  --bg1: #ffffff;
  --card: #ffffff;
  --card-strong: #ffffff;
  --accent: #ea580c;
  --accent-dark: #c2410c;
  --accent-glow: rgba(234, 88, 12, 0.12);
  --ink: #111827;
  --fg: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --shadow: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --success: #16a34a;
  --success-bg: rgba(22, 163, 74, 0.1);
  --warning: #d97706;
  --warning-bg: rgba(217, 119, 6, 0.1);
  --danger: #dc2626;
  --danger-bg: rgba(220, 38, 38, 0.1);
  --info: #2563eb;
  --info-bg: rgba(37, 99, 235, 0.1);
}

[data-theme="light"] body {
  background: #f5f5f5;
}

[data-theme="light"] body::before {
  background: none;
}

[data-theme="light"] .sidebar {
  background: #f0f4f8;
  border-right: 1px solid #e5e7eb;
  box-shadow: none;
}

[data-theme="light"] .sidebar .logo {
  color: var(--accent);
}

[data-theme="light"] .sidebar-brand .muted,
[data-theme="light"] .sidebar .muted {
  color: #64748b;
}

[data-theme="light"] .nav-link {
  color: #475569;
}

[data-theme="light"] .nav-link:hover {
  background: #fff7ed;
  color: var(--accent);
}

[data-theme="light"] .nav-link.active {
  background: linear-gradient(90deg, rgba(234, 88, 12, 0.12), rgba(234, 88, 12, 0.05));
  color: var(--accent);
  border-left: 3px solid var(--accent);
}

[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  border-bottom: 2px solid #fed7aa;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.05);
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: var(--ink);
  box-shadow: none;
}

[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus {
  border-color: #3b82f6;
  box-shadow: none;
  outline: 2px solid #3b82f6;
  outline-offset: 0;
}

[data-theme="light"] input::placeholder {
  color: #94a3b8;
}

[data-theme="light"] .table-row {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: none;
}

[data-theme="light"] .table-row:hover {
  background: #f3f4f6;
  border-color: #d1d5db;
  box-shadow: none;
}

[data-theme="light"] .table-head {
  color: #6b7280;
  background: #f9fafb;
  border: 1px solid #e5e7eb;
}

[data-theme="light"] .modal-content {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

[data-theme="light"] .modal-overlay {
  background: rgba(0,0,0,0.4);
}

[data-theme="light"] .hero {
  background: #ffffff;
  border: 2px solid #fed7aa;
  box-shadow: var(--shadow);
}

[data-theme="light"] .hero .eyebrow {
  color: var(--accent);
}

[data-theme="light"] .hero h2 {
  color: var(--ink);
}

[data-theme="light"] .hero-metric {
  background: #fffbf7;
  border: 1px solid #fdba74;
  color: var(--ink);
}

[data-theme="light"] .hero-metric .muted {
  color: #64748b;
}

[data-theme="light"] .hero-metric strong {
  color: var(--ink);
}

[data-theme="light"] .card,
[data-theme="light"] .dashboard-widget {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

[data-theme="light"] .dashboard-widget:hover {
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.12);
  border-color: #fdba74;
}

[data-theme="light"] .dashboard-widget h3 {
  color: #64748b;
  font-weight: 500;
}

[data-theme="light"] .dashboard-widget .metric {
  color: var(--ink);
}

[data-theme="light"] .dashboard-widget .muted {
  color: #64748b;
}

[data-theme="light"] .intelligence-card {
  background: #ffffff;
  border: 1px solid #fde1c4;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.06);
}

[data-theme="light"] .intelligence-card:hover {
  border-color: #fdba74;
  box-shadow: 0 4px 12px rgba(234, 88, 12, 0.12);
}

[data-theme="light"] .mobile-home {
  background: #ffffff;
  border: 1px solid #fde1c4;
}

[data-theme="light"] .mobile-home-btn {
  background: #ffffff;
  border: 1px solid #fdba74;
  color: var(--ink);
}

[data-theme="light"] .eyebrow {
  color: var(--accent);
  font-weight: 600;
}

[data-theme="light"] .mini-list {
  color: #64748b;
}

[data-theme="light"] .tag {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 237, 0.98)),
    linear-gradient(135deg, rgba(251, 146, 60, 0.08), rgba(45, 212, 191, 0.08));
  color: #9a3412;
  border: 1px solid rgba(251, 146, 60, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 14px 24px rgba(234, 88, 12, 0.12);
}

[data-theme="light"] .tag:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 244, 230, 1)),
    linear-gradient(135deg, rgba(251, 146, 60, 0.12), rgba(45, 212, 191, 0.12));
  border-color: rgba(234, 88, 12, 0.5);
  color: #9a3412;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 18px 30px rgba(234, 88, 12, 0.16);
}

[data-theme="light"] .topbar-metrics .tag {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 237, 0.98)),
    linear-gradient(135deg, rgba(251, 146, 60, 0.08), rgba(45, 212, 191, 0.08));
  color: #9a3412;
  border: 1px solid rgba(251, 146, 60, 0.34);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 14px 24px rgba(234, 88, 12, 0.12);
}

[data-theme="light"] .topbar-metrics .tag strong {
  color: #ea580c;
}

[data-theme="light"] .topbar-action-btn,
[data-theme="light"] .theme-toggle-btn,
[data-theme="light"] .notification-bell-btn {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 247, 237, 0.98)),
    linear-gradient(135deg, rgba(251, 146, 60, 0.06), rgba(45, 212, 191, 0.08));
  border: 1px solid rgba(251, 146, 60, 0.32);
  color: #9a3412;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 14px 24px rgba(234, 88, 12, 0.1);
}

[data-theme="light"] .topbar-action-btn:hover,
[data-theme="light"] .theme-toggle-btn:hover,
[data-theme="light"] .notification-bell-btn:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 1), rgba(255, 244, 230, 1)),
    linear-gradient(135deg, rgba(251, 146, 60, 0.12), rgba(45, 212, 191, 0.12));
  border-color: rgba(234, 88, 12, 0.5);
  color: #7c2d12;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 18px 30px rgba(234, 88, 12, 0.15);
}

[data-theme="light"] .topbar-action-btn::before,
[data-theme="light"] .notification-bell-btn::before {
  background: rgba(249, 115, 22, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

[data-theme="light"] .primary {
  background: linear-gradient(135deg, #ea580c, #f97316);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(234, 88, 12, 0.3);
}

[data-theme="light"] .primary:hover {
  background: linear-gradient(135deg, #c2410c, #ea580c);
  box-shadow: 0 6px 20px rgba(234, 88, 12, 0.4);
}

[data-theme="light"] .secondary {
  background: linear-gradient(135deg, #4f46e5, #6366f1);
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.25);
}

[data-theme="light"] .ghost {
  background: #ffffff;
  border: 1px solid #fdba74;
  color: #c2410c;
  box-shadow: 0 0 8px rgba(234, 88, 12, 0.12), 0 0 2px rgba(234, 88, 12, 0.08);
}

[data-theme="light"] .ghost:hover {
  background: #fff7ed;
  border-color: #ea580c;
  color: #ea580c;
  box-shadow: 0 0 14px rgba(234, 88, 12, 0.25), 0 0 4px rgba(234, 88, 12, 0.15);
}

/* Badges melhorados para tema claro */
[data-theme="light"] .badge {
  background: rgba(234, 88, 12, 0.1);
  color: #c2410c;
  font-weight: 500;
}

[data-theme="light"] .badge--active,
[data-theme="light"] .badge--won,
[data-theme="light"] .badge--received {
  background: var(--success-bg);
  color: var(--success);
}

[data-theme="light"] .badge--prospect,
[data-theme="light"] .badge--negotiation,
[data-theme="light"] .badge--contact {
  background: var(--info-bg);
  color: var(--info);
}

[data-theme="light"] .badge--inactive,
[data-theme="light"] .badge--lost,
[data-theme="light"] .badge--canceled {
  background: var(--danger-bg);
  color: var(--danger);
}

[data-theme="light"] .badge--open,
[data-theme="light"] .badge--pending,
[data-theme="light"] .badge--partial,
[data-theme="light"] .badge--proposal {
  background: var(--warning-bg);
  color: var(--warning);
}

/* Seções e headers */
[data-theme="light"] .section-header h2 {
  color: var(--ink);
}

[data-theme="light"] .section-header .muted {
  color: #64748b;
}

[data-theme="light"] .filters {
  background: #fffcf9;
  border-radius: 12px;
  padding: 12px;
  border: 1px solid #fde1c4;
}

/* Métricas e relatórios */
[data-theme="light"] .metric {
  color: var(--ink);
}

[data-theme="light"] .report-cards > div {
  background: #ffffff;
  border: 2px solid #fed7aa;
  box-shadow: 0 2px 8px rgba(234, 88, 12, 0.06);
}

/* Avatar */
[data-theme="light"] .avatar {
  background: linear-gradient(135deg, #fff7ed, #ffedd5);
  color: var(--accent);
  border: 2px solid #fdba74;
  box-shadow: 0 2px 4px rgba(234, 88, 12, 0.1);
}

/* Links */
[data-theme="light"] a {
  color: var(--accent);
}

[data-theme="light"] a:hover {
  color: var(--accent-dark);
}

/* Toast notifications */
[data-theme="light"] .toast {
  background: #ffffff;
  border: 1px solid #fdba74;
  box-shadow: 0 0 12px rgba(234, 88, 12, 0.15), 0 4px 12px rgba(0, 0, 0, 0.1);
  color: var(--ink);
}

/* Subscription status na topbar */
[data-theme="light"] #subscription-status {
  background: #ffffff !important;
  border: 1px solid #fdba74;
  box-shadow: 0 0 8px rgba(234, 88, 12, 0.15), 0 0 2px rgba(234, 88, 12, 0.1);
  color: #c2410c;
}

/* Plano box */
[data-theme="light"] .plan-box {
  background: #fffbf7;
  border: 2px solid #fed7aa;
  box-shadow: 0 0 12px rgba(234, 88, 12, 0.1);
}

/* Scroll personalizado */
[data-theme="light"] ::-webkit-scrollbar-track {
  background: #f1f5f9;
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #cbd5e1;
}

[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Light theme consistency pass: neutral palette, strong readability, and unified surfaces */
[data-theme="light"] {
  --bg: #f8fafc;
  --bg-soft: #f5f5f5;
  --bg-dark: #eef2f7;
  --card: #ffffff;
  --card-strong: #ffffff;
  --ink: #111827;
  --muted: #6b7280;
  --border: #e5e7eb;
  --accent: #ea580c;
  --accent-dark: #c2410c;
  --focus-ring: rgba(37, 99, 235, 0.24);
  --focus-border: #2563eb;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 6px 18px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] body {
  color: var(--ink);
  background: #f5f5f5;
}

[data-theme="light"] .app-shell {
  background: transparent;
}

[data-theme="light"] .sidebar {
  background: #f0f4f8;
  border-right: 1px solid #e5e7eb;
  box-shadow: none;
}

[data-theme="light"] .sidebar::after {
  background: linear-gradient(180deg, rgba(229, 231, 235, 1) 0%, rgba(229, 231, 235, 0.25) 55%, rgba(229, 231, 235, 1) 100%);
}

[data-theme="light"] .sidebar-brand,
[data-theme="light"] .sidebar-subscription {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
}

[data-theme="light"] .nav-link {
  color: #334155;
}

[data-theme="light"] .nav-link:hover {
  background: #f1f5f9;
  color: #0f172a;
}

[data-theme="light"] .nav-link.active {
  background: linear-gradient(90deg, rgba(234, 88, 12, 0.12), rgba(234, 88, 12, 0.04));
  color: #9a3412;
  border-left-color: #ea580c;
}

[data-theme="light"] .topbar,
[data-theme="light"] .hero,
[data-theme="light"] .card,
[data-theme="light"] .dashboard-widget,
[data-theme="light"] .report-cards > div,
[data-theme="light"] .table-row,
[data-theme="light"] .cash-list-item,
[data-theme="light"] .cash-kpi,
[data-theme="light"] .plan-box,
[data-theme="light"] .mobile-home,
[data-theme="light"] .intelligence-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

[data-theme="light"] .table-row:hover,
[data-theme="light"] .dashboard-widget:hover,
[data-theme="light"] .intelligence-card:hover {
  border-color: #d1d5db;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

[data-theme="light"] .table-head,
[data-theme="light"] .section-header,
[data-theme="light"] .filters,
[data-theme="light"] .cash-breakdown,
[data-theme="light"] .sales-items-header,
[data-theme="light"] .admin-embed-shell {
  border-color: #e5e7eb;
}

[data-theme="light"] .table-head,
[data-theme="light"] .sales-items-header {
  background: #f9fafb;
}

[data-theme="light"] .table > .table-row:nth-child(odd),
[data-theme="light"] .sales-items-body .item-row:nth-child(odd),
[data-theme="light"] .list .cash-list-item:nth-child(odd) {
  background: #ffffff;
}

[data-theme="light"] .table > .table-row:nth-child(even),
[data-theme="light"] .sales-items-body .item-row:nth-child(even),
[data-theme="light"] .list .cash-list-item:nth-child(even) {
  background: #f9fafb;
}

[data-theme="light"] .metric,
[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6,
[data-theme="light"] .section-header h2,
[data-theme="light"] strong {
  color: #111827;
}

[data-theme="light"] .muted,
[data-theme="light"] .section-header .muted,
[data-theme="light"] .mini-list,
[data-theme="light"] .table-head,
[data-theme="light"] .sales-items-header {
  color: #6b7280;
}

[data-theme="light"] input,
[data-theme="light"] select,
[data-theme="light"] textarea,
[data-theme="light"] .onboarding-form input,
[data-theme="light"] .verify-actions input {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #111827;
  box-shadow: none;
}

[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
  color: #9ca3af;
}

[data-theme="light"] input:focus,
[data-theme="light"] select:focus,
[data-theme="light"] textarea:focus,
[data-theme="light"] .onboarding-form input:focus,
[data-theme="light"] .verify-actions input:focus {
  border-color: #3b82f6;
  box-shadow: none;
  outline: 2px solid #3b82f6;
  outline-offset: 0;
}

[data-theme="light"] .primary {
  background: linear-gradient(135deg, #ea580c, #f97316);
  color: #ffffff;
  border: 1px solid #c2410c;
  box-shadow: 0 3px 10px rgba(234, 88, 12, 0.24);
}

[data-theme="light"] .primary:hover {
  background: linear-gradient(135deg, #c2410c, #ea580c);
}

[data-theme="light"] .ghost,
[data-theme="light"] .secondary,
[data-theme="light"] .topbar-action-btn,
[data-theme="light"] .theme-toggle-btn,
[data-theme="light"] .notification-bell-btn {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #1f2937;
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

[data-theme="light"] .ghost:hover,
[data-theme="light"] .secondary:hover,
[data-theme="light"] .topbar-action-btn:hover,
[data-theme="light"] .theme-toggle-btn:hover,
[data-theme="light"] .notification-bell-btn:hover {
  background: #f3f4f6;
  border-color: #9ca3af;
  color: #111827;
}

[data-theme="light"] .modal {
  background: rgba(0,0,0,0.4);
}

[data-theme="light"] .modal-card,
[data-theme="light"] #onboarding-modal .onboarding-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

[data-theme="light"] .toast {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: #111827;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.14);
}

[data-theme="light"] .sales-items-body .item-row:hover,
[data-theme="light"] .list li:hover {
  background: #f3f4f6;
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Previne overflow horizontal em toda aplicação */
html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

body {
  margin: 0;
  font-family: "Manrope", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top, rgba(255, 160, 77, 0.14), transparent 34%),
    radial-gradient(circle at 85% 10%, rgba(47, 183, 168, 0.1), transparent 28%),
    linear-gradient(180deg, #091018 0%, #0b0f17 45%, #06080d 100%);
  min-height: 100vh;
  position: relative;
}

/* Garante que textos longos quebrem corretamente */
* {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Garante que imagens nunca ultrapassem o container */
img {
  max-width: 100%;
  height: auto;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 14% 18%, rgba(255, 122, 24, 0.14), transparent 36%),
    radial-gradient(circle at 84% 12%, rgba(47, 183, 168, 0.12), transparent 30%),
    radial-gradient(circle at 40% 84%, rgba(255, 196, 140, 0.08), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent 45%);
  pointer-events: none;
  z-index: -1;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

h1,
h2,
h3 {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
}

p {
  margin: 0 0 12px;
}

.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 16px;
  color: var(--ink, #f6f7fb);
}

.auth-page {
  width: 100%;
  max-width: 1240px;
  display: grid;
  gap: 18px;
}

.auth-shell {
  display: grid;
  gap: 36px;
  max-width: 1240px;
  width: 100%;
  grid-template-columns: minmax(360px, 1.3fr) minmax(360px, 440px);
  align-items: center;
}

.auth-legal {
  text-align: center;
  display: grid;
  gap: 10px;
  margin-top: 60px;
  padding-bottom: 20px;
}

.auth-legal__line {
  font-size: 12px;
  letter-spacing: 0.2px;
  color: var(--muted, #b1b8c5);
  opacity: 0.9;
}

.auth-legal__links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-legal__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 122, 24, 0.28);
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.14), rgba(255, 153, 64, 0.06));
  color: #f1f4fb;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.auth-legal__link:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 153, 64, 0.48);
  box-shadow: 0 8px 18px rgba(255, 122, 24, 0.16);
}

.auth-legal__link:focus-visible {
  outline: 2px solid rgba(255, 153, 64, 0.65);
  outline-offset: 2px;
}

.brand-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 16px;
  min-height: 190px;
  padding: 28px 30px;
  border: 1px solid rgba(255, 190, 122, 0.18);
  border-radius: 28px;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 122, 24, 0.14), transparent 34%),
    radial-gradient(circle at 92% 84%, rgba(47, 183, 168, 0.1), transparent 36%),
    linear-gradient(160deg, rgba(15, 20, 31, 0.92), rgba(9, 13, 22, 0.82));
  box-shadow: 0 20px 52px rgba(2, 6, 12, 0.36);
  position: relative;
  overflow: hidden;
}

.brand-block::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.06), transparent 30%),
    linear-gradient(300deg, rgba(255, 255, 255, 0.025), transparent 28%);
  pointer-events: none;
}

.brand-block--center {
  justify-content: center;
}

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

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 190, 122, 0.24);
  background: rgba(255, 255, 255, 0.05);
  color: #ffe3c2;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-kicker::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 4px rgba(255, 122, 24, 0.12);
}

.auth-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: 100%;
}

.auth-stat {
  position: relative;
  overflow: hidden;
  min-height: 108px;
  align-content: start;
  padding: 16px 56px 18px 16px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.025)),
    linear-gradient(135deg, rgba(255, 122, 24, 0.08), rgba(47, 183, 168, 0.06));
  display: grid;
  gap: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.auth-stat::before {
  font-family: "Material Icons Outlined";
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.22), rgba(47, 183, 168, 0.18));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  color: #ffd8b4;
}

.auth-stat::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, rgba(255, 179, 71, 0.65), rgba(47, 183, 168, 0.45));
  opacity: 0.75;
}

.auth-stat:nth-child(1)::before {
  content: "dashboard";
}

.auth-stat:nth-child(2)::before {
  content: "timer";
}

.auth-stat:nth-child(3)::before {
  content: "login";
}

.auth-stat strong {
  font-family: "Space Grotesk", "Manrope", sans-serif;
  font-size: 17px;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff5ea;
}

.auth-stat span {
  color: rgba(241, 244, 251, 0.7);
  font-size: 12px;
  line-height: 1.45;
  max-width: 18ch;
}

.auth-trust-list {
  display: grid;
  gap: 12px;
  width: 100%;
}

.auth-trust-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.045), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.07);
  color: rgba(232, 237, 247, 0.96);
  font-size: 14px;
  line-height: 1.5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.auth-trust-item::before {
  font-family: "Material Icons Outlined";
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  margin-top: 1px;
  border-radius: 10px;
  background:
    linear-gradient(135deg, rgba(255, 122, 24, 0.28), rgba(47, 183, 168, 0.22));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 0 0 6px rgba(255, 255, 255, 0.02);
  color: #ffd8b4;
}

.auth-trust-item:nth-child(1)::before {
  content: "storefront";
}

.auth-trust-item:nth-child(2)::before {
  content: "admin_panel_settings";
}

.auth-trust-item:nth-child(3)::before {
  content: "desktop_windows";
}

.auth-brand-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.auth-brand-copy {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.auth-brand-note {
  color: rgba(232, 237, 247, 0.72);
  font-size: 12px;
  line-height: 1.35;
}

.auth-brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  margin-bottom: 0;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 12px 24px rgba(255, 122, 24, 0.12);
}

.brand-block h1 {
  color: var(--ink, #f6f7fb);
  max-width: 19ch;
  font-size: clamp(40px, 4.2vw, 56px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  text-wrap: balance;
  margin: 0;
}

.auth-brand-support {
  margin: 0;
  max-width: 42ch;
  color: rgba(232, 237, 247, 0.78);
  font-size: 18px;
  line-height: 1.42;
}

.auth-brand-footnote {
  margin: 2px 0 0;
  color: rgba(177, 184, 197, 0.9);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-card {
  width: 100%;
}

.brand-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent, #ff7a18), #ffb347);
  color: #1b120a;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.auth-chip-spaced {
  margin-bottom: 16px;
}

.auth-card {
  background:
    linear-gradient(180deg, rgba(18, 24, 35, 0.96), rgba(12, 17, 27, 0.94));
  border-radius: 28px;
  padding: 34px;
  box-shadow: 0 32px 80px rgba(4, 8, 14, 0.58);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--ink, #f6f7fb);
  backdrop-filter: blur(18px);
}

.auth-card-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #ffd8b4;
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-card-kicker::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.auth-card h2 {
  color: var(--ink, #f6f7fb);
}

.auth-card .muted,
.auth-card p,
.auth-card label {
  color: var(--muted, #b1b8c5);
}

.auth-card .error {
  color: #fda4af;
}

.auth-alt-link {
  margin-top: 8px;
}

.auth-note-block {
  margin-top: 8px;
}

.auth-social-block {
  margin-top: 4px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 12px;
  color: var(--muted, #b1b8c5);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 153, 64, 0.35), transparent);
}

.google-login-slot {
  display: flex;
  justify-content: center;
  min-height: 44px;
}

.auth-helper-copy {
  margin-top: 10px;
  font-size: 12px;
  text-align: center;
}

.auth-form {
  margin-top: 18px;
}

.auth-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 24px;
}

.auth-link-row__hint {
  font-size: 12px;
  color: rgba(177, 184, 197, 0.72);
}

.auth-text-link {
  appearance: none;
  border: 0;
  background: transparent;
  color: #ffd2a6;
  padding: 0;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.auth-text-link:hover {
  color: #fff0dd;
}

.auth-inline-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 10px;
}

.auth-inline-actions > * {
  width: 100%;
}

.auth-security-strip {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.auth-security-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.035);
  color: rgba(232, 237, 247, 0.9);
  font-size: 13px;
}

.auth-security-item::before {
  content: "";
  flex-shrink: 0;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 0 0 4px rgba(255, 122, 24, 0.12);
}

.auth-divider--compact {
  margin: 16px 0 10px;
}

.auth-card-footer {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.auth-card .primary,
.auth-card .ghost,
.verify-card .primary,
.verify-card .resend-btn {
  min-height: 48px;
  border-radius: 15px;
}

.auth-card .primary {
  box-shadow: 0 16px 34px rgba(255, 122, 24, 0.22);
}

.auth-card .ghost {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.auth-card .ghost:hover {
  border-color: rgba(255, 190, 122, 0.38);
  background: rgba(255, 255, 255, 0.06);
}

.auth-side-note {
  margin-top: 6px;
  color: rgba(177, 184, 197, 0.86);
  font-size: 13px;
}

.verify-layout {
  align-items: stretch;
}

.verify-container {
  width: 100%;
  max-width: 520px;
}

.verification-banner {
  margin: 18px 0 4px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(255, 153, 64, 0.28);
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.14), rgba(17, 24, 39, 0.88));
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.verification-banner__content strong {
  display: block;
  color: var(--ink, #f6f7fb);
  margin-bottom: 4px;
}

.verification-banner__content p {
  margin: 0;
  color: var(--muted, #b1b8c5);
}

.verification-banner__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.onboarding-reminder {
  margin: 0 0 14px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(255, 191, 122, 0.18);
  background: linear-gradient(135deg, rgba(18, 24, 35, 0.94), rgba(10, 15, 25, 0.9));
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  box-shadow: 0 16px 36px rgba(3, 7, 14, 0.24);
}

.onboarding-reminder__content {
  display: grid;
  gap: 4px;
}

.onboarding-reminder__content strong {
  color: var(--ink, #f6f7fb);
}

.onboarding-reminder__content p {
  margin: 0;
  color: var(--muted, #b1b8c5);
}

.onboarding-reminder__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

#onboarding-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
}

html.onboarding-open,
body.onboarding-open {
  overflow: hidden;
}

.onboarding-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at top left, rgba(255, 122, 24, 0.18), transparent 38%),
    rgba(3, 7, 18, 0.78);
  backdrop-filter: blur(10px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.onboarding-content {
  width: min(980px, 100%);
  max-height: min(92vh, 920px);
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 28px;
  border-radius: 24px;
  border: 1px solid rgba(255, 153, 64, 0.22);
  background: linear-gradient(160deg, rgba(17, 24, 39, 0.98), rgba(10, 15, 28, 0.96));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.48);
}

.onboarding-header h2 {
  margin: 0;
  color: var(--ink, #f6f7fb);
}

.onboarding-header p {
  margin: 10px 0 0;
  color: var(--muted, #b1b8c5);
}

.onboarding-required-note {
  margin-top: 12px;
  font-size: 12px;
  color: rgba(177, 184, 197, 0.82);
}

.required-marker {
  color: #ff9a4d;
  font-weight: 800;
}

.onboarding-types {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 24px 0 20px;
}

.business-type-card {
  min-height: 56px;
  padding: 14px 16px;
  border-radius: 999px;
  border: 1px solid rgba(177, 184, 197, 0.28);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink, #f6f7fb);
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.business-type-card:hover,
.business-type-card:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(255, 153, 64, 0.58);
  background: rgba(255, 122, 24, 0.12);
  box-shadow: 0 12px 32px rgba(255, 122, 24, 0.14);
}

.business-type-card.selected {
  border-color: rgba(255, 153, 64, 0.9);
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.28), rgba(255, 153, 64, 0.16));
  color: #fff7ed;
}

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

.onboarding-form .form-group {
  display: grid;
  gap: 8px;
}

.onboarding-form .form-group label {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  margin: 0;
  color: var(--muted, #b1b8c5);
  font-size: 0.92rem;
}

/* NFC-e persistent mode */
.nfce-mode-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 122, 24, 0.13);
  border: 1px solid rgba(255, 122, 24, 0.35);
  color: #ffd8b4;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.dropdown-item.nfce-mode-active {
  color: var(--accent, #ff7a18);
  background: rgba(255, 122, 24, 0.09);
  font-weight: 600;
}

.onboarding-field-note {
  color: rgba(177, 184, 197, 0.75);
  font-size: 12px;
  line-height: 1.4;
}

.onboarding-form input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: rgba(15, 23, 42, 0.82);
  color: var(--ink, #f6f7fb);
}

.onboarding-form input::placeholder {
  color: rgba(177, 184, 197, 0.72);
}

.onboarding-form input:focus {
  outline: none;
  border-color: rgba(255, 153, 64, 0.62);
  box-shadow: 0 0 0 4px rgba(255, 122, 24, 0.14);
}

.onboarding-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 22px;
}

@media (max-width: 860px) {
  .onboarding-overlay {
    align-items: flex-start;
    padding: 12px;
  }

  .onboarding-content {
    width: 100%;
    max-height: calc(100dvh - 24px);
    min-height: auto;
    padding: 20px;
    border-radius: 20px;
  }

  .onboarding-types,
  .onboarding-form {
    grid-template-columns: 1fr;
  }

  .onboarding-actions {
    flex-direction: column-reverse;
  }

  .onboarding-actions .btn-primary,
  .onboarding-actions .btn-secondary {
    width: 100%;
  }
}

@media (max-width: 860px) {
  .verification-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .onboarding-reminder {
    flex-direction: column;
    align-items: flex-start;
  }

  .verification-banner__actions {
    width: 100%;
  }

  .onboarding-reminder__actions {
    width: 100%;
  }

  .verification-banner__actions .primary,
  .verification-banner__actions .ghost {
    flex: 1 1 180px;
  }

  .onboarding-reminder__actions .primary,
  .onboarding-reminder__actions .ghost {
    flex: 1 1 180px;
  }
}

@media (max-width: 1160px) {
  .auth-page {
    max-width: 720px;
  }

  .auth-shell {
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 720px;
  }

  .brand-block {
    border-radius: 24px;
    padding: 24px;
  }

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

  .auth-brand-header {
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .auth-brand-header {
    flex-direction: column;
    gap: 12px;
  }

  .auth-link-row,
  .auth-inline-actions {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: flex-start;
  }

  .auth-link-row {
    display: grid;
    gap: 6px;
  }
}

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

.password-requirements {
  display: grid;
  gap: 4px;
  margin-top: 6px;
  font-size: 11px;
  color: #8f98a8;
}

.req {
  transition: color 0.2s ease;
}

.req.valid {
  color: #34d399;
}

.req.invalid {
  color: #8f98a8;
}

.verify-box {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(255, 122, 24, 0.08);
}

.verify-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.verify-actions input {
  text-align: center;
  letter-spacing: 2px;
  font-weight: 600;
}

label {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

input,
select,
textarea {
  padding: 12px 14px;
  min-height: var(--control-h);
  border-radius: 12px;
  border: 1px solid var(--border, #2a3241);
  font-size: 14px;
  background: #0e121a;
  color: var(--ink, #f6f7fb);
}

input::placeholder,
textarea::placeholder {
  color: rgba(177, 184, 197, 0.8);
}

input[type="file"] {
  padding: 10px;
  background: #0b0f17;
}

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


.activity-list {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.activity-row {
  background: var(--card-strong);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 6px;
}

.activity-empty {
  padding: 10px;
  color: var(--muted);
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 12px;
}

.activity-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

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

button {
  border: none;
  padding: 10px 16px;
  min-height: var(--control-h);
  border-radius: 999px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 20px rgba(31, 27, 22, 0.15);
}

.primary {
  background: linear-gradient(120deg, var(--accent), #ffb347);
  color: #1b120a;
  box-shadow: 0 12px 30px var(--accent-glow);
}

.secondary {
  background: linear-gradient(120deg, #6366f1, #8b5cf6);
  color: #fff;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
}

.secondary:hover {
  box-shadow: 0 12px 25px rgba(99, 102, 241, 0.4);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  width: 100%;
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 600;
  text-align: center;
}

.plan-box {
  margin-top: 18px;
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 122, 24, 0.08);
  border: 1px solid rgba(255, 122, 24, 0.3);
}

.plan-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.plan-title {
  margin: 0;
  font-size: 12px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--accent);
}

.plan-price {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.plan-list {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  display: grid;
  gap: 6px;
}

.ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--ink);
}

.muted {
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.error {
  color: #ff6b57;
  min-height: 20px;
}

.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

.sidebar {
  background:
    radial-gradient(circle at top left, rgba(255, 122, 24, 0.12), transparent 26%),
    linear-gradient(180deg, rgba(7, 11, 18, 0.94), rgba(8, 12, 19, 0.98));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: #fff;
  padding: 28px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  width: clamp(272px, 292px, 292px);
  flex-shrink: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar::-webkit-scrollbar {
  display: none;
}

.sidebar::after {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, rgba(255, 122, 24, 0.2) 0%, transparent 50%, rgba(255, 122, 24, 0.2) 100%);
}

.sidebar-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 16px 16px 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(255, 122, 24, 0.12), rgba(47, 183, 168, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  transition: all 0.3s ease;
}

.sidebar-brand > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 3px;
}

.sidebar-brand:hover {
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.2), rgba(255, 196, 140, 0.12));
  border-color: rgba(255, 122, 24, 0.4);
  box-shadow: 0 12px 40px rgba(255, 122, 24, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.sidebar-brand img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  flex-shrink: 0;
  transition: transform 0.3s ease;
  filter: drop-shadow(0 4px 8px rgba(255, 122, 24, 0.2));
}

.sidebar-brand:hover img {
  transform: scale(1.08) rotate(3deg);
}

.sidebar-brand .brand-chip {
  display: block;
  margin: 0;
  padding: 0;
  font-weight: 700;
  font-size: 15px;
  line-height: 1;
  background: linear-gradient(135deg, #ff7a18, #ffb347);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-left: -1px;
}

.sidebar-brand .muted {
  margin: 0;
  padding: 0;
  font-size: 11px;
  line-height: 1;
  color: rgba(255, 255, 255, 0.6);
}

.sidebar .muted {
  color: rgba(255, 255, 255, 0.6);
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-link {
  background: rgba(255, 255, 255, 0.02);
  color: var(--ink);
  text-align: left;
  padding: 12px 14px;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  font-weight: 500;
  font-size: 14px;
}

.nav-link::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 3px;
  background: var(--accent);
  transform: scaleY(0);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@font-face {
  font-family: "Material Icons Outlined";
  src: url("/icons/ui-pack/font/MaterialIconsOutlined-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

.nav-link .nav-icon {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid rgba(255, 122, 24, 0.3);
  background: rgba(255, 122, 24, 0.08);
  color: var(--accent);
  display: grid;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0;
  flex-shrink: 0;
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.nav-link .nav-icon::before {
  font-family: "Material Icons Outlined";
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  display: inline-block;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  content: "";
}

.nav-link[data-section="dashboard"] .nav-icon::before {
  content: "dashboard";
}
.nav-link[data-section="clients"] .nav-icon::before {
  content: "people";
}
.nav-link[data-section="products"] .nav-icon::before {
  content: "storefront";
}
.nav-link[data-section="purchases"] .nav-icon::before {
  content: "shopping_cart";
}
.nav-link[data-section="sales"] .nav-icon::before {
  content: "point_of_sale";
}
.nav-link[data-section="sales-history"] .nav-icon::before {
  content: "history";
}
.nav-link[data-section="cash"] .nav-icon::before {
  content: "account_balance_wallet";
}
.nav-link[data-section="expenses"] .nav-icon::before {
  content: "receipt_long";
}
.nav-link[data-section="financial"] .nav-icon::before {
  content: "account_balance";
}
.nav-link[data-section="appointments"] .nav-icon::before {
  content: "event";
}
.nav-link[data-section="ordens"] .nav-icon::before {
  content: "build";
}
.nav-link[data-section="warranties"] .nav-icon::before {
  content: "verified";
}
.nav-link[data-section="orcamentos"] .nav-icon::before {
  content: "assignment";
}
.nav-link[data-section="reports"] .nav-icon::before {
  content: "bar_chart";
}
.nav-link[data-section="devices"] .nav-icon::before {
  content: "devices";
}
#admin-link .nav-icon::before {
  content: "admin_panel_settings";
}

.admin-embed-shell {
  min-height: calc(100vh - 220px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  overflow: hidden;
  background: rgba(10, 16, 28, 0.9);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.admin-embed-frame {
  display: block;
  width: 100%;
  min-height: calc(100vh - 220px);
  border: 0;
  background: #0f172a;
}

#logout,
#notification-bell-btn,
#suggestion-btn,
#desktop-more-btn,
#quick-guide-btn,
#my-suggestions-btn,
#whatsapp-templates-btn,
#whatsapp-history-btn,
#manage-subscription-btn,
#settings-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#logout::before,
#notification-bell-btn::before,
#suggestion-btn::before,
#desktop-more-btn::before,
#quick-guide-btn::before,
#my-suggestions-btn::before,
#whatsapp-templates-btn::before,
#whatsapp-history-btn::before,
#manage-subscription-btn::before,
#settings-btn::before {
  font-family: "Material Icons Outlined";
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  display: inline-block;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  content: "";
}

#notification-bell-btn::before,
#suggestion-btn::before {
  display: inline-flex;
}

.topbar-inline-icon {
  font-family: "Material Icons Outlined";
  font-weight: 400;
  font-style: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  font-size: 15px;
  line-height: 1;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

.topbar-inline-icon--theme {
  font-family: "Material Icons Outlined";
  font-weight: 400;
  font-style: normal;
  width: 20px;
  height: 20px;
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

#logout::before {
  content: "exit_to_app";
}
#notification-bell-btn::before {
  content: "notifications";
}
#suggestion-btn::before {
  content: "feedback";
}
#desktop-more-btn::before {
  content: "more_horiz";
}
#quick-guide-btn::before {
  content: "menu_book";
}
#my-suggestions-btn::before {
  content: "fact_check";
}
#whatsapp-templates-btn::before {
  content: "chat";
}
#whatsapp-history-btn::before {
  content: "schedule";
}
#manage-subscription-btn::before {
  content: "subscriptions";
}
#settings-btn::before {
  content: "settings";
}

.subscription-status .sub-action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.subscription-status .sub-action::before {
  font-family: "Material Icons Outlined";
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  display: inline-block;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  content: attr(data-icon);
  width: 18px;
  overflow: hidden;
}

#hero-add-sale,
#hero-view-appointments,
#hero-add-appointment,
#hero-add-client,
#add-expense,
#add-appointment,
#add-client,
#add-product,
#add-warranty,
#sales-fast-cancel,
#sales-fast-save,
#add-sale,
#add-service,
#add-sale-nfce,
#fiscal-certificate-btn,
#export-sales {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

#hero-add-sale::before,
#hero-view-appointments::before,
#hero-add-appointment::before,
#hero-add-client::before,
#add-expense::before,
#add-appointment::before,
#add-client::before,
#add-product::before,
#add-warranty::before,
#sales-fast-cancel::before,
#sales-fast-save::before,
#add-sale::before,
#add-service::before,
#add-sale-nfce::before,
#fiscal-certificate-btn::before,
#export-sales::before {
  font-family: "Material Icons Outlined";
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  display: inline-block;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  content: "";
}

#hero-add-sale::before,
#hero-view-appointments::before,
#hero-add-appointment::before,
#hero-add-client::before {
  content: attr(data-icon);
}
#add-expense::before {
  content: "add";
}
#add-appointment::before {
  content: "add";
}
#add-client::before {
  content: "add";
}
#add-product::before {
  content: "add";
}
#add-warranty::before {
  content: "add";
}
#sales-fast-cancel::before {
  content: "close";
}
#sales-fast-save::before {
  content: "save";
}
#add-sale::before {
  content: "receipt_long";
}
#add-service::before {
  content: "build";
}
#add-sale-nfce::before {
  content: "receipt";
}
#fiscal-certificate-btn::before {
  content: "verified_user";
}
#export-sales::before {
  content: "download";
}

.ui-icon {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  border: 1px solid rgba(255, 122, 24, 0.3);
  background: rgba(255, 122, 24, 0.08);
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
}

.nav-link .nav-text {
  flex: 1;
  color: var(--muted);
  transition: color 0.3s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateX(3px);
  border-color: rgba(255, 190, 122, 0.14);
}

.nav-link:hover .nav-text {
  color: var(--ink);
}

.nav-link:hover .nav-icon {
  transform: scale(1.04);
  border-color: rgba(255, 122, 24, 0.55);
  background: rgba(255, 122, 24, 0.15);
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(255, 122, 24, 0.16), rgba(47, 183, 168, 0.08));
  border-color: rgba(255, 190, 122, 0.18);
  box-shadow: 0 16px 28px rgba(255, 122, 24, 0.12);
}

.nav-link.active .nav-text {
  color: var(--accent);
  font-weight: 600;
}

.nav-link.active::before {
  transform: scaleY(1);
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  min-width: 0;
}

.sidebar-footer button {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 122, 24, 0.08);
  border: 1px solid rgba(255, 122, 24, 0.2);
  color: var(--muted);
  border-radius: 10px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.3s ease;
}

.sidebar-footer button:hover {
  background: rgba(255, 122, 24, 0.15);
  border-color: rgba(255, 122, 24, 0.4);
  color: var(--accent);
}

.sidebar-subscription {
  display: grid;
  gap: 10px;
  padding: 12px 12px 14px;
  border-radius: 12px;
  background: rgba(255, 122, 24, 0.06);
  border: 1px solid rgba(255, 122, 24, 0.18);
  margin-bottom: 12px;
  max-width: 100%;
  overflow: hidden;
  min-width: 0;
}

.sidebar-subscription-title {
  font-size: 11px;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: rgba(255, 153, 64, 0.95);
}

.subscription-status {
  font-size: 12px;
  color: var(--muted);
  min-width: 0;
}

.subscription-status .sub-row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}

.subscription-status .sub-row > span {
  min-width: 0;
}

.subscription-status .sub-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 1px solid rgba(255, 122, 24, 0.24);
  background: rgba(255, 122, 24, 0.08);
  color: var(--accent);
  font-size: 18px;
  font-weight: 400;
  flex-shrink: 0;
}

.subscription-status .sub-badge::before {
  font-family: "Material Icons Outlined";
  font-weight: 400;
  font-style: normal;
  line-height: 1;
  display: inline-block;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  content: attr(data-icon);
  width: 18px;
  overflow: hidden;
}

.subscription-status .sub-title {
  font-weight: 700;
  color: var(--ink);
  min-width: 0;
}

.subscription-status .sub-meta {
  margin-top: 6px;
  font-size: 11px;
  color: var(--muted);
}

.subscription-status .sub-action {
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.95), rgba(255, 153, 64, 0.95));
  color: #111827;
  border: 0;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  margin-left: auto;
  flex: 0 0 auto;
}

.subscription-status .sub-action:hover {
  filter: brightness(1.03);
}

.main {
  flex: 1;
  min-width: 0;
  padding: 28px 28px 48px;
  position: relative;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100vh;
}

.topbar {
  position: relative;
  z-index: 1205;
  isolation: isolate;
  overflow: visible;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 18px;
  flex-wrap: wrap;
  padding: 18px 20px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(12, 17, 27, 0.88), rgba(11, 15, 24, 0.76));
  box-shadow: 0 18px 44px rgba(3, 7, 14, 0.34);
  backdrop-filter: blur(18px);
}

.topbar-intro {
  display: grid;
  gap: 8px;
}

.topbar-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #fdd6b3;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-badge::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

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

.desktop-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.desktop-more-wrap {
  position: relative;
  z-index: 1210;
}

.desktop-more-menu {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 244px;
  background: linear-gradient(180deg, rgba(14, 19, 29, 0.98), rgba(9, 13, 22, 0.98));
  border: 1px solid rgba(255, 190, 122, 0.18);
  border-radius: 18px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.42);
  z-index: 1215;
  padding: 8px;
  flex-direction: column;
  gap: 4px;
}

.tag-grid {
  display: none !important;
  gap: 10px;
  flex-wrap: wrap;
}

.tag {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    linear-gradient(135deg, rgba(255, 122, 24, 0.12), rgba(47, 183, 168, 0.08));
  border: 1px solid rgba(255, 190, 122, 0.16);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  color: #ebf1fb;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 16px 26px rgba(0, 0, 0, 0.18);
}

.tag::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ffb347, #ff7a18);
  box-shadow: 0 0 0 4px rgba(255, 122, 24, 0.12);
  flex: 0 0 auto;
}

.topbar-metrics .tag:nth-child(2)::before {
  background: linear-gradient(135deg, #38bdf8, #22c55e);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.12);
}

.topbar-metrics .tag:nth-child(3)::before {
  background: linear-gradient(135deg, #f472b6, #fb7185);
  box-shadow: 0 0 0 4px rgba(244, 114, 182, 0.12);
}

.tag:hover {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    linear-gradient(135deg, rgba(255, 122, 24, 0.16), rgba(47, 183, 168, 0.12));
  border-color: rgba(255, 179, 71, 0.4);
  transform: translateY(-2px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 18px 34px rgba(0, 0, 0, 0.24);
}

.topbar-action-btn,
.notification-bell-btn {
  display: inline-flex;
  align-items: center;
}

.topbar-inline-icon--btn {
  font-size: 18px;
  line-height: 1;
}

.topbar-action-label {
  display: inline-block;
  line-height: 1;
}

.topbar-action-btn,
.theme-toggle-btn,
.notification-bell-btn {
  position: relative;
  min-height: 46px;
  border-radius: 16px;
  padding: 0 16px;
  border: 1px solid rgba(255, 190, 122, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    linear-gradient(135deg, rgba(13, 18, 29, 0.96), rgba(15, 22, 35, 0.92));
  color: #eef4ff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 14px 26px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.theme-toggle-btn {
  position: relative;
  width: 46px;
  height: 46px;
  min-height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(255, 190, 122, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
    linear-gradient(135deg, rgba(13, 18, 29, 0.96), rgba(15, 22, 35, 0.92));
  color: #eef4ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 14px 26px rgba(0, 0, 0, 0.2);
}

.theme-toggle-btn::before {
  font-family: "Material Icons Outlined";
  font-weight: 400;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  display: inline-block;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  content: attr(data-icon);
}

.topbar-action-btn:hover,
.theme-toggle-btn:hover,
.notification-bell-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 179, 71, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.04)),
    linear-gradient(135deg, rgba(27, 37, 55, 0.98), rgba(18, 27, 43, 0.94));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 18px 34px rgba(0, 0, 0, 0.26);
}

.topbar-action-btn::before,
.notification-bell-btn::before {
  font-family: "Material Icons Outlined";
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  content: attr(data-icon);
  width: 18px;
  height: 18px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  flex: 0 0 auto;
}

.notification-bell-btn::before {
  content: "notifications";
}

#suggestion-btn::before {
  content: attr(data-icon);
}

#suggestion-btn.topbar-action-btn--suggestion::before {
  content: none !important;
  display: none !important;
}

#desktop-more-btn::before {
  content: "more_horiz";
}

#suggestion-btn {
  border-color: rgba(88, 170, 255, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
    linear-gradient(135deg, rgba(23, 43, 77, 0.96), rgba(18, 35, 66, 0.92));
}

#suggestion-btn:hover {
  border-color: rgba(102, 193, 255, 0.52);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.05)),
    linear-gradient(135deg, rgba(28, 56, 98, 0.98), rgba(24, 48, 86, 0.94));
}

.topbar-menu-btn {
  width: 100%;
  justify-content: flex-start;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13px;
  text-align: left;
  background: transparent;
}

.topbar-menu-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 179, 71, 0.26);
  box-shadow: none;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1px;
  font-size: 12px;
  color: var(--accent);
}

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  padding: 30px;
  border-radius: 32px;
  background:
    radial-gradient(circle at top right, rgba(47, 183, 168, 0.16), transparent 26%),
    radial-gradient(circle at bottom left, rgba(255, 122, 24, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(14, 18, 28, 0.98), rgba(10, 14, 22, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 24px 56px rgba(7, 10, 16, 0.52);
  margin-bottom: 20px;
  max-width: 100%;
  overflow: hidden;
  animation: riseIn 0.35s ease both;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -80px -80px auto;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 24, 0.16), transparent 70%);
  pointer-events: none;
}

.hero-content h2 {
  margin-top: 10px;
  font-size: clamp(32px, 4vw, 46px);
  max-width: 24ch;
  line-height: 1.12;
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.hero-actions > button {
  flex: 0 0 auto;
}

.hero-metrics {
  display: grid;
  gap: 12px;
}

.hero-metric {
  position: relative;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 16px 18px;
  display: grid;
  gap: 6px;
}

.hero-metric .muted {
  line-height: 1.25;
}

.hero-metric strong {
  font-size: 18px;
}

.hero-metric-edit {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border-radius: 999px;
  width: 30px;
  height: 30px;
  min-height: 30px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0;
}

.hero-metric-edit::before {
  font-family: "Material Icons Outlined";
  font-weight: 400;
  font-style: normal;
  font-size: 16px;
  line-height: 1;
  display: inline-block;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  content: attr(data-icon);
}

.hero-metric-edit:hover {
  color: var(--ink);
  border-color: rgba(255, 153, 64, 0.36);
  background: rgba(255, 122, 24, 0.12);
}

.hero-metric-editor {
  grid-column: 1 / -1;
  margin-top: 2px;
  padding: 12px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(10, 15, 24, 0.78);
  display: grid;
  gap: 8px;
}

.hero-metric-editor label {
  font-size: 12px;
  color: var(--muted);
}

.hero-metric-editor input,
.hero-metric-editor select {
  width: 100%;
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
}

.hero-metric-editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.mobile-home {
  display: none;
  margin-bottom: 14px;
  padding: 14px;
  border-radius: 16px;
  background: linear-gradient(130deg, rgba(255, 122, 24, 0.12), rgba(12, 16, 24, 0.8));
  border: 1px solid rgba(255, 122, 24, 0.25);
}

.mobile-home h3 {
  margin: 0 0 10px;
  font-size: 16px;
}

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

.mobile-home-btn {
  border-radius: 14px;
  border: 1px solid rgba(255, 122, 24, 0.25);
  background: rgba(18, 24, 36, 0.9);
  color: var(--ink);
  min-height: 54px;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
}

.dashboard-stage {
  display: grid;
  gap: 24px;
}

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

.intelligence-card {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 22px;
  background: linear-gradient(180deg, rgba(17, 23, 35, 0.94), rgba(12, 17, 27, 0.88));
  display: grid;
  gap: 8px;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 14px 34px rgba(2, 6, 13, 0.28);
}

.intelligence-card:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 122, 24, 0.35);
  box-shadow: 0 12px 24px rgba(7, 10, 16, 0.28);
}

.intelligence-card strong {
  font-size: 22px;
}

.dashboard-intelligence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.intelligence-panel {
  min-height: 160px;
}

.sparkline-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  min-height: 118px;
}

.sparkline-bar {
  background: linear-gradient(180deg, rgba(255, 122, 24, 0.95), rgba(255, 179, 71, 0.7));
  border-radius: 8px 8px 4px 4px;
  min-height: 6px;
  position: relative;
}

.sparkline-bar .sparkline-label {
  position: absolute;
  bottom: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}

.section {
  display: none;
}

.section.active {
  display: block;
  animation: sectionEnter 0.22s cubic-bezier(0.4, 0, 0.2, 1) both;
  will-change: opacity, transform;
}

.section.leaving {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  pointer-events: none;
  animation: sectionLeave 0.16s cubic-bezier(0.4, 0, 1, 1) both;
  will-change: opacity, transform;
}

@media (prefers-reduced-motion: reduce) {
  .section.active,
  .section.leaving {
    animation: none;
    will-change: auto;
  }
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.card {
  background: linear-gradient(180deg, rgba(17, 23, 35, 0.96), rgba(12, 17, 27, 0.9));
  border-radius: 24px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 40px rgba(7, 10, 16, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.dashboard-widget {
  background: linear-gradient(180deg, rgba(17, 23, 35, 0.96), rgba(11, 15, 24, 0.88));
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow: 0 18px 40px rgba(7, 10, 16, 0.35);
}

.dashboard-widget h3 {
  font-size: 15px;
  color: #d9e2f2;
}

.dashboard-widget .metric {
  font-size: 30px;
}

.dashboard-widgets {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
  margin-top: 16px;
}

.is-locked {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}

.upgrade-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  width: 100%;
  height: 100%;
}

.upgrade-notice .muted {
  line-height: 1.6;
  font-size: 15px;
  max-width: 100%;
  display: block;
}

[data-theme="light"] .upgrade-notice {
  background: rgba(234, 88, 12, 0.03);
  border-radius: 16px;
}

[data-theme="light"] .upgrade-notice .muted {
  color: #64748b;
}

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

  .sidebar {
    position: relative;
    height: auto;
  }

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

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

@media (max-width: 700px) {
  .main {
    padding: 18px 14px 36px;
  }

  .topbar {
    padding: 16px;
    border-radius: 18px;
  }

  .topbar-actions,
  .desktop-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .topbar-metrics,
  .desktop-actions {
    gap: 8px;
  }

  .topbar-metrics .tag,
  .topbar-action-btn,
  .notification-bell-btn {
    min-height: 42px;
    padding-inline: 14px;
  }

  .theme-toggle-btn {
    width: 42px;
    height: 42px;
    min-height: 42px;
  }

  .hero {
    padding: 22px;
    border-radius: 24px;
  }

  .intelligence-cards,
  .card-grid,
  .dashboard-widgets {
    grid-template-columns: 1fr;
  }
}

.card:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 122, 24, 0.28);
  box-shadow: 0 18px 34px rgba(7, 10, 16, 0.38);
}

.metric {
  font-size: 28px;
  font-weight: 700;
}

.mini-list {
  display: grid;
  gap: 8px;
  font-size: 13px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.section-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.filters {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.sales-fastbar {
  display: grid;
  gap: 18px;
}

.feature-locked {
  opacity: 0.7;
}

.feature-inline-hint {
  display: inline-flex;
  align-items: center;
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 122, 24, 0.14);
  color: #ffd8b4;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  white-space: nowrap;
}

.badge--locked {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 153, 64, 0.28);
  background: rgba(255, 122, 24, 0.08);
  color: #ffd8b4;
  font-size: 12px;
  font-weight: 700;
}

.sub-plan {
  margin-top: 8px;
  color: rgba(255, 216, 180, 0.88);
  font-size: 12px;
}

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

.sales-fastbar-grid label,
.sales-fastbar-item-inputs label,
.sales-fastbar-summary-values label {
  display: grid;
  gap: 8px;
  font-weight: 500;
  font-size: 14px;
}

.sales-fastbar-grid .span-2 {
  grid-column: span 2;
}

.sales-fast-client-field {
  display: grid;
  gap: 8px;
}

.sales-fast-client-controls {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.sales-fast-client-controls input {
  min-width: 0;
}

.sales-fast-client-controls .ghost {
  min-height: var(--control-h);
  white-space: nowrap;
}

.sales-fastbar-grid textarea {
  min-height: 62px;
}

.sales-fastbar-items {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  display: grid;
  gap: 12px;
}

.sales-fastbar-item-inputs {
  display: grid;
  grid-template-columns: 2fr 1.4fr 0.7fr 1fr 1fr;
  gap: 10px;
  align-items: end;
}

.sales-fastbar-item-autocomplete {
  position: relative;
}

.fastbar-autocomplete-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 25;
  max-height: 260px;
  overflow-y: auto;
  background: #111722;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.45);
  display: none;
}

.fastbar-autocomplete-option {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  cursor: pointer;
  display: grid;
  gap: 2px;
}

.fastbar-autocomplete-option:last-child {
  border-bottom: none;
}

.fastbar-autocomplete-option:hover,
.fastbar-autocomplete-option.active {
  background: rgba(255, 122, 24, 0.16);
}

.fastbar-autocomplete-option--create {
  border-top: 1px solid rgba(255, 122, 24, 0.28);
  background: rgba(255, 122, 24, 0.08);
}

.fastbar-autocomplete-option--create strong {
  color: #ffcfab;
}

.fastbar-autocomplete-option strong {
  font-size: 13px;
}

.fastbar-autocomplete-option span {
  font-size: 12px;
  color: var(--muted);
}

.sales-fastbar-item-actions {
  display: flex;
  justify-content: flex-start;
}

.sales-fast-item-row {
  background: rgba(18, 23, 34, 0.85);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sales-fastbar-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.sales-fastbar-summary h3 {
  margin: 0;
}

.sales-fastbar-summary-values {
  display: grid;
  gap: 12px;
  justify-items: end;
}

.sales-fastbar-totals {
  display: grid;
  gap: 8px;
  min-width: 220px;
}

.sales-fastbar-totals span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.report-sales-history {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.report-sales-filters {
  margin-bottom: 0;
}

.filter-input {
  background: #0e121a;
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: 12px;
  padding: 10px 14px;
  min-height: var(--control-h);
  flex: 1 1 160px;
  min-width: 0;
  max-width: 100%;
}

.table-head {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  gap: 12px;
  padding: 8px 12px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1px;
}

.table {
  display: grid;
  gap: 12px;
}

.table-row {
  background: #121722;
  border-radius: 16px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr auto;
  gap: 12px;
  align-items: center;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.table-row:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 122, 24, 0.28);
  box-shadow: 0 10px 20px rgba(7, 10, 16, 0.25);
}

.table-row--clients {
  grid-template-columns: 1.4fr 1fr 1fr auto;
  max-width: 100%;
  overflow: hidden;
}

.table-head--sales-history {
  grid-template-columns: 0.4fr 1.4fr 0.8fr 0.8fr 1fr 0.8fr auto;
}

.table-row--sales {
  grid-template-columns: 0.4fr 1.4fr 0.8fr 0.8fr 1fr 0.8fr auto;
  max-width: 100%;
  overflow: hidden;
}

.table-head.table-head--devices {
  grid-template-columns: 1.2fr 1fr 1fr auto;
}

.table-row--devices {
  grid-template-columns: 1.2fr 1fr 1fr auto;
}

.device-name {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.device-details,
.device-last-activity {
  color: var(--muted);
  font-size: 13px;
}

.table-row--products {
  grid-template-columns: 0.8fr 1.8fr 1fr 0.8fr 0.8fr 140px;
  max-width: 100%;
  overflow: hidden;
}

.table-head.table-head--products {
  grid-template-columns: 0.8fr 1.8fr 1fr 0.8fr 0.8fr 140px;
}

.table-head.table-head--expenses {
  display: grid;
  grid-template-columns: 1.8fr 1fr 0.8fr 0.8fr auto;
}

.table-row--expenses {
  grid-template-columns: 1.8fr 1fr 0.8fr 0.8fr auto;
  max-width: 100%;
  overflow: hidden;
}

/* Expenses Summary Bar */
.expenses-summary-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.expenses-summary-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 16px;
  min-width: 110px;
}

.expenses-summary-card--total { border-left: 3px solid var(--accent); }
.expenses-summary-card--paid  { border-left: 3px solid #22c55e; }
.expenses-summary-card--pending { border-left: 3px solid #f59e0b; }
.expenses-summary-card--cat  { border-left: 3px solid var(--muted); }

.esc-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.esc-value {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
}

.esc-sub {
  font-size: 0.75rem;
  color: var(--muted);
}

[data-theme="light"] .expenses-summary-card {
  background: #f8fafc;
}

[data-theme="light"] .esc-value {
  color: #111827;
}

[data-theme="light"] .esc-label,
[data-theme="light"] .esc-sub {
  color: #6b7280;
}

@media (max-width: 600px) {
  .expenses-summary-bar { gap: 8px; }
  .expenses-summary-card { min-width: calc(50% - 8px); padding: 8px 12px; }
}
/* END Expenses Summary Bar */

.table-head.table-head--bills,
.table-row--bills {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 0.8fr auto;
  gap: 16px;
  align-items: center;
}

.table-row--bills {
  background: var(--bg1);
  padding: 16px;
  border-radius: 12px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
}

/* Bill Detail Modal */
.bill-detail-card {
  width: min(540px, 100%);
}

.bill-detail-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.bill-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 8px 0;
}

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

.bill-detail-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.bill-detail-value {
  font-size: 15px;
  color: var(--fg);
}

.bill-detail-amount {
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
}

.bill-detail-line-section {
  background: var(--bg1);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 4px;
}

.bill-detail-line-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}

.bill-detail-line-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.bill-detail-line-code {
  flex: 1;
  font-size: 13px;
  font-family: 'Courier New', monospace;
  color: var(--fg);
  word-break: break-all;
  line-height: 1.5;
  background: none;
  border: none;
  padding: 0;
}

.warranty-grid-header,
.warranty-grid-row {
  display: grid;
  grid-template-columns: minmax(140px, 1.2fr) minmax(160px, 1.4fr) minmax(100px, 0.8fr) minmax(100px, 0.8fr) minmax(110px, 0.8fr) minmax(140px, 1fr) minmax(120px, auto);
  gap: 16px;
  align-items: center;
}

.warranty-grid-header {
  padding: 12px 16px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 1px;
  background: rgba(255, 122, 24, 0.05);
  border-radius: 8px;
  border-bottom: 2px solid var(--border);
}

.warranty-grid-row {
  background: #121722;
  border-radius: 12px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  margin-bottom: 12px;
  transition: background 0.2s ease;
}

.warranty-grid-row:hover {
  background: rgba(255, 122, 24, 0.05);
  border-color: rgba(255, 122, 24, 0.3);
}

.warranty-grid-row .row-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  white-space: nowrap;
}

.text-danger {
  color: #ff4d4d !important;
}

.sale-cell {
  display: flex;
  align-items: center;
}

.sale-meta {
  display: grid;
  gap: 4px;
}

.client-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 122, 24, 0.2);
  border: 1px solid rgba(255, 122, 24, 0.35);
  display: grid;
  place-items: center;
  overflow: hidden;
  flex-shrink: 0;
  color: #ffb98a;
  font-weight: 700;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.client-meta {
  display: grid;
  gap: 4px;
}

.client-meta strong {
  font-size: 14px;
}

.client-sub {
  color: var(--muted);
  font-size: 12px;
}

.link {
  color: var(--accent);
  font-size: 12px;
  margin-left: 6px;
}

.table-row span {
  font-size: 14px;
}

.row-actions {
  display: flex;
  gap: 8px;
}

.table-row--sales .row-actions {
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.table-row--sales .row-actions .action-compact {
  padding: 7px 10px;
  font-size: 12px;
  line-height: 1.1;
  border-radius: 999px;
}

.badge {
  background: rgba(255, 122, 24, 0.15);
  color: #ffb98a;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
}

.badge--active {
  background: rgba(39, 205, 128, 0.18);
  color: #8df2c4;
}

.badge--prospect {
  background: rgba(90, 164, 255, 0.18);
  color: #a8d0ff;
}

.badge--inactive {
  background: rgba(255, 108, 92, 0.2);
  color: #ffb3a8;
}

.badge--open {
  background: rgba(255, 170, 70, 0.18);
  color: #ffd2a1;
}

.badge--negotiation {
  background: rgba(98, 188, 255, 0.18);
  color: #b8e1ff;
}

.badge--contact {
  background: rgba(120, 214, 255, 0.18);
  color: #bfeaff;
}

.badge--proposal {
  background: rgba(255, 209, 102, 0.2);
  color: #ffe0a8;
}

.badge--pending {
  background: rgba(255, 154, 84, 0.2);
  color: #ffc59f;
}

.badge--processing {
  background: rgba(90, 164, 255, 0.18);
  color: #a8d0ff;
}

.badge--authorized {
  background: rgba(59, 227, 167, 0.2);
  color: #9ff3d3;
}

.badge--rejected,
.badge--error {
  background: rgba(255, 108, 92, 0.22);
  color: #ffb3a8;
}

.badge--partial {
  background: rgba(255, 206, 84, 0.22);
  color: #ffe2a6;
}

.badge--awaiting_pickup {
  background: rgba(147, 197, 253, 0.22);
  color: #bfdbfe;
}

.badge--won {
  background: rgba(39, 205, 128, 0.2);
  color: #8df2c4;
}

.badge--received {
  background: rgba(59, 227, 167, 0.2);
  color: #9ff3d3;
}

.badge--lost {
  background: rgba(255, 108, 92, 0.22);
  color: #ffb3a8;
}

.badge--canceled {
  background: rgba(180, 184, 197, 0.2);
  color: #d9dde8;
}

.report-cards {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.report-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.report-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.15fr) repeat(3, minmax(190px, 1fr));
  gap: 16px;
  align-items: stretch;
  margin-bottom: 18px;
}

.report-range {
  display: grid;
  gap: 8px;
}

.range-inputs {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.range-inputs input[type="text"] {
  width: 120px;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-primary);
  font-size: 14px;
  text-align: center;
}

.report-highlight {
  background: rgba(255, 122, 24, 0.12);
  border: 1px solid rgba(255, 122, 24, 0.25);
  padding: 12px 16px;
  border-radius: 16px;
  display: grid;
  justify-items: center;
  text-align: center;
  align-content: center;
  gap: 6px;
  min-height: 86px;
}

@media (max-width: 1100px) {
  .report-toolbar {
    grid-template-columns: repeat(2, minmax(200px, 1fr));
  }
}

@media (max-width: 680px) {
  .report-toolbar {
    grid-template-columns: 1fr;
  }
}

.report-highlight strong {
  font-size: 20px;
}

.report-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.report-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

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

.mini-trello {
  margin-top: 24px;
  background: var(--bg-panel);
  border-radius: 16px;
  border: 1px solid var(--border);
  padding: 20px;
}

.trello-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.trello-header h3 {
  margin: 0;
  font-size: 18px;
}

.trello-board {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  min-height: 300px;
}

.trello-column {
  background: rgba(255, 255, 255, 0.03);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  min-height: 280px;
}

.trello-column[data-status="todo"] {
  border-top: 3px solid #f59e0b;
}

.trello-column[data-status="doing"] {
  border-top: 3px solid #3b82f6;
}

.trello-column[data-status="done"] {
  border-top: 3px solid #10b981;
}

.column-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.column-title {
  font-weight: 600;
  font-size: 13px;
}

.task-count {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.task-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 50px;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.2s;
}

.task-list.drag-over {
  background: rgba(255, 122, 24, 0.1);
}

.task-card {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  cursor: grab;
  transition: transform 0.15s, box-shadow 0.15s;
  position: relative;
}

.task-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.task-card.dragging {
  opacity: 0.5;
  cursor: grabbing;
}

.task-card-content {
  font-size: 13px;
  line-height: 1.4;
  word-break: break-word;
}

.task-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.task-date {
  font-size: 10px;
  color: var(--muted);
}

.task-actions {
  display: flex;
  gap: 4px;
}

.task-actions button {
  background: none;
  border: none;
  padding: 2px 6px;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.6;
  transition: opacity 0.15s;
}

.task-actions button:hover {
  opacity: 1;
  color: var(--ink);
}

.task-priority {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.task-priority.high {
  background: #ef4444;
}

.task-priority.medium {
  background: #f59e0b;
}

.task-priority.low {
  background: #10b981;
}

/* Modal de nova tarefa */
.task-modal-form {
  display: grid;
  gap: 12px;
}

.task-modal-form label {
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.task-modal-form input,
.task-modal-form textarea,
.task-modal-form select {
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #0e121a;
  color: var(--ink);
  font-size: 13px;
}

.task-modal-form select option {
  background: #0e121a;
  color: var(--ink);
}

[data-theme="light"] .task-modal-form input,
[data-theme="light"] .task-modal-form textarea,
[data-theme="light"] .task-modal-form select {
  background: #ffffff;
  border: 1px solid #d1d5db;
  color: var(--ink);
}

[data-theme="light"] .task-modal-form select option {
  background: #ffffff;
  color: var(--ink);
}

[data-theme="light"] .task-modal-form input:focus,
[data-theme="light"] .task-modal-form textarea:focus,
[data-theme="light"] .task-modal-form select:focus {
  border-color: #3b82f6;
  outline: 2px solid #3b82f6;
  outline-offset: 0;
  box-shadow: none;
}

.task-modal-form textarea {
  min-height: 80px;
  resize: vertical;
}

@media (max-width: 768px) {
  .trello-board {
    grid-template-columns: 1fr;
  }
  
  .trello-column {
    min-height: 150px;
  }
}

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

.stage-list {
  display: grid;
  gap: 12px;
}

.stage-row {
  display: grid;
  grid-template-columns: 90px 1fr 40px;
  gap: 10px;
  align-items: center;
  font-size: 13px;
}

.stage-bar {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.stage-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #ffb347);
}

.mini-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
  font-size: 14px;
}

.cash-breakdown {
  display: grid;
  gap: 12px;
}

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

.cash-kpi {
  background: rgba(18, 23, 34, 0.9);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
}

.cash-kpi strong {
  font-size: 16px;
}

.cash-kpi-value--positive {
  color: #8df2c4;
}

.cash-kpi-value--negative {
  color: #ffb3a8;
}

.cash-breakdown-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  font-size: 13px;
}

.cash-list-item {
  background: rgba(18, 23, 34, 0.8);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  gap: 6px;
}

#modal-form.cash-opening-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.cash-opening-intro {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.cash-opening-intro-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cash-opening-view-toggle {
  display: inline-flex;
  gap: 6px;
}

.cash-opening-view-toggle .ghost {
  min-height: 30px;
  padding: 4px 10px;
}

.cash-opening-view-toggle .ghost.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

.cash-opening-intro h4 {
  margin: 0;
  font-size: 15px;
}

.cash-opening-intro .muted {
  margin: 0;
}

.cash-opening-panel {
  display: grid;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  background: rgba(18, 23, 34, 0.55);
}

.cash-opening-table-head,
.cash-opening-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 120px;
  gap: 10px;
  align-items: center;
}

.cash-opening-table-head {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
  padding: 0 6px 4px;
}

.cash-opening-rows {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}

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

.cash-opening-rows.cash-opening-rows--grid .cash-opening-row {
  grid-template-columns: 1fr;
  gap: 8px;
}

.cash-opening-rows.cash-opening-rows--grid .cash-opening-row input,
.cash-opening-rows.cash-opening-rows--grid .cash-opening-row strong {
  text-align: left;
}

.cash-opening-row {
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.02);
}

.cash-opening-row input {
  text-align: right;
}

.cash-opening-row strong {
  text-align: right;
  color: #e5ebf5;
}

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

.cash-opening-totals > div {
  display: grid;
  gap: 3px;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 17, 26, 0.8);
}

.cash-opening-totals strong {
  font-size: 16px;
}

.readonly-field {
  background: rgba(14, 18, 26, 0.65);
  border-style: dashed;
  color: #d7dce7;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(7, 9, 12, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 9999;
}

.modal.hidden {
  display: none;
}

.modal-card {
  background: linear-gradient(180deg, var(--card), var(--card-strong));
  padding: 24px;
  border-radius: var(--radius);
  width: min(920px, 100%);
  box-shadow: var(--shadow);
  max-height: 90vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
}

#modal-form {
  overflow-y: auto;
  max-height: 70vh;
  padding-right: 6px;
}

#modal-form.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

#modal-form.form-grid label {
  gap: 4px;
  min-width: 0;
}

.field-tooltip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted, #888);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  margin-left: 5px;
  cursor: help;
  vertical-align: middle;
  flex-shrink: 0;
  user-select: none;
}

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

.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 16px;
}

.material-icons-outlined {
  font-family: "Material Icons Outlined";
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
}

.settings-modal-grid {
  gap: 12px;
}

.settings-section {
  grid-column: 1 / -1;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.01));
  padding: 12px 14px;
}

.settings-section__header {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.settings-section__header h4 {
  margin: 0;
  font-size: 14px;
}

.settings-section__header p {
  margin: 2px 0 0;
  font-size: 12px;
}

.settings-section__icon {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(255, 153, 64, 0.18);
  color: #ffcc9a;
}

.suggestions-stack {
  gap: 10px;
}

.suggestion-card {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  background: linear-gradient(180deg, rgba(24, 31, 46, 0.95), rgba(17, 23, 36, 0.95));
}

.suggestion-card--empty {
  text-align: center;
}

.suggestion-card__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.suggestion-card__message {
  margin: 0 0 8px;
  white-space: pre-wrap;
  color: #e6ebf5;
}

.suggestion-card__meta {
  margin: 0;
  font-size: 12px;
}

.suggestion-card__note {
  margin: 10px 0 0;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: #d6dded;
  font-size: 12px;
}

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

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

@keyframes sectionLeave {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-4px);
  }
}

/* Desktop menu styles - show by default */
#desktop-actions {
  display: flex !important;
}

#mobile-menu-btn {
  display: none !important;
}

#mobile-menu-overlay {
  display: none;
}

.mobile-menu {
  /* DRAWER — escondido por padrão, fora da tela */
  position: fixed;
  top: 0;
  left: 0;
  height: 100dvh;
  width: min(80vw, 300px);
  z-index: 1300;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg, #1a1a1a);
}

.mobile-menu.open {
  /* DRAWER — aberto */
  transform: translateX(0);
}

.mobile-menu-overlay {
  /* OVERLAY — fundo escuro ao abrir */
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1299;
  background: rgba(0, 0, 0, 0.5);
}

.mobile-menu-overlay.open {
  display: block;
}

.mobile-drawer-logo {
  /* Logo dentro do drawer — tamanho controlado */
  width: 32px;
  height: 32px;
  object-fit: contain;
}

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

  .sidebar {
    display: none !important;
  }

  .nav {
    grid-auto-flow: column;
    overflow-x: auto;
  }

  .table-row {
    grid-template-columns: 1fr;
  }

  .table-row--expenses {
    grid-template-columns: 1fr;
  }

  .warranty-grid-header {
    display: none;
  }

  .warranty-grid-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .warranty-grid-row > div {
    padding: 6px 0;
    border-bottom: 1px solid rgba(255, 122, 24, 0.1);
  }

  .warranty-grid-row > div:last-child {
    border-bottom: none;
    padding-top: 8px;
  }

  .warranty-grid-row .row-actions {
    justify-content: flex-start;
    gap: 12px;
    margin-top: 8px;
  }

  .table-head {
    display: none;
  }

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

  .report-grid .span-2 {
    grid-column: span 1;
  }

  #modal-form.form-grid {
    grid-template-columns: 1fr;
  }

  #modal-form.cash-opening-modal-grid {
    grid-template-columns: 1fr;
  }

  .cash-opening-table-head,
  .cash-opening-row {
    grid-template-columns: minmax(0, 1fr) 90px 96px;
  }

  .cash-opening-intro-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .cash-opening-rows.cash-opening-rows--grid {
    grid-template-columns: 1fr;
  }

  .cash-opening-totals {
    grid-template-columns: 1fr;
  }
}

.trial-banner {
  background: linear-gradient(120deg, rgba(255, 122, 24, 0.15), rgba(255, 196, 140, 0.08));
  border: 1px solid rgba(255, 122, 24, 0.4);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.trial-banner p {
  color: var(--muted);
}
/* Toast animations */
@keyframes slideIn {
  from {
    transform: translateX(400px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

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

/* Tablets e dispositivos médios */
@media (max-width: 1024px) {
  .main {
    padding: 24px 20px;
  }
  
  .hero {
    grid-template-columns: 1fr;
  }
  
  .card-grid {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

/* Smartphones grandes e tablets pequenos */
@media (max-width: 768px) {
  .toast {
    bottom: 10px !important;
    right: 10px !important;
    left: 10px !important;
    max-width: calc(100vw - 20px) !important;
  }
  
  .modal-dialog {
    max-width: 95vw !important;
    max-height: 90vh;
    overflow-y: auto;
    margin: 10px;
    padding: 20px;
  }
  
  .form-grid {
    grid-template-columns: 1fr !important;
    gap: 16px;
  }
  
  .span-2 {
    grid-column: span 1 !important;
  }
  
  .app-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    max-width: 100vw;
  }
  
  .nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 4px;
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }
  
  .nav-link {
    font-size: 12px;
    padding: 10px 14px;
    white-space: nowrap;
    flex-shrink: 0;
  }
  
  .main {
    padding: 16px;
    padding-bottom: 80px;
    max-width: 100vw;
  }
  
  .topbar {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    padding: 0;
    margin-bottom: 16px;
  }

  .topbar-intro {
    width: 100%;
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    position: relative;
  }

  .topbar-metrics {
    display: none;
  }

  #desktop-actions {
    display: none !important;
  }

  #mobile-menu-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 14px !important;
    border-radius: 14px;
    border: 1px solid rgba(255, 190, 122, 0.2) !important;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)),
      linear-gradient(135deg, rgba(13, 18, 29, 0.96), rgba(15, 22, 35, 0.92)) !important;
    color: #eef4ff !important;
    font-size: 14px !important;
    font-weight: 700;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 14px 26px rgba(0, 0, 0, 0.2);
  }

  .topbar::before {
    content: "";
    width: 28px;
    height: 28px;
    background: url("/favicon.png") center / contain no-repeat;
    border-radius: 6px;
    opacity: 0.9;
    filter: drop-shadow(0 2px 6px rgba(255, 122, 24, 0.2));
  }
  
  .topbar > div {
    width: 100%;
    max-width: 100%;
  }
  
  .tag-grid {
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }
  
  .tag {
    font-size: 11px;
    padding: 6px 10px;
    white-space: nowrap;
  }
  
  .hero {
    padding: 20px 16px;
    border-radius: 16px;
    margin-bottom: 16px;
  }
  
  .hero-content h2 {
    font-size: 22px;
    line-height: 1.3;
  }
  
  .hero-content p {
    font-size: 14px;
  }
  
  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }
  
  .hero-actions button {
    width: 100%;
  }

  .mobile-home {
    display: block;
  }

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

  .intelligence-card strong {
    font-size: 18px;
  }

  .dashboard-intelligence-grid {
    grid-template-columns: 1fr;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .card {
    padding: 16px;
  }
  
  /* Tabelas responsivas */
  .table-row {
    padding: 16px;
    gap: 12px;
  }
  
  .table-row--clients,
  .table-row--products,
  .table-row--sales,
  .table-row--devices {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  
  .table-row--products .table-actions {
    display: flex !important;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    margin-top: 8px;
  }
  
  .table-row--products .table-actions button {
    flex: 1;
    min-width: 80px;
    font-size: 12px;
    padding: 6px 8px;
  }

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

  .sales-fastbar-grid .span-2 {
    grid-column: span 1;
  }

  .sales-fastbar-item-inputs {
    grid-template-columns: 1fr;
  }

  .sales-fast-client-controls {
    grid-template-columns: 1fr;
  }

  .sales-ai-input-wrap {
    grid-template-columns: 1fr;
  }

  .sales-fastbar-summary {
    flex-direction: column;
  }

  .sales-fastbar-summary-values {
    justify-items: stretch;
    width: 100%;
  }

  .sales-fastbar-totals {
    min-width: 0;
    width: 100%;
  }

  .sales-fast-item-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .table-head--devices {
    display: none;
  }

  .table-row--devices .row-actions {
    justify-content: flex-start;
  }

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

  .cash-breakdown-detail {
    display: grid;
    grid-template-columns: 1fr;
    gap: 6px;
  }

  #cash .section-actions,
  #devices .section-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }
  
  .row-actions,
  .table-actions {
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }
  
  .row-actions button,
  .table-actions button {
    flex: 1;
    min-width: 80px;
  }

  .table-row--sales .row-actions .action-compact {
    padding: 6px 9px;
    font-size: 11px;
    min-width: auto;
    flex: 0 1 auto;
  }
  
  /* Inputs e formulários */
  input, select, textarea {
    font-size: 16px !important; /* Previne zoom no iOS */
    min-height: 44px;
    width: 100%;
  }
  
  button {
    min-height: 44px; /* Touch target mínimo */
    font-size: 14px;
  }
  
  /* Seções e headers */
  .section-header {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }
  
  .section-header > div {
    width: 100%;
  }
  
  .section-actions {
    flex-wrap: wrap;
    width: 100%;
  }
  
  .section-actions button {
    flex: 1;
    min-width: 120px;
  }
  
  /* Trial banner */
  .trial-banner {
    flex-direction: column;
    gap: 12px;
    padding: 16px;
  }
  
  .trial-banner > div {
    width: 100%;
  }
}

.appointments-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.appointment-employee-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  width: min(100%, 720px);
}

.appointment-employee-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--bg-soft);
}

.appointment-employee-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.appointment-employee-role {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 11px;
  color: var(--muted);
}

.appointment-employee-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--muted);
}

.appointment-employee-empty {
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  background: var(--bg-soft);
}

.employee-manager-toolbar {
  display: flex;
  justify-content: flex-end;
}

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

.employee-manager-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--bg-soft);
}

.employee-manager-card p {
  margin: 4px 0 0;
}

.employee-manager-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-section {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.filter-section select {
  padding: 10px 16px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
  font-size: 13px;
  transition: all 0.3s ease;
}

.filter-section select:hover {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.calendar-container {
  background: linear-gradient(135deg, var(--card) 0%, var(--card-strong) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

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

.calendar-nav button {
  background: linear-gradient(135deg, var(--accent), #ff9d4a);
  border: none;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  font-size: 12px;
  transition: all 0.3s ease;
}

.calendar-nav button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 16px rgba(255, 122, 24, 0.3);
}

.calendar-nav h3 {
  text-align: center;
  flex: 1;
  font-size: 20px;
  background: linear-gradient(135deg, var(--accent), #ff9d4a);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.calendar-weekday {
  text-align: center;
  font-weight: 700;
  color: var(--accent);
  padding: 12px 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.calendar-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  font-size: 12px;
  color: var(--muted);
}

.calendar-day::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent), #ff9d4a);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.calendar-day:hover {
  border-color: var(--accent);
  color: var(--ink);
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(255, 122, 24, 0.2);
}

.calendar-day:hover::before {
  opacity: 0.08;
}

.calendar-day.other-month {
  opacity: 0.3;
}

.calendar-day.today {
  border: 2px solid var(--accent);
  color: var(--accent);
  font-weight: 600;
}

.calendar-day.has-appointments {
  background: linear-gradient(135deg, rgba(255, 122, 24, 0.15), rgba(255, 196, 140, 0.1));
  border-color: var(--accent);
}

.calendar-day.has-employee-match {
  background: linear-gradient(135deg, rgba(99, 200, 255, 0.18), rgba(99, 200, 255, 0.07));
  border-color: #63c8ff;
  box-shadow: 0 0 0 1.5px #63c8ff44;
}

.calendar-day.has-employee-match::after {
  content: "";
  position: absolute;
  bottom: 4px;
  width: 6px;
  height: 6px;
  background: #63c8ff;
  border-radius: 50%;
  box-shadow: 0 0 8px #63c8ff;
}

[data-theme="light"] .calendar-day.has-employee-match {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(14, 165, 233, 0.05));
  border-color: #0ea5e9;
  box-shadow: 0 0 0 1.5px #0ea5e922;
}

.calendar-day.has-appointments::after {
  content: "";
  position: absolute;
  bottom: 4px;
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--accent);
}

.appointment-count {
  font-size: 10px;
  color: var(--accent);
  font-weight: 600;
  position: absolute;
  top: 4px;
  right: 4px;
  background: var(--accent);
  color: var(--bg);
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.calendar-day-clients {
  max-width: calc(100% - 8px);
  font-size: 10px;
  line-height: 1.15;
  color: var(--ink);
  opacity: 0.85;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.appointments-table {
  background: linear-gradient(135deg, var(--card) 0%, var(--card-strong) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  margin-bottom: 24px;
}

.appointments-table table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.appointments-table thead {
  background: linear-gradient(90deg, rgba(255, 122, 24, 0.1), rgba(255, 196, 140, 0.05));
  border-bottom: 2px solid var(--border);
}

.appointments-table thead th {
  padding: 16px;
  text-align: left;
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.appointments-table tbody tr {
  border-bottom: 1px solid var(--border);
  transition: all 0.3s ease;
}

.appointments-table tbody tr:hover {
  background: rgba(255, 122, 24, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 122, 24, 0.22);
}

.appointments-table tbody tr:last-child {
  border-bottom: none;
}

.appointments-table td {
  padding: 14px 16px;
  font-size: 13px;
  color: var(--ink);
}

.appointment-datetime {
  display: inline-block;
  min-width: 136px;
  font-variant-numeric: tabular-nums;
}

.appointment-status {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  text-transform: capitalize;
  letter-spacing: 0.5px;
}

.appointment-status.agendado {
  background: rgba(77, 157, 255, 0.2);
  color: #4d9dff;
}

.appointment-status.confirmado {
  background: rgba(76, 175, 80, 0.2);
  color: #4caf50;
}

.appointment-status.concluido {
  background: rgba(156, 39, 176, 0.2);
  color: #9c27b0;
}

.appointment-status.cancelado {
  background: rgba(244, 67, 54, 0.2);
  color: #f44336;
}

.appointment-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.appointment-actions button {
  padding: 6px 12px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.appointment-actions button:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(255, 122, 24, 0.3);
}

.appointment-actions button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.no-appointments {
  text-align: center;
  padding: 48px 24px;
  color: var(--muted);
  font-size: 14px;
}

.no-appointments svg {
  width: 80px;
  height: 80px;
  margin-bottom: 16px;
  opacity: 0.3;
}

.whatsapp-modal-actions {
  display: flex;
  justify-content: flex-end;
}

.whatsapp-message-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--bg-soft);
  color: var(--ink);
}

.whatsapp-message-card-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  margin-bottom: 8px;
}

.whatsapp-message-body {
  margin: 0;
  white-space: pre-wrap;
  color: var(--ink);
  line-height: 1.45;
}

.whatsapp-message-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.financial-placeholder {
  text-align: center;
  padding: 40px;
}

.financial-placeholder-icon {
  font-size: 46px;
  margin-bottom: 14px;
  opacity: 0.72;
}

button.feature-disabled,
button.feature-disabled:hover {
  opacity: 0.6;
  filter: grayscale(0.2);
  box-shadow: none;
  transform: none;
}

[data-theme="light"] .whatsapp-message-card {
  background: #ffffff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.05);
}

[data-theme="light"] .whatsapp-message-card .tag {
  background: #f1f5f9;
  color: #334155;
  border: 1px solid #dbe3ee;
}

[data-theme="light"] .appointments-table {
  box-shadow: 0 3px 14px rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .appointments-table thead {
  background: linear-gradient(90deg, rgba(234, 88, 12, 0.12), rgba(234, 88, 12, 0.05));
}

[data-theme="light"] .appointments-table td,
[data-theme="light"] .appointments-table th {
  color: #1f2937;
}

[data-theme="light"] .appointment-actions button {
  color: #ffffff;
}

[data-theme="light"] .appointment-employee-card,
[data-theme="light"] .appointment-employee-empty,
[data-theme="light"] .employee-manager-card {
  background: #ffffff;
  border-color: #e2e8f0;
}

/* Smartphone pequenos */
.mobile-menu-group {
  display: grid;
  gap: 8px;
}

.mobile-menu-heading {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 214, 179, 0.78);
  padding: 4px 2px;
}

.mobile-menu-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 122, 24, 0.28), transparent);
  margin: 4px 0;
}

.mobile-menu-item::before {
  font-family: "Material Icons Outlined";
  font-weight: 400;
  font-style: normal;
  font-size: 18px;
  line-height: 1;
  display: inline-block;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  content: "";
  opacity: 0.9;
}

#mobile-theme-btn::before {
  content: "dark_mode";
}

#mobile-dashboard-btn::before {
  content: "dashboard";
}

#mobile-clients-btn::before {
  content: "group";
}

#mobile-products-btn::before {
  content: "storefront";
}

#mobile-purchases-btn::before {
  content: "shopping_cart";
}

#mobile-sales-btn::before {
  content: "point_of_sale";
}

#mobile-sales-history-btn::before {
  content: "history";
}

#mobile-cash-btn::before {
  content: "account_balance_wallet";
}

#mobile-expenses-btn::before {
  content: "receipt_long";
}

#mobile-financial-btn::before {
  content: "account_balance";
}

#mobile-appointments-btn::before {
  content: "event";
}

#mobile-ordens-btn::before {
  content: "build";
}

#mobile-orcamentos-btn::before {
  content: "request_quote";
}

#mobile-warranties-btn::before {
  content: "verified";
}

#mobile-reports-btn::before {
  content: "bar_chart";
}

#mobile-devices-btn::before {
  content: "devices";
}

#mobile-admin-btn::before {
  content: "admin_panel_settings";
}

#mobile-quick-guide-btn::before {
  content: "menu_book";
}

#mobile-suggestion-btn::before {
  content: "lightbulb";
}

#mobile-my-suggestions-btn::before {
  content: "fact_check";
}

#mobile-whatsapp-templates-btn::before {
  content: "chat";
}

#mobile-whatsapp-history-btn::before {
  content: "schedule";
}

#mobile-settings-btn::before {
  content: "settings";
}

#mobile-subscription-btn::before {
  content: "subscriptions";
}

@media (max-width: 900px) {
  html,
  body {
    overflow-x: hidden;
  }

  .app-shell {
    grid-template-columns: 1fr !important;
    max-width: 100vw;
  }

  .main,
  .section,
  .dashboard-stage,
  .hero,
  .card,
  .dashboard-widget,
  .intelligence-card {
    min-width: 0;
  }

  .main {
    padding: 16px 16px 32px !important;
    padding-bottom: 32px !important;
    max-width: 100vw;
    overflow-x: clip;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 1205;
    margin-bottom: 16px;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
  }

  .topbar-intro,
  .topbar-actions,
  .topbar > div {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .topbar-actions {
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    position: relative;
    flex-wrap: nowrap;
  }

  .topbar-metrics,
  #desktop-actions {
    display: none !important;
  }

  [data-theme="light"] .mobile-menu {
    background: var(--bg, #1a1a1a) !important;
  }

  .mobile-home {
    display: block;
  }

  .hero,
  .dashboard-intelligence-grid,
  .dashboard-widgets,
  .card-grid,
  .cash-kpi-grid,
  .sales-fastbar-grid,
  .sales-main {
    grid-template-columns: 1fr !important;
  }

  .hero {
    padding: 20px 16px;
    border-radius: 16px;
    margin-bottom: 16px;
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    gap: 10px;
  }

  .hero-actions button {
    width: 100%;
  }

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

  .appointments-header {
    flex-direction: column;
    align-items: stretch;
  }

  .appointment-employee-summary {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .employee-manager-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .main {
    padding: 12px !important;
    padding-bottom: 24px !important;
  }

  .hero {
    padding: 16px;
  }

  .hero-content h2 {
    font-size: 20px;
  }

  .modal-dialog {
    margin: 5px;
    padding: 16px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  h3 {
    font-size: 16px;
  }

  .card {
    padding: 14px;
  }

  .tag {
    font-size: 10px;
    padding: 5px 8px;
  }

  button {
    font-size: 13px;
  }

  .calendar-day,
  .calendar-weekday {
    font-size: 10px;
  }

  .appointments-table td {
    padding: 10px 8px;
    font-size: 11px;
  }

  .intelligence-cards,
  .cash-kpi-grid {
    grid-template-columns: 1fr;
  }
}

/* Spinner animation para lazy loading */
@keyframes spin {
  to { transform: rotate(360deg); }
}

.section-loader {
  position: relative;
  z-index: 1;
}

.dashboard-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
}

.dashboard-widget {
  background: linear-gradient(180deg, var(--card), var(--card-strong));
  border-radius: var(--radius);
  padding: 22px;
  border: 1px solid var(--border);
  box-shadow: 0 14px 40px rgba(7, 10, 16, 0.55);
  cursor: grab;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  position: relative;
}

.dashboard-widget:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 50px rgba(7, 10, 16, 0.65);
}

.dashboard-widget::before {
  content: "⋮⋮";
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 12px;
  color: var(--muted);
  opacity: 0.4;
  letter-spacing: -2px;
  pointer-events: none;
}

.dashboard-widget:hover::before {
  opacity: 0.8;
}

.dashboard-widget.dragging {
  opacity: 0.5;
  transform: scale(1.02);
  cursor: grabbing;
  z-index: 100;
}

.dashboard-widget.drag-over {
  border-color: var(--accent);
  box-shadow: 0 0 20px rgba(255, 122, 24, 0.3);
}

.dashboard-customize-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding: 10px 16px;
  background: rgba(255, 122, 24, 0.08);
  border: 1px solid rgba(255, 122, 24, 0.2);
  border-radius: 12px;
  font-size: 13px;
}

.dashboard-customize-bar span {
  color: var(--muted);
}

.dashboard-customize-bar button {
  font-size: 12px;
  padding: 6px 12px;
}

.widget-visibility-toggle {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.widget-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 11px;
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s ease;
}

.widget-toggle:hover {
  border-color: var(--accent);
}

.widget-toggle.active {
  background: rgba(255, 122, 24, 0.15);
  border-color: var(--accent);
  color: var(--ink);
}

.widget-toggle input {
  display: none;
}

.dashboard-widget.hidden-widget {
  display: none;
}

.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 12px;
  background: var(--card);
  border-radius: 0 0 var(--radius) var(--radius);
  border: 1px solid var(--border);
  border-top: none;
  margin-top: -1px;
  flex-wrap: wrap;
  gap: 12px;
}

.pagination-left,
.pagination-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

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

.pagination-perpage {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}

.pagination-perpage:hover {
  border-color: var(--accent);
}

.pagination-btn {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--ink);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pagination-btn:hover:not(:disabled) {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.pagination-pages {
  font-size: 13px;
  color: var(--muted);
  padding: 0 8px;
}

@media (max-width: 768px) {
  .pagination-controls {
    flex-direction: column;
    gap: 12px;
  }
  
  .pagination-left,
  .pagination-right {
    width: 100%;
    justify-content: center;
    flex-wrap: wrap;
  }
  
  .pagination-btn {
    padding: 8px 10px;
    font-size: 12px;
  }
}

.theme-toggle {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 20px;
  background: var(--card);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  border-color: var(--accent);
}

.theme-toggle-track {
  width: 44px;
  height: 24px;
  background: var(--bg-dark);
  border-radius: 12px;
  position: relative;
  transition: background 0.3s ease;
}

.theme-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: var(--accent);
  border-radius: 50%;
  transition: transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
}

[data-theme="light"] .theme-toggle-thumb {
  transform: translateX(20px);
}

.theme-toggle-label {
  font-size: 12px;
  color: var(--muted);
  min-width: 50px;
}

/* Ícones do tema */
.theme-icon-dark,
.theme-icon-light {
  position: absolute;
  transition: opacity 0.3s ease;
}

.theme-icon-dark {
  opacity: 1;
}

.theme-icon-light {
  opacity: 0;
}

[data-theme="light"] .theme-icon-dark {
  opacity: 0;
}

[data-theme="light"] .theme-icon-light {
  opacity: 1;
}

/* Botão compacto para topbar */
.theme-toggle-btn {
  width: 46px;
  height: 46px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0;
}

.theme-toggle-btn:hover {
  transform: translateY(-2px);
}

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

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

.skeleton {
  background: linear-gradient(
    90deg,
    var(--card) 25%,
    var(--card-strong) 50%,
    var(--card) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s ease-in-out infinite;
  border-radius: 8px;
}

.skeleton-text {
  height: 14px;
  margin: 6px 0;
}

.skeleton-text.short {
  width: 40%;
}

.skeleton-text.medium {
  width: 65%;
}

.skeleton-text.long {
  width: 90%;
}

.skeleton-title {
  height: 20px;
  width: 50%;
  margin-bottom: 12px;
}

.skeleton-metric {
  height: 36px;
  width: 70%;
  margin: 12px 0;
}

.skeleton-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex-shrink: 0;
}

.skeleton-badge {
  width: 70px;
  height: 24px;
  border-radius: 999px;
}

.skeleton-button {
  width: 60px;
  height: 32px;
  border-radius: 8px;
}

/* Skeleton containers */
.skeleton-widget {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
}

.skeleton-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: var(--card);
  border-radius: 12px;
  margin-bottom: 8px;
}

.skeleton-row-client {
  display: flex;
  align-items: center;
  gap: 12px;
}

.skeleton-row-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skeleton-row-actions {
  display: flex;
  gap: 8px;
}

/* Skeleton widgets grid */
.skeleton-widgets {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

/* Light theme adjustments */
[data-theme="light"] .skeleton {
  background: linear-gradient(
    90deg,
    #e5e7eb 25%,
    #f3f4f6 50%,
    #e5e7eb 75%
  );
  background-size: 200% 100%;
}

.notification-bell-wrap {
  position: relative;
}

.notification-bell-btn {
  position: relative;
  min-width: fit-content;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.notification-count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

.notification-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(360px, 88vw);
  max-height: 420px;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(255, 122, 24, 0.25);
  background: linear-gradient(140deg, #1a2231, #111827);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.45);
  z-index: 1200;
}

.notification-panel.hidden {
  display: none;
}

.notification-count.hidden {
  display: none;
}

.notification-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 122, 24, 0.2);
}

.notification-panel-header .ghost {
  font-size: 12px;
  padding: 6px 9px;
}

.notification-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
}

.notification-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  background: rgba(16, 24, 38, 0.82);
}

.notification-item.unread {
  border-color: rgba(255, 122, 24, 0.55);
  box-shadow: 0 0 0 1px rgba(255, 122, 24, 0.22) inset;
}

.notification-item-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.notification-item p {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.notification-item-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.notification-item-actions .ghost {
  font-size: 12px;
  padding: 5px 8px;
}

.quick-guide-prompt {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1100;
}

.quick-guide-prompt-card {
  width: min(370px, calc(100vw - 24px));
  background: linear-gradient(140deg, #1e293b, #111827);
  border: 1px solid rgba(255, 122, 24, 0.35);
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
}

.quick-guide-prompt-card h3 {
  margin: 0 0 8px;
}

.quick-guide-prompt-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.quick-guide-overlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1200;
}

.quick-guide-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(2px);
  pointer-events: auto;
  z-index: 1190;
}

.quick-guide-spotlight {
  position: absolute;
  z-index: 1195;
  border-radius: 12px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7), 0 0 20px rgba(255, 122, 24, 0.5);
  pointer-events: none;
  transition: all 0.3s ease;
  border: 2px solid #ff7a18;
}

.quick-guide-card {
  position: fixed;
  z-index: 1210;
  right: 24px;
  bottom: 24px;
  width: min(400px, calc(100vw - 48px));
  background: linear-gradient(135deg, rgba(23, 30, 46, 0.98), rgba(15, 23, 42, 0.98));
  border: 1px solid rgba(255, 122, 24, 0.3);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  pointer-events: auto;
  backdrop-filter: blur(12px);
  animation: slideUp 0.3s ease-out;
}

.quick-guide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.quick-guide-close-icon {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  font-size: 24px;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
  transition: color 0.2s;
}

.quick-guide-close-icon:hover {
  color: #fff;
}

.quick-guide-step {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ff7a18;
  background: rgba(255, 122, 24, 0.1);
  border: 1px solid rgba(255, 122, 24, 0.2);
}

.quick-guide-card h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: #fff;
  font-weight: 700;
}

.quick-guide-card p {
  margin: 0;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.6;
}

.quick-guide-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
}

.btn-guide-nav {
  padding: 10px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

[data-guide-prev] {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
}

[data-guide-prev]:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.1);
}

[data-guide-prev]:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

[data-guide-next] {
  background: #ff7a18;
  border: 1px solid #ff7a18;
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 122, 24, 0.3);
}

[data-guide-next]:hover {
  background: #ff8c3a;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(255, 122, 24, 0.4);
}

.quick-guide-focus {
  position: relative;
  z-index: 1205 !important;
  pointer-events: none !important;
}

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

@media (max-width: 900px) {
  .notification-panel {
    right: -6px;
  }

  .quick-guide-card,
  .quick-guide-prompt-card {
    width: min(94vw, 360px);
  }
}

.smart-notification-popup {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: min(320px, calc(100vw - 24px));
  padding: 11px 12px;
  border-radius: 10px;
  border: 1px solid rgba(251, 146, 60, 0.45);
  background: linear-gradient(130deg, rgba(17, 24, 39, 0.96), rgba(30, 41, 59, 0.96));
  color: #f9fafb;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  transform: translateY(20px);
  opacity: 0;
  transition: transform 0.25s ease, opacity 0.25s ease;
  z-index: 1300;
}

.smart-notification-popup.show {
  transform: translateY(0);
  opacity: 1;
}

.smart-notification-popup strong {
  display: block;
  font-size: 13px;
  margin-bottom: 4px;
}

.smart-notification-popup p {
  margin: 0;
  font-size: 13px;
  color: #e5e7eb;
  line-height: 1.35;
}

/* --- Nova Venda (Refatorada) --- */

.sales-header {
  margin-bottom: var(--space-3);
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
}

.sales-heading {
  display: grid;
  gap: 6px;
}

.sales-kicker {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 214, 184, 0.92);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sales-subtitle {
  max-width: 640px;
}

.sales-workspace {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
}

.sales-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-width: 0; /* Prevent flex overflow */
}

.sales-sidebar {
  width: 300px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.sales-panel {
  border-color: rgba(255, 255, 255, 0.07);
  background:
    radial-gradient(circle at top right, rgba(255, 122, 24, 0.08), transparent 32%),
    linear-gradient(180deg, rgba(22, 28, 40, 0.98), rgba(13, 18, 27, 0.98));
  box-shadow: 0 16px 36px rgba(4, 8, 16, 0.22);
}

.financial-summary .form-group {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.financial-summary {
  position: sticky;
  top: 16px;
  padding: 18px;
}

.financial-summary__header {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}

.financial-summary__header h3 {
  margin: 0;
}

.financial-summary__notes {
  margin-top: 16px;
}

.sales-finalize-btn {
  margin-top: 24px;
  width: 100%;
  justify-content: center;
}

/* Top Bar */
.sales-top-bar {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(130px, 0.6fr) minmax(130px, 0.6fr);
  gap: 12px;
  padding: var(--space-3);
  align-items: end;
  position: relative;
  z-index: 30;
}

.sales-top-bar .form-group {
  display: grid;
  gap: 6px;
}

.sales-top-bar .client-select-group {
  min-width: 0;
}

.sales-top-bar .sales-meta-group {
  min-width: 130px;
}

/* Client search input emphasis */
#sales-fast-client-search {
  font-size: 0.97rem;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg-soft);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#sales-fast-client-search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 24, 0.13);
  outline: none;
}

/* AI Assistant */
.sales-ai-compact {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

/* Product Entry */
.product-entry-bar {
  display: grid;
  grid-template-columns: 1fr 72px 116px 140px 110px;
  gap: 10px;
  padding: var(--space-3);
  align-items: end;
  position: relative;
  z-index: 20;
}

/* Product search input emphasis */
#sales-fast-item {
  font-size: 0.97rem;
  height: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1.5px solid var(--border);
  background: var(--bg-soft);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

#sales-fast-item:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255, 122, 24, 0.13);
  outline: none;
}

.product-search-group {
  min-width: 0;
}

.sales-fast-entry-grid {
  display: contents;
}

/* Ajustes para telas menores onde a sobreposição ocorre */
@media (max-width: 1100px) {
  .product-entry-bar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  
  .product-search-group {
    width: 100%;
    margin-bottom: 12px;
  }
  
  .sales-fast-entry-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
  }
}

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

.product-entry-bar input,
.product-entry-bar .total-field,
.product-entry-bar .add-btn {
  height: 40px;
}

.qty-field input {
  text-align: center;
}

.unit-field input {
  text-align: right;
}

.total-field {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-weight: 600;
  color: var(--ink);
  cursor: default;
  text-align: right;
}

/* Autocomplete */
.autocomplete-stack {
  display: grid;
  gap: 6px;
}

.autocomplete-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-1);
  align-items: center;
}

.sales-quick-icon-btn {
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: 12px;
  border: 1px solid rgba(255, 122, 24, 0.22);
  background: rgba(255, 122, 24, 0.08);
  color: var(--accent);
  display: grid;
  place-items: center;
  box-shadow: none;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.sales-quick-icon-btn::before {
  font-family: "Material Icons Outlined";
  font-weight: 400;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  display: inline-block;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
  direction: ltr;
  -webkit-font-feature-settings: "liga";
  font-feature-settings: "liga";
  -webkit-font-smoothing: antialiased;
  content: attr(data-icon);
}

.sales-quick-icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(255, 122, 24, 0.42);
  background: rgba(255, 122, 24, 0.14);
  box-shadow: none;
}

.autocomplete-anchor {
  position: relative;
  min-width: 0;
}

.autocomplete-stack .autocomplete-list {
  position: static;
  border-radius: 12px;
  max-height: 240px;
}

.autocomplete-wrapper {
  position: relative;
  display: flex;
  gap: var(--space-1);
}

.autocomplete-wrapper input {
  width: 100%;
}

.autocomplete-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 14px;
  max-height: 320px;
  overflow-y: auto;
  z-index: 200;
  box-shadow: 0 8px 32px rgba(0,0,0,0.22), 0 2px 8px rgba(0,0,0,0.12);
  display: none;
}

.autocomplete-list:not(.hidden) {
  display: block;
}

.autocomplete-item {
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  transition: background 0.1s ease;
}

.autocomplete-item:first-child {
  border-radius: 14px 14px 0 0;
}

.autocomplete-item:last-child {
  border-bottom: none;
  border-radius: 0 0 14px 14px;
}

.autocomplete-item:only-child {
  border-radius: 14px;
}

.autocomplete-item:hover, .autocomplete-item.focused {
  background: rgba(255, 122, 24, 0.08);
  color: var(--accent);
}

.autocomplete-item strong {
  display: block;
  color: var(--ink);
  font-size: 0.93rem;
}

.autocomplete-item small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}

.ac-item-main {
  min-width: 0;
  flex: 1;
}

.ac-item-main strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ac-item-price {
  flex-shrink: 0;
  font-size: 0.92rem;
  color: var(--accent);
  font-weight: 700;
}

/* Items List */
.sales-items-list-container {
  overflow: hidden;
  position: relative;
  z-index: 10;
}

.sales-items-body {
  padding: 0;
}

.sales-items-empty-state {
  padding: 40px 24px;
  text-align: center;
  color: var(--muted);
}

.sales-items-header {
  display: grid;
  grid-template-columns: 3fr 1fr 1fr 1fr 50px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sales-items-header__numeric {
  text-align: right;
}

.sales-items-header__actions {
  text-align: center;
}

.sales-items-body .item-row {
  display: grid;
  grid-template-columns: 3fr 1fr 1fr 1fr 50px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.sales-items-body .item-row:hover {
  background: var(--bg-dark);
}

.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.discount-row {
  margin-bottom: 16px;
}

.discount-input-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.financial-summary__field-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.discount-currency {
  color: var(--muted);
}

.sales-amount-shortcut {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 122, 24, 0.2);
  background: rgba(255, 122, 24, 0.08);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.sales-amount-shortcut:hover {
  background: rgba(255, 122, 24, 0.14);
  border-color: rgba(255, 122, 24, 0.3);
}

#sales-fast-discount {
  width: 92px;
  text-align: right;
  padding: 6px 8px;
}

.total-row {
  margin-bottom: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 1.22rem;
}

.total-row #sales-fast-total {
  color: var(--accent);
}

.remaining-row {
  margin-top: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.received-row,
.change-row {
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.received-row {
  background: rgba(76, 175, 80, 0.08);
}

.change-row {
  background: rgba(255, 193, 7, 0.08);
}

.received-row #sales-fast-received,
.change-row #sales-fast-change,
.remaining-row #sales-fast-remaining {
  font-weight: 700;
}

/* Dropdown Menu */
.dropdown-container {
  position: relative;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  z-index: 50;
  padding: 6px;
  display: none;
}

.dropdown-menu:not(.hidden) {
  display: block;
  animation: fadeIn 0.12s ease-out;
}

.dropdown-section-label {
  padding: 4px 12px 2px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  background: none;
  border: none;
  color: var(--ink);
  cursor: pointer;
  border-radius: 6px;
  font-size: 14px;
  line-height: 1.3;
  transition: background 0.1s, color 0.1s;
}

.dropdown-item-text {
  flex: 1;
}

.dropdown-item:hover {
  background: rgba(255, 122, 24, 0.08);
  color: var(--accent);
}

.dropdown-item.feature-locked {
  opacity: 0.6;
}

.dropdown-item.feature-locked:hover {
  background: rgba(255, 122, 24, 0.05);
  color: var(--muted);
}

/* Mobile Responsiveness */
@media (max-width: 900px) {
  .sales-header {
    flex-direction: column;
    align-items: stretch;
  }

  .sales-workspace {
    flex-direction: column;
  }
  
  .sales-sidebar {
    width: 100%;
  }
  
  .sales-top-bar,
  .product-entry-bar {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .sales-items-header {
    display: none;
  }
  
  .product-inputs {
    flex-wrap: wrap;
  }
}

/* ============================================================
   ORDENS + DOCUMENTOS FRONTEND
   ============================================================ */

.ordens-table-head {
  display: grid;
  grid-template-columns: 140px 1fr 1.4fr 130px 130px 160px;
  gap: 8px;
  align-items: center;
}

.ordem-row {
  display: grid;
  grid-template-columns: 140px 1fr 1.4fr 130px 130px 160px;
  gap: 8px;
  align-items: center;
}

.report-document-sales .table .table-row {
  grid-template-columns: 100px 1.4fr 120px 120px 140px;
}

@media (max-width: 768px) {
  .ordens-table-head {
    display: none;
  }

  .ordem-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 12px;
  }

  .report-document-sales .table .table-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

/* ============================================================
   ORÇAMENTOS MODULE
   ============================================================ */

/* status badges */
.badge-gray   { background: rgba(156,163,175,.18); color: #d1d5db; }
.badge-blue   { background: rgba(59,130,246,.18);  color: #93c5fd; }
.badge-green  { background: rgba(34,197,94,.18);   color: #86efac; }
.badge-red    { background: rgba(239,68,68,.18);   color: #fca5a5; }
.badge-orange { background: rgba(249,115,22,.18);  color: #fdba74; }

[data-theme="light"] .badge-gray   { background: #f3f4f6; color: #6b7280; }
[data-theme="light"] .badge-blue   { background: #eff6ff; color: #2563eb; }
[data-theme="light"] .badge-green  { background: #f0fdf4; color: #16a34a; }
[data-theme="light"] .badge-red    { background: #fef2f2; color: #dc2626; }
[data-theme="light"] .badge-orange { background: #fff7ed; color: #ea580c; }

.orc-table-head {
  display: grid;
  grid-template-columns: 70px 1fr 100px 100px 110px 110px 90px;
  gap: 8px;
  align-items: center;
}

.orcamento-row {
  display: grid;
  grid-template-columns: 70px 1fr 100px 100px 110px 110px 90px;
  gap: 8px;
  align-items: center;
  cursor: pointer;
  transition: background .15s ease;
}

.orcamento-row:hover { background: var(--bg-dark); }

.orc-actions { display: flex; gap: 6px; }
.orc-actions .ghost { padding: 4px 8px; font-size: 14px; }

.orc-total-big { font-size: 18px; color: var(--accent); }

.orc-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
  margin-bottom: 14px;
}

.orc-detail-grid > div { display: flex; flex-direction: column; gap: 2px; }

.orc-detail-notes {
  font-size: 13px;
  color: var(--muted);
  border-left: 3px solid var(--accent);
  padding-left: 10px;
  margin-bottom: 14px;
}

.orc-items-header {
  display: grid;
  grid-template-columns: 1fr 160px 100px;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 8px 8px 0 0;
  background: var(--bg-dark);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.orc-items-body {
  border: 1px solid var(--border);
  border-radius: 0 0 8px 8px;
  overflow: hidden;
}

.orc-detail-item {
  display: grid;
  grid-template-columns: 1fr 160px 100px;
  gap: 8px;
  padding: 8px 10px;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
}

.orc-detail-item:last-child { border-bottom: none; }

.orc-detail-actions { display: flex; gap: 10px; margin-top: 18px; }

.orc-form { display: flex; flex-direction: column; gap: 12px; }

.orc-form-row { display: flex; flex-direction: column; gap: 4px; }

.orc-form-row label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .4px;
}

.orc-items-form-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 6px;
}

.orc-item-row {
  display: grid;
  grid-template-columns: 1fr 140px 70px 100px 36px;
  gap: 6px;
  align-items: center;
  margin-bottom: 6px;
}

.orc-item-row input,
.orc-item-row select { padding: 6px 8px; font-size: 13px; }

.orc-item-remove { padding: 4px 8px !important; font-size: 13px; color: var(--muted); }

.orc-total-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
  font-size: 14px;
}

.orc-total-row strong { font-size: 18px; color: var(--accent); }

@media (max-width: 768px) {
  .orc-table-head { display: none; }
  .orcamento-row {
    grid-template-columns: 1fr 1fr;
    padding: 12px;
  }
  .orc-num    { grid-column: 1; font-weight: 700; }
  .orc-client { grid-column: 2; text-align: right; }
  .orc-total  { grid-column: 1; }
  .orc-status { grid-column: 2; text-align: right; }
  .orc-date, .orc-valid { display: none; }
  .orc-actions { grid-column: 1 / -1; justify-content: flex-end; }
  .orc-detail-grid { grid-template-columns: 1fr; }
  .orc-item-row { grid-template-columns: 1fr 60px 90px 36px; }
}

/* Drawer mobile moderno */
@media (max-width: 900px) {
  .topbar-actions {
    position: relative;
  }

  #mobile-menu-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 0 !important;
    border-radius: 999px;
    border: 1px solid rgba(255, 122, 24, 0.28) !important;
    background: linear-gradient(145deg, rgba(22, 31, 48, 0.94), rgba(11, 18, 30, 0.94)) !important;
    color: #f4f7ff !important;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.32);
    touch-action: manipulation;
    gap: 0;
    flex-direction: column;
  }

  [data-theme="light"] #mobile-menu-btn {
    border: 1px solid rgba(27, 59, 95, 0.2) !important;
    background: linear-gradient(145deg, #ffffff, #edf3ff) !important;
    color: #1d334a !important;
    box-shadow: 0 10px 20px rgba(29, 51, 74, 0.18);
  }

  #mobile-menu-btn .hamburger-line {
    width: 20px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform 300ms cubic-bezier(0.4, 0, 0.2, 1), opacity 300ms cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
  }

  #mobile-menu-btn .hamburger-line + .hamburger-line {
    margin-top: 4px;
  }

  #mobile-menu-btn.is-active .hamburger-line:nth-child(2) {
    transform: translateY(6px) rotate(45deg);
  }

  #mobile-menu-btn.is-active .hamburger-line:nth-child(3) {
    opacity: 0;
  }

  #mobile-menu-btn.is-active .hamburger-line:nth-child(4) {
    transform: translateY(-6px) rotate(-45deg);
  }

  .mobile-drawer-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 14px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
  }

  [data-theme="light"] .mobile-drawer-header {
    border-bottom-color: rgba(32, 52, 75, 0.12);
  }

  .mobile-drawer-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
  }

  .mobile-drawer-brand {
    min-width: 0;
    display: grid;
  }

  .mobile-drawer-brand strong {
    font-size: 14px;
    font-weight: 700;
    color: #f7fbff;
    line-height: 1.2;
  }

  .mobile-drawer-brand span {
    font-size: 11px;
    color: rgba(189, 203, 227, 0.88);
    line-height: 1.2;
  }

  [data-theme="light"] .mobile-drawer-brand strong {
    color: #1f3045;
  }

  [data-theme="light"] .mobile-drawer-brand span {
    color: #506680;
  }

  .mobile-menu-scroll {
    flex: 1 1 auto;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 10px 10px 12px;
  }

  .mobile-menu-group {
    display: grid;
    gap: 6px;
  }

  .mobile-menu-heading {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 214, 179, 0.8);
    padding: 4px 6px;
  }

  [data-theme="light"] .mobile-menu-heading {
    color: rgba(33, 58, 84, 0.72);
  }

  .mobile-menu-divider {
    height: 1px;
    margin: 8px 0;
    background: linear-gradient(90deg, transparent, rgba(255, 122, 24, 0.26), transparent);
  }

  [data-theme="light"] .mobile-menu-divider {
    background: linear-gradient(90deg, transparent, rgba(33, 58, 84, 0.24), transparent);
  }

  .mobile-menu-item {
    width: 100%;
    min-width: 0;
    min-height: 42px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    border-radius: 12px;
    padding: 10px 10px;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.02);
    color: #f5f8ff;
    font-size: 13px;
    font-weight: 500;
    text-align: left;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
  }

  .mobile-menu-item::before {
    flex: 0 0 18px;
    width: 18px;
    text-align: center;
    color: rgba(255, 187, 130, 0.92);
  }

  .mobile-menu-item:hover,
  .mobile-menu-item:active {
    background: rgba(255, 122, 24, 0.14);
    border-color: rgba(255, 122, 24, 0.28);
    color: #ffd6a6;
  }

  .mobile-menu-item.active {
    background: rgba(255, 122, 24, 0.18);
    border-color: rgba(255, 122, 24, 0.4);
    color: #ffb26a;
  }

  .mobile-menu-item.active::before {
    color: #ff9a41;
  }

  [data-theme="light"] .mobile-menu-item {
    border-color: rgba(30, 60, 94, 0.12);
    background: rgba(255, 255, 255, 0.82);
    color: #1f334b;
  }

  [data-theme="light"] .mobile-menu-item::before {
    color: rgba(184, 90, 19, 0.9);
  }

  [data-theme="light"] .mobile-menu-item:hover,
  [data-theme="light"] .mobile-menu-item:active {
    background: rgba(255, 122, 24, 0.14);
    color: #a44f10;
    border-color: rgba(184, 90, 19, 0.28);
  }

  [data-theme="light"] .mobile-menu-item.active {
    background: rgba(255, 122, 24, 0.18);
    color: #9a470b;
    border-color: rgba(184, 90, 19, 0.35);
  }

  .mobile-drawer-footer {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(8, 14, 24, 0.45);
  }

  [data-theme="light"] .mobile-drawer-footer {
    border-top-color: rgba(30, 60, 94, 0.12);
    background: rgba(238, 245, 255, 0.72);
  }

  .mobile-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #ff7a18, #ff9a41);
    flex-shrink: 0;
  }

  .mobile-user-meta {
    min-width: 0;
    display: grid;
    line-height: 1.2;
  }

  .mobile-user-meta strong {
    font-size: 12px;
    color: #f3f7ff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .mobile-user-meta span {
    font-size: 11px;
    color: rgba(188, 204, 229, 0.9);
  }

  [data-theme="light"] .mobile-user-meta strong {
    color: #1e3148;
  }

  [data-theme="light"] .mobile-user-meta span {
    color: #506680;
  }
}

@media (max-width: 420px) {
  .mobile-menu {
    width: min(80vw, 300px);
  }

  .mobile-menu-item {
    min-height: 40px;
    font-size: 12px;
    padding: 9px 9px;
  }
}

.pwa-install-card {
  position: fixed;
  left: 12px;
  right: 12px;
  bottom: max(12px, env(safe-area-inset-bottom));
  z-index: 1400;
  border-radius: 16px;
  border: 1px solid rgba(255, 122, 24, 0.35);
  background: linear-gradient(140deg, rgba(11, 18, 30, 0.96), rgba(19, 31, 48, 0.95));
  color: #eef5ff;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.38);
  padding: 14px 14px 12px;
  animation: pwaInstallSlideIn 220ms ease-out;
}

.pwa-install-fab {
  position: fixed;
  right: 12px;
  bottom: max(86px, calc(env(safe-area-inset-bottom) + 64px));
  z-index: 1390;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 122, 24, 0.38);
  background: linear-gradient(135deg, #ff7a18, #ff9d4d);
  color: #251304;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.01em;
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
  display: none;
  align-items: center;
  justify-content: center;
}

.pwa-install-title {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 6px;
}

.pwa-install-text {
  margin: 0;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(225, 234, 246, 0.9);
}

.pwa-install-actions {
  margin-top: 12px;
  display: flex;
  gap: 8px;
}

.pwa-install-primary,
.pwa-install-secondary,
.pwa-install-close {
  border: 0;
  cursor: pointer;
}

.pwa-install-primary,
.pwa-install-secondary {
  min-height: 38px;
  padding: 0 12px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
}

.pwa-install-primary {
  background: linear-gradient(135deg, #ff7a18, #ff9d4d);
  color: #1f1205;
  flex: 1;
}

.pwa-install-secondary {
  background: rgba(255, 255, 255, 0.08);
  color: #e3edfb;
  flex: 1;
}

.pwa-install-close {
  position: absolute;
  top: 6px;
  right: 8px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: #d7e5f7;
  font-size: 18px;
  line-height: 1;
}

[data-theme="light"] .pwa-install-card {
  border-color: rgba(30, 60, 94, 0.2);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.96), rgba(240, 247, 255, 0.95));
  color: #1e324a;
  box-shadow: 0 16px 32px rgba(18, 45, 76, 0.18);
}

[data-theme="light"] .pwa-install-fab {
  border-color: rgba(184, 90, 19, 0.32);
  box-shadow: 0 10px 20px rgba(29, 51, 74, 0.18);
}

[data-theme="light"] .pwa-install-text {
  color: rgba(35, 54, 78, 0.88);
}

[data-theme="light"] .pwa-install-secondary {
  background: rgba(35, 68, 104, 0.09);
  color: #20364e;
}

[data-theme="light"] .pwa-install-close {
  background: rgba(35, 68, 104, 0.1);
  color: #22405f;
}

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

@media (min-width: 901px) {
  .pwa-install-card {
    left: auto;
    right: 20px;
    bottom: 20px;
    width: min(420px, calc(100vw - 40px));
    border-radius: 14px;
  }

  .pwa-install-actions {
    justify-content: flex-end;
  }

  .pwa-install-primary,
  .pwa-install-secondary {
    flex: 0 0 auto;
    min-width: 128px;
  }

  .pwa-install-fab {
    right: 20px;
    bottom: 20px;
  }
}
