/* DetailQuote visual polish overlay — additive only */
:root {
  --dq-polish-ring: rgba(74, 231, 193, .30);
  --dq-polish-border: rgba(135, 190, 203, .16);
  --dq-polish-border-strong: rgba(96, 225, 196, .24);
  --dq-polish-shadow: 0 18px 44px rgba(0, 0, 0, .18);
  --dq-polish-shadow-soft: 0 10px 28px rgba(0, 0, 0, .13);
  --dq-polish-surface: rgba(255, 255, 255, .018);
}

html { scroll-behavior: smooth; }
body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Universal interaction polish */
a, button, input, select, textarea, .btn {
  -webkit-tap-highlight-color: transparent;
}
button, .btn, a.btn, input, select, textarea {
  transition: border-color .18s ease, background-color .18s ease, box-shadow .18s ease, transform .18s ease, opacity .18s ease;
}
button:not(:disabled):hover, .btn:not(:disabled):hover, a.btn:hover {
  transform: translateY(-1px);
}
button:not(:disabled):active, .btn:not(:disabled):active, a.btn:active {
  transform: translateY(0);
}
button:focus-visible, .btn:focus-visible, a:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 3px var(--dq-polish-ring);
}
button:disabled, .btn:disabled { opacity: .58; cursor: not-allowed; transform: none !important; }

/* Forms */
input, select, textarea {
  border-radius: 12px;
}
input:hover, select:hover, textarea:hover {
  border-color: var(--dq-polish-border-strong);
}
label { letter-spacing: .005em; }
.form-actions {
  padding-top: 4px;
  gap: 12px;
}

/* Landing page rhythm */
.hero { padding-top: clamp(72px, 8vw, 118px); padding-bottom: clamp(76px, 8vw, 112px); }
.hero p { line-height: 1.6; }
.hero-actions { margin-top: 30px; gap: 12px; }
.trust-row { margin-top: 22px; gap: 18px; opacity: .92; }
main > section { position: relative; }
main > section + section { scroll-margin-top: 88px; }

/* Cards / panels */
article, .card, .panel, .stat-card, .metric-card, .customer-card,
.quote-card, .pricing-card, .settings-card, .billing-card, .empty-state {
  border-color: var(--dq-polish-border);
}
article, .card, .panel, .stat-card, .metric-card, .customer-card,
.quote-card, .pricing-card, .settings-card, .billing-card {
  box-shadow: var(--dq-polish-shadow-soft);
}
article:hover, .card:hover, .pricing-card:hover, .customer-card:hover {
  border-color: var(--dq-polish-border-strong);
}

/* Landing feature + pricing cards */
#features article, #pricing article, .feature-card, .price-card, .pricing-card {
  position: relative;
  overflow: hidden;
}
#features article::before, #pricing article::before, .feature-card::before, .price-card::before, .pricing-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(75, 232, 194, .035), transparent 34%, rgba(90, 164, 255, .025));
}
#pricing article, .price-card, .pricing-card { min-height: 100%; }
#pricing article:nth-child(2), .price-card.is-featured, .pricing-card.is-featured {
  border-color: rgba(75, 232, 194, .34);
  box-shadow: 0 20px 50px rgba(0, 0, 0, .21), 0 0 0 1px rgba(75, 232, 194, .07) inset;
}

/* Authenticated app shell */
.app-shell, .dashboard-shell, .app-layout {
  min-height: 100dvh;
}
.sidebar, aside {
  border-right-color: var(--dq-polish-border);
}
.sidebar a, aside nav a, .side-nav a, .app-nav a {
  border-radius: 12px;
  transition: background-color .18s ease, color .18s ease, box-shadow .18s ease;
}
.sidebar a:hover, aside nav a:hover, .side-nav a:hover, .app-nav a:hover {
  background: rgba(86, 202, 190, .07);
}
.sidebar a.active, aside nav a.active, .side-nav a.active, .app-nav a.active,
.sidebar a[aria-current="page"], aside nav a[aria-current="page"] {
  box-shadow: inset 3px 0 0 rgba(71, 226, 191, .72), 0 8px 22px rgba(0, 0, 0, .08);
}

/* Dashboard hierarchy */
.stats-grid, .metrics-grid, .dashboard-grid { gap: 16px; }
.stat-card, .metric-card {
  position: relative;
  overflow: hidden;
}
.stat-card::after, .metric-card::after {
  content: "";
  position: absolute;
  width: 96px;
  height: 96px;
  border-radius: 999px;
  right: -36px;
  top: -40px;
  background: radial-gradient(circle, rgba(74, 231, 193, .10), transparent 68%);
  pointer-events: none;
}

/* Tables */
.table-wrap, .table-shell { border-radius: 16px; overflow: auto; }
table { border-collapse: separate; border-spacing: 0; }
thead th { letter-spacing: .015em; }
tbody tr { transition: background-color .15s ease; }
tbody tr:hover { background: rgba(255, 255, 255, .018); }

/* Status / feedback */
.badge, .status, [class*="status-badge"], [class*="pill"] {
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: .01em;
}
.empty-state {
  background: linear-gradient(145deg, rgba(255,255,255,.018), rgba(255,255,255,.008));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}
.error, .form-error, .alert-error { border-radius: 12px; }
.success, .form-success, .alert-success { border-radius: 12px; }

/* Quote builder */
.quote-preview, .quote-summary, .live-total, .quote-total-card {
  position: relative;
  border-color: rgba(72, 229, 193, .24);
  box-shadow: var(--dq-polish-shadow-soft);
}
.quote-preview .total, .quote-summary .total, .live-total strong,
.quote-total, .quote-total-value {
  letter-spacing: -.035em;
}
input[type="checkbox"], input[type="radio"] { accent-color: #45dfba; }

/* Settings + pricing grouping */
.settings-grid, .pricing-sections, .pricing-grid { gap: 18px; }
.settings-card h2, .settings-card h3, .pricing-card h2, .pricing-card h3,
.billing-card h2, .billing-card h3 { margin-bottom: 6px; }

/* Billing */
.usage-bar, .progress-track, [role="progressbar"] {
  border-radius: 999px;
  overflow: hidden;
}
.billing-card.current, .plan-card.current, [data-current-plan="true"] {
  border-color: rgba(74, 231, 193, .34);
  box-shadow: 0 18px 42px rgba(0,0,0,.18), 0 0 0 1px rgba(74,231,193,.06) inset;
}

/* Public quote */
.public-card, .public-quote, .quote-public-card {
  box-shadow: var(--dq-polish-shadow);
}
.public-total {
  font-size: clamp(2.75rem, 8vw, 3.55rem);
  line-height: 1;
}
.public-actions { gap: 12px; }
.public-actions .btn, .public-actions button { min-height: 48px; }
.public-actions .btn-ghost:hover { background: #eef3f3; }

/* Fine-grained mobile cleanup */
@media (max-width: 760px) {
  .hero { padding-top: 58px; padding-bottom: 68px; }
  .hero-actions > * { flex: 1 1 100%; justify-content: center; text-align: center; }
  .trust-row { gap: 10px 14px; }
  .split { grid-template-columns: 1fr; }
  .form-actions { flex-direction: column-reverse; align-items: stretch; }
  .form-actions > * { width: 100%; }
  .public-actions { flex-direction: column; }
  .public-actions > * { width: 100%; }
  table { min-width: 620px; }
}

@media (max-width: 520px) {
  button, .btn, a.btn { min-height: 44px; }
  input, select, textarea { font-size: 16px; }
  article, .card, .panel, .stat-card, .metric-card, .customer-card,
  .quote-card, .pricing-card, .settings-card, .billing-card { border-radius: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  button:hover, .btn:hover, a.btn:hover { transform: none !important; }
}
