/* ── AVARA COMPONENTS ──────────────────────────────────────────────────────
   Shared UI components. Requires base.css.
────────────────────────────────────────────────────────────────────────── */

/* ── BUTTONS ── */
.btn {
  font-family: var(--font);
  font-size: 13px;
  font-weight: 500;
  padding: 7px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--r);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: background .15s, border-color .15s;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn:hover { background: var(--bg); }

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

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.btn-ghost:hover { background: var(--bg); border-color: var(--border-strong); }

.btn-danger {
  background: var(--red-bg);
  color: var(--red);
  border-color: #f5c4bc;
}
.btn-danger:hover { background: #fae0dc; }

/* CTA buttons (larger, for landing pages) */
.cta-primary {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 32px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: var(--r);
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  display: inline-block;
}
.cta-primary:hover {
  background: var(--green-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(45,106,79,.25);
}

.cta-secondary {
  font-family: var(--font);
  font-size: 16px;
  font-weight: 600;
  padding: 14px 32px;
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
  border-radius: var(--r);
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  display: inline-block;
}
.cta-secondary:hover { background: var(--bg); border-color: var(--border-strong); }

/* ── FORMS ── */
.field { margin-bottom: 16px; }

.label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
  letter-spacing: .02em;
}

.input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  background: white;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus {
  border-color: #3a8fd4;
  box-shadow: 0 0 0 3px rgba(58,143,212,.1);
}
.input::placeholder { color: var(--faint); }
.input.err { border-color: #f5c4bc; }

.input-wrap { position: relative; }
.input-wrap .input { padding-right: 40px; }

/* ── MODALS ── */
.modal-bg {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  width: 100%;
  max-width: 680px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-hdr {
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--muted);
  line-height: 1;
  padding: 0 4px;
}
.modal-close:hover { color: var(--text); }

.modal-body {
  padding: 18px 22px;
  overflow-y: auto;
  flex: 1;
}

.modal-foot {
  padding: 12px 22px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.modal-note {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
  line-height: 1.6;
}

/* ── PANEL (slide-in overlay) ── */
.panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.35);
  z-index: 800;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.panel-overlay.open { opacity: 1; pointer-events: all; }

.panel {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 780px;
  max-width: 95vw;
  max-height: 85vh;
  background: var(--surface);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  z-index: 801;
  transform: translate(-50%, -60%);
  opacity: 0;
  pointer-events: none;
  transition: transform .25s cubic-bezier(.4,0,.2,1), opacity .25s;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.panel.open {
  transform: translate(-50%, -50%);
  opacity: 1;
  pointer-events: all;
}

.panel-hdr {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  background: var(--surface);
  z-index: 1;
}
.panel-title { font-size: 17px; font-weight: 700; }
.panel-close {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 20px;
  color: var(--muted);
  padding: 0 4px;
  line-height: 1;
}
.panel-close:hover { color: var(--text); }
.panel-body { padding: 20px 24px; flex: 1; }

/* ── DROPDOWN MENU ── */
.account-menu-wrap { position: relative; }

.account-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  min-width: 220px;
  z-index: 500;
  overflow: hidden;
  display: none;
}
.account-dropdown.open { display: block; }

.account-dropdown-email {
  padding: 12px 14px;
  font-size: 12px;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
  word-break: break-all;
}

.account-dropdown-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 14px;
  font-size: 13px;
  font-family: var(--font);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text);
  text-align: left;
  text-decoration: none;
}
.account-dropdown-item:hover { background: var(--bg); }
.account-dropdown-item.danger { color: var(--red); }
.account-dropdown-item.danger:hover { background: var(--red-bg); }

.account-dropdown-divider {
  height: 1px;
  background: var(--border);
  margin: 4px 0;
}

/* ── SITE NAV ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 40px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.04em;
  color: var(--text);
  text-decoration: none;
}
.nav-logo span { color: var(--green); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.nav-link {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color .15s;
}
.nav-link:hover { color: var(--text); }

.nav-btn {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 20px;
  border-radius: var(--r);
  cursor: pointer;
  text-decoration: none;
  transition: all .15s;
  display: inline-block;
  border: 1px solid transparent;
}
.nav-btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}
.nav-btn-ghost:hover { background: var(--bg); }
.nav-btn-solid {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.nav-btn-solid:hover { background: var(--green-dark); }

/* App header (inside /app) */
.app-header {
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}

.app-logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.04em;
  text-decoration: none;
  color: var(--text);
}
.app-logo span { color: var(--green); }

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.card-elevated {
  box-shadow: 0 4px 32px rgba(0,0,0,.07);
}

/* ── SAVE INDICATOR ── */
.save-indicator {
  font-size: 11px;
  color: var(--green);
  opacity: 0;
  transition: opacity .3s;
}
.save-indicator.show { opacity: 1; }

/* ── USER CHIP ── */
.user-chip {
  font-size: 12px;
  color: var(--muted);
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: var(--r);
  background: var(--bg);
  cursor: pointer;
  white-space: nowrap;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  font-family: var(--font);
}
.user-chip:hover { background: var(--red-bg); color: var(--red); border-color: #f5c4bc; }
.user-chip.loggedin {
  color: var(--green);
  border-color: var(--green-mid);
  background: var(--green-bg);
}

/* ── SECTION HELPERS (landing page) ── */
.section-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 12px;
}

.section-title {
  font-size: clamp(28px, 3.5vw, 40px);
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--text);
  margin-bottom: 14px;
  line-height: 1.1;
}

.section-sub {
  font-size: 16px;
  color: var(--muted);
  max-width: 480px;
  line-height: 1.6;
  margin-bottom: 48px;
}

.section-wrap { max-width: 1100px; margin: 0 auto; }
.section-wrap.center { text-align: center; }
.section-wrap.center .section-sub { margin-left: auto; margin-right: auto; }

/* ── FOOTER ── */
.site-footer {
  background: #1a1916;
  padding: 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-logo { font-size: 16px; font-weight: 700; letter-spacing: -.03em; color: #fff; }
.footer-logo span { color: #6fcfa0; }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; }
.footer-link { font-size: 13px; color: rgba(255,255,255,.45); text-decoration: none; transition: color .15s; }
.footer-link:hover { color: rgba(255,255,255,.8); }
.footer-copy { font-size: 12px; color: rgba(255,255,255,.3); }

/* ── DIVIDER ── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}
.divider-line { flex: 1; height: 1px; background: var(--border); }
.divider-text { font-size: 12px; color: var(--faint); }

/* ── RESPONSIVE NAV ── */
@media (max-width: 768px) {
  .site-nav { padding: 0 20px; }
  .nav-link { display: none; }
  .app-header { padding: 0 16px; }
  .site-footer { padding: 28px 20px; flex-direction: column; align-items: flex-start; }
}

.audience {
  padding: 72px 20px 80px;
  background: #ffffff;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.audience-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.audience-header {
  text-align: center;
  margin-bottom: 36px;
}

.audience .section-title {
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.audience-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px 30px;
  box-shadow: none;
}

.audience-card-title {
  margin: 0 0 12px;
  font-size: 18px;
  line-height: 1.35;
  color: var(--text);
}

.audience-card-text {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

@media (max-width: 900px) {
  .audience {
    padding: 56px 20px;
  }

  .audience-grid {
    grid-template-columns: 1fr;
  }
}

/* ── APP PAGE HEADER (delt mellem /app, /overblik og andre undersider) ── */
.app-page-header {
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 0 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
}
.app-page-header .logo {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.04em;
  text-decoration: none;
  color: var(--text);
}
.app-page-header .logo span { color: var(--green); }
.hright { display: flex; gap: 8px; align-items: center; }

.hleft {
  display: flex;
  align-items: center;
  gap: 0;
}

.breadcrumb-sep {
  font-size: 18px;
  color: var(--border-strong);
  margin: 0 16px;
  user-select: none;
}

/* ── VERSION DROPDOWN ── */
.version-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
}
.version-row:hover { background: var(--bg); }

.version-row-check {
  width: 14px;
  font-size: 12px;
  color: var(--green);
  flex-shrink: 0;
}

.version-row-name {
  flex: 1;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.version-row-active {
  font-weight: 600;
  color: var(--green);
}

.version-active-badge {
  font-size: 10px;
  font-weight: 600;
  color: var(--green);
  background: var(--green-bg);
  border-radius: 4px;
  padding: 1px 6px;
  flex-shrink: 0;
}

.version-dots-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  color: var(--muted);
  padding: 0 4px;
  border-radius: 4px;
  line-height: 1;
  flex-shrink: 0;
}
.version-dots-btn:hover { background: var(--border); color: var(--text); }

.version-ctx-menu {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.12);
  min-width: 180px;
  overflow: hidden;
}
