:root {
  --ev-navy: #7a1f2b;
  --ev-navy-dark: #5a1620;
  --ev-gold: #d4af37;
  --ev-gold-light: #e4c767;
  --ev-slate: #5a5a5a;
  --ev-bg: #f8f8f8;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: #222222;
  background-color: var(--ev-bg);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1 0 auto; }

.text-navy { color: var(--ev-navy); }
.text-black { color: #000 !important; }
.text-gold { color: var(--ev-gold); }
.bg-navy { background-color: var(--ev-navy); }
.text-light-50 { color: rgba(255,255,255,.65); }

.btn-navy {
  background-color: var(--ev-navy);
  border-color: var(--ev-navy);
  color: #fff;
}
.btn-navy:hover { background-color: var(--ev-navy-dark); color: #fff; }

.btn-outline-navy {
  border-color: var(--ev-navy);
  color: var(--ev-navy);
}
.btn-outline-navy:hover { background-color: var(--ev-navy); color: #fff; }

.btn-gold {
  background-color: var(--ev-gold);
  border-color: var(--ev-gold);
  color: #222222;
  font-weight: 600;
}
.btn-gold:hover { background-color: var(--ev-gold-light); color: #222222; }

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px;
  height: 68px;
  border-radius: 12px;
  background: var(--ev-navy);
  color: var(--ev-gold);
  font-weight: 800;
  font-size: 1.3rem;
  letter-spacing: 0.03em;
}
.brand-mark-light { background: rgba(255,255,255,.08); }

.brand-mark-img {
  object-fit: contain;
  background: #fff;
  padding: 3px;
}

.navbar-nav .nav-link { font-weight: 500; color: #333333; }
.navbar-nav .nav-link.active, .navbar-nav .nav-link:hover { color: var(--ev-navy); }

.footer-link { color: rgba(255,255,255,.7); text-decoration: none; }
.footer-link:hover { color: var(--ev-gold-light); }

.hero {
  position: relative;
  overflow: hidden;
  color: #fff;
  padding: 5rem 0;
  background-color: var(--ev-navy-dark);
  background-size: cover;
  background-position: center;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(135deg, var(--ev-navy) 0%, var(--ev-navy-dark) 100%);
}
.hero-with-photo::before {
  background: none;
}
.hero-with-photo h1,
.hero-with-photo .lead,
.hero-with-photo .btn-outline-light {
  text-shadow: 0 2px 10px rgba(0,0,0,.75);
}
.hero-with-photo .btn-outline-light {
  border-color: #fff;
  background: rgba(0,0,0,.25);
}
.hero > .container {
  position: relative;
  z-index: 1;
}

.card-feature {
  border: 1px solid #e6e9f0;
  border-radius: 12px;
  transition: box-shadow .2s ease, transform .2s ease;
  height: 100%;
}
.card-feature:hover { box-shadow: 0 10px 25px rgba(122,31,43,.08); transform: translateY(-2px); }

.step-badge {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--ev-gold);
  color: #222222;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.progress-steps .step { opacity: .45; }
.progress-steps .step.active { opacity: 1; font-weight: 700; color: var(--ev-navy); }
.progress-steps .step.done { opacity: 1; color: var(--ev-gold); }

/* Application open/close dates: floating timeline card (distinct desktop vs mobile treatment) */
.dates-timeline-section {
  position: relative;
  z-index: 2;
  padding: 0 0 3rem;
  margin-top: -3.5rem;
}
.dates-timeline-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border-radius: 20px;
  padding: 2.25rem 2.5rem;
  box-shadow: 0 20px 45px rgba(90, 22, 32, 0.35), 0 2px 0 rgba(255,255,255,.04) inset;
  border: 1px solid rgba(228, 199, 103, 0.25);
}
.dates-timeline-card::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(125deg, var(--ev-navy) 0%, var(--ev-navy-dark) 65%, #3d0f17 100%);
}
.dates-timeline-glow,
.dates-countdown-badge,
.dates-timeline {
  position: relative;
  z-index: 1;
}
.dates-timeline-glow {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(228,199,103,.22) 0%, rgba(228,199,103,0) 70%);
  pointer-events: none;
}
.dates-countdown-badge {
  align-self: flex-end;
  margin-bottom: 1.5rem;
  background: var(--ev-gold);
  color: #222222;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(212,175,55,.35);
}

.dates-timeline {
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
}
.dates-node {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.dates-node-icon {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  background: var(--ev-gold);
  color: var(--ev-navy-dark);
  box-shadow: 0 6px 16px rgba(0,0,0,.25);
}
.dates-node-close .dates-node-icon {
  background: transparent;
  border: 2px solid var(--ev-gold);
  color: var(--ev-gold-light);
}
.dates-node-text { display: flex; flex-direction: column; color: #fff; }
.dates-node .date-label {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--ev-gold-light);
  margin-bottom: 0.2rem;
}
.dates-node .date-value {
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.1;
}

.dates-node-connector {
  flex: 1;
  min-width: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 1.75rem;
  position: relative;
  align-self: center;
}
.dates-node-connector::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  transform: translateY(-50%);
  background: repeating-linear-gradient(to right, rgba(228,199,103,.55) 0 6px, transparent 6px 14px);
}
.dates-node-connector span {
  position: relative;
  z-index: 1;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ev-gold);
}
.dates-node-connector span:nth-child(2) { opacity: .55; }

/* Mobile: vertical timeline (icon-anchored line), not just a reflow of the desktop layout */
@media (max-width: 767.98px) {
  .dates-timeline-section { margin-top: -2rem; padding-bottom: 2.5rem; }
  .dates-timeline-card { padding: 1.75rem 1.25rem 1.5rem; border-radius: 16px; }
  .dates-countdown-badge {
    align-self: flex-start;
    margin-bottom: 1.25rem;
  }
  .dates-timeline {
    flex-direction: column;
    align-items: stretch;
    position: relative;
    padding-left: 0;
  }
  .dates-timeline::before {
    content: '';
    position: absolute;
    left: 27px;
    top: 32px;
    bottom: 32px;
    width: 2px;
    background: repeating-linear-gradient(to bottom, rgba(228,199,103,.55) 0 6px, transparent 6px 14px);
  }
  .dates-node { width: 100%; padding: 0.75rem 0; }
  .dates-node-connector { display: none; }
  .dates-node .date-value { font-size: 1.5rem; }
}

.transfer-card {
  border-radius: 20px;
  padding: 10px;
  background: linear-gradient(135deg, var(--ev-navy) 0%, var(--ev-gold) 100%);
}
.transfer-card-inner {
  background: #fff;
  border-radius: 14px;
  padding: 2rem;
}
.transfer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.85rem 0;
  border-bottom: 1px solid #e6e9f0;
}
.transfer-row-last { border-bottom: none; }

.slip-wrapper {
  background: #fff;
  border: 1px solid #e0e4ec;
  border-top: 6px solid var(--ev-navy);
  border-radius: 10px;
  padding: 2rem 2.25rem;
}
.slip-wrapper .slip-header { border-bottom: 2px solid var(--ev-gold); padding-bottom: 1rem; }
.slip-wrapper .status-badge {
  display: inline-block;
  padding: 0.3rem 0.9rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background-color: #eaf5ec;
  color: #1f7a3d;
}
.slip-wrapper .table th { width: 40%; }
.slip-wrapper .signature-line { border-top: 1px solid #222222; padding-top: 0.35rem; }
.slip-wrapper .id-title-bar {
  background-color: var(--ev-bg);
  border: 1px solid #e0e4ec;
  border-radius: 6px;
  padding: 0.6rem 1rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.slip-wrapper .id-field-table td, .slip-wrapper .id-field-table th { border: none; padding: 0.25rem 0.5rem; }
.slip-wrapper .id-field-table th { width: 45%; color: var(--ev-slate); font-weight: 600; }
.slip-wrapper .photo-box {
  width: 130px;
  height: 155px;
  object-fit: cover;
  border: 1px solid #d7dbe4;
  border-radius: 6px;
}
.slip-wrapper .photo-box-placeholder {
  width: 130px;
  height: 155px;
  border: 1px dashed #c3c8d4;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ev-slate);
  font-size: 0.75rem;
  text-align: center;
  padding: 0.5rem;
}
.slip-wrapper .items-checklist li { margin-bottom: 0.35rem; }
.slip-wrapper .guarantor-instructions { background-color: var(--ev-bg); border: 1px solid #e0e4ec; border-radius: 8px; padding: 1rem 1.25rem; }

.page-break-after { page-break-after: always; }

.doc-compact { padding: 1.25rem 1.5rem; }
.doc-compact .guarantor-instructions { padding: 0.65rem 0.9rem; }
.doc-compact p { font-size: 0.85rem; }

@page { size: A4; margin: 10mm; }

@media print {
  .no-print { display: none !important; }
  body { background: #fff !important; }
  .doc-compact { padding: 0.5rem 0.75rem; }
}
