/* ============================================================
   Actomat — Design System (inspirat din startfi.ro)
   Mobile-first | Navy + Blue + Teal | Inter + Caveat
   ============================================================ */

/* ---- Google Fonts import (Caveat + Inter) ---- */
@import url('https://fonts.googleapis.com/css2?family=Caveat:wght@600;700;800&family=Inter:wght@400;500;600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
  --navy:         #0f2540;
  --navy-deep:    #0a1929;
  --navy-mid:     #1a3555;
  --blue:         #1a6fd8;
  --blue-light:   #3b9eff;
  --blue-pale:    #e8f2ff;
  --teal:         #00b89c;
  --teal-light:   #00d4b4;
  --teal-pale:    #e0faf6;
  --gold:         #f0a500;
  --gold-light:   #ffc52d;
  --gold-pale:    #fff8e6;
  --red:          #e53e3e;
  --red-pale:     #fef2f2;
  --green:        #38a169;
  --green-pale:   #f0fff4;

  --white:        #ffffff;
  --bg:           #f5f8ff;
  --bg-alt:       #eaf0ff;
  --text:         #1a2740;
  --text-muted:   #4a6890;
  --text-light:   #7a9cc0;
  --border:       #c5d8f0;
  --border-dark:  #0f2540;

  --radius-sm:    4px 8px 4px 6px;
  --radius:       6px 12px 6px 10px;
  --radius-lg:    8px 16px 8px 14px;
  --radius-xl:    12px 20px 12px 18px;
  --radius-round: 50px;

  --shadow-sm:    3px 3px 0 rgba(15,37,64,0.6);
  --shadow:       4px 4px 0 rgba(15,37,64,0.7);
  --shadow-lg:    6px 6px 0 rgba(15,37,64,0.8);
  --shadow-xl:    8px 8px 0 rgba(15,37,64,0.85);

  --border-w:     2px;
  --transition:   0.25s ease;

  --nav-h:        66px;
  --container:    1180px;
  --sidebar-w:    260px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select, textarea { font: inherit; }
ul { list-style: none; }

/* ---- Typography ---- */
h1,h2,h3,h4,h5 { font-weight: 800; line-height: 1.2; color: var(--navy); }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.1rem; }

.brand-font { font-family: 'Caveat', cursive; }
.text-blue   { color: var(--blue); }
.text-teal   { color: var(--teal); }
.text-gold   { color: var(--gold); }
.text-navy   { color: var(--navy); }
.text-muted  { color: var(--text-muted); }
.text-center { text-align: center; }

/* ---- Container ---- */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 5%;
}

/* ---- Preloader ---- */
.preloader {
  position: fixed; inset: 0;
  background: var(--navy);
  z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}
.preloader.done { opacity: 0; visibility: hidden; }
.preloader-spinner {
  width: 46px; height: 46px;
  border: 3px solid rgba(255,255,255,0.15);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================
   NAVBAR (Marketing)
   ============================================================ */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: var(--border-w) solid var(--navy);
  display: flex; align-items: center;
}
.navbar .container {
  display: flex; align-items: center; justify-content: space-between;
}
.navbar-brand {
  font-family: 'Caveat', cursive;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -0.5px;
}
.navbar-brand .accent { color: var(--blue); }

.navbar-links {
  display: none;
  gap: 0.25rem;
  align-items: center;
}
@media (min-width: 900px) {
  .navbar-links { display: flex; }
}
.navbar-links a {
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition), background var(--transition);
}
.navbar-links a:hover, .navbar-links a.active {
  color: var(--navy);
  background: var(--bg);
}

.navbar-actions {
  display: none;
  gap: 0.75rem;
  align-items: center;
}
@media (min-width: 900px) { .navbar-actions { display: flex; } }

.hamburger {
  display: flex; flex-direction: column; gap: 5px;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: var(--border-w) solid var(--navy);
}
@media (min-width: 900px) { .hamburger { display: none; } }
.hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--navy);
  transition: var(--transition);
}

/* Mobile menu */
.mobile-nav {
  position: fixed; inset: 0; z-index: 999;
  background: var(--navy);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(.4,0,.2,1);
  padding: 1.5rem;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.mobile-nav-brand {
  font-family: 'Caveat', cursive;
  font-size: 1.8rem; font-weight: 800; color: var(--white);
}
.mobile-nav-brand .accent { color: var(--teal); }
.mobile-nav-close {
  width: 38px; height: 38px;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--white); font-size: 1.1rem;
}
.mobile-nav-links { flex: 1; display: flex; flex-direction: column; gap: 0.25rem; }
.mobile-nav-links a {
  padding: 0.85rem 1rem;
  color: rgba(255,255,255,0.8);
  font-size: 1.05rem; font-weight: 500;
  border-radius: var(--radius-sm);
  transition: background var(--transition), color var(--transition);
}
.mobile-nav-links a:hover { background: rgba(255,255,255,0.1); color: var(--white); }
.mobile-nav-footer { padding-top: 1.5rem; display: flex; flex-direction: column; gap: 0.75rem; }

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  font-size: 0.92rem; font-weight: 700;
  border-radius: var(--radius);
  border: var(--border-w) solid var(--navy);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.btn:hover {
  transform: translate(-2px, -2px);
  box-shadow: var(--shadow-lg);
}
.btn:active { transform: translate(0, 0); box-shadow: var(--shadow-sm); }

.btn-primary {
  background: var(--blue);
  color: var(--white);
  box-shadow: var(--shadow);
}
.btn-primary:hover { background: #155bbf; }

.btn-navy {
  background: var(--navy);
  color: var(--white);
  box-shadow: var(--shadow);
}
.btn-navy:hover { background: var(--navy-deep); }

.btn-teal {
  background: var(--teal);
  color: var(--white);
  box-shadow: var(--shadow);
}
.btn-teal:hover { background: #009980; }

.btn-gold {
  background: var(--gold);
  color: var(--navy);
  box-shadow: var(--shadow);
}
.btn-gold:hover { background: var(--gold-light); }

.btn-outline {
  background: var(--white);
  color: var(--navy);
  box-shadow: var(--shadow);
}
.btn-outline:hover { background: var(--bg); }

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--bg); color: var(--navy); box-shadow: none; transform: none; }

.btn-sm { padding: 0.45rem 1rem; font-size: 0.82rem; }
.btn-lg { padding: 0.9rem 2rem; font-size: 1rem; }
.btn-xl { padding: 1.1rem 2.5rem; font-size: 1.05rem; }
.btn-full { width: 100%; }

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--white);
  border: var(--border-w) solid var(--navy);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-xl); }

.card-header {
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1.5px dashed var(--border);
}
.card-title { font-size: 1.1rem; font-weight: 700; }
.card-subtitle { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ============================================================
   FORMS
   ============================================================ */
.form-group { margin-bottom: 1.25rem; }
.form-label {
  display: block;
  font-size: 0.88rem; font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.4rem;
}
.form-label .required { color: var(--red); margin-left: 2px; }
.form-control {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text);
  font-size: 0.92rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-control:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(26,111,216,0.15);
}
.form-control::placeholder { color: var(--text-light); }
.form-control.error { border-color: var(--red); }
.form-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.3rem; }
.form-error { font-size: 0.8rem; color: var(--red); margin-top: 0.3rem; display: none; }
.form-error.show { display: block; }

.form-row { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 600px) {
  .form-row-2 { grid-template-columns: 1fr 1fr; }
  .form-row-3 { grid-template-columns: 1fr 1fr 1fr; }
}

select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath fill='%234a6890' d='M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; background-size: 1rem; padding-right: 2.5rem; }

textarea.form-control { resize: vertical; min-height: 100px; }

.input-group { position: relative; display: flex; }
.input-group .form-control { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .input-addon {
  padding: 0 0.9rem;
  background: var(--bg); border: var(--border-w) solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  display: flex; align-items: center;
  color: var(--text-muted); font-size: 0.88rem;
  white-space: nowrap;
}
.input-icon-left { position: relative; }
.input-icon-left i { position: absolute; left: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--text-light); font-size: 0.9rem; pointer-events: none; }
.input-icon-left .form-control { padding-left: 2.4rem; }
.input-icon-right { position: relative; }
.input-icon-right i { position: absolute; right: 0.75rem; top: 50%; transform: translateY(-50%); color: var(--text-light); font-size: 0.9rem; cursor: pointer; }
.input-icon-right .form-control { padding-right: 2.4rem; }

/* Checkbox / Radio */
.check-group { display: flex; align-items: flex-start; gap: 0.6rem; cursor: pointer; }
.check-group input[type="checkbox"], .check-group input[type="radio"] {
  width: 18px; height: 18px; min-width: 18px;
  border: 2px solid var(--border);
  border-radius: 4px;
  appearance: none;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  margin-top: 2px;
}
.check-group input[type="checkbox"]:checked { background: var(--blue); border-color: var(--blue); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M6.5 11.5L2.5 7.5l1.4-1.4L6.5 8.7l5.6-5.6 1.4 1.4z'/%3E%3C/svg%3E"); background-size: 14px; background-position: center; background-repeat: no-repeat; }

/* ============================================================
   BADGES & PILLS
   ============================================================ */
.badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.25rem 0.75rem;
  font-size: 0.78rem; font-weight: 600;
  border-radius: var(--radius-round);
  border: 1.5px solid;
}
.badge-blue  { background: var(--blue-pale);  color: var(--blue);  border-color: var(--blue); }
.badge-teal  { background: var(--teal-pale);  color: var(--teal);  border-color: var(--teal); }
.badge-gold  { background: var(--gold-pale);  color: #c47d00;      border-color: var(--gold); }
.badge-navy  { background: var(--navy);       color: var(--white); border-color: var(--navy); }
.badge-red   { background: var(--red-pale);   color: var(--red);   border-color: var(--red); }
.badge-green { background: var(--green-pale); color: var(--green); border-color: var(--green); }

/* ============================================================
   ALERTS
   ============================================================ */
.alert {
  padding: 0.9rem 1.2rem;
  border-radius: var(--radius);
  border: var(--border-w) solid;
  font-size: 0.9rem;
  display: flex; align-items: flex-start; gap: 0.75rem;
  margin-bottom: 1rem;
}
.alert i { font-size: 1rem; margin-top: 1px; flex-shrink: 0; }
.alert-success { background: var(--green-pale); border-color: var(--green); color: var(--green); }
.alert-error   { background: var(--red-pale);   border-color: var(--red);   color: var(--red); }
.alert-info    { background: var(--blue-pale);  border-color: var(--blue);  color: var(--blue); }
.alert-warning { background: var(--gold-pale);  border-color: var(--gold);  color: #c47d00; }

/* ============================================================
   SECTION UTILS
   ============================================================ */
.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.section-lg { padding: 7rem 0; }
@media (max-width: 768px) {
  .section { padding: 3.5rem 0; }
  .section-lg { padding: 4.5rem 0; }
}
body.has-navbar { padding-top: var(--nav-h); }

.section-label {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--blue);
  background: var(--blue-pale);
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-round);
  border: 1.5px solid var(--blue);
  margin-bottom: 1rem;
}
.section-title { margin-bottom: 1rem; }
.section-desc { font-size: 1.05rem; color: var(--text-muted); max-width: 600px; }
.section-header-center { text-align: center; display: flex; flex-direction: column; align-items: center; }

/* ============================================================
   HERO (Landing)
   ============================================================ */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: flex; align-items: center;
  overflow: hidden;
  background: var(--navy);
  padding: 4rem 0;
}
.hero-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 60% 40%, rgba(26,111,216,0.35) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(0,184,156,0.2) 0%, transparent 50%);
  pointer-events: none;
}
.hero-pattern {
  position: absolute; inset: 0;
  background-image: repeating-linear-gradient(0deg, rgba(255,255,255,0.025) 0, rgba(255,255,255,0.025) 1px, transparent 1px, transparent 44px),
                    repeating-linear-gradient(90deg, rgba(255,255,255,0.025) 0, rgba(255,255,255,0.025) 1px, transparent 1px, transparent 44px);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 1; }
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  align-items: center;
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1fr 1fr; }
}
.hero-label {
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--teal);
  background: rgba(0,184,156,0.12);
  padding: 0.35rem 1rem;
  border-radius: var(--radius-round);
  border: 1.5px solid var(--teal);
  margin-bottom: 1.25rem;
}
.hero h1 { color: var(--white); margin-bottom: 1.25rem; }
.hero h1 .accent { color: var(--teal); }
.hero-desc { color: rgba(255,255,255,0.72); font-size: 1.1rem; margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 1rem; }
.hero-stats {
  display: flex; flex-wrap: wrap; gap: 1.5rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.hero-stat-num {
  font-family: 'Caveat', cursive;
  font-size: 2rem; font-weight: 700; color: var(--teal);
  line-height: 1;
}
.hero-stat-label { font-size: 0.82rem; color: rgba(255,255,255,0.6); margin-top: 0.25rem; }

/* Hero Visual (mockup / illustration) */
.hero-visual {
  position: relative;
}
.hero-card-mockup {
  background: rgba(255,255,255,0.07);
  border: 1.5px solid rgba(255,255,255,0.15);
  border-radius: var(--radius-xl);
  padding: 1.5rem;
  backdrop-filter: blur(8px);
}
.hero-card-mockup .card-row {
  display: flex; align-items: center; gap: 1rem;
  padding: 0.75rem;
  background: rgba(255,255,255,0.06);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  border: 1px solid rgba(255,255,255,0.1);
}
.hero-card-mockup .card-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.hero-card-mockup .card-text-main { font-size: 0.88rem; font-weight: 600; color: var(--white); }
.hero-card-mockup .card-text-sub  { font-size: 0.78rem; color: rgba(255,255,255,0.5); }
.hero-card-mockup .card-status    { margin-left: auto; }

/* ============================================================
   FEATURES GRID
   ============================================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.feature-card {
  background: var(--white);
  border: var(--border-w) solid var(--navy);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.feature-card:hover { transform: translate(-2px, -3px); box-shadow: var(--shadow-xl); }
.feature-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
  border: var(--border-w) solid var(--navy);
}
.feature-icon.blue  { background: var(--blue-pale); color: var(--blue); }
.feature-icon.teal  { background: var(--teal-pale); color: var(--teal); }
.feature-icon.gold  { background: var(--gold-pale); color: #c47d00; }
.feature-icon.navy  { background: var(--navy); color: var(--white); }
.feature-card h3 { font-size: 1.05rem; margin-bottom: 0.5rem; }
.feature-card p  { font-size: 0.88rem; color: var(--text-muted); line-height: 1.6; }

/* ============================================================
   PRICING
   ============================================================ */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  align-items: start;
}
.pricing-card {
  background: var(--white);
  border: var(--border-w) solid var(--navy);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  padding: 2rem;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}
.pricing-card.featured {
  background: var(--navy);
  box-shadow: var(--shadow-xl);
  transform: translateY(-6px);
}
.pricing-card.featured:hover { transform: translateY(-10px); }
.pricing-card.featured * { color: var(--white); }
.pricing-card.featured .pricing-price { color: var(--teal); }
.pricing-card.featured .pricing-feature { border-color: rgba(255,255,255,0.12); }
.pricing-badge {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--teal); color: var(--white);
  font-size: 0.78rem; font-weight: 700;
  padding: 0.3rem 1rem;
  border-radius: var(--radius-round);
  border: 2px solid var(--navy);
  white-space: nowrap;
}
.pricing-plan { font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 0.5rem; }
.pricing-price {
  font-family: 'Caveat', cursive;
  font-size: 3rem; font-weight: 800; color: var(--navy); line-height: 1;
  margin-bottom: 0.25rem;
}
.pricing-price sup { font-size: 1.2rem; vertical-align: super; }
.pricing-period { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.pricing-features { margin-bottom: 2rem; }
.pricing-feature {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: 0.88rem;
}
.pricing-feature:last-child { border-bottom: none; }
.pricing-feature i { color: var(--teal); flex-shrink: 0; margin-top: 2px; }

/* ============================================================
   PACKAGES / DOCUMENT CARDS
   ============================================================ */
.package-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
}
.package-card {
  background: var(--white);
  border: var(--border-w) solid var(--navy);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 0.75rem;
  text-decoration: none;
  color: inherit;
  transition: transform var(--transition), box-shadow var(--transition);
}
.package-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-xl); }
.package-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  border: 2px solid var(--navy);
}
.package-name { font-size: 0.95rem; font-weight: 700; }
.package-count { font-size: 0.8rem; color: var(--text-muted); }

/* ============================================================
   DOCUMENT LIST
   ============================================================ */
.doc-list { display: flex; flex-direction: column; gap: 0.75rem; }
.doc-item {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: var(--border-w) solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.doc-item:hover { border-color: var(--blue); box-shadow: var(--shadow-sm); }
.doc-item-icon {
  width: 40px; height: 40px; min-width: 40px;
  border-radius: var(--radius-sm);
  background: var(--blue-pale);
  border: 1.5px solid var(--blue);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--blue);
}
.doc-item-name { font-size: 0.92rem; font-weight: 600; flex: 1; }
.doc-item-price { font-size: 0.88rem; font-weight: 700; color: var(--navy); white-space: nowrap; }
.doc-item-price.free { color: var(--teal); }

/* ============================================================
   FAQ / ACCORDION
   ============================================================ */
.accordion { display: flex; flex-direction: column; gap: 0.75rem; }
.accordion-item {
  background: var(--white);
  border: var(--border-w) solid var(--navy);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.accordion-trigger {
  width: 100%; text-align: left;
  padding: 1.1rem 1.25rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  font-size: 0.95rem; font-weight: 600; color: var(--navy);
  background: none;
  transition: background var(--transition);
}
.accordion-trigger:hover { background: var(--bg); }
.accordion-icon {
  width: 26px; height: 26px; min-width: 26px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; color: var(--text-muted);
  transition: transform var(--transition), background var(--transition), border-color var(--transition);
}
.accordion-item.open .accordion-icon {
  transform: rotate(45deg);
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}
.accordion-body {
  max-height: 0; overflow: hidden;
  transition: max-height 0.35s ease, padding var(--transition);
  font-size: 0.9rem; color: var(--text-muted);
  line-height: 1.7;
}
.accordion-body-inner {
  padding: 0 1.25rem 1.25rem;
  border-top: 1.5px dashed var(--border);
  padding-top: 1rem;
}
.accordion-item.open .accordion-body { max-height: 500px; }

/* ============================================================
   STEPS
   ============================================================ */
.steps { display: flex; flex-direction: column; gap: 1.5rem; }
@media (min-width: 768px) { .steps-horizontal { flex-direction: row; } }
.step {
  display: flex; gap: 1.25rem;
  align-items: flex-start;
}
.step-num {
  width: 44px; height: 44px; min-width: 44px;
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  font-family: 'Caveat', cursive;
  font-size: 1.3rem; font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.step-content h4 { margin-bottom: 0.35rem; }
.step-content p  { font-size: 0.88rem; color: var(--text-muted); }

/* ============================================================
   TABLES
   ============================================================ */
.table-wrap { overflow-x: auto; }
.table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--white);
  border: var(--border-w) solid var(--navy);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.table th {
  padding: 0.85rem 1rem;
  text-align: left; font-size: 0.8rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--text-muted);
  background: var(--bg);
  border-bottom: var(--border-w) solid var(--navy);
  white-space: nowrap;
}
.table td {
  padding: 0.85rem 1rem;
  font-size: 0.88rem;
  border-bottom: 1px dashed var(--border);
  vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover td { background: var(--bg); }

/* ============================================================
   MODAL — bottom sheet on mobile, centered on desktop
   ============================================================ */
.modal-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(15,37,64,0.7);
  display: flex; align-items: flex-end; justify-content: center;
  padding: 0;
  opacity: 0; visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

/* Bottom sheet */
.modal {
  background: var(--white);
  border-top: var(--border-w) solid var(--navy);
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -8px 40px rgba(15,37,64,0.25);
  width: 100%;
  max-height: 92dvh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.32s cubic-bezier(.32,0,.67,0);
  overscroll-behavior: contain;
}
.modal-overlay.open .modal {
  transform: translateY(0);
  transition-timing-function: cubic-bezier(.22,.61,.36,1);
}

/* Drag handle */
.modal::before {
  content: '';
  display: block;
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 0;
}

.modal-header {
  padding: 0.75rem 1.5rem 1rem;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1.5px solid var(--border);
  position: sticky; top: 0; background: var(--white); z-index: 1;
}
.modal-title { font-size: 1.05rem; font-weight: 700; }
.modal-close {
  width: 32px; height: 32px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; color: var(--text-muted);
  transition: background var(--transition), border-color var(--transition);
  flex-shrink: 0;
}
.modal-close:hover { background: var(--bg); border-color: var(--navy); color: var(--navy); }
.modal-body { padding: 1.25rem 1.5rem 1.5rem; }
.modal-footer {
  padding: 1rem 1.5rem 1.5rem;
  border-top: 1.5px solid var(--border);
  display: flex; gap: 0.75rem; justify-content: flex-end;
  position: sticky; bottom: 0; background: var(--white); z-index: 1;
}

/* Desktop: classic centered dialog */
@media (min-width: 640px) {
  .modal-overlay {
    align-items: center;
    padding: 1.5rem;
  }
  .modal {
    border: var(--border-w) solid var(--navy);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    max-width: 620px;
    max-height: 88vh;
    transform: scale(0.95) translateY(12px);
    transition: transform 0.25s cubic-bezier(.22,.61,.36,1);
  }
  .modal-overlay.open .modal {
    transform: scale(1) translateY(0);
    transition-timing-function: cubic-bezier(.22,.61,.36,1);
  }
  /* Hide drag handle on desktop */
  .modal::before { display: none; }
  .modal-header { position: static; padding: 1.5rem 1.5rem 1rem; }
  .modal-footer { position: static; padding: 1rem 1.5rem; }
}


/* ============================================================
   TABS
   ============================================================ */
.tabs { display: flex; flex-direction: column; }
.tab-list {
  display: flex; gap: 0.25rem; flex-wrap: wrap;
  border-bottom: var(--border-w) solid var(--border);
  margin-bottom: 1.5rem;
}
.tab-btn {
  padding: 0.65rem 1.25rem;
  font-size: 0.9rem; font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  border: var(--border-w) solid transparent;
  transition: color var(--transition), background var(--transition), border-color var(--transition);
  position: relative; bottom: -2px;
}
.tab-btn:hover { color: var(--navy); background: var(--bg); }
.tab-btn.active {
  color: var(--blue); font-weight: 700;
  background: var(--white);
  border-color: var(--border) var(--border) transparent;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ============================================================
   SEARCH
   ============================================================ */
.search-bar {
  display: flex; gap: 0.5rem;
}
.search-bar .form-control {
  border-radius: var(--radius) 0 0 var(--radius);
  flex: 1;
}
.search-bar .btn {
  border-radius: 0 var(--radius) var(--radius) 0;
  padding-left: 1.25rem; padding-right: 1.25rem;
}

/* ============================================================
   PROGRESS STEPS (wizard)
   ============================================================ */
.wizard-steps {
  display: flex; align-items: center;
  gap: 0;
  margin-bottom: 2rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}
.wizard-step {
  display: flex; align-items: center;
  flex-shrink: 0;
}
.wizard-step-num {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; color: var(--text-muted);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.wizard-step.done .wizard-step-num { background: var(--teal); border-color: var(--teal); color: var(--white); }
.wizard-step.active .wizard-step-num { background: var(--navy); border-color: var(--navy); color: var(--white); box-shadow: var(--shadow-sm); }
.wizard-step-label { font-size: 0.8rem; font-weight: 600; color: var(--text-muted); margin-top: 0.35rem; white-space: nowrap; }
.wizard-step.active .wizard-step-label { color: var(--navy); }
.wizard-step.done  .wizard-step-label  { color: var(--teal); }
.wizard-sep { height: 2px; width: 40px; background: var(--border); margin: 0 0.25rem; margin-bottom: 1.5rem; flex-shrink: 0; }
.wizard-sep.done { background: var(--teal); }
.wizard-step-inner { display: flex; flex-direction: column; align-items: center; }

/* ============================================================
   AVATAR
   ============================================================ */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--text-muted);
  flex-shrink: 0;
}
.avatar-sm  { width: 32px;  height: 32px;  font-size: 0.8rem; }
.avatar-md  { width: 44px;  height: 44px;  font-size: 1rem; }
.avatar-lg  { width: 64px;  height: 64px;  font-size: 1.4rem; }
.avatar-xl  { width: 88px;  height: 88px;  font-size: 1.8rem; }

/* ============================================================
   TOAST NOTIFICATIONS
   ============================================================ */
#toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999;
  display: flex; flex-direction: column; gap: 0.75rem;
  max-width: 380px;
}
.toast {
  display: flex; align-items: flex-start; gap: 0.75rem;
  padding: 1rem 1.25rem;
  background: var(--white);
  border: var(--border-w) solid var(--navy);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-size: 0.9rem;
  animation: toastIn 0.3s ease;
}
.toast.removing { animation: toastOut 0.3s ease forwards; }
.toast-icon { font-size: 1.1rem; flex-shrink: 0; }
.toast-success .toast-icon { color: var(--teal); }
.toast-error   .toast-icon { color: var(--red); }
.toast-info    .toast-icon { color: var(--blue); }
.toast-warning .toast-icon { color: var(--gold); }
.toast-text { flex: 1; }
.toast-title { font-weight: 700; font-size: 0.88rem; }
.toast-body  { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.15rem; }
.toast-close { color: var(--text-light); font-size: 0.85rem; cursor: pointer; padding: 2px; }
@keyframes toastIn  { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: translateX(0); } }
@keyframes toastOut { from { opacity:1; transform: translateX(0); } to { opacity:0; transform: translateX(20px); } }

/* ============================================================
   OCR / Camera Upload Widget
   ============================================================ */
.ocr-widget {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  background: var(--bg);
  transition: border-color var(--transition), background var(--transition);
  cursor: pointer;
  position: relative;
}
.ocr-widget:hover, .ocr-widget.drag-over {
  border-color: var(--blue);
  background: var(--blue-pale);
}
.ocr-widget input[type="file"] {
  position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%;
}
.ocr-icon { font-size: 2rem; color: var(--blue); margin-bottom: 0.75rem; }
.ocr-title { font-weight: 600; font-size: 0.95rem; color: var(--navy); }
.ocr-sub   { font-size: 0.82rem; color: var(--text-muted); margin-top: 0.25rem; }
.ocr-preview { margin-top: 1rem; position: relative; }
.ocr-preview img { width: 100%; max-height: 200px; object-fit: contain; border-radius: var(--radius); border: 1.5px solid var(--border); }
.ocr-scanning {
  position: absolute; inset: 0;
  background: rgba(26,111,216,0.08);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  gap: 0.5rem;
  font-size: 0.88rem; font-weight: 600; color: var(--blue);
}
.ocr-scanning-bar {
  height: 3px; background: var(--blue-pale);
  border-radius: 2px; margin-top: 0.75rem; overflow: hidden;
}
.ocr-scanning-bar-inner {
  height: 100%; background: var(--blue);
  animation: scanBar 1.5s ease-in-out infinite;
  width: 40%;
}
@keyframes scanBar { 0%,100%{transform:translateX(-100%)} 50%{transform:translateX(250%)} }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 3.5rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand {
  font-family: 'Caveat', cursive;
  font-size: 1.8rem; font-weight: 800; color: var(--white);
  margin-bottom: 0.75rem;
}
.footer-brand .accent { color: var(--teal); }
.footer-desc { font-size: 0.88rem; line-height: 1.7; }
.footer-col h4 {
  font-size: 0.82rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--white); margin-bottom: 1rem;
}
.footer-links { display: flex; flex-direction: column; gap: 0.5rem; }
.footer-links a {
  font-size: 0.88rem; color: rgba(255,255,255,0.6);
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--teal); }
.footer-bottom {
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center;
  gap: 1rem;
  font-size: 0.82rem;
}
.footer-legal { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-legal a { color: rgba(255,255,255,0.5); transition: color var(--transition); }
.footer-legal a:hover { color: var(--teal); }

/* ============================================================
   AUTH PAGES
   ============================================================ */
.auth-page {
  min-height: 100vh;
  display: flex;
  background: var(--navy);
  position: relative;
  overflow: hidden;
}
.auth-left {
  display: none;
  flex: 0 0 42%;
  background: var(--navy-deep);
  padding: 3rem;
  flex-direction: column;
  justify-content: space-between;
  border-right: 2px solid rgba(255,255,255,0.08);
  position: relative;
  overflow: hidden;
}
@media (min-width: 900px) { .auth-left { display: flex; } }
.auth-left-bg {
  position: absolute; inset: 0;
  background: radial-gradient(ellipse at 70% 30%, rgba(26,111,216,0.25) 0%, transparent 60%),
              radial-gradient(ellipse at 20% 80%, rgba(0,184,156,0.15) 0%, transparent 50%);
  pointer-events: none;
}
.auth-left-content { position: relative; z-index: 1; }
.auth-logo {
  font-family: 'Caveat', cursive;
  font-size: 2rem; font-weight: 800; color: var(--white);
  margin-bottom: 3rem;
}
.auth-logo .accent { color: var(--teal); }
.auth-left h2 { color: var(--white); font-size: 1.8rem; margin-bottom: 1rem; }
.auth-left p  { color: rgba(255,255,255,0.65); font-size: 0.95rem; line-height: 1.7; }
.auth-left-features { display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }
.auth-left-feature {
  display: flex; gap: 0.75rem; align-items: flex-start;
  font-size: 0.88rem; color: rgba(255,255,255,0.75);
}
.auth-left-feature i { color: var(--teal); font-size: 1rem; margin-top: 2px; flex-shrink: 0; }

.auth-right {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1.5rem;
}
.auth-box {
  background: var(--white);
  border: var(--border-w) solid var(--navy);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 2.5rem;
  width: 100%; max-width: 440px;
}
.auth-box h1 { font-size: 1.6rem; margin-bottom: 0.4rem; }
.auth-subtitle { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 2rem; }
.auth-divider {
  display: flex; align-items: center; gap: 1rem;
  margin: 1.5rem 0; font-size: 0.82rem; color: var(--text-muted);
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}
.auth-social { display: flex; flex-direction: column; gap: 0.75rem; }
.auth-social-btn {
  display: flex; align-items: center; gap: 0.75rem;
  padding: 0.7rem 1rem;
  border: var(--border-w) solid var(--navy);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--white);
  font-size: 0.9rem; font-weight: 600; color: var(--navy);
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.auth-social-btn:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow); background: var(--bg); }
.auth-social-btn img { width: 20px; height: 20px; }

/* ============================================================
   HELPERS
   ============================================================ */
.flex  { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.gap-1 { gap: 0.5rem; } .gap-2 { gap: 1rem; } .gap-3 { gap: 1.5rem; }
.mt-1 { margin-top: 0.5rem; } .mt-2 { margin-top: 1rem; } .mt-3 { margin-top: 1.5rem; } .mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; } .mb-2 { margin-bottom: 1rem; } .mb-3 { margin-bottom: 1.5rem; } .mb-4 { margin-bottom: 2rem; }
.p-0 { padding: 0 !important; }
.w-full { width: 100%; }
.hidden { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

/* Loading spinner inline */
.spinner {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
.spinner-dark { border-color: rgba(15,37,64,0.2); border-top-color: var(--navy); }

/* ============================================================
   RESPONSIVE HELPERS
   ============================================================ */
@media (max-width: 599px) { .hide-mobile { display: none !important; } }
@media (min-width: 600px) { .show-mobile-only { display: none !important; } }

/* ============================================================
   iOS / MOBILE — prevent auto-zoom on input focus
   iOS Safari zooms when input font-size < 16px. Fix: force
   font-size 16px on touch devices. Visual size stays close
   because we compensate with a slightly tighter line-height.
   ============================================================ */
@media (pointer: coarse) {
  input, select, textarea,
  .form-control,
  .doc-search-bar input {
    font-size: 16px !important;
  }
}

/* Prevent iOS Safari bounce / overscroll on the root */
html {
  overscroll-behavior: none;
}

/* Scrollbar custom */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }
