/* ==========================================================================
   Applications Auto — Design System
   Premium B2B SaaS • Modern Tech-Forward
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* Brand */
  --navy:    #0F172A;
  --navy-80: #1E293B;
  --navy-60: #334155;
  --navy-40: #475569;
  --navy-20: #94A3B8;
  --slate:   #CBD5E1;
  --light:   #F1F5F9;
  --white:   #FFFFFF;

  --indigo:     #6366F1;
  --indigo-dk:  #4F46E5;
  --indigo-lt:  #818CF8;
  --indigo-bg:  #EEF2FF;

  --green:      #10B981;
  --green-dk:   #059669;
  --green-lt:   #34D399;
  --green-bg:   #ECFDF5;

  --amber:      #F59E0B;
  --amber-dk:   #D97706;
  --amber-bg:   #FFFBEB;

  --red:        #EF4444;
  --red-dk:     #DC2626;
  --red-bg:     #FEF2F2;

  --blue:       #3B82F6;
  --blue-bg:    #EFF6FF;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', 'Fira Code', monospace;

  /* Sizing */
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm:  0 1px 2px rgba(15,23,42,.06);
  --shadow:     0 4px 6px -1px rgba(15,23,42,.08), 0 2px 4px -2px rgba(15,23,42,.06);
  --shadow-md:  0 10px 15px -3px rgba(15,23,42,.08), 0 4px 6px -4px rgba(15,23,42,.06);
  --shadow-lg:  0 20px 25px -5px rgba(15,23,42,.1), 0 8px 10px -6px rgba(15,23,42,.08);
  --shadow-xl:  0 25px 50px -12px rgba(15,23,42,.2);

  /* Transitions */
  --ease: cubic-bezier(.4,0,.2,1);
  --duration: .2s;
}

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font);
  color: var(--navy);
  background: var(--white);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: var(--indigo); text-decoration: none; transition: color var(--duration) var(--ease); }
a:hover { color: var(--indigo-dk); }

/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 { line-height: 1.2; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); }
h4 { font-size: 1.25rem; }
p { color: var(--navy-40); }

.text-gradient {
  background: linear-gradient(135deg, var(--indigo), var(--indigo-lt));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-label {
  display: inline-block;
  font-size: .8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--indigo);
  margin-bottom: .75rem;
  padding: .25rem .75rem;
  background: var(--indigo-bg);
  border-radius: var(--radius-full);
}

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 5rem 0;
}

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  section { padding: 3rem 0; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  font-family: var(--font);
  font-size: .95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
}

.btn-primary {
  background: var(--indigo);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(99,102,241,.35);
}
.btn-primary:hover {
  background: var(--indigo-dk);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99,102,241,.45);
}

.btn-secondary {
  background: var(--white);
  color: var(--navy);
  border: 1.5px solid var(--slate);
}
.btn-secondary:hover {
  border-color: var(--indigo);
  color: var(--indigo);
}

.btn-outline {
  background: transparent;
  color: var(--indigo);
  border: 1.5px solid var(--indigo);
}
.btn-outline:hover {
  background: var(--indigo);
  color: var(--white);
}

.btn-success {
  background: var(--green);
  color: var(--white);
  box-shadow: 0 4px 14px rgba(16,185,129,.35);
}
.btn-success:hover {
  background: var(--green-dk);
  transform: translateY(-1px);
}

.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  border-radius: var(--radius-lg);
}

.btn-sm {
  padding: .4rem 1rem;
  font-size: .8rem;
  border-radius: var(--radius-sm);
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ---------- Navigation ---------- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(203,213,225,.4);
  padding: .75rem 0;
  transition: all .3s var(--ease);
}

.navbar.scrolled {
  box-shadow: var(--shadow);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.03em;
}

.nav-brand svg {
  width: 32px;
  height: 32px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: .9rem;
  font-weight: 500;
  color: var(--navy-40);
  transition: color var(--duration) var(--ease);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--indigo);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span {
  width: 24px;
  height: 2px;
  background: var(--navy);
  border-radius: 2px;
  transition: all .3s var(--ease);
}

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 2rem;
    gap: 1.5rem;
    border-bottom: 1px solid var(--slate);
    transform: translateY(-110%);
    transition: transform .3s var(--ease);
  }
  .nav-links.open {
    transform: translateY(0);
  }
}

/* ---------- Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid rgba(203,213,225,.5);
  border-radius: var(--radius-lg);
  padding: 2rem;
  transition: all .3s var(--ease);
}

.card:hover {
  border-color: var(--indigo-lt);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  background: var(--indigo-bg);
  color: var(--indigo);
}

.card h4 {
  margin-bottom: .5rem;
}

.card p {
  font-size: .9rem;
  line-height: 1.5;
}

/* ---------- Hero ---------- */
.hero {
  padding: 8rem 0 5rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(99,102,241,.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(16,185,129,.06) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero h1 {
  margin-bottom: 1.25rem;
}

.hero p {
  font-size: 1.15rem;
  max-width: 600px;
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ---------- Stats Bar ---------- */
.stats-bar {
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--slate);
}

.stat-item {
  text-align: left;
}

.stat-value {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.03em;
}

.stat-label {
  font-size: .8rem;
  color: var(--navy-20);
  font-weight: 500;
}

@media (max-width: 640px) {
  .stats-bar { gap: 1.5rem; flex-wrap: wrap; }
  .stat-value { font-size: 1.3rem; }
}

/* ---------- Steps ---------- */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  counter-reset: step;
}

.step {
  position: relative;
  padding: 2rem 1.5rem;
  text-align: center;
  counter-increment: step;
}

.step::before {
  content: counter(step);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--indigo);
  color: var(--white);
  font-size: 1.1rem;
  font-weight: 700;
}

.step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 3.5rem;
  right: -1rem;
  width: 2rem;
  height: 2px;
  background: var(--slate);
}

.step h4 { margin-bottom: .5rem; }

@media (max-width: 768px) {
  .steps { grid-template-columns: 1fr 1fr; }
  .step::after { display: none; }
}
@media (max-width: 480px) {
  .steps { grid-template-columns: 1fr; }
}

/* ---------- Feature Grid ---------- */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 1024px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .feature-grid { grid-template-columns: 1fr; }
}

/* ---------- ROI Section ---------- */
.roi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}

.roi-item {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--green-bg);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(16,185,129,.15);
}

.roi-icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--green);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
}

.roi-text h4 {
  font-size: 1rem;
  margin-bottom: .25rem;
  color: var(--green-dk);
}

.roi-text p {
  font-size: .85rem;
  color: var(--navy-40);
}

@media (max-width: 640px) {
  .roi-grid { grid-template-columns: 1fr; }
}

/* ---------- Pricing ---------- */
.pricing-card {
  background: var(--white);
  border: 2px solid var(--indigo);
  border-radius: var(--radius-xl);
  padding: 3rem;
  text-align: center;
  position: relative;
  max-width: 480px;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
}

.pricing-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--indigo);
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  padding: .4rem 1.5rem;
  border-radius: var(--radius-full);
}

.pricing-amount {
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.04em;
  line-height: 1;
}

.pricing-period {
  font-size: 1rem;
  color: var(--navy-20);
  font-weight: 500;
}

.pricing-features {
  list-style: none;
  text-align: left;
  margin: 2rem 0;
}

.pricing-features li {
  padding: .6rem 0;
  border-bottom: 1px solid var(--light);
  font-size: .9rem;
  color: var(--navy-60);
  display: flex;
  align-items: center;
  gap: .6rem;
}

.pricing-features li::before {
  content: '\2713';
  color: var(--green);
  font-weight: 700;
}

/* ---------- Sectors ---------- */
.sector-card {
  padding: 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  background: var(--white);
  border: 1px solid rgba(203,213,225,.5);
  transition: all .3s var(--ease);
}

.sector-card:hover {
  border-color: var(--indigo-lt);
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
}

.sector-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.sector-card h4 {
  margin-bottom: .4rem;
}

.sector-card p {
  font-size: .85rem;
}

/* ---------- Testimonials ---------- */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

.testimonial {
  padding: 2rem;
  background: var(--light);
  border-radius: var(--radius-lg);
  position: relative;
}

.testimonial::before {
  content: '\201C';
  position: absolute;
  top: .5rem;
  left: 1.5rem;
  font-size: 4rem;
  color: var(--indigo-lt);
  opacity: .3;
  line-height: 1;
}

.testimonial p {
  font-size: .95rem;
  font-style: italic;
  color: var(--navy-60);
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.testimonial-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--indigo);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .85rem;
}

.testimonial-name {
  font-weight: 600;
  font-size: .9rem;
  color: var(--navy);
}

.testimonial-role {
  font-size: .8rem;
  color: var(--navy-20);
}

@media (max-width: 768px) {
  .testimonials { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--navy);
  color: var(--slate);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 3rem;
}

.footer h5 {
  color: var(--white);
  font-size: .9rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: .5rem;
}

.footer-links a {
  color: var(--navy-20);
  font-size: .85rem;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid var(--navy-60);
  padding-top: 2rem;
  display: flex;
  justify-content: space-between;
  font-size: .8rem;
  color: var(--navy-40);
}

@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: .5rem; }
}

/* ---------- Phone Mockup ---------- */
.phone-mockup {
  position: relative;
  width: 360px;
  height: 740px;
  background: #000;
  border-radius: 40px;
  padding: 12px;
  box-shadow: var(--shadow-xl), 0 0 0 2px rgba(99,102,241,.15);
  margin: 0 auto;
}

.phone-mockup::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 28px;
  background: #000;
  border-radius: 0 0 18px 18px;
  z-index: 10;
}

.phone-screen {
  width: 100%;
  height: 100%;
  border-radius: 30px;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--white);
}

.phone-screen::-webkit-scrollbar {
  width: 0;
}

/* ---------- Demo Page Specifics ---------- */
.demo-input-wrap {
  position: relative;
  max-width: 600px;
  margin: 0 auto;
}

.demo-input {
  width: 100%;
  padding: 1rem 1.5rem;
  padding-right: 10rem;
  font-size: 1rem;
  font-family: var(--font);
  border: 2px solid var(--slate);
  border-radius: var(--radius-lg);
  outline: none;
  transition: border-color .2s;
}

.demo-input:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 4px rgba(99,102,241,.1);
}

.demo-submit {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
}

/* Loading Steps */
.loading-overlay {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding: 3rem;
}

.loading-overlay.active { display: flex; }

.spinner {
  width: 48px;
  height: 48px;
  border: 4px solid var(--light);
  border-top: 4px solid var(--indigo);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.loading-steps {
  list-style: none;
  text-align: left;
}

.loading-steps li {
  padding: .4rem 0;
  font-size: .9rem;
  color: var(--navy-20);
  display: flex;
  align-items: center;
  gap: .5rem;
  transition: all .3s;
}

.loading-steps li.active {
  color: var(--indigo);
  font-weight: 600;
}

.loading-steps li.done {
  color: var(--green);
}

/* ---------- Extranet ---------- */
.extranet-wrap {
  display: flex;
  min-height: 100vh;
  padding-top: 60px;
}

.sidebar {
  width: 260px;
  background: var(--navy);
  color: var(--white);
  padding: 2rem 0;
  flex-shrink: 0;
  position: fixed;
  top: 60px;
  bottom: 0;
  left: 0;
  overflow-y: auto;
  z-index: 90;
  transition: transform .3s var(--ease);
}

.sidebar-nav {
  list-style: none;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1.5rem;
  color: var(--navy-20);
  font-size: .9rem;
  font-weight: 500;
  transition: all .2s;
  border-left: 3px solid transparent;
}

.sidebar-nav li a:hover,
.sidebar-nav li a.active {
  background: rgba(99,102,241,.1);
  color: var(--white);
  border-left-color: var(--indigo);
}

.sidebar-nav li a svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.main-content {
  flex: 1;
  margin-left: 260px;
  padding: 2rem;
  background: var(--light);
  min-height: calc(100vh - 60px);
}

@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-content {
    margin-left: 0;
  }
}

/* ---------- Dashboard Widgets ---------- */
.widget-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.widget {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(203,213,225,.4);
}

.widget-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--navy-20);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: .5rem;
}

.widget-value {
  font-size: 2rem;
  font-weight: 800;
  color: var(--navy);
  letter-spacing: -.03em;
}

.widget-change {
  font-size: .8rem;
  font-weight: 600;
  margin-top: .25rem;
}

.widget-change.up { color: var(--green); }
.widget-change.down { color: var(--red); }

@media (max-width: 1024px) {
  .widget-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .widget-grid { grid-template-columns: 1fr; }
}

/* ---------- Tables ---------- */
.table-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(203,213,225,.4);
  overflow: hidden;
}

.table-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--light);
  flex-wrap: wrap;
  gap: 1rem;
}

.table-header h3 {
  font-size: 1.1rem;
}

.table-filters {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
}

.filter-select, .filter-input {
  padding: .45rem .75rem;
  font-size: .85rem;
  font-family: var(--font);
  border: 1px solid var(--slate);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--navy);
  outline: none;
}

.filter-select:focus, .filter-input:focus {
  border-color: var(--indigo);
}

table {
  width: 100%;
  border-collapse: collapse;
}

thead th {
  text-align: left;
  padding: .75rem 1.25rem;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--navy-20);
  background: var(--light);
  border-bottom: 1px solid rgba(203,213,225,.5);
}

tbody td {
  padding: .75rem 1.25rem;
  font-size: .88rem;
  border-bottom: 1px solid var(--light);
  color: var(--navy-60);
}

tbody tr:hover {
  background: rgba(99,102,241,.03);
}

/* Status badges */
.badge {
  display: inline-flex;
  padding: .2rem .65rem;
  font-size: .75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.badge-new { background: var(--blue-bg); color: var(--blue); }
.badge-sent { background: var(--indigo-bg); color: var(--indigo); }
.badge-viewed { background: var(--amber-bg); color: var(--amber-dk); }
.badge-interested { background: var(--green-bg); color: var(--green-dk); }
.badge-rdv { background: #F0FDFA; color: #0D9488; }
.badge-client { background: var(--green-bg); color: var(--green-dk); border: 1px solid var(--green-lt); }
.badge-lost { background: var(--red-bg); color: var(--red-dk); }

/* ---------- Tabs ---------- */
.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

/* ---------- Forms ---------- */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: .4rem;
}

.form-control {
  width: 100%;
  padding: .65rem 1rem;
  font-size: .9rem;
  font-family: var(--font);
  border: 1.5px solid var(--slate);
  border-radius: var(--radius);
  color: var(--navy);
  outline: none;
  transition: border-color .2s;
  background: var(--white);
}

.form-control:focus {
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(99,102,241,.1);
}

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

/* ---------- Modals ---------- */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.5);
  backdrop-filter: blur(4px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  width: 90%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--light);
}

.modal-header h3 {
  font-size: 1.2rem;
}

.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--navy-20);
  line-height: 1;
}

.modal-body {
  padding: 2rem;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
  padding: 1.25rem 2rem;
  border-top: 1px solid var(--light);
}

/* ---------- Calendar ---------- */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(203,213,225,.4);
}

.cal-header {
  padding: .6rem;
  text-align: center;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--navy-20);
  background: var(--light);
}

.cal-day {
  min-height: 90px;
  padding: .5rem;
  background: var(--white);
  border: 1px solid var(--light);
  cursor: pointer;
  transition: background .2s;
}

.cal-day:hover {
  background: var(--indigo-bg);
}

.cal-day.today {
  background: var(--indigo-bg);
}

.cal-day.other-month {
  opacity: .35;
}

.cal-day-num {
  font-size: .8rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: .3rem;
}

.cal-event {
  font-size: .7rem;
  padding: .15rem .4rem;
  background: var(--indigo);
  color: var(--white);
  border-radius: 3px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
}

/* ---------- Charts ---------- */
.chart-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(203,213,225,.4);
}

.chart-card h4 {
  margin-bottom: 1rem;
  font-size: 1rem;
}

/* ---------- Campaign Templates ---------- */
.template-card {
  background: var(--light);
  border-radius: var(--radius);
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s;
}

.template-card:hover, .template-card.selected {
  border-color: var(--indigo);
  background: var(--indigo-bg);
}

.template-subject {
  font-weight: 600;
  font-size: .95rem;
  margin-bottom: .5rem;
  color: var(--navy);
}

.template-body {
  font-size: .85rem;
  color: var(--navy-40);
  white-space: pre-line;
}

/* ---------- Funnel ---------- */
.funnel {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 500px;
  margin: 0 auto;
}

.funnel-step {
  text-align: center;
  padding: .75rem;
  color: var(--white);
  font-weight: 600;
  font-size: .9rem;
  position: relative;
}

.funnel-step:nth-child(1) { background: var(--navy); border-radius: var(--radius) var(--radius) 0 0; }
.funnel-step:nth-child(2) { background: var(--indigo); margin: 0 2rem; }
.funnel-step:nth-child(3) { background: var(--indigo-lt); margin: 0 4rem; }
.funnel-step:nth-child(4) { background: var(--green-lt); margin: 0 6rem; }
.funnel-step:nth-child(5) { background: var(--green); margin: 0 8rem; border-radius: 0 0 var(--radius) var(--radius); }

@media (max-width: 640px) {
  .funnel-step:nth-child(2) { margin: 0 1rem; }
  .funnel-step:nth-child(3) { margin: 0 2rem; }
  .funnel-step:nth-child(4) { margin: 0 3rem; }
  .funnel-step:nth-child(5) { margin: 0 4rem; }
}

/* ---------- Preview Gallery ---------- */
.preview-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.5rem;
}

.preview-thumb {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(203,213,225,.4);
  transition: all .3s;
  cursor: pointer;
}

.preview-thumb:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.preview-thumb-img {
  height: 180px;
  background: var(--light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
}

.preview-thumb-info {
  padding: 1rem;
}

.preview-thumb-info h5 {
  font-size: .9rem;
  margin-bottom: .25rem;
}

.preview-thumb-info p {
  font-size: .75rem;
  color: var(--navy-20);
}

/* ---------- Time Slots ---------- */
.time-slots {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: .5rem;
}

.time-slot {
  padding: .5rem;
  text-align: center;
  font-size: .85rem;
  font-weight: 500;
  border: 1.5px solid var(--slate);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .2s;
  background: var(--white);
  color: var(--navy);
}

.time-slot:hover, .time-slot.selected {
  border-color: var(--indigo);
  background: var(--indigo);
  color: var(--white);
}

.time-slot.taken {
  opacity: .3;
  cursor: not-allowed;
  pointer-events: none;
}

/* ---------- Animations ---------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: fadeInUp .6s var(--ease) forwards;
  opacity: 0;
}

.delay-1 { animation-delay: .1s; }
.delay-2 { animation-delay: .2s; }
.delay-3 { animation-delay: .3s; }
.delay-4 { animation-delay: .4s; }

/* ---------- Login ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light);
}

.login-box {
  background: var(--white);
  padding: 3rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
  text-align: center;
}

.login-box h2 {
  margin-bottom: .5rem;
}

.login-box p {
  margin-bottom: 2rem;
}

/* ---------- Toasts ---------- */
.toast-container {
  position: fixed;
  top: 80px;
  right: 1.5rem;
  z-index: 5000;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.toast {
  padding: .75rem 1.25rem;
  border-radius: var(--radius);
  font-size: .88rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: fadeInUp .3s var(--ease);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.toast-success { background: var(--green); color: var(--white); }
.toast-error { background: var(--red); color: var(--white); }
.toast-info { background: var(--indigo); color: var(--white); }

/* ---------- App Content inside Phone ---------- */
.app-header {
  padding: .75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--light);
}

.app-header h3 {
  font-size: .95rem;
  letter-spacing: -.01em;
}

.app-hero-img {
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
  font-weight: 700;
  font-size: 1rem;
  text-align: center;
  padding: 1rem;
}

.app-quick-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: .5rem;
  padding: .75rem;
}

.app-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  padding: .75rem .5rem;
  border-radius: var(--radius);
  font-size: .7rem;
  font-weight: 600;
  text-align: center;
}

.app-action-icon {
  font-size: 1.2rem;
}

.app-section-title {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: .5rem .75rem;
  color: var(--navy-20);
}

.app-promo {
  margin: .5rem .75rem;
  padding: .75rem;
  border-radius: var(--radius);
  text-align: center;
}

.app-promo h4 {
  font-size: .8rem;
  margin-bottom: .2rem;
}

.app-promo p {
  font-size: .7rem;
}

.app-nav-bar {
  display: flex;
  justify-content: space-around;
  padding: .5rem 0;
  border-top: 1px solid var(--light);
  position: absolute;
  bottom: 12px;
  left: 12px;
  right: 12px;
  background: var(--white);
  border-radius: 0 0 30px 30px;
}

.app-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  font-size: .6rem;
  color: var(--navy-20);
  gap: .15rem;
}

.app-nav-item.active {
  color: var(--indigo);
}

.app-nav-item svg {
  width: 18px;
  height: 18px;
}

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.gap-1 { gap: .5rem; }
.gap-2 { gap: 1rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }
.hidden { display: none !important; }
.bg-light { background: var(--light); }
.rounded { border-radius: var(--radius); }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
