/* =============================================================================
   EVIGT — Designsystem
   Retning: " Blæk & botanik " — varmt papir, dyb eukalyptusgrøn, antik guld,
   serif-display til overskrifter. Roligt, redaktionelt, lavt øjentræt.
   ============================================================================= */

:root {
    /* Farver — lyst tema */
    --paper:        #F7F5F0;
    --surface:      #FFFFFF;
    --surface-2:    #EFEBE1;
    --surface-3:    #E7E2D6;
    --ink:          #23241F;
    --ink-soft:     #585C53;
    --ink-faint:    #8A8F83;
    --line:         #E5E0D5;
    --line-strong:  #D6D0C2;

    --accent:       #3C6B57;   /* eukalyptus */
    --accent-hover: #335C4A;
    --accent-soft:  #6E9C86;
    --accent-bg:    #E7F0EA;

    --gold:         #A9863F;   /* antik champagne-guld */
    --gold-bg:      #F2EAD6;

    --danger:       #B0453B;
    --danger-bg:    #F6E4E1;
    --warn:         #B4832F;
    --warn-bg:      #F5EBD5;
    --ok:           #3C6B57;
    --ok-bg:        #E7F0EA;
    --info:         #466B86;
    --info-bg:      #E4EDF3;

    /* Typografi */
    --font-display: 'Iowan Old Style', 'Palatino Linotype', Palatino, 'Book Antiqua', Georgia, 'Times New Roman', serif;
    --font-sans:    -apple-system, BlinkMacSystemFont, 'Segø UI', Roboto, 'Helvetica Neue', Arial, system-ui, sans-serif;
    --font-mono:    ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, Consolas, monospace;

    /* Form */
    --r-xs: 6px;
    --r-sm: 9px;
    --r:    13px;
    --r-lg: 18px;
    --r-xl: 26px;

    --shadow-sm: 0 1px 2px rgba(35,36,31,.05), 0 1px 3px rgba(35,36,31,.04);
    --shadow:    0 2px 6px rgba(35,36,31,.06), 0 8px 24px rgba(35,36,31,.06);
    --shadow-lg: 0 12px 40px rgba(35,36,31,.14);

    --sidebar-w: 258px;
    --topbar-h:  64px;
    --maxw:      1240px;

    --ease: cubic-bezier(.32, .72, 0, 1);
    color-scheme: light;
}

html[data-theme="dark"] {
    --paper:        #17181A;
    --surface:      #202220;
    --surface-2:    #2A2C28;
    --surface-3:    #33352F;
    --ink:          #ECEAE2;
    --ink-soft:     #ABAda2;
    --ink-faint:    #7C7E73;
    --line:         #33352F;
    --line-strong:  #40423A;

    --accent:       #83BA9E;
    --accent-hover: #97C7AE;
    --accent-soft:  #6E9C86;
    --accent-bg:    #23322B;

    --gold:         #CBAA63;
    --gold-bg:      #2F2A1E;

    --danger:       #E08079;
    --danger-bg:    #362321;
    --warn:         #D6A752;
    --warn-bg:      #322A1B;
    --ok:           #83BA9E;
    --ok-bg:        #23322B;
    --info:         #86A9C4;
    --info-bg:      #212C34;

    --shadow-sm: 0 1px 2px rgba(0,0,0,.3);
    --shadow:    0 2px 8px rgba(0,0,0,.35), 0 12px 30px rgba(0,0,0,.35);
    --shadow-lg: 0 16px 48px rgba(0,0,0,.5);
    color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-sans);
    background: var(--paper);
    color: var(--ink);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    transition: background .3s var(--ease), color .3s var(--ease);
}

h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.12rem; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent-bg); }

.eyebrow {
    font-family: var(--font-sans);
    font-size: .72rem;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--ink-faint);
}
.muted { color: var(--ink-soft); }
.faint { color: var(--ink-faint); }
.mono  { font-family: var(--font-mono); font-size: .9em; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }

/* =============================================================================
   APP-SKAL
   ============================================================================= */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; }

.sidebar {
    background: var(--surface);
    border-right: 1px solid var(--line);
    display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh;
    padding: 20px 14px;
    z-index: 40;
    transition: transform .32s var(--ease);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 20px; }
.brand__mark {
    width: 34px; height: 34px; flex: none;
    display: grid; place-items: center;
    border-radius: 10px;
    background: var(--accent); color: #fff;
    font-family: var(--font-display); font-size: 1.15rem; font-weight: 700;
    box-shadow: var(--shadow-sm);
}
.brand__name { font-family: var(--font-display); font-size: 1.28rem; font-weight: 600; letter-spacing: .02em; }
.brand__name span { color: var(--gold); }

.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; margin: 0 -4px; padding: 0 4px; }
.nav__label { padding: 16px 12px 6px; }
.nav a {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px; border-radius: var(--r-sm);
    color: var(--ink-soft); font-size: .92rem; font-weight: 500;
    text-decoration: none; white-space: nowrap;
    transition: background .15s, color .15s;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav a.active { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
/* Global standardstørrelse på ikoner, så ingen svg vokser i egne wrappere.
   Mere specifikke regler nedenfor (knapper, menu m.m.) vinder som før. */
.ic { width: 18px; height: 18px; flex: none; }

.nav a .ic { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav a.active .ic { opacity: 1; }

.sidebar__foot { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 8px; }

/* Hovedområde */
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
    height: var(--topbar-h);
    position: sticky; top: 0; z-index: 30;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: saturate(1.6) blur(10px);
    border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: 14px;
    padding: 0 clamp(16px, 3vw, 30px);
}
.topbar h1 { font-size: 1.32rem; }
.topbar__spacer { flex: 1; }

.hamburger { display: none; background: none; border: 0; padding: 8px; cursor: pointer; border-radius: var(--r-sm); }
.hamburger:hover { background: var(--surface-2); }

.content { padding: clamp(18px, 3vw, 32px); max-width: var(--maxw); width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { color: var(--ink-soft); margin-top: 2px; }

/* =============================================================================
   KOMPONENTER
   ============================================================================= */

/* Kort */
.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-sm);
}
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.card__head h3 { font-size: 1.05rem; }
.card__body { padding: 20px; }
.card--flush .card__body { padding: 0; }

/* Grid-hjælpere */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.span-2 { grid-column: span 2; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.between { justify-content: space-between; }

/* Statistik-fliser */
.stat {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-sm);
    display: flex; flex-direction: column; gap: 6px;
}
.stat__label { font-size: .78rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-faint); }
.stat__value { font-family: var(--font-display); font-size: 1.85rem; font-weight: 600; line-height: 1; }
.stat__meta { font-size: .84rem; color: var(--ink-soft); }
.stat__value.small { font-size: 1.4rem; }

/* Knapper */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 9px 16px; border-radius: var(--r-sm);
    border: 1px solid transparent; cursor: pointer;
    font-size: .9rem; font-weight: 600; line-height: 1;
    transition: background .15s, border-color .15s, transform .05s, box-shadow .15s;
    white-space: nowrap; text-decoration: none;
}
.btn:active { transform: translateY(1px); }
.btn .ic { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-hover); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--surface-2); text-decoration: none; }
.btn-subtle { background: var(--surface-2); color: var(--ink); }
.btn-subtle:hover { background: var(--surface-3); text-decoration: none; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { filter: brightness(.95); text-decoration: none; }
.btn-sm { padding: 6px 11px; font-size: .82rem; border-radius: var(--r-xs); }
.btn-lg { padding: 12px 20px; font-size: 1rem; }
.btn-icon { padding: 8px; width: 36px; height: 36px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Badges / pills */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 3px 10px; border-radius: 999px;
    font-size: .76rem; font-weight: 600; line-height: 1.4;
    background: var(--surface-2); color: var(--ink-soft);
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok     { background: var(--ok-bg);     color: var(--ok); }
.badge-warn   { background: var(--warn-bg);   color: var(--warn); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info   { background: var(--info-bg);   color: var(--info); }
.badge-gold   { background: var(--gold-bg);   color: var(--gold); }

/* Formularer */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 15px; }
.field label { font-size: .84rem; font-weight: 600; color: var(--ink-soft); }
.field .hint { font-size: .78rem; color: var(--ink-faint); }
.input, .select, .textarea {
    width: 100%; padding: 10px 13px;
    background: var(--surface); color: var(--ink);
    border: 1px solid var(--line-strong); border-radius: var(--r-sm);
    transition: border-color .15s, box-shadow .15s; outline: none;
}
.textarea { resize: vertical; min-height: 92px; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.input::placeholder, .textarea::placeholder { color: var(--ink-faint); }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238A8F83' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Tabeller */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.tbl th {
    text-align: left; font-size: .74rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
    color: var(--ink-faint); padding: 11px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
    position: sticky; top: 0; background: var(--surface);
}
table.tbl td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tbody tr { transition: background .12s; }
table.tbl tbody tr:hover { background: var(--surface-2); }
table.tbl tbody tr:last-child td { border-bottom: 0; }
.td-actions { display: flex; gap: 6px; justify-content: flex-end; }
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--ink); }

/* Fremdriftsbjælke */
.progress { height: 9px; background: var(--surface-3); border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .5s var(--ease); }
.progress.gold > span { background: var(--gold); }
.progress.danger > span { background: var(--danger); }

/* Tom tilstand */
.empty { text-align: center; padding: 46px 20px; color: var(--ink-soft); }
.empty__mark { width: 54px; height: 54px; margin: 0 auto 14px; color: var(--accent-soft); opacity: .7; }
.empty h3 { font-size: 1.1rem; margin-bottom: 4px; color: var(--ink); }
.empty p { max-width: 340px; margin: 0 auto 18px; }

/* Segment-kontrol / faner */
.segment { display: inline-flex; background: var(--surface-2); border-radius: var(--r-sm); padding: 3px; gap: 2px; }
.segment button {
    border: 0; background: transparent; cursor: pointer;
    padding: 6px 14px; border-radius: var(--r-xs);
    font-size: .85rem; font-weight: 600; color: var(--ink-soft);
    transition: background .15s, color .15s;
}
.segment button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

/* Værktøjslinje over lister */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar .grow { flex: 1; }
.search {
    position: relative; display: flex; align-items: center; min-width: 200px;
}
.search .ic { position: absolute; left: 11px; width: 17px; height: 17px; color: var(--ink-faint); pointer-events: none; }
.search input { padding-left: 36px; }

/* =============================================================================
   MODAL
   ============================================================================= */
.modal-overlay {
    position: fixed; inset: 0; z-index: 100;
    background: color-mix(in srgb, #14140f 55%, transparent);
    backdrop-filter: blur(3px);
    display: flex; align-items: flex-start; justify-content: center;
    padding: max(6vh, 30px) 18px 40px; overflow-y: auto;
    opacity: 0; visibility: hidden; transition: opacity .2s, visibility .2s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }
.modal {
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
    width: 100%; max-width: 560px;
    transform: translateY(10px) scale(.98); transition: transform .25s var(--ease);
}
.modal-overlay.open .modal { transform: none; }
.modal--wide { max-width: 820px; }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px; border-bottom: 1px solid var(--line); }
.modal__head h2 { font-size: 1.3rem; }
.modal__body { padding: 22px 24px; }
.modal__foot { display: flex; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 var(--r-xl) var(--r-xl); }
.modal__close { background: none; border: 0; cursor: pointer; color: var(--ink-faint); padding: 6px; border-radius: var(--r-xs); }
.modal__close:hover { background: var(--surface-2); color: var(--ink); }

/* =============================================================================
   TOASTS
   ============================================================================= */
#toasts { position: fixed; bottom: 22px; right: 22px; z-index: 200; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast {
    display: flex; align-items: flex-start; gap: 11px;
    background: var(--surface); border: 1px solid var(--line);
    border-left: 3px solid var(--accent);
    border-radius: var(--r); padding: 13px 15px; box-shadow: var(--shadow-lg);
    animation: toast-in .3s var(--ease);
}
.toast.err { border-left-color: var(--danger); }
.toast.warn { border-left-color: var(--warn); }
.toast__ic { width: 19px; height: 19px; flex: none; margin-top: 1px; color: var(--accent); }
.toast.err .toast__ic { color: var(--danger); }
.toast__msg { font-size: .88rem; line-height: 1.45; }
@keyframes toast-in { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: none; } }

/* Dropdown-menu */
.menu { position: relative; }
.menu__pop {
    position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; min-width: 190px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
    box-shadow: var(--shadow-lg); padding: 6px; display: none;
}
.menu.open .menu__pop { display: block; }
.menu__pop a, .menu__pop button {
    display: flex; align-items: center; gap: 9px; width: 100%;
    padding: 8px 11px; border-radius: var(--r-xs); border: 0; background: none;
    color: var(--ink); font-size: .88rem; text-align: left; cursor: pointer; text-decoration: none;
}
.menu__pop a:hover, .menu__pop button:hover { background: var(--surface-2); text-decoration: none; }
.menu__pop hr { border: 0; border-top: 1px solid var(--line); margin: 6px 4px; }
.menu__pop .danger { color: var(--danger); }

/* Avatar */
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--accent-bg); color: var(--accent); display: grid; place-items: center; font-weight: 700; font-size: .82rem; flex: none; }

/* Divider m. tekst */
.hr-text { display: flex; align-items: center; gap: 12px; color: var(--ink-faint); font-size: .82rem; margin: 6px 0; }
.hr-text::before, .hr-text::after { content: ""; flex: 1; border-top: 1px solid var(--line); }

/* Hjælpeklasser */
.hidden { display: none !important; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; }
.w-full { width: 100%; }
.text-right { text-align: right; }
.gap-sm { gap: 6px; }

/* =============================================================================
   RESPONSIVT
   ============================================================================= */
@media (max-width: 1020px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .span-2 { grid-column: span 1; }
}
@media (max-width: 860px) {
    .app { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed; left: 0; top: 0; width: min(84vw, 300px);
        transform: translateX(-102%); box-shadow: var(--shadow-lg);
    }
    body.nav-open .sidebar { transform: none; }
    body.nav-open::after {
        content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 39;
    }
    .hamburger { display: inline-flex; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .form-row, .form-row.form-row { grid-template-columns: 1fr; }
    .page-head { align-items: flex-start; }
}
@media (max-width: 520px) {
    body { font-size: 14.5px; }
    .content { padding: 16px; }
    #toasts { left: 16px; right: 16px; bottom: 16px; max-width: none; }
    .modal__foot { flex-direction: column-reverse; }
    .modal__foot .btn { width: 100%; }
}

/* Tilgængelighed: respektér reduceret bevægelse */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Print (bordplan, gæsteliste, timeline m.m.) */
@media print {
    .sidebar, .topbar, .toolbar, .no-print { display: none !important; }
    .app { display: block; }
    body { background: #fff; }
    .card { box-shadow: none; border-color: #ccc; }
    .content { max-width: none; padding: 0; }
}

/* ---- Sidebar-komponenter (bryllupsvælger, bruger-række) ---------------- */
.wed-switch {
    display: flex; align-items: center; gap: 8px; width: 100%;
    padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-sm);
    background: var(--surface-2); cursor: pointer; text-align: left;
    transition: border-color .15s, background .15s;
}
.wed-switch:hover { border-color: var(--line-strong); }
.wed-switch__body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
.wed-switch__title {
    font-family: var(--font-display); font-size: 1rem; font-weight: 600; color: var(--ink);
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wed-switch__meta { font-size: .76rem; color: var(--ink-faint); }
.wed-switch__chev { width: 16px; height: 16px; flex: none; color: var(--ink-faint); }

.nav-foot-link {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px; border-radius: var(--r-sm);
    color: var(--ink-soft); font-size: .92rem; font-weight: 500; text-decoration: none;
    transition: background .15s, color .15s;
}
.nav-foot-link:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.nav-foot-link.active { background: var(--accent-bg); color: var(--accent); font-weight: 600; }
.nav-foot-link .ic { width: 18px; height: 18px; flex: none; opacity: .85; }

.user-menu { margin-top: 4px; }
.user-row {
    display: flex; align-items: center; gap: 10px; width: 100%;
    padding: 7px 8px; border: 0; background: none; border-radius: var(--r-sm);
    cursor: pointer; text-align: left; transition: background .15s;
}
.user-row:hover { background: var(--surface-2); }
.user-row__name { flex: 1; min-width: 0; font-size: .9rem; font-weight: 600; color: var(--ink); }
.user-row .ic { width: 16px; height: 16px; color: var(--ink-faint); flex: none; }

/* ---- Auth- og opsætningsskærme ---------------------------------------- */
.auth {
    min-height: 100vh; display: grid; place-items: center;
    padding: 24px; background:
        radial-gradient(1200px 600px at 50% -10%, var(--accent-bg), transparent 70%),
        var(--paper);
}
.auth__card {
    width: 100%; max-width: 428px;
    background: var(--surface); border: 1px solid var(--line);
    border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
    padding: clamp(24px, 5vw, 40px);
}
.auth__brand { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.auth__brand .brand__mark { width: 40px; height: 40px; font-size: 1.3rem; }
.auth__brand .brand__name { font-size: 1.5rem; }
.auth h1 { font-family: var(--font-display); font-size: 1.55rem; margin: 18px 0 4px; font-weight: 600; }
.auth__sub { color: var(--ink-soft); margin-bottom: 22px; font-size: .95rem; }
.auth .field { margin-bottom: 14px; }
.auth .btn { width: 100%; justify-content: center; }
.auth__alt { text-align: center; margin-top: 18px; font-size: .9rem; color: var(--ink-soft); }
.auth__err {
    background: var(--danger-bg); color: var(--danger);
    border-radius: var(--r-sm); padding: 11px 14px; font-size: .9rem; margin-bottom: 18px;
    display: flex; align-items: center; gap: 9px;
}
.auth__steps { display: flex; gap: 6px; margin-bottom: 22px; }
.auth__steps span { height: 4px; flex: 1; border-radius: 999px; background: var(--surface-3); }
.auth__steps span.on { background: var(--accent); }

/* ---- Afkrydsning + små hjælpere ---------------------------------------- */
input[type="checkbox"], input[type="radio"] { accent-color: var(--accent); width: 16px; height: 16px; }
.checkrow { display: flex; align-items: center; gap: 9px; font-size: .9rem; color: var(--ink); cursor: pointer; user-select: none; }
.select-sm { padding: 5px 26px 5px 10px; font-size: .82rem; border-radius: var(--r-xs); background-position: right 8px center; }
.subtext { font-size: .8rem; color: var(--ink-faint); }
.tag-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; background: var(--surface-2); font-size: .78rem; color: var(--ink-soft); }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }

/* ---- Opgavetavle (Kanban) ----------------------------------------------- */
.board { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; align-items: start; }
.board__col { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px; min-height: 120px; transition: background .15s, box-shadow .15s; }
.board__col.drop { background: var(--accent-bg); box-shadow: inset 0 0 0 2px var(--accent-soft); }
.board__col-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 8px 12px; }
.board__col-head h3 { font-size: .95rem; }
.board__count { font-size: .78rem; color: var(--ink-faint); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 1px 9px; }
.board__list { display: flex; flex-direction: column; gap: 10px; min-height: 8px; }
.tcard {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
    padding: 12px 13px; box-shadow: var(--shadow-sm); cursor: grab; position: relative;
    transition: box-shadow .15s, transform .05s, border-color .15s;
}
.tcard:hover { border-color: var(--line-strong); box-shadow: var(--shadow); }
.tcard.dragging { opacity: .5; }
.tcard__title { font-weight: 600; font-size: .93rem; line-height: 1.35; margin-bottom: 7px; padding-right: 20px; }
.tcard__grip { position: absolute; top: 11px; right: 9px; width: 15px; height: 15px; color: var(--ink-faint); opacity: .6; }
.tcard__meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.tcard__tags { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.tcard__sub { margin-top: 9px; padding-top: 9px; border-top: 1px dashed var(--line); font-size: .82rem; color: var(--ink-soft); }
.subline { display: flex; align-items: center; gap: 7px; padding: 3px 0; }
.subline label { flex: 1; cursor: pointer; }
.subline.done label { text-decoration: line-through; color: var(--ink-faint); }
.col-empty { text-align: center; color: var(--ink-faint); font-size: .82rem; padding: 14px 6px; border: 1px dashed var(--line-strong); border-radius: var(--r-sm); }
@media (max-width: 860px) { .board { grid-template-columns: 1fr; } }

/* ---- Noter --------------------------------------------------------------- */
.notes-grid { columns: 3 260px; column-gap: 16px; }
.note { break-inside: avoid; margin-bottom: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px 16px 14px; box-shadow: var(--shadow-sm); cursor: pointer; position: relative; transition: box-shadow .15s, transform .05s; }
.note:hover { box-shadow: var(--shadow); }
.note__title { font-family: var(--font-display); font-weight: 600; font-size: 1.02rem; margin-bottom: 6px; padding-right: 22px; }
.note__body { font-size: .88rem; color: var(--ink-soft); white-space: pre-wrap; line-height: 1.5; max-height: 220px; overflow: hidden; }
.note__pin { position: absolute; top: 12px; right: 12px; color: var(--ink-faint); }
.note__pin.on { color: var(--gold); }
.note__date { font-size: .74rem; color: var(--ink-faint); margin-top: 10px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; }
.swatch.sel { border-color: var(--ink); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--accent); }
@media (max-width: 860px) { .notes-grid { columns: 2 200px; } }
@media (max-width: 520px) { .notes-grid { columns: 1; } }

/* ---- Kalender ------------------------------------------------------------ */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 12px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-faint); padding: 4px 0; font-weight: 600; }
.cal-cell { min-height: 96px; border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; }
.cal-cell.other { background: var(--surface-2); opacity: .55; }
.cal-cell.today { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-daynum { font-size: .78rem; color: var(--ink-soft); font-weight: 600; }
.cal-ev { font-size: .74rem; padding: 2px 6px; border-radius: 5px; background: var(--accent-bg); color: var(--accent); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid var(--accent); }
.cal-ev.deadline { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); border-left-color: var(--danger); }
.cal-more { font-size: .72rem; color: var(--ink-faint); padding-left: 4px; }
@media (max-width: 640px) { .cal-cell { min-height: 62px; } .cal-ev { font-size: 0; padding: 3px; } .cal-ev::before { content: '•'; font-size: 14px; } }

/* ---- Tidslinje (dagens program) ------------------------------------------ */
.timeline { position: relative; padding-left: 8px; }
.tl-item { display: grid; grid-template-columns: 74px 1fr; gap: 16px; position: relative; padding-bottom: 4px; }
.tl-time { text-align: right; font-family: var(--font-display); font-weight: 600; color: var(--accent); padding-top: 12px; font-size: .95rem; }
.tl-body { border-left: 2px solid var(--line); padding: 12px 0 20px 20px; position: relative; }
.tl-body::before { content: ''; position: absolute; left: -7px; top: 16px; width: 12px; height: 12px; border-radius: 50%; background: var(--accent); border: 2px solid var(--surface); }
.tl-item.backup .tl-body::before { background: var(--gold); }
.tl-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; box-shadow: var(--shadow-sm); cursor: pointer; }
.tl-card:hover { box-shadow: var(--shadow); }
.tl-dur { font-size: .76rem; color: var(--ink-faint); }

/* ---- Liste-rækker (menu, musik, rejse) ---------------------------------- */
.menu-list, .lrows { display: flex; flex-direction: column; }
.menu-row, .lrow { display: flex; gap: 12px; align-items: center; padding: 11px 6px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s; }
.menu-row:last-child, .lrow:last-child { border-bottom: 0; }
.menu-row:hover, .lrow:hover { background: var(--surface-2); border-radius: var(--r-sm); }
.lrow__main { flex: 1; min-width: 0; }
.lrow__title { font-weight: 600; }
.track-num { width: 26px; text-align: center; color: var(--ink-faint); font-size: .82rem; font-variant-numeric: tabular-nums; }

/* ---- Galleri ------------------------------------------------------------- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.gtile { position: relative; aspect-ratio: 1; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); cursor: pointer; }
.gtile img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s var(--ease); }
.gtile:hover img { transform: scale(1.05); }
.gtile__cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 16px 8px 6px; font-size: .76rem; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.6)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gtile__del { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.5); color: #fff; border: 0; border-radius: 50%; width: 26px; height: 26px; cursor: pointer; display: none; align-items: center; justify-content: center; }
.gtile__del .ic { width: 14px; height: 14px; }
.gtile:hover .gtile__del { display: flex; }

/* ---- Dokumenter / upload ------------------------------------------------- */
.dropzone { border: 2px dashed var(--line-strong); border-radius: var(--r-lg); padding: 30px; text-align: center; color: var(--ink-faint); cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone.drag { border-color: var(--accent); background: var(--accent-bg); color: var(--accent); }
.doc-row { display: flex; align-items: center; gap: 12px; padding: 12px 6px; border-bottom: 1px solid var(--line); }
.doc-row:last-child { border-bottom: 0; }
.doc-ic { width: 40px; height: 40px; border-radius: var(--r-sm); background: var(--accent-bg); color: var(--accent); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.doc-ic .ic { width: 20px; height: 20px; }

/* ---- Bordplan ------------------------------------------------------------ */
.seat-wrap { display: grid; grid-template-columns: 1fr 260px; gap: 16px; align-items: start; }
.seat-canvas { position: relative; min-height: 540px; background:
    radial-gradient(circle at 1px 1px, var(--line) 1px, transparent 0) 0 0 / 26px 26px,
    var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.stable { position: absolute; background: var(--surface); border: 2px solid var(--accent-soft); box-shadow: var(--shadow-sm); cursor: grab; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; user-select: none; padding: 6px; touch-action: none; }
.stable.round { border-radius: 50%; }
.stable.rectangle { border-radius: var(--r-sm); }
.stable.square { border-radius: var(--r-sm); }
.stable.full { border-color: var(--danger); }
.stable__name { font-weight: 600; font-size: .82rem; line-height: 1.1; }
.stable__cap { font-size: .72rem; color: var(--ink-faint); margin-top: 2px; }
.stable.sel { outline: 3px solid var(--accent); outline-offset: 2px; }
.stable { overflow: visible; }
.stable__name, .stable__cap { position: relative; z-index: 3; }
.stseat { position: absolute; transform: translate(-50%, -50%); max-width: 96px; padding: 3px 8px; border-radius: 999px; background: var(--accent); color: #fff; font-size: .62rem; font-weight: 600; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: 1.5px solid var(--surface); box-shadow: var(--shadow-sm); z-index: 2; }
.stseat.empty { max-width: none; width: 13px; height: 13px; padding: 0; background: transparent; border: 1.5px dashed var(--line-strong); box-shadow: none; }
.stable.full .stseat { border-color: var(--surface); }
.seat-side { display: flex; flex-direction: column; gap: 12px; }
.gchip { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: .84rem; background: var(--surface); }
.gchip button { background: none; border: 0; cursor: pointer; color: var(--ink-faint); padding: 2px; }
@media (max-width: 860px) { .seat-wrap { grid-template-columns: 1fr; } }

/* ---- Offentlig RSVP-side ------------------------------------------------- */
.rsvp-body { background:
    radial-gradient(1200px 500px at 50% -10%, color-mix(in srgb, var(--accent) 10%, transparent), transparent),
    var(--paper); min-height: 100vh; }
.rsvp-wrap { max-width: 620px; margin: 0 auto; padding: 40px 18px 60px; display: flex; flex-direction: column; gap: 16px; }
.rsvp-hero { text-align: center; padding: 20px 8px 8px; }
.rsvp-date { font-family: var(--font-display); font-size: 1.2rem; color: var(--accent); margin: 6px 0 2px; }
.rsvp-foot { text-align: center; font-size: .78rem; color: var(--ink-faint); margin-top: 6px; letter-spacing: .04em; }

/* =============================================================================
   ACCENT-PALETTER (farvetema pr. bruger)
   Vælges i Indstillinger og sættes via data-accent på <html>. Standard er
   eukalyptus (:root). Mørk-varianten har højere specificitet, så den altid
   vinder i mørkt tema. Kun accent-variablerne ændres; guld arves.
   ========================================================================== */
html[data-accent="rosa"]      { --accent:#C05D7E; --accent-hover:#A94D6C; --accent-soft:#D89AAE; --accent-bg:#F7E7EC; }
html[data-accent="blå"]      { --accent:#4A6D8C; --accent-hover:#3E5D78; --accent-soft:#93AAC0; --accent-bg:#E7EDF3; }
html[data-accent="teal"]      { --accent:#2E7D82; --accent-hover:#276A6E; --accent-soft:#7FB3B6; --accent-bg:#E1EFEF; }
html[data-accent="lavendel"]  { --accent:#7A6BA8; --accent-hover:#695B93; --accent-soft:#A99CC9; --accent-bg:#ECE8F4; }
html[data-accent="terracotta"]{ --accent:#B96A4B; --accent-hover:#A25A3D; --accent-soft:#D49E88; --accent-bg:#F6E8E1; }
html[data-accent="bordeaux"]  { --accent:#8E3B4E; --accent-hover:#7A3142; --accent-soft:#B47C89; --accent-bg:#F2E4E7; }
html[data-accent="champagne"] { --accent:#9A8468; --accent-hover:#857154; --accent-soft:#C4B49E; --accent-bg:#F0EAE0; }

html[data-theme="dark"][data-accent="rosa"]      { --accent:#E491AB; --accent-hover:#EDA8BE; --accent-soft:#C77E97; --accent-bg:#3A222A; }
html[data-theme="dark"][data-accent="blå"]      { --accent:#8FB4D6; --accent-hover:#A6C4DF; --accent-soft:#7C97B0; --accent-bg:#1E2A35; }
html[data-theme="dark"][data-accent="teal"]      { --accent:#6FBEC2; --accent-hover:#8ACFCF; --accent-soft:#5E9DA0; --accent-bg:#163030; }
html[data-theme="dark"][data-accent="lavendel"]  { --accent:#B3A5DB; --accent-hover:#C4B8E4; --accent-soft:#9186B4; --accent-bg:#2A2438; }
html[data-theme="dark"][data-accent="terracotta"]{ --accent:#E0987A; --accent-hover:#E8AC92; --accent-soft:#BE8168; --accent-bg:#33241D; }
html[data-theme="dark"][data-accent="bordeaux"]  { --accent:#D98298; --accent-hover:#E29CAE; --accent-soft:#B06E7E; --accent-bg:#331F26; }
html[data-theme="dark"][data-accent="champagne"] { --accent:#CBB79A; --accent-hover:#D8C7AE; --accent-soft:#A8977E; --accent-bg:#2C271F; }

/* Bordplan: pladsrækkefølge ved et bord (styr naborrækkefølgen). */
.seatlist { display: flex; flex-direction: column; gap: 4px; }
.seatrow { display: flex; align-items: center; gap: 6px; background: var(--surface-2); border-radius: var(--r-sm); padding: 4px 6px 4px 4px; }
.seatrow__n { width: 22px; height: 22px; flex: none; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 50%; font-size: .72rem; font-weight: 600; color: var(--ink-soft); }
.seatrow__name { flex: 1; font-size: .88rem; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seatrow .btn-icon { width: 28px; height: 28px; padding: 4px; }
.seatrow__rm { background: none; border: 0; color: var(--ink-faint); cursor: pointer; display: flex; padding: 4px; border-radius: var(--r-xs); flex: none; }
.seatrow__rm:hover { color: var(--danger); background: var(--danger-bg); }
