/* ═══════════════════════════════════════════════
   FichaYa — Design System CSS v1.0
   Fichaje horario SaaS para España
   ═══════════════════════════════════════════════ */

/* ── Tokens ── */
:root {
  --fy-primary: #6366F1;
  --fy-primary-hover: #5558E6;
  --fy-primary-dark: #4F46E5;
  --fy-primary-darker: #4338CA;
  --fy-primary-light: #818CF8;
  --fy-primary-lighter: #C7D2FE;
  --fy-primary-subtle: #EEF2FF;
  --fy-primary-rgb: 99, 102, 241;

  --fy-success: #10B981;
  --fy-success-light: #D1FAE5;
  --fy-success-dark: #059669;
  --fy-warning: #F59E0B;
  --fy-warning-light: #FEF3C7;
  --fy-warning-dark: #D97706;
  --fy-danger: #EF4444;
  --fy-danger-light: #FEE2E2;
  --fy-danger-dark: #DC2626;
  --fy-info: #3B82F6;
  --fy-info-light: #DBEAFE;

  --fy-bg: #F8FAFC;
  --fy-surface: #FFFFFF;
  --fy-surface-2: #F1F5F9;
  --fy-surface-3: #E2E8F0;
  --fy-text: #0F172A;
  --fy-text-secondary: #475569;
  --fy-text-muted: #94A3B8;
  --fy-text-inverted: #FFFFFF;

  --fy-border: #E2E8F0;
  --fy-border-hover: #CBD5E1;
  --fy-shadow-sm: 0 1px 3px rgba(15,23,42,0.06);
  --fy-shadow: 0 4px 16px rgba(15,23,42,0.08);
  --fy-shadow-lg: 0 12px 40px rgba(15,23,42,0.12);
  --fy-shadow-primary: 0 4px 16px rgba(99,102,241,0.25);

  --fy-radius-xs: 6px;
  --fy-radius-sm: 10px;
  --fy-radius: 14px;
  --fy-radius-lg: 20px;
  --fy-radius-xl: 28px;
  --fy-radius-full: 9999px;

  --fy-header-h: 56px;
  --fy-bottom-nav-h: 64px;
  --fy-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --fy-ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --fy-gradient: linear-gradient(135deg, #6366F1 0%, #4F46E5 50%, #4338CA 100%);
  --fy-gradient-warm: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
}

/* ── Dark Mode ── */
[data-theme="dark"] {
  --fy-primary: #818CF8;
  --fy-primary-hover: #A5B4FC;
  --fy-primary-dark: #6366F1;
  --fy-primary-darker: #4F46E5;
  --fy-primary-light: #6366F1;
  --fy-primary-lighter: #312E81;
  --fy-primary-subtle: #1E1B4B;
  --fy-primary-rgb: 129, 140, 248;

  --fy-success: #34D399;
  --fy-success-light: #064E3B;
  --fy-success-dark: #6EE7B7;
  --fy-warning: #FBBF24;
  --fy-warning-light: #78350F;
  --fy-warning-dark: #FDE68A;
  --fy-danger: #F87171;
  --fy-danger-light: #7F1D1D;
  --fy-danger-dark: #FCA5A5;

  --fy-bg: #0B0F1A;
  --fy-surface: #131825;
  --fy-surface-2: #1A2035;
  --fy-surface-3: #252D44;
  --fy-text: #F1F5F9;
  --fy-text-secondary: #94A3B8;
  --fy-text-muted: #64748B;
  --fy-text-inverted: #0F172A;

  --fy-border: #1E293B;
  --fy-border-hover: #334155;
  --fy-shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --fy-shadow: 0 4px 16px rgba(0,0,0,0.4);
  --fy-shadow-lg: 0 12px 40px rgba(0,0,0,0.5);
  --fy-shadow-primary: 0 4px 16px rgba(129,140,248,0.2);

  --fy-gradient: linear-gradient(135deg, #4F46E5 0%, #3730A3 50%, #312E81 100%);
  --fy-gradient-warm: linear-gradient(135deg, #4F46E5 0%, #7C3AED 100%);
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--fy-text);
  background: var(--fy-bg);
  font-size: 15px;
  line-height: 1.5;
  -webkit-tap-highlight-color: transparent;
  transition: background-color 0.3s ease, color 0.3s ease;
}
body { min-height: 100vh; min-height: 100dvh; overflow-x: hidden; }
a { color: var(--fy-primary); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
.text-muted { color: var(--fy-text-muted); }

/* ═══ SPLASH ═══ */
.splash {
  position: fixed; inset: 0;
  background: var(--fy-gradient);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.splash.hide { opacity: 0; transform: scale(1.05); pointer-events: none; }
.splash-icon { width: 72px; height: 72px; animation: splash-bounce 1.2s var(--fy-ease-bounce) infinite alternate; }
.splash-icon img { width: 100%; height: 100%; }
.splash-title { font-size: 28px; font-weight: 800; color: white; margin-top: 12px; letter-spacing: -0.03em; }
.splash-dots { display: flex; gap: 6px; margin-top: 24px; }
.splash-dots span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,0.5); animation: dot-pulse 1.4s ease infinite; }
.splash-dots span:nth-child(2) { animation-delay: 0.2s; }
.splash-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes splash-bounce { 0% { transform: translateY(0); } 100% { transform: translateY(-8px); } }
@keyframes dot-pulse { 0%,80%,100% { opacity: 0.3; transform: scale(0.8); } 40% { opacity: 1; transform: scale(1.2); } }

/* ═══ LANDING ═══ */
.landing { background: var(--fy-bg); }

/* Hero */
.hero {
  position: relative; padding: 120px 24px 80px; text-align: center; overflow: hidden;
  background: var(--fy-gradient); color: white;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.1) 0%, transparent 50%),
              radial-gradient(ellipse at 70% 80%, rgba(99,102,241,0.2) 0%, transparent 50%);
}
.hero-logo-watermark {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -55%);
  width: 280px; height: 280px; opacity: 0.22;
  pointer-events: none; z-index: 0;
}
.hero-logo-watermark img { width: 100%; height: 100%; }
.hero-content { position: relative; max-width: 640px; margin: 0 auto; z-index: 1; }
.hero-badge {
  display: inline-block; padding: 6px 16px; border-radius: var(--fy-radius-full);
  background: rgba(255,255,255,0.15); backdrop-filter: blur(8px);
  font-size: 13px; font-weight: 600; margin-bottom: 24px;
}
.hero h1 { font-size: clamp(28px, 6vw, 48px); font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; margin-bottom: 16px; }
.hero-accent { color: #C7D2FE; }
.hero-sub { font-size: 17px; opacity: 0.9; max-width: 480px; margin: 0 auto 32px; line-height: 1.6; }
.google-btn-wrap {
  display: flex; justify-content: center; margin-bottom: 24px;
}
.hero-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; font-size: 13px; opacity: 0.8; }

/* Features */
.features { padding: 64px 24px; max-width: 960px; margin: 0 auto; }
.features-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }
.feature-card {
  background: var(--fy-surface); border: 1px solid var(--fy-border); border-radius: var(--fy-radius);
  padding: 24px; transition: all 0.25s var(--fy-ease);
}
.feature-card:hover { border-color: var(--fy-primary-lighter); box-shadow: var(--fy-shadow); transform: translateY(-2px); }
.feature-icon {
  width: 48px; height: 48px; border-radius: 12px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--fy-primary-subtle);
}
.feature-icon svg {
  width: 24px; height: 24px; stroke: var(--fy-primary); stroke-width: 1.8; fill: none;
}
[data-theme="dark"] .feature-icon {
  background: rgba(99, 102, 241, 0.15);
}
.feature-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 14px; color: var(--fy-text-secondary); line-height: 1.6; }

/* Social Proof */
.social-proof { padding: 48px 24px; max-width: 800px; margin: 0 auto; display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.proof-card {
  background: var(--fy-surface); border: 1px solid var(--fy-border); border-radius: var(--fy-radius);
  padding: 24px;
}
.proof-quote { font-size: 15px; font-style: italic; color: var(--fy-text-secondary); line-height: 1.7; margin-bottom: 16px; }
.proof-author { display: flex; align-items: center; gap: 12px; }
.proof-avatar {
  width: 40px; height: 40px; border-radius: 50%; background: var(--fy-primary-subtle); color: var(--fy-primary);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px;
}
.proof-author strong { display: block; font-size: 14px; }
.proof-author span { font-size: 12px; color: var(--fy-text-muted); }

/* Pricing */
.pricing { padding: 64px 24px; text-align: center; max-width: 1040px; margin: 0 auto; }
.pricing h2 { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.pricing-sub { color: var(--fy-text-secondary); margin-bottom: 40px; }
.pricing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; text-align: left; }
.plan-card {
  background: var(--fy-surface); border: 1.5px solid var(--fy-border); border-radius: var(--fy-radius-lg);
  padding: 28px 24px; position: relative; transition: all 0.25s var(--fy-ease);
}
.plan-card:hover { border-color: var(--fy-primary-lighter); box-shadow: var(--fy-shadow); }
.plan-popular { border-color: var(--fy-primary); box-shadow: var(--fy-shadow-primary); }
.plan-badge {
  position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
  padding: 4px 14px; border-radius: var(--fy-radius-full);
  background: var(--fy-primary); color: white; font-size: 12px; font-weight: 700; white-space: nowrap;
}
.plan-name { font-size: 18px; font-weight: 700; margin-bottom: 8px; }
.plan-price { font-size: 36px; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 20px; }
.plan-currency { font-size: 20px; font-weight: 600; vertical-align: top; margin-right: 2px; }
.plan-price-decimal { font-size: 20px; font-weight: 600; }
.plan-period { font-size: 14px; font-weight: 500; color: var(--fy-text-muted); }
.plan-features { margin-bottom: 24px; }
.plan-features li { padding: 6px 0; font-size: 14px; color: var(--fy-text-secondary); }
.plan-features li::before { content: "✓ "; color: var(--fy-success); font-weight: 700; }
.plan-btn { width: 100%; }

/* Legal Warning */
.legal-warning {
  margin: 48px 24px; max-width: 800px; margin-left: auto; margin-right: auto;
  background: var(--fy-warning-light); border: 1px solid var(--fy-warning); border-radius: var(--fy-radius);
  padding: 24px;
}
.warning-content { display: flex; gap: 16px; align-items: flex-start; }
.warning-icon {
  width: 44px; height: 44px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--fy-warning-light);
}
.warning-icon svg {
  width: 22px; height: 22px; stroke: var(--fy-warning-dark); stroke-width: 2; fill: none;
}
.warning-content strong { display: block; margin-bottom: 4px; font-size: 15px; }
.warning-content p { font-size: 14px; color: var(--fy-text-secondary); line-height: 1.6; margin-top: 4px; }

/* Footer */
.landing-footer { padding: 32px 24px; border-top: 1px solid var(--fy-border); margin-top: 48px; }
.footer-content { max-width: 960px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.footer-logo { font-weight: 800; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.footer-logo img { width: 24px; height: 24px; }
.footer-by { font-size: 12px; color: var(--fy-text-muted); margin-left: 8px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 13px; color: var(--fy-text-muted); }
.footer-links a:hover { color: var(--fy-primary); }

/* ═══ ONBOARDING ═══ */
.onboarding {
  min-height: 100vh; min-height: 100dvh;
  background: var(--fy-bg); padding: 0 24px;
  display: flex; align-items: center; justify-content: center;
}
.onb-step { max-width: 480px; width: 100%; animation: fadeSlideIn 0.35s var(--fy-ease); }
.onb-header { margin-bottom: 32px; }
.onb-header h2 { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.onb-header p { color: var(--fy-text-secondary); }
.onb-options { display: flex; flex-direction: column; gap: 12px; }
.onb-option {
  display: flex; align-items: center; gap: 16px;
  background: var(--fy-surface); border: 1.5px solid var(--fy-border); border-radius: var(--fy-radius);
  padding: 20px; text-align: left; width: 100%;
  transition: all 0.2s var(--fy-ease);
}
.onb-option:hover { border-color: var(--fy-primary); box-shadow: var(--fy-shadow); transform: translateY(-1px); }
.onb-option:active { transform: scale(0.99); }
.onb-option-icon {
  width: 52px; height: 52px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--fy-primary-subtle); color: var(--fy-primary);
}
[data-theme="dark"] .onb-option-icon { background: rgba(99, 102, 241, 0.15); }
.onb-option-text strong { display: block; font-size: 16px; margin-bottom: 4px; }
.onb-option-text span { font-size: 13px; color: var(--fy-text-secondary); }
.onb-option-arrow { margin-left: auto; font-size: 20px; color: var(--fy-text-muted); }

.onb-form { display: flex; flex-direction: column; gap: 20px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 14px; font-weight: 600; }
.form-hint { font-weight: 400; color: var(--fy-text-muted); }

.btn-back { color: var(--fy-text-secondary); font-weight: 600; font-size: 14px; margin-bottom: 16px; padding: 0; }
.btn-back:hover { color: var(--fy-primary); }

@keyframes fadeSlideIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ═══ INPUTS ═══ */
.input {
  width: 100%; padding: 12px 16px;
  background: var(--fy-surface); border: 1.5px solid var(--fy-border); border-radius: var(--fy-radius);
  font-size: 15px; color: var(--fy-text);
  transition: all 0.15s ease;
}
.input:focus { outline: none; border-color: var(--fy-primary); box-shadow: 0 0 0 3px rgba(var(--fy-primary-rgb),0.12); }
.input::placeholder { color: var(--fy-text-muted); }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394A3B8' viewBox='0 0 16 16'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* ═══ BUTTONS ═══ */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px; border-radius: var(--fy-radius); font-weight: 600; font-size: 15px;
  transition: all 0.15s ease; user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--fy-gradient); color: white; box-shadow: var(--fy-shadow-primary); }
.btn-primary:hover { box-shadow: 0 6px 20px rgba(var(--fy-primary-rgb),0.35); transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.97); }
.btn-secondary { background: var(--fy-surface); color: var(--fy-text); border: 1.5px solid var(--fy-border); }
.btn-secondary:hover { border-color: var(--fy-primary-lighter); background: var(--fy-primary-subtle); }
.btn-ghost { background: transparent; color: var(--fy-primary); padding: 6px 12px; }
.btn-ghost:hover { background: var(--fy-primary-subtle); }
.btn-lg { padding: 14px 24px; font-size: 16px; border-radius: var(--fy-radius); }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: var(--fy-radius-sm); }
.btn-full { width: 100%; }

/* ═══ APP SHELL ═══ */
.app {
  min-height: 100vh; min-height: 100dvh;
  background: var(--fy-bg);
  display: flex; flex-direction: column;
}

/* Header */
.header {
  position: fixed; top: 0; left: 0; right: 0; height: var(--fy-header-h);
  background: var(--fy-gradient); color: white;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; z-index: 200;
  -webkit-font-smoothing: antialiased;
}
.header-left { display: flex; align-items: center; gap: 10px; }
.header-logo { width: 32px; height: 32px; }
.header-logo img { width: 100%; height: 100%; border-radius: 7px; }
.header-title { font-size: 18px; font-weight: 800; letter-spacing: -0.02em; }
.header-right { display: flex; align-items: center; gap: 8px; }
.header-btn {
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.12); color: white;
  transition: background 0.15s ease;
}
.header-btn:hover { background: rgba(255,255,255,0.2); }
.header-btn svg { width: 20px; height: 20px; }

/* Theme toggle icons */
[data-theme="dark"] .sun-icon { display: block; }
[data-theme="dark"] .moon-icon { display: none; }
:root:not([data-theme="dark"]) .sun-icon { display: none; }
:root:not([data-theme="dark"]) .moon-icon { display: block; }

.header-avatar { padding: 0; overflow: hidden; }
.avatar-img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.avatar-initial {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--fy-primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 15px; line-height: 1;
}

/* Main & Views */
.app-main {
  flex: 1; position: relative;
  margin-top: var(--fy-header-h);
  margin-bottom: var(--fy-bottom-nav-h);
  overflow: hidden;
}
.view {
  position: absolute; inset: 0;
  opacity: 0; transform: translateX(20px);
  transition: opacity 0.25s var(--fy-ease), transform 0.25s var(--fy-ease);
  pointer-events: none; overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  will-change: transform, opacity;
}
.view.active { opacity: 1; transform: translateX(0); pointer-events: auto; }
.view.exit { opacity: 0; transform: translateX(-20px); }
.view-scroll { padding: 24px 16px; }
.view-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 20px; }

/* Bottom Nav */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  height: var(--fy-bottom-nav-h);
  background: var(--fy-surface);
  border-top: 1px solid var(--fy-border);
  display: flex; justify-content: space-around; align-items: center;
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 100;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 8px 12px; position: relative;
  color: var(--fy-text-muted); font-size: 11px; font-weight: 600;
  transition: color 0.2s ease;
}
.nav-item.active { color: var(--fy-primary); }
.nav-item.active::after {
  content: ''; position: absolute; bottom: 4px;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--fy-primary);
}
.nav-icon { width: 22px; height: 22px; }

/* ═══ CLOCK VIEW ═══ */
.clock-container {
  display: flex; flex-direction: column; align-items: center;
  padding: 32px 16px 24px; min-height: 100%;
}

.clock-status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-radius: var(--fy-radius-full);
  background: var(--fy-surface); border: 1px solid var(--fy-border);
  font-size: 13px; font-weight: 600;
  animation: fadeSlideIn 0.4s var(--fy-ease);
}
.status-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--fy-text-muted);
}
.clock-status.working .status-dot { background: var(--fy-success); animation: pulse-dot 2s ease infinite; }
.clock-status.paused .status-dot { background: var(--fy-warning); animation: pulse-dot 2s ease infinite; }
.clock-status.out .status-dot { background: var(--fy-text-muted); }

@keyframes pulse-dot { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.3); } }

.clock-time {
  font-size: clamp(48px, 12vw, 64px); font-weight: 800; letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums; font-feature-settings: 'tnum';
  margin-top: 24px; line-height: 1;
}
.clock-date { font-size: 15px; color: var(--fy-text-secondary); margin-top: 4px; }

.clock-center {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 16px; font-size: 13px; color: var(--fy-text-secondary);
}
.clock-center svg { color: var(--fy-primary); }
.clock-center-dist { font-weight: 600; }
.clock-center-dist.inside { color: var(--fy-success); }
.clock-center-dist.outside { color: var(--fy-danger); }

/* ── THE BIG BUTTON ── */
.clock-btn-wrap {
  position: relative; margin-top: 32px; margin-bottom: 32px;
  width: 160px; height: 160px;
  display: flex; align-items: center; justify-content: center;
}
.clock-btn-ring {
  position: absolute; inset: -8px;
  border-radius: 50%; border: 2px solid rgba(var(--fy-primary-rgb), 0.2);
  animation: ring-pulse 3s ease infinite;
}
@keyframes ring-pulse {
  0%,100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.06); opacity: 0.15; }
}

.clock-btn {
  width: 140px; height: 140px; border-radius: 50%;
  background: var(--fy-gradient);
  color: white; border: none;
  box-shadow: var(--fy-shadow-primary), 0 0 40px rgba(var(--fy-primary-rgb), 0.15);
  transition: all 0.15s ease;
  -webkit-tap-highlight-color: transparent;
  position: relative; z-index: 2;
}
.clock-btn:hover { box-shadow: var(--fy-shadow-primary), 0 0 60px rgba(var(--fy-primary-rgb), 0.25); transform: scale(1.02); }
.clock-btn:active { transform: scale(0.93); box-shadow: var(--fy-shadow-sm); }
.clock-btn.out { background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%); box-shadow: 0 4px 16px rgba(239,68,68,0.25); }
.clock-btn.out .clock-btn-ring { border-color: rgba(239,68,68,0.2); }
.clock-btn.pause { background: linear-gradient(135deg, #F59E0B 0%, #D97706 100%); box-shadow: 0 4px 16px rgba(245,158,11,0.25); }

.clock-btn-inner { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.clock-btn-icon { width: 32px; height: 32px; }
.clock-btn-label { font-size: 14px; font-weight: 700; letter-spacing: 0.06em; }
.clock-btn-type { font-size: 11px; font-weight: 600; opacity: 0.8; letter-spacing: 0.04em; }

/* Checkmark animation */
.clock-btn .check-svg { display: none; }
.clock-btn.success { background: var(--fy-success) !important; }
.clock-btn.success .clock-btn-inner { display: none; }
.clock-btn.success .check-svg { display: block; width: 48px; height: 48px; }
.check-path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: draw-check 0.4s ease forwards; }
@keyframes draw-check { to { stroke-dashoffset: 0; } }

/* Ring expand */
.ring-expand {
  position: absolute; inset: 0; border-radius: 50%;
  border: 3px solid var(--fy-success);
  animation: ring-expand 0.6s ease forwards;
  pointer-events: none; z-index: 1;
}
@keyframes ring-expand { 0% { transform: scale(1); opacity: 0.6; } 100% { transform: scale(2.5); opacity: 0; } }

/* Confetti */
.confetti-container { position: absolute; inset: 0; pointer-events: none; z-index: 10; }
.confetti-particle {
  position: absolute; width: 6px; height: 6px; border-radius: 2px;
  top: 50%; left: 50%;
  animation: confetti-fly 0.7s ease forwards;
}
@keyframes confetti-fly {
  0% { transform: translate(0,0) scale(1) rotate(0deg); opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(0) rotate(var(--rot)); opacity: 0; }
}

/* Summary */
.clock-summary {
  display: flex; align-items: center; gap: 24px;
  background: var(--fy-surface); border: 1px solid var(--fy-border);
  border-radius: var(--fy-radius); padding: 16px 24px;
  width: 100%; max-width: 320px;
}
.summary-item { text-align: center; flex: 1; }
.summary-label { display: block; font-size: 12px; color: var(--fy-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.summary-value { display: block; font-size: 18px; font-weight: 800; margin-top: 2px; }
.summary-divider { width: 1px; height: 36px; background: var(--fy-border); }

/* Timeline */
.clock-timeline {
  width: 100%; max-width: 400px; margin-top: 24px;
}
.timeline-title { font-size: 14px; font-weight: 700; color: var(--fy-text-secondary); margin-bottom: 12px; }
.timeline-entries { display: flex; flex-direction: column; gap: 8px; }
.timeline-entry {
  display: flex; align-items: center; gap: 12px;
  background: var(--fy-surface); border: 1px solid var(--fy-border);
  border-radius: var(--fy-radius-sm); padding: 12px 16px;
  animation: fadeSlideIn 0.3s var(--fy-ease);
}
.timeline-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.timeline-dot.in { background: var(--fy-success); }
.timeline-dot.out { background: var(--fy-danger); }
.timeline-dot.pause_start { background: var(--fy-warning); }
.timeline-dot.pause_end { background: var(--fy-info); }
.timeline-time { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; min-width: 52px; }
.timeline-type { font-size: 13px; color: var(--fy-text-secondary); }
.timeline-geo { margin-left: auto; font-size: 11px; color: var(--fy-text-muted); }

.timeline-empty {
  text-align: center; padding: 24px; color: var(--fy-text-muted); font-size: 14px;
}

/* ═══ BADGES ═══ */
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: var(--fy-radius-full);
  font-size: 12px; font-weight: 600; letter-spacing: 0.02em;
}
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.badge-working { background: var(--fy-success-light); color: var(--fy-success-dark); }
.badge-working::before { animation: pulse-dot 2s ease infinite; }
.badge-paused { background: var(--fy-warning-light); color: var(--fy-warning-dark); }
.badge-out { background: var(--fy-surface-2); color: var(--fy-text-muted); }
.badge-role { background: var(--fy-primary-subtle); color: var(--fy-primary); text-transform: capitalize; }

/* ═══ TEAM VIEW ═══ */
.team-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 24px;
}
.stat-card {
  background: var(--fy-surface); border: 1px solid var(--fy-border); border-radius: var(--fy-radius);
  padding: 16px; text-align: center;
}
.stat-value { font-size: 28px; font-weight: 800; }
.stat-value.green { color: var(--fy-success); }
.stat-value.amber { color: var(--fy-warning); }
.stat-value.red { color: var(--fy-danger); }
.stat-label { font-size: 11px; font-weight: 600; color: var(--fy-text-muted); text-transform: uppercase; letter-spacing: 0.04em; margin-top: 4px; }

.team-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.team-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--fy-surface); border: 1px solid var(--fy-border); border-radius: var(--fy-radius);
  padding: 12px 16px; transition: all 0.15s ease;
}
.team-card:hover { border-color: var(--fy-primary-lighter); box-shadow: var(--fy-shadow-sm); }
.team-avatar { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex-shrink: 0; background: var(--fy-primary-subtle); }
.team-avatar-initial {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--fy-primary); color: #fff;
  align-items: center; justify-content: center;
  font-weight: 700; font-size: 16px; line-height: 1;
}
.team-info { flex: 1; min-width: 0; }
.team-name { font-size: 15px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.team-role { font-size: 12px; color: var(--fy-text-muted); }
.team-clock-time { font-size: 12px; font-weight: 600; color: var(--fy-text-secondary); font-variant-numeric: tabular-nums; }

/* ═══ MAP VIEW ═══ */
.team-map { position: absolute; inset: 0; z-index: 1; }
.map-panel {
  position: absolute; bottom: 0; left: 0; right: 0; z-index: 10;
  max-height: 40vh; overflow-y: auto;
  background: var(--fy-surface); border-radius: var(--fy-radius-lg) var(--fy-radius-lg) 0 0;
  box-shadow: var(--fy-shadow-lg); padding: 16px;
  transform: translateY(calc(100% - 60px));
  transition: transform 0.4s var(--fy-ease);
}
.map-panel.expanded { transform: translateY(0); }
.map-panel-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: var(--fy-surface-3); margin: 0 auto 12px;
}

/* ═══ PROFILE VIEW ═══ */
.profile-header { text-align: center; padding: 24px 0; }
.profile-avatar-wrap { width: 80px; height: 80px; margin: 0 auto 16px; position: relative; }
.profile-avatar { width: 80px; height: 80px; border-radius: 50%; border: 3px solid var(--fy-primary-lighter); object-fit: cover; }
.profile-avatar-initial {
  width: 80px; height: 80px; border-radius: 50%; border: 3px solid var(--fy-primary-lighter);
  display: flex; align-items: center; justify-content: center;
  background: var(--fy-primary); color: #fff; font-size: 32px; font-weight: 800;
}
.profile-header h2 { font-size: 22px; font-weight: 800; }
.profile-header p { margin-top: 4px; }
.profile-header .badge { margin-top: 8px; }
.profile-org {
  background: var(--fy-surface); border: 1px solid var(--fy-border); border-radius: var(--fy-radius);
  padding: 20px; margin: 16px 0;
}
.profile-org h3 { font-size: 17px; font-weight: 700; }
.profile-join-code { margin-top: 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.join-code-label { font-size: 13px; color: var(--fy-text-muted); }
.join-code-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px; font-weight: 700; letter-spacing: 0.06em;
  background: var(--fy-primary-subtle); color: var(--fy-primary);
  padding: 4px 12px; border-radius: var(--fy-radius-sm);
}
.profile-actions { margin-top: 24px; }

/* ═══ TOAST ═══ */
.toast {
  position: fixed; bottom: calc(var(--fy-bottom-nav-h) + 16px);
  left: 50%; transform: translateX(-50%) translateY(80px);
  padding: 12px 20px; border-radius: var(--fy-radius);
  font-weight: 600; font-size: 14px; z-index: 1000;
  opacity: 0; transition: all 0.3s var(--fy-ease);
  backdrop-filter: blur(8px);
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast.success { background: var(--fy-success); color: white; }
.toast.error { background: var(--fy-danger); color: white; }
.toast.info { background: var(--fy-surface); color: var(--fy-text); border: 1px solid var(--fy-border); box-shadow: var(--fy-shadow); }

/* ═══ MODAL ═══ */
.overlay {
  position: fixed; inset: 0; background: rgba(15,23,42,0.5);
  backdrop-filter: blur(4px); opacity: 0;
  transition: opacity 0.25s var(--fy-ease);
  z-index: 500; pointer-events: none;
}
.overlay.active { opacity: 1; pointer-events: auto; }
[data-theme="dark"] .overlay { background: rgba(0,0,0,0.6); }

.modal {
  position: fixed; bottom: 0; left: 0; right: 0;
  max-height: 85vh; background: var(--fy-surface);
  border-radius: var(--fy-radius-xl) var(--fy-radius-xl) 0 0;
  transform: translateY(100%);
  transition: transform 0.4s var(--fy-ease);
  z-index: 501; overflow-y: auto; -webkit-overflow-scrolling: touch;
}
.modal.active { transform: translateY(0); }
.modal-handle { width: 36px; height: 4px; border-radius: 2px; background: var(--fy-surface-3); margin: 12px auto 0; }
.modal-content { padding: 24px; }
.modal-content h3 { font-size: 20px; font-weight: 800; margin-bottom: 8px; }

.invite-code-box {
  background: var(--fy-surface-2); border-radius: var(--fy-radius);
  padding: 20px; text-align: center; margin: 20px 0;
}
.invite-code-label { font-size: 13px; color: var(--fy-text-muted); margin-bottom: 8px; }
.invite-code-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 24px; font-weight: 800; letter-spacing: 0.1em;
  color: var(--fy-primary); margin-bottom: 12px;
}
.invite-separator {
  display: flex; align-items: center; gap: 12px; margin: 20px 0;
  color: var(--fy-text-muted); font-size: 13px;
}
.invite-separator::before, .invite-separator::after {
  content: ''; flex: 1; height: 1px; background: var(--fy-border);
}

/* ═══ SKELETON ═══ */
.skeleton {
  background: linear-gradient(90deg, var(--fy-surface-2) 25%, var(--fy-surface-3) 50%, var(--fy-surface-2) 75%);
  background-size: 200% 100%; animation: shimmer 1.5s ease infinite;
  border-radius: var(--fy-radius-sm);
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.skeleton-circle { border-radius: 50%; }
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-text.w-50 { width: 50%; }
.skeleton-text.w-75 { width: 75%; }

/* ═══ ANALYTICS VIEW ═══ */
.analytics-header { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.analytics-header .view-title { margin-bottom: 0; }
.analytics-period { display: flex; gap: 4px; background: var(--fy-surface-2); border-radius: var(--fy-radius-full); padding: 3px; }
.period-btn {
  padding: 6px 14px; border-radius: var(--fy-radius-full); font-size: 13px; font-weight: 600;
  color: var(--fy-text-muted); background: transparent; transition: all 0.2s ease;
}
.period-btn.active { background: var(--fy-surface); color: var(--fy-text); box-shadow: var(--fy-shadow-sm); }
.period-btn:hover:not(.active) { color: var(--fy-text-secondary); }

.analytics-kpis { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi-card {
  background: var(--fy-surface); border: 1px solid var(--fy-border); border-radius: var(--fy-radius);
  padding: 16px; display: flex; align-items: center; gap: 14px;
}
.kpi-icon {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.kpi-icon svg { width: 20px; height: 20px; }
.kpi-icon.green { background: var(--fy-success-light); color: var(--fy-success); }
.kpi-icon.blue { background: var(--fy-info-light); color: var(--fy-info); }
.kpi-icon.amber { background: var(--fy-warning-light); color: var(--fy-warning); }
.kpi-icon.red { background: var(--fy-danger-light); color: var(--fy-danger); }
.kpi-data { display: flex; flex-direction: column; }
.kpi-value { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.1; }
.kpi-label { font-size: 12px; color: var(--fy-text-muted); font-weight: 500; margin-top: 2px; }

.analytics-card {
  background: var(--fy-surface); border: 1px solid var(--fy-border); border-radius: var(--fy-radius);
  padding: 20px; margin-bottom: 16px;
}
.analytics-card-title { font-size: 15px; font-weight: 700; margin-bottom: 16px; }

/* Bar chart */
.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-bottom: 24px; position: relative; }
.chart-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; height: 100%; justify-content: flex-end; }
.chart-bar {
  width: 100%; min-height: 4px; border-radius: 4px 4px 0 0;
  background: var(--fy-gradient); transition: height 0.5s var(--fy-ease-bounce);
  position: relative;
}
.chart-bar.overtime { background: linear-gradient(135deg, #EF4444, #DC2626); }
.chart-bar-value {
  position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
  font-size: 10px; font-weight: 700; color: var(--fy-text-secondary); white-space: nowrap;
}
.chart-bar-label { font-size: 10px; color: var(--fy-text-muted); font-weight: 600; }
.chart-baseline {
  position: absolute; bottom: 24px; left: 0; right: 0; height: 1px;
  background: var(--fy-border); z-index: 0;
}
.chart-target-line {
  position: absolute; left: 0; right: 0; height: 1px;
  border-top: 2px dashed var(--fy-warning); opacity: 0.5; z-index: 0;
}
.chart-target-label {
  position: absolute; right: 0; font-size: 9px; font-weight: 700;
  color: var(--fy-warning); transform: translateY(-12px);
}

/* Ranking */
.ranking-list { display: flex; flex-direction: column; gap: 8px; }
.ranking-row {
  display: flex; align-items: center; gap: 12px; padding: 10px 0;
  border-bottom: 1px solid var(--fy-border);
}
.ranking-row:last-child { border-bottom: none; }
.ranking-pos { width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.ranking-pos.gold { background: #FEF3C7; color: #B45309; }
.ranking-pos.silver { background: #F1F5F9; color: #64748B; }
.ranking-pos.bronze { background: #FED7AA; color: #C2410C; }
.ranking-pos.normal { background: var(--fy-surface-2); color: var(--fy-text-muted); }
.ranking-name { flex: 1; font-size: 14px; font-weight: 600; }
.ranking-hours { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ranking-bar-bg { width: 60px; height: 6px; background: var(--fy-surface-2); border-radius: 3px; overflow: hidden; }
.ranking-bar-fill { height: 100%; background: var(--fy-gradient); border-radius: 3px; transition: width 0.5s var(--fy-ease-bounce); }

/* Geo summary */
.geo-summary { display: flex; flex-direction: column; gap: 8px; }
.geo-row { display: flex; align-items: center; gap: 12px; font-size: 14px; }
.geo-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.geo-dot.inside { background: var(--fy-success); }
.geo-dot.outside { background: var(--fy-danger); }
.geo-label { flex: 1; }
.geo-pct { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ═══ EMPLOYEE DETAIL MODAL ═══ */
.modal-lg { max-height: 92vh; }
.emp-detail-header {
  display: flex; align-items: center; gap: 16px; padding-bottom: 20px;
  border-bottom: 1px solid var(--fy-border); margin-bottom: 20px;
}
.emp-detail-avatar {
  width: 56px; height: 56px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: var(--fy-primary); color: #fff; font-weight: 800; font-size: 22px;
}
.emp-detail-avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.emp-detail-info h3 { font-size: 18px; font-weight: 800; }
.emp-detail-info p { font-size: 13px; color: var(--fy-text-muted); }

.emp-detail-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px; }
.emp-kpi { text-align: center; padding: 12px 8px; background: var(--fy-surface-2); border-radius: var(--fy-radius-sm); }
.emp-kpi-val { font-size: 20px; font-weight: 800; }
.emp-kpi-label { font-size: 11px; color: var(--fy-text-muted); margin-top: 2px; }

.emp-detail-chart { margin-bottom: 20px; }
.emp-mini-bars { display: flex; align-items: flex-end; gap: 3px; height: 80px; }
.emp-mini-bar { flex: 1; border-radius: 3px 3px 0 0; background: var(--fy-gradient); min-height: 2px; transition: height 0.4s var(--fy-ease-bounce); }
.emp-mini-bar.overtime { background: linear-gradient(135deg, #EF4444, #DC2626); }
.emp-mini-bar.low { background: var(--fy-warning); opacity: 0.6; }

.emp-detail-timeline h4 { font-size: 14px; font-weight: 700; margin-bottom: 12px; color: var(--fy-text-secondary); }

/* Team card clickable */
.team-card { cursor: pointer; }
.team-card:active { transform: scale(0.98); }

/* ═══ CHAT AI VIEW ═══ */
.chat-container {
  display: flex; flex-direction: column; height: 100%;
  max-height: calc(100vh - var(--fy-header-h) - var(--fy-bottom-nav-h));
}
.chat-messages {
  flex: 1; overflow-y: auto; padding: 16px 12px;
  display: flex; flex-direction: column; gap: 12px;
  scroll-behavior: smooth;
}
.chat-bubble {
  display: flex; gap: 8px; max-width: 88%; animation: chatFadeIn 0.3s ease;
}
.chat-bubble.user { align-self: flex-end; flex-direction: row-reverse; }
.chat-bubble.assistant { align-self: flex-start; }
.chat-bubble-avatar {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(var(--fy-primary-rgb), 0.12);
}
.chat-bubble.user .chat-bubble-avatar {
  background: var(--fy-primary); color: #fff; font-size: 12px; font-weight: 700;
}
.chat-bubble-content {
  padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.55;
  word-break: break-word;
}
.chat-bubble.assistant .chat-bubble-content {
  background: var(--fy-surface); border: 1px solid var(--fy-border);
  border-top-left-radius: 4px;
}
.chat-bubble.user .chat-bubble-content {
  background: var(--fy-primary); color: #fff;
  border-top-right-radius: 4px;
}
.chat-bubble-content p { margin: 0 0 6px; }
.chat-bubble-content p:last-child { margin-bottom: 0; }
.chat-bubble-content ul { margin: 4px 0; padding-left: 18px; }
.chat-bubble-content li { margin: 2px 0; }
.chat-bubble-content strong { font-weight: 700; }
.chat-bubble-content code {
  background: rgba(0,0,0,0.1); padding: 1px 4px; border-radius: 3px; font-size: 13px;
}
.chat-tool-badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: var(--fy-radius-full);
  background: rgba(var(--fy-primary-rgb), 0.1); color: var(--fy-primary);
  font-size: 12px; font-weight: 600; margin-bottom: 6px;
}
.chat-tool-badge .spinner {
  width: 12px; height: 12px; border: 2px solid rgba(var(--fy-primary-rgb), 0.2);
  border-top-color: var(--fy-primary); border-radius: 50%;
  animation: spin 0.6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.chat-typing { display: flex; align-items: center; gap: 5px; padding: 8px 14px; }
.chat-typing span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--fy-text-muted); opacity: 0.6;
  animation: chatTyping 1.4s ease-in-out infinite both;
}
.chat-typing span:nth-child(2) { animation-delay: 0.16s; }
.chat-typing span:nth-child(3) { animation-delay: 0.32s; }
@keyframes chatTyping {
  0%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-5px); }
}
@keyframes chatFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.chat-quick-actions {
  display: flex; gap: 6px; padding: 8px 12px; overflow-x: auto;
  -webkit-overflow-scrolling: touch; flex-shrink: 0;
}
.chat-quick-actions::-webkit-scrollbar { display: none; }
.chat-chip {
  white-space: nowrap; padding: 6px 12px; border-radius: var(--fy-radius-full);
  background: var(--fy-surface); border: 1px solid var(--fy-border);
  font-size: 13px; font-weight: 500; color: var(--fy-text); cursor: pointer;
  transition: all 0.15s ease; flex-shrink: 0;
}
.chat-chip:hover { border-color: var(--fy-primary); color: var(--fy-primary); }
.chat-chip:active { transform: scale(0.96); }
.chat-input-bar {
  display: flex; gap: 8px; padding: 10px 12px; flex-shrink: 0;
  border-top: 1px solid var(--fy-border); background: var(--fy-bg);
}
.chat-input {
  flex: 1; padding: 10px 14px; border-radius: var(--fy-radius-full);
  border: 1px solid var(--fy-border); background: var(--fy-surface);
  font-size: 14px; color: var(--fy-text); outline: none;
  transition: border-color 0.15s;
}
.chat-input:focus { border-color: var(--fy-primary); }
.chat-input::placeholder { color: var(--fy-text-muted); }
.chat-send-btn {
  width: 42px; height: 42px; border-radius: 50%; border: none;
  background: var(--fy-primary); color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.15s; flex-shrink: 0;
}
.chat-send-btn:hover { background: var(--fy-primary-dark); }
.chat-send-btn:active { transform: scale(0.92); }
.chat-send-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.chat-model-badge {
  font-size: 10px; color: var(--fy-text-muted); text-align: center;
  padding: 2px 0; opacity: 0.6;
}

/* ═══ ACCESSIBILITY ═══ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
*:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(var(--fy-primary-rgb), 0.4);
}

/* ═══ RESPONSIVE ═══ */
@media (min-width: 768px) {
  .hero { padding: 140px 40px 100px; }
  .hero h1 { font-size: 48px; }

  .bottom-nav {
    top: 0; bottom: auto; left: 0; right: auto;
    width: var(--fy-bottom-nav-h);
    height: 100%; flex-direction: column;
    justify-content: flex-start; padding-top: calc(var(--fy-header-h) + 16px);
    border-top: none; border-right: 1px solid var(--fy-border);
  }
  .nav-item { padding: 12px; }
  .nav-item span { display: none; }
  .nav-item.active::after { bottom: auto; right: 0; left: auto; top: 50%; transform: translateY(-50%); }

  .app-main {
    margin-left: var(--fy-bottom-nav-h);
    margin-bottom: 0;
  }

  .clock-container { padding-top: 48px; }
}

@media (min-width: 1024px) {
  .bottom-nav { width: 200px; }
  .nav-item { flex-direction: row; gap: 10px; padding: 12px 16px; }
  .nav-item span { display: block; font-size: 14px; }
  .app-main { margin-left: 200px; }

  .pricing-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ═══ COMPLIANCE / ALERTS VIEW ═══ */
.alerts-header { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; }
.alerts-actions { display: flex; gap: 6px; }
.compliance-report-box { background: var(--fy-surface); border: 1px solid var(--fy-border); border-radius: var(--fy-radius-lg); padding: 14px 16px; margin: 0 12px 12px; }
.compliance-report-box h4 { font-size: 14px; margin-bottom: 4px; }
.report-controls { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.report-checkbox { display: flex; gap: 4px; align-items: center; font-size: 12px; color: var(--fy-text-muted); }

.alerts-list { padding: 0 12px; }
.alert-item { display: flex; gap: 10px; padding: 12px; background: var(--fy-surface); border: 1px solid var(--fy-border); border-radius: var(--fy-radius-lg); margin-bottom: 8px; position: relative; animation: chatFadeIn 0.3s ease; }
.alert-item.unread { border-left: 3px solid var(--fy-primary); }
.alert-item.critical { border-left: 3px solid var(--fy-error); }
.alert-icon { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.alert-icon.warning { background: #fef3c7; }
.alert-icon.critical { background: #fecaca; }
.alert-icon.info { background: #dbeafe; }
.alert-body { flex: 1; min-width: 0; }
.alert-title { font-size: 13px; font-weight: 600; color: var(--fy-text); }
.alert-message { font-size: 11.5px; color: var(--fy-text-muted); margin-top: 2px; line-height: 1.4; }
.alert-time { font-size: 10px; color: var(--fy-text-muted); margin-top: 4px; opacity: 0.7; }
.alert-dismiss { position: absolute; top: 8px; right: 8px; background: none; border: none; cursor: pointer; font-size: 16px; color: var(--fy-text-muted); opacity: 0.5; }
.alert-dismiss:hover { opacity: 1; }

.alert-badge { position: absolute; top: 2px; right: 6px; background: var(--fy-error); color: #fff; font-size: 9px; font-weight: 700; min-width: 16px; height: 16px; border-radius: 8px; display: flex; align-items: center; justify-content: center; padding: 0 4px; line-height: 1; }

/* ═══ SIGNATURE MODAL ═══ */
.sig-modal-actions { display: flex; gap: 8px; margin-top: 10px; justify-content: flex-end; }
#signatureCanvas { cursor: crosshair; }

