/* ── VieUtility Hub — Design system ─────────────────────────────────────── */

@import url('https://fonts.bunny.net/css?family=inter:400,500,600,700,800,900&display=swap');

/* Design tokens — Teal brand */
:root {
  --brand:       #0d9488;   /* teal-600 */
  --brand-dark:  #0f766e;   /* teal-700 */
  --brand-light: #f0fdfa;   /* teal-50  */
  --radius-card: 1.25rem;
  --shadow-card: 0 1px 3px rgba(0,0,0,.06), 0 2px 8px rgba(0,0,0,.06);
  --shadow-card-hover: 0 8px 24px rgba(0,0,0,.1), 0 2px 8px rgba(0,0,0,.06);
  --shadow-brand: 0 4px 16px rgba(13,148,136,.3);
}

/* Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.tabular { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* Gradient text */
.text-gradient {
  background: linear-gradient(135deg, #5eead4 0%, #99f6e4 40%, #f9a8d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.text-gradient-brand {
  background: linear-gradient(135deg, #0d9488 0%, #0f766e 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Glass */
.glass {
  background: rgba(255,255,255,0.85);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}
.glass-dark {
  background: rgba(15,23,42,0.6);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
}

/* Cards */
.card {
  background: white;
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0,0,0,.06);
  transition: box-shadow .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow-card-hover); }

/* Tool cards with lift */
.tool-card {
  transition: transform .2s cubic-bezier(.34,1.56,.64,1), box-shadow .2s ease;
}
.tool-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,.1);
}
.tool-card:active { transform: translateY(-1px); }

/* Inputs */
input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button { -webkit-appearance: none; }
input[type=number] { -moz-appearance: textfield; }
input, select, textarea {
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
input:focus, select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(13,148,136,.15);
  background: white;
}

/* Primary button — teal gradient */
.btn-primary {
  background: linear-gradient(135deg, #0d9488, #0f766e);
  box-shadow: var(--shadow-brand);
  transition: all .15s ease;
}
.btn-primary:hover { filter: brightness(1.08); box-shadow: 0 6px 20px rgba(13,148,136,.4); }
.btn-primary:active { transform: scale(.98); }

/* Scrollbar */
* { scrollbar-width: thin; scrollbar-color: #e5e7eb transparent; }
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d1d5db; border-radius: 3px; }

/* ── Animations ─────────────────────────────────────────────────────────── */

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.95); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-6px); }
}

.animate-fade-in   { animation: fadeIn .3s ease; }
.animate-slide-up  { animation: slideUp .35s cubic-bezier(.16,1,.3,1); }
.animate-slide-down{ animation: slideDown .25s ease; }
.animate-scale-in  { animation: scaleIn .25s cubic-bezier(.16,1,.3,1); }
.animate-float     { animation: float 3s ease-in-out infinite; }

#result > * { animation: slideUp .35s cubic-bezier(.16,1,.3,1); }

/* ── Loading bar — teal shimmer ─────────────────────────────────────────── */
#loading-bar {
  height: 3px;
  background: linear-gradient(90deg, #0d9488, #14b8a6, #2dd4bf, #0d9488);
  background-size: 200% 100%;
  opacity: 0;
  transition: opacity .2s ease;
}
#loading-bar.active {
  opacity: 1;
  animation: shimmer 1.2s linear infinite;
}

/* ── Mobile nav tabs ─────────────────────────────────────────────────────── */
.mobile-tab { position: relative; transition: color .2s ease; }
.mobile-tab.is-active { color: #0d9488; }
.mobile-tab.is-active::before {
  content: '';
  position: absolute;
  top: 0; left: 50%;
  transform: translateX(-50%);
  width: 28px; height: 2.5px;
  background: #0d9488;
  border-radius: 0 0 4px 4px;
}

/* ── Hero dot grid ───────────────────────────────────────────────────────── */
.dot-grid {
  background-image: radial-gradient(circle, rgba(255,255,255,.1) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
}

/* ── Category color stripes — no purple ─────────────────────────────────── */
.stripe-finance { background: linear-gradient(90deg, #2563eb, #0d9488); }
.stripe-group   { background: linear-gradient(90deg, #059669, #0d9488); }
.stripe-work    { background: linear-gradient(90deg, #d97706, #ea580c); }
.stripe-vehicle { background: linear-gradient(90deg, #ea580c, #dc2626); }

/* ── Table scroll ────────────────────────────────────────────────────────── */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Segmented control ───────────────────────────────────────────────────── */
.seg-btn {
  border-radius: 10px;
  padding: .5rem .75rem;
  font-size: .8125rem;
  font-weight: 600;
  transition: all .15s ease;
  cursor: pointer;
  color: #6b7280;
}
.seg-btn.active {
  background: white;
  color: #0d9488;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
