/* ViloBot — Mobile-first dark theme */
:root {
  --bg: #0f0f1a;
  --bg2: #1a1a2e;
  --bg3: #252540;
  --border: rgba(255,255,255,0.1);
  --text: #ffffff;
  --text-dim: rgba(255,255,255,0.5);
  --accent: #E8735A;
  --accent-hover: #d4624a;
  --green: #4ade80;
  --yellow: #fbbf24;
  --red: #f87171;
  --blue: #60a5fa;
  --purple: #a78bfa;
  --radius: 10px;
  --sidebar-width: 260px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.5; -webkit-font-smoothing: antialiased; min-height: 100vh; overflow-x: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Scrollbar ─────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--bg3); border-radius: 3px; }

/* ── Layout ────────────────────────────── */
.app-shell { display: flex; min-height: 100vh; }

/* ── Sidebar ───────────────────────────── */
.sidebar { width: var(--sidebar-width); background: var(--bg2); border-right: 1px solid var(--border); display: flex; flex-direction: column; position: fixed; top: 0; left: 0; bottom: 0; z-index: 100; transition: transform 0.25s ease, width 0.2s ease; }
/* Collapsed sidebar — thin vertical bar */
.sidebar.collapsed { width: 44px; min-width: 44px; overflow: visible; }
.sidebar.collapsed .sidebar-header h1,
.sidebar.collapsed .sidebar-header .user-name,
.sidebar.collapsed .sidebar-section,
.sidebar.collapsed .nav-label,
.sidebar.collapsed .sidebar-footer { display: none; }
.sidebar.collapsed .sidebar-header { padding: 12px 8px; }
.sidebar.collapsed .sidebar-nav { overflow-y: hidden; overflow-x: hidden; width: 44px; }
.sidebar.collapsed .nav-item { padding: 10px 12px; justify-content: center; gap: 0; border-left: none; overflow: hidden; white-space: nowrap; width: 44px; }
.sidebar.collapsed .nav-item .nav-icon { width: auto; font-size: 18px; }
/* Toggle bar — sits on top edge of sidebar */
.sidebar-toggle { position: absolute; top: 8px; right: -20px; width: 20px; height: 40px; background: var(--bg2); border: 1px solid var(--border); border-left: none; border-radius: 0 6px 6px 0; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--text-dim); font-size: 11px; z-index: 200; }
.sidebar-toggle:hover { background: var(--accent); color: #fff; }
.sidebar-header { padding: 20px 16px; border-bottom: 1px solid var(--border); }
.sidebar-header h1 { font-size: 22px; font-weight: 700; color: var(--accent); }
.sidebar-header .user-name { font-size: 13px; color: var(--text-dim); margin-top: 2px; }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.sidebar-section { padding: 8px 16px 4px; font-size: 11px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; color: var(--text-dim); font-size: 14px; cursor: pointer; transition: all 0.15s; border-left: 3px solid transparent; }
.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active { background: rgba(232,115,90,0.1); color: var(--accent); border-left-color: var(--accent); font-weight: 600; }
.nav-item .nav-icon { width: 20px; text-align: center; font-size: 16px; }
.sidebar-footer { padding: 12px 16px; border-top: 1px solid var(--border); }
.logout-btn { width: 100%; padding: 10px; background: var(--bg3); border: 1px solid var(--border); color: var(--text-dim); border-radius: 8px; cursor: pointer; font-size: 13px; }
.logout-btn:hover { color: var(--red); border-color: var(--red); }

/* ── Main content ──────────────────────── */
.main-content { flex: 1; margin-left: var(--sidebar-width); min-height: 100vh; overflow-x: hidden; width: calc(100vw - var(--sidebar-width)); max-width: calc(100vw - var(--sidebar-width)); transition: margin-left 0.2s ease, max-width 0.2s ease; }
.sidebar.collapsed ~ .main-content { margin-left: 44px; width: calc(100vw - 44px); max-width: calc(100vw - 44px); }
.app-header { position: sticky; top: 0; background: var(--bg); border-bottom: 1px solid var(--border); padding: 14px 20px; display: flex; align-items: center; gap: 12px; z-index: 50; }
.app-header .menu-toggle { display: none; background: none; border: none; color: var(--text); font-size: 22px; cursor: pointer; padding: 4px; }
.app-header h2 { font-size: 18px; font-weight: 600; flex: 1; }
.app-body { padding: 16px 20px; width: 100%; max-width: 100%; overflow-x: auto; box-sizing: border-box; }

/* ── Mobile sidebar ────────────────────── */
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; }

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); width: 280px; }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .sidebar-toggle { display: none; }
  .sidebar.open .sidebar-toggle { display: flex; }
  .main-content { margin-left: 0 !important; max-width: 100vw !important; }
  .app-header .menu-toggle { display: block; }
  .app-body { padding: 12px; }
}

/* ── Tablet (iPad) ────────────────────── */
@media (min-width: 769px) and (max-width: 1180px) {
  :root { --sidebar-width: 200px; }
  .sidebar .nav-label { font-size: 12px; }
  .app-body { padding: 12px 14px; }
}

/* ── Cards ─────────────────────────────── */
.card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.card-title { font-size: 15px; font-weight: 600; }
.card-subtitle { font-size: 13px; color: var(--text-dim); }

/* ── Badges ────────────────────────────── */
.badge { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 12px; font-weight: 600; }
.badge-green { background: rgba(74,222,128,0.15); color: var(--green); }
.badge-yellow { background: rgba(251,191,36,0.15); color: var(--yellow); }
.badge-red { background: rgba(248,113,113,0.15); color: var(--red); }
.badge-blue { background: rgba(96,165,250,0.15); color: var(--blue); }
.badge-purple { background: rgba(167,139,250,0.15); color: var(--purple); }
.badge-gray { background: rgba(255,255,255,0.08); color: var(--text-dim); }
.badge-accent { background: rgba(232,115,90,0.15); color: var(--accent); }

/* ── Buttons ───────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 10px; font-size: 15px; font-weight: 600; border: none; cursor: pointer; transition: all 0.15s; min-height: 44px; -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
.btn:active { transform: scale(0.97); opacity: 0.9; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--bg3); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--accent); }
.btn-sm { padding: 10px 14px; font-size: 13px; min-height: 40px; }
.btn-icon { padding: 10px; background: none; border: none; color: var(--text-dim); cursor: pointer; font-size: 18px; min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }

/* ── Forms ─────────────────────────────── */
.form-input, .form-select { width: 100%; padding: 12px 14px; background: var(--bg3); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-size: 16px; outline: none; min-height: 44px; -webkit-appearance: none; }
.form-input:focus, .form-select:focus { border-color: var(--accent); }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='rgba(255,255,255,0.5)' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.form-label { display: block; font-size: 13px; color: var(--text-dim); margin-bottom: 4px; }
.form-group { margin-bottom: 12px; }

/* ── Search bar ────────────────────────── */
.search-bar { position: relative; }
.search-bar input { padding-left: 36px; }
.search-bar::before { content: "\1F50D"; position: absolute; left: 12px; top: 50%; transform: translateY(-50%); font-size: 14px; opacity: 0.5; }

/* ── Tabs ──────────────────────────────── */
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--bg2); border-radius: 12px; margin-bottom: 16px; overflow-x: auto; flex-wrap: wrap; }
.tab { padding: 10px 18px; border-radius: 10px; font-size: 14px; font-weight: 600; color: var(--text-dim); cursor: pointer; white-space: nowrap; transition: all 0.15s; min-height: 44px; display: flex; align-items: center; -webkit-tap-highlight-color: transparent; }
.tab.active { background: var(--accent); color: #fff; }
.tab:active:not(.active) { background: var(--bg3); }
.tab:hover:not(.active) { color: var(--text); }

/* ── Table ─────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th { text-align: left; padding: 10px 12px; font-size: 12px; font-weight: 600; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 10px 12px; font-size: 14px; border-bottom: 1px solid var(--border); }
.data-table tr:hover td { background: rgba(255,255,255,0.02); }
.data-table .clickable { cursor: pointer; }
.data-table .clickable:hover td { background: rgba(232,115,90,0.05); }

/* ── Kanban ────────────────────────────── */
.kanban-board { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; }
.kanban-col { min-width: 280px; flex: 1; }
.kanban-col-header { padding: 10px 12px; background: var(--bg2); border-radius: var(--radius) var(--radius) 0 0; border: 1px solid var(--border); border-bottom: 2px solid var(--accent); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; }
.kanban-col-header .count { background: var(--bg3); padding: 2px 8px; border-radius: 10px; font-size: 11px; color: var(--text-dim); }
.kanban-col-body { border: 1px solid var(--border); border-top: none; border-radius: 0 0 var(--radius) var(--radius); padding: 8px; min-height: 100px; background: var(--bg); }
.kanban-card { background: var(--bg2); border: 1px solid var(--border); border-radius: 8px; padding: 12px; margin-bottom: 8px; cursor: pointer; transition: border-color 0.15s; }
.kanban-card:hover { border-color: var(--accent); }
.kanban-card .kc-name { font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.kanban-card .kc-customer { font-size: 13px; color: var(--text-dim); }
.kanban-card .kc-amount { font-size: 14px; font-weight: 600; color: var(--green); margin-top: 6px; }
.kanban-card .kc-date { font-size: 12px; color: var(--text-dim); }
.kanban-card .kc-meta { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }

/* ── Stats row ─────────────────────────── */
.stats-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; margin-bottom: 16px; width: 100%; box-sizing: border-box; }
.stat-card { background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; text-align: center; }
.stat-value { font-size: 24px; font-weight: 700; }
.stat-label { font-size: 12px; color: var(--text-dim); margin-top: 2px; }

/* ── Filter bar ────────────────────────── */
.filter-bar { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; align-items: center; }
.filter-bar .form-input, .filter-bar .form-select { width: auto; min-width: 140px; padding: 8px 12px; font-size: 14px; }

/* ── Detail view ───────────────────────── */
.detail-back { display: inline-flex; align-items: center; gap: 6px; color: var(--text-dim); font-size: 14px; cursor: pointer; margin-bottom: 16px; }
.detail-back:hover { color: var(--accent); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 768px) { .detail-grid { grid-template-columns: 1fr; } }
.detail-section { margin-bottom: 20px; }
.detail-section h3 { font-size: 14px; font-weight: 600; color: var(--text-dim); margin-bottom: 8px; text-transform: uppercase; letter-spacing: 0.5px; }
.detail-row { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 14px; }
.detail-row .label { color: var(--text-dim); }
.detail-row .value { font-weight: 500; text-align: right; }

/* ── Line items table ──────────────────── */
.line-items { width: 100%; }
.line-items th { text-align: left; padding: 8px; font-size: 12px; color: var(--text-dim); border-bottom: 1px solid var(--border); }
.line-items td { padding: 8px; font-size: 13px; border-bottom: 1px solid var(--border); }
.line-items .section-row td { font-weight: 600; color: var(--accent); padding-top: 14px; }
.line-items .note-row td { color: var(--text-dim); font-style: italic; }

/* ── Loading ───────────────────────────── */
.loading { display: flex; align-items: center; justify-content: center; padding: 40px; color: var(--text-dim); }
.loading::before { content: ""; width: 24px; height: 24px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin 0.6s linear infinite; margin-right: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Empty state ───────────────────────── */
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-dim); }
.empty-state .icon { font-size: 48px; margin-bottom: 12px; opacity: 0.3; }
.empty-state h3 { font-size: 16px; margin-bottom: 4px; color: var(--text); }
.empty-state p { font-size: 14px; }

/* ── Toast ─────────────────────────────── */
.toast { position: fixed; bottom: 20px; right: 20px; background: var(--bg2); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 20px; font-size: 14px; z-index: 1000; transform: translateY(100px); opacity: 0; transition: all 0.3s; }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.error { border-color: var(--red); }

/* ── Calendar grid ─────────────────────── */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-header { font-size: 11px; font-weight: 600; color: var(--text-dim); text-align: center; padding: 8px 4px; }
.cal-day { background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; min-height: 80px; padding: 4px; }
.cal-day-num { font-size: 11px; color: var(--text-dim); padding: 2px 4px; }
.cal-event { background: rgba(232,115,90,0.15); border-left: 2px solid var(--accent); border-radius: 3px; padding: 2px 4px; font-size: 11px; margin-top: 2px; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 768px) {
  .kanban-board { flex-direction: column; }
  .kanban-col { min-width: unset; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }
  .filter-bar { flex-direction: column; }
  .filter-bar .form-input, .filter-bar .form-select { width: 100%; }

  /* ── Mobile SO Detail ────────────── */
  .so-detail-grid { grid-template-columns: 1fr !important; }

  /* Line items table → card layout on mobile */
  .line-items { display: block; }
  .line-items thead { display: none; }
  .line-items tbody { display: flex; flex-direction: column; gap: 8px; }
  .line-items tr {
    display: flex; flex-wrap: wrap; gap: 4px 12px;
    padding: 12px 12px 10px; padding-right: 40px; /* room for action buttons */
    background: var(--bg2); border-radius: 8px; border: 1px solid var(--border);
    align-items: flex-start; position: relative;
  }
  .line-items tr.section-row, .line-items tr.note-row { background: none; border: none; padding: 8px 0; }
  .line-items td { border: none; padding: 2px 0; font-size: 13px; }
  .line-items td:first-child { flex: 1 1 100%; min-width: 0; padding-right: 30px; }
  .line-items td:nth-child(2), .line-items td:nth-child(3), .line-items td:nth-child(4) { font-size: 13px; font-weight: 600; }
  .line-items td:nth-child(2)::before { content: "Qty: "; color: var(--text-dim); font-weight: 400; font-size: 11px; }
  .line-items td:nth-child(3)::before { content: "Price: "; color: var(--text-dim); font-weight: 400; font-size: 11px; }
  .line-items td:nth-child(4)::before { content: "Total: "; color: var(--text-dim); font-weight: 400; font-size: 11px; }
  .line-items td:last-child { position: absolute; right: 6px; top: 6px; display: flex; flex-direction: column; gap: 2px; }

  /* ── Mobile Site Plan Editor ──────── */
  .spe-top { padding: 4px 6px !important; gap: 3px !important; }
  .spe-top .spe-tb { min-width: 40px !important; min-height: 40px !important; padding: 2px !important; font-size: 13px !important; }
  .spe-bot { padding: 4px 8px !important; gap: 3px !important; }
  .spe-float-btn { padding: 10px 16px !important; font-size: 13px !important; bottom: 8px !important; }

  /* Footer totals row — clean layout */
  .line-items tfoot { display: block; margin-top: 8px; }
  .line-items tfoot tr {
    background: none; border: none; padding: 4px 0;
    display: flex; justify-content: flex-end; gap: 8px; align-items: center;
  }
  .line-items tfoot td { border: none; padding: 0; }
  .line-items tfoot td::before { content: none !important; }
}

/* ── iPad / Tablet optimizations (768px+, touch device) ── */
@media (min-width: 768px) and (pointer: coarse) {
  /* Bigger touch targets for field workers */
  .btn { padding: 14px 22px; font-size: 15px; border-radius: 12px; min-height: 48px; }
  .btn-sm { padding: 11px 16px; font-size: 14px; min-height: 44px; }
  .btn-icon { min-width: 48px; min-height: 48px; font-size: 20px; }

  /* Navigation */
  .nav-item { padding: 14px 18px; font-size: 15px; min-height: 48px; }
  .nav-item .nav-icon { font-size: 18px; }
  .sidebar-section { font-size: 12px; padding: 10px 18px 6px; }

  /* Cards — more breathing room */
  .card { padding: 18px; margin-bottom: 14px; border-radius: 12px; }
  .card-title { font-size: 16px; }

  /* Forms */
  .form-input, .form-select { padding: 14px 16px; font-size: 16px; border-radius: 10px; min-height: 48px; }

  /* Tabs */
  .tab { padding: 12px 20px; font-size: 15px; min-height: 48px; }

  /* Table cells */
  .data-table td { padding: 14px; font-size: 15px; }
  .data-table th { padding: 12px 14px; font-size: 13px; }
  .line-items td { padding: 12px 10px; font-size: 14px; }

  /* Detail rows */
  .detail-row { padding: 10px 0; font-size: 15px; }
  .detail-back { font-size: 15px; padding: 10px 0; min-height: 44px; display: inline-flex; align-items: center; }

  /* Badges */
  .badge { padding: 5px 12px; font-size: 13px; }

  /* Kanban cards */
  .kanban-card { padding: 16px; }
  .kanban-card .kc-name { font-size: 15px; }

  /* Toast */
  .toast { padding: 16px 24px; font-size: 15px; border-radius: 12px; }

  /* Stats */
  .stat-value { font-size: 28px; }
  .stat-label { font-size: 13px; }
  .stat-card { padding: 18px; }
}

/* ── iPhone / Small phone (max 480px) ── */
@media (max-width: 480px) {
  /* Global font bump */
  body { font-size: 16px; }
  .app-body { padding: 8px !important; }
  .app-header { padding: 8px 12px; }
  .app-header .app-title { font-size: 18px; }

  /* Tabs — horizontal scroll, bigger touch */
  .tabs { flex-wrap: nowrap; overflow-x: auto; gap: 2px; padding: 3px; -webkit-overflow-scrolling: touch; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { font-size: 14px; padding: 10px 14px; min-height: 44px; white-space: nowrap; flex-shrink: 0; }

  /* Buttons — bigger touch targets */
  .btn { font-size: 15px; padding: 12px 16px; min-height: 48px; }
  .btn-sm { font-size: 14px; padding: 10px 14px; min-height: 44px; }

  /* Inputs — bigger */
  .form-input, .form-select, input, select, textarea { font-size: 16px !important; padding: 12px !important; min-height: 48px !important; border-radius: 8px; }

  /* Cards — tighter padding */
  .card { padding: 12px; margin-bottom: 8px; border-radius: 10px; }
  .card-title { font-size: 17px; }
  .card-subtitle { font-size: 14px; }

  /* Stats — 2 cols on small phones, compact */
  .stats-row { grid-template-columns: 1fr 1fr !important; gap: 6px; }
  .cs-stats-grid { grid-template-columns: repeat(5, 1fr) !important; gap: 4px !important; }
  .cs-stats-grid > div { padding: 8px 4px !important; }
  .cs-stats-grid > div > div:first-child { font-size: 18px !important; }
  .cs-stats-grid > div > div:last-child { font-size: 9px !important; }
  .stat-card { padding: 10px; }
  .stat-value { font-size: 22px; }
  .stat-label { font-size: 11px; }

  /* Badges */
  .badge { font-size: 11px; padding: 3px 8px; }

  /* Tables */
  .data-table { font-size: 13px; }
  .data-table td { padding: 8px 6px; }
  .data-table th { padding: 6px; font-size: 11px; }

  /* Navigation sidebar items */
  .nav-item { padding: 14px 16px; font-size: 16px; min-height: 48px; }

  /* Button groups — stack vertically */
  .filter-bar { flex-direction: column; gap: 6px; }
  .filter-bar > * { width: 100%; }

  /* Modals/Overlays — near full width with padding */
  [style*="max-width:400px"], [style*="max-width:420px"], [style*="max-width:450px"], [style*="max-width:460px"] {
    max-width: calc(100vw - 16px) !important; width: calc(100vw - 16px) !important; border-radius: 12px !important;
  }

  /* SO detail action buttons — wrap nicely */
  [style*="display:flex"][style*="gap:8px"][style*="flex-wrap:wrap"] > .btn,
  [style*="display:flex"][style*="gap:6px"] > button {
    flex: 1 1 45%; min-width: 120px;
  }

  /* Estimator quote cards */
  .est-quote-card { padding: 12px !important; }

  /* Site plan editor — compact toolbar for phone */
  .spe-top { padding: 3px 4px !important; gap: 1px !important; flex-wrap: wrap; }
  .spe-top .spe-tb { min-width: 36px !important; height: 36px !important; padding: 2px !important; font-size: 14px !important; }
  .spe-top .spe-tbl { font-size: 8px !important; }
  .spe-bot { padding: 3px 6px !important; gap: 2px !important; flex-wrap: wrap; }
  .spe-bot .spe-tb { min-width: 34px !important; height: 34px !important; font-size: 12px !important; }
  .spe-bot .spe-tbl { font-size: 9px !important; }

  /* Grid layouts — single column */
  [style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
  [style*="grid-template-columns:1fr 1fr"] { grid-template-columns: 1fr !important; }
}

/* Skeleton loading animation */
.skeleton{background:linear-gradient(90deg,var(--bg3,#21262d) 25%,var(--bg2,#161b22) 50%,var(--bg3,#21262d) 75%);background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:4px}
@keyframes shimmer{0%{background-position:200% 0}100%{background-position:-200% 0}}
.skeleton-text{height:14px;margin-bottom:8px}
.skeleton-title{height:22px;width:60%;margin-bottom:12px}
.skeleton-block{height:80px;margin-bottom:12px}
.skeleton-line{height:12px;margin-bottom:6px}
#sales-content,#ea-content,[id^="est-section-"]{transition:opacity .15s ease}
#sales-content.fading,#ea-content.fading{opacity:0}
/* Estimator app — larger fonts for readability */
[data-app="estimator"]{font-size:15px}
[data-app="estimator"] .card{font-size:15px}
[data-app="estimator"] .form-input,[data-app="estimator"] .form-select,[data-app="estimator"] .btn{font-size:15px;padding:10px 14px}
[data-app="estimator"] .btn-sm{font-size:14px;padding:8px 12px}
[data-app="estimator"] .tab,[data-app="estimator"] .tabs .tab{font-size:14px;padding:10px 16px}
[data-app="estimator-admin"]{font-size:15px}
[data-app="estimator-admin"] .card{font-size:15px}
[data-app="estimator-admin"] .form-input,[data-app="estimator-admin"] .form-select,[data-app="estimator-admin"] .btn{font-size:15px;padding:10px 14px}
[data-app="estimator-admin"] .btn-sm{font-size:14px;padding:8px 12px}
