/* ── Reset & Base ──────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --navy: #2d3560;
  --navy-light: #3d4878;
  --navy-dark: #1e2442;
  --magenta: #e8336d;
  --magenta-light: #f04d82;
  --white: #ffffff;
  --bg: #f5f6f9;
  --card: #ffffff;
  --border: #dfe2ea;
  --text: #2d3560;
  --text-muted: #6b7194;
  --text-light: #8a8fb0;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(45, 53, 96, 0.08), 0 4px 12px rgba(45, 53, 96, 0.04);
  --shadow-lg:
    0 4px 16px rgba(45, 53, 96, 0.12), 0 8px 32px rgba(45, 53, 96, 0.06);
}
/*
body {
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif;
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  border: 2px red solid;
}
*/
/* ── Invoice Type Tabs ─────────────────────────── */
.tabs-wrapper {
  width: 100%;
  margin: 32px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

@media (min-width: 992px) {
  .tabs-wrapper {
    width: 80%;
  }
}

.tabs-bar {
  display: flex;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  border: 1px solid var(--border);
}

.tab-btn {
  flex: 1;
  padding: 16px 12px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.25s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.tab-btn:not(:last-child) {
  border-right: 1px solid var(--border);
}

.tab-btn:hover {
  background: rgba(45, 53, 96, 0.03);
  color: var(--navy);
}

.tab-btn.active {
  color: var(--magenta);
  background: rgba(232, 51, 109, 0.04);
}

.tab-btn.active::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 20%;
  right: 20%;
  height: 3px;
  background: var(--magenta);
  border-radius: 3px 3px 0 0;
}

.tab-btn .tab-desc {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-light);
  display: none;
}

.tab-btn.active .tab-desc {
  color: var(--magenta);
  opacity: 0.7;
}

@media (min-width: 640px) {
  .tab-btn .tab-desc {
    display: block;
  }
  .tab-btn {
    padding: 18px 16px;
  }
}

/* ── Main Layout ───────────────────────────────── */
.main {
  max-width: 1140px;
  margin: 32px auto 64px;
  padding: 0 24px;
}

.section-intro {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 24px;
  line-height: 1.6;
}

.layout-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 28px;
  align-items: start;
}

@media (min-width: 960px) {
  .layout-grid {
    grid-template-columns: 1fr 1fr;
  }
}

/* ── Invoice Image Panel ───────────────────────── */
.invoice-panel {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--card);
  box-shadow: var(--shadow);
  position: relative;
}

@media (min-width: 960px) {
  .invoice-panel {
    position: sticky;
    top: 120px;
  }
}

.invoice-panel img {
  width: 100%;
  height: auto;
  display: block;
}

.invoice-overlay {
  position: absolute;
  inset: 0;
  background: rgba(45, 53, 96, 0.35);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.invoice-overlay.visible {
  opacity: 1;
}

/* ── Markers on image ──────────────────────────── */
.marker {
  position: absolute;
  z-index: 2;
  transition: all 0.3s ease;
}

.marker .marker-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  background: var(--navy);
  box-shadow: 0 2px 8px rgba(45, 53, 96, 0.25);
  transition: all 0.25s ease;
  cursor: pointer;
}

.marker.dimmed .marker-dot {
  background: rgba(107, 113, 148, 0.5);
}

.marker.active .marker-dot {
  background: var(--magenta);
  transform: scale(1.15);
  box-shadow:
    0 0 0 6px rgba(232, 51, 109, 0.25),
    0 2px 12px rgba(232, 51, 109, 0.3);
}

.marker .marker-highlight {
  position: absolute;
  top: -24px;
  left: -24px;
  right: -24px;
  bottom: -24px;
  border-radius: var(--radius);
  border: 2px solid var(--magenta);
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(4px);
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: -1;
}

.marker.active .marker-highlight {
  opacity: 1;
  transform: scale(1);
}

/* ── Accordion Panel ───────────────────────────── */
.accordion-panel {
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.accordion-header {
  background: var(--navy);
  padding: 16px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.accordion-header svg {
  width: 18px;
  height: 18px;
  color: var(--white);
  flex-shrink: 0;
}

.accordion-header h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--white);
}

/* ── Accordion Items ───────────────────────────── */
.accordion-item {
  border-bottom: 1px solid var(--border);
}

.accordion-item:last-child {
  border-bottom: none;
}

.accordion-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 16px 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: inherit;
  transition: background 0.15s ease;
}

.accordion-trigger:hover {
  background: rgba(45, 53, 96, 0.03);
}

.accordion-trigger-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.trigger-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.25s ease;
  background: rgba(45, 53, 96, 0.08);
  color: var(--navy);
}

.accordion-item.open .trigger-number {
  background: var(--magenta);
  color: var(--white);
}

.trigger-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-align: left;
}

.trigger-chevron {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.accordion-item.open .trigger-chevron {
  transform: rotate(180deg);
}

/* ── Accordion Content ─────────────────────────── */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-content-inner {
  padding: 0 20px 16px;
  margin-left: 40px;
}

.accordion-content-inner p {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.content-badge {
  display: inline-flex;
  margin-top: 10px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(45, 53, 96, 0.07);
  color: var(--navy);
}

/* ── Responsive ────────────────────────────────── */
@media (min-width: 640px) {
  .header {
    padding: 64px 32px 88px;
  }
  .header h1 {
    font-size: 34px;
  }
  .header p {
    font-size: 16px;
  }
}
