/*
Copyright (c) 2026 Steffen Friis. All rights reserved.
Permission to use this software is granted exclusively to Liberal Alliance Sjællands Storkreds.
*/

/* Liberal Alliance SjÃ¦lland - hand-written CSS, no build step.
   Palette: navy (party colour) + a restrained gold accent for CTAs only,
   generous whitespace and light card styling - closer to la-kbh.dk's clean,
   minimalist layout than liberalalliance.dk's busier block-colour sections. */

:root {
    --navy: #002945;
    --navy-deep: #001d35;
    --navy-text: #004468;
    --gold: #caa046;
    --gold-dark: #a9843a;
    --cream: #f7f6f2;
    --white: #ffffff;
    --border: #e3e1da;
    --muted: #64748b;
    --danger: #c0392b;
    --danger-bg: #fbeceb;
    --success: #1f8a4c;
    --success-bg: #eaf6ef;
    --warning: #8a6d1f;
    --warning-bg: #fdf3d9;
    --radius: 8px;
    --radius-lg: 14px;
    --max-width: 1120px;
    --header-max-width: 1400px;
    --font: "Instrument Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font);
    color: var(--navy-text);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--navy); }

h1, h2, h3, h4 {
    color: var(--navy);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.5em;
}

h1 { font-size: clamp(2rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; }

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.eyebrow {
    display: inline-block;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.8rem;
    color: var(--gold-dark);
    margin-bottom: 0.75em;
}

/* -------------------------------------------------------------------- */
/* Buttons                                                               */
/* -------------------------------------------------------------------- */

.button {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    background: var(--gold);
    color: var(--navy-deep);
    border: 1px solid var(--gold);
    padding: 11px 22px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.05s ease;
}

.button:hover { background: var(--gold-dark); border-color: var(--gold-dark); }
.button:active { transform: translateY(1px); }

.button.outline {
    background: transparent;
    color: var(--navy);
    border-color: var(--navy);
}
.button.outline:hover { background: var(--navy); color: var(--white); }

.button.ghost {
    background: transparent;
    color: var(--navy-text);
    border-color: var(--border);
}
.button.ghost:hover { background: var(--cream); }

.button.danger { background: var(--danger); border-color: var(--danger); color: var(--white); padding: 6px 14px; font-size: 0.85rem; }
.button.danger:hover { opacity: 0.9; }

/* Public site only (see .site-body on layouts/app.blade.php's <body>) -
   shifts the whole gold palette up one notch: #f0b440 becomes the resting
   colour, and the original #caa046 becomes the hover/active shade.
   Overriding the two variables here, rather than individual .button rules,
   means every existing var(--gold)/var(--gold-dark) usage on the public
   site - buttons (including .on-dark and the header's "Bliv medlem") plus
   eyebrows, category labels and icons that use --gold-dark as a text
   colour - picks this up automatically and consistently, with no
   per-selector exceptions to maintain. An earlier version of this tried
   overriding .button's background directly and needed an ever-growing
   :not() exclusion list to avoid clobbering .outline/.on-dark/etc. -
   scoping the variables instead sidesteps that entirely. Admin/webmail use
   a different <body> (no .site-body class), so they never see this. */
.site-body {
    --gold: #f0b440;
    --gold-dark: #caa046;
}

.newsletter-editor-tabs { display: flex; gap: 4px; margin-bottom: 12px; border-bottom: 1px solid var(--border); }
.newsletter-editor-tab { padding: 8px 18px; background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 600; font-size: 0.9rem; color: var(--muted); cursor: pointer; }
.newsletter-editor-tab:hover { color: var(--navy); }
.newsletter-editor-tab.active { color: var(--navy); border-bottom-color: var(--gold); }
.newsletter-design-frame { width: 100%; height: 70vh; border: 1px solid var(--border); border-radius: var(--radius); background: var(--white); }
.newsletter-html-view { width: 100%; max-height: 70vh; overflow: auto; margin: 0; padding: 16px; background: var(--navy-deep, #001d35); color: #e5e1d8; border-radius: var(--radius); font-family: 'Courier New', monospace; font-size: 0.8rem; white-space: pre-wrap; word-break: break-word; }

/* Newsletter compose, step "2. Byg indholdet": the element list builder. */
.elements-toolbar { display: flex; gap: 10px; margin-bottom: 14px; }
#elements_list { display: flex; flex-direction: column; gap: 10px; }
.element-card { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--white); }
.element-card.dragging { opacity: 0.4; }
.element-card-header { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.element-drag-handle { cursor: grab; color: var(--muted); font-size: 1.1rem; line-height: 1; user-select: none; touch-action: none; }
.element-drag-handle:active { cursor: grabbing; }
.element-type-label { font-weight: 700; color: var(--navy); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.02em; }
.element-summary { flex: 1; color: var(--muted); font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.element-card-header .button { padding: 6px 14px; font-size: 0.82rem; }
.element-card-body { display: none; padding: 0 16px 16px; border-top: 1px solid var(--border); }
.element-card.expanded .element-card-body { display: block; padding-top: 16px; }
.element-card.expanded .element-drag-handle { cursor: grab; }

/* Referent (Dagsorden/Referat) punkt cards - same shape as .element-card
   above, kept separate rather than shared since the two features may
   diverge (e.g. the referat stage never shows a drag handle at all). */
#meeting_items_list { display: flex; flex-direction: column; gap: 10px; }
.meeting-item-card { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--white); }
.meeting-item-card.dragging { opacity: 0.4; }
.meeting-item-card-header { display: flex; align-items: center; gap: 12px; padding: 12px 16px; }
.meeting-item-card-header .button { padding: 6px 14px; font-size: 0.82rem; }
.meeting-item-number { font-weight: 700; color: var(--navy); font-size: 0.85rem; min-width: 1.5em; }
.meeting-item-title-input { flex: 1; border: none; background: transparent; font-size: 0.95rem; padding: 4px 0; }
.meeting-item-title-input:focus { outline: none; border-bottom: 1px solid var(--navy); }
.meeting-item-title-locked { flex: 1; font-size: 0.95rem; font-weight: 600; }
.meeting-item-title-withdrawn { text-decoration: line-through; color: var(--danger); }
.meeting-item-card-body { display: none; padding: 0 16px 16px; border-top: 1px solid var(--border); }
.meeting-item-card.expanded .meeting-item-card-body { display: block; padding-top: 16px; }

/* Bilag, on the dagsorden builder - sits below a punkt's header, or (since
   .meeting-subitem-card is a single flex row) wraps onto its own full-width
   line below an underpunkt's fields via flex-basis:100%. */
.meeting-item-bilag { padding: 0 16px 12px; }
.meeting-item-bilag .meeting-attachments-list { margin-bottom: 6px; }
.meeting-item-bilag-label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.meeting-item-bilag-input { display: block; font-size: 0.85rem; }
.meeting-subitem-card .meeting-item-bilag { flex-basis: 100%; padding: 0 0 0 38px; }

/* Under-underpunkter - the same trick one level deeper: a
   .meeting-subitems-list nested inside a .meeting-subitem-card (itself a
   flex row) wraps onto its own full-width line via flex-basis:100%, same
   reasoning as the bilag rule above it. */
.meeting-subitem-card .meeting-subitems-list { flex-basis: 100%; padding: 8px 0 0 38px; }

/* Underpunkter - nested one level inside a punkt card, indented to read as
   children of it. Empty when a punkt has none, so no border/padding shows
   up unless at least one underpunkt card is present. */
.meeting-subitems-list { display: flex; flex-direction: column; gap: 8px; padding: 0 16px 12px 48px; }
.meeting-subitems-list:empty { display: none; }
.meeting-subitem-card { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--cream); padding: 8px 14px; }
.meeting-subitem-card.dragging { opacity: 0.4; }
.meeting-subitem-number { font-weight: 700; color: var(--navy); font-size: 0.8rem; min-width: 2.5em; }

/* Beslutning/opfÃ¸lgning markering under Referat - green for a decision
   taken, blue for a followup carried to a later meeting (matches the blue
   suggestion box it produces below). */
.meeting-decision-block { margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.meeting-decision-option { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: 0.9rem; }
.meeting-decision-text-wrap { border-radius: var(--radius); padding: 10px 12px; }
.meeting-decision-text-wrap textarea,
.meeting-decision-text-wrap input[type="text"] { width: 100%; }
.meeting-decision-text-wrap.decision { background: var(--success-bg); }
.meeting-decision-text-wrap.followup { background: #e6eefb; }

.meeting-followup-assignees { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.meeting-followup-assignee-option { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: 0.88rem; }
.meeting-decision-text-wrap.followup textarea { width: 100%; }

/* OpfÃ¸lgningspunkter carried over from an earlier meeting of the same type
   - shown above the dagsorden builder while it's still a draft, so they
   stand out as "add this?" suggestions rather than blend in as punkter. */
.meeting-followup-suggestions { background: #e6eefb; border: 1px solid #c3d9f5; border-radius: var(--radius-lg); padding: 14px 18px; margin-bottom: 20px; display: flex; flex-direction: column; gap: 10px; }
.meeting-followup-suggestions-title { margin: 0; font-weight: 700; color: #1d4f9a; }
.meeting-followup-suggestion { display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--white); border-radius: var(--radius); padding: 10px 14px; }
.meeting-followup-suggestion-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.meeting-followup-suggestion-actions .button { padding: 6px 12px; font-size: 0.82rem; }

/* 3-state deltagelse-toggle on referatet: grøn = deltog, grå = umarkeret
   (left out of both Deltagere og Afbud), rød = afbud. One row per person,
   toggle first with a fixed width so every row lines up regardless of how
   long the name next to it is. */
.attendance-list { display: flex; flex-direction: column; gap: 8px; }
.attendance-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.attendance-toggle-name { font-size: 0.88rem; }
.attendance-receive-referat { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 400; color: var(--muted); margin-left: auto; }
.attendance-toggle-switch { display: inline-flex; flex: 0 0 auto; width: 170px; border-radius: 999px; overflow: hidden; border: 1px solid var(--border); }
.attendance-toggle-option { position: relative; flex: 1; display: flex; align-items: center; justify-content: center; padding: 4px 10px; font-size: 0.76rem; font-weight: 600; cursor: pointer; background: var(--cream); color: var(--muted); }
.attendance-toggle-option input { position: absolute; opacity: 0; width: 0; height: 0; }
.attendance-toggle-absent:has(input:checked) { background: var(--danger); color: var(--white); }
.attendance-toggle-unmarked:has(input:checked) { background: var(--muted); color: var(--white); }
.attendance-toggle-attending:has(input:checked) { background: var(--success); color: var(--white); }

.button.on-dark { background: var(--gold); color: var(--navy-deep); }
.button.on-dark.outline { background: transparent; color: var(--white); border-color: rgba(255,255,255,0.5); }
.button.on-dark.outline:hover { background: rgba(255,255,255,0.12); }

/* -------------------------------------------------------------------- */
/* Public header / nav                                                   */
/* -------------------------------------------------------------------- */

.site-header {
    border-bottom: 1px solid var(--border);
    background: var(--white);
    position: sticky;
    top: 0;
    z-index: 40;
}

.site-header .container {
    max-width: var(--header-max-width);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    padding-bottom: 14px;
    gap: 24px;
}

.site-logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--navy);
    text-decoration: none;
    white-space: nowrap;
}
.site-logo span { color: var(--gold-dark); }
.site-logo img { display: block; height: 40px; width: auto; max-width: 220px; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.site-nav a {
    color: var(--navy-text);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
}
.site-nav a:hover, .site-nav a.active { color: var(--navy); }

.nav-home {
    display: flex;
    align-items: center;
    color: var(--navy-text);
}
.nav-home:hover, .nav-home.active { color: var(--navy); }

.nav-dropdown {
    position: relative;
    display: flex;
    align-items: center;
    gap: 2px;
}

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    background: none;
    border: none;
    padding: 4px;
    margin: 0;
    color: var(--navy-text);
    cursor: pointer;
}
.nav-dropdown-toggle:hover { color: var(--navy); }

.nav-dropdown-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    color: var(--navy-text);
    font-family: inherit;
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
}
.nav-dropdown-trigger:hover,
.nav-dropdown.active .nav-dropdown-trigger,
.nav-dropdown.active .nav-dropdown-toggle,
.nav-dropdown.active > a { color: var(--navy); }

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 12px);
    left: 0;
    min-width: 160px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 6px;
    box-shadow: 0 8px 24px rgba(16, 35, 63, 0.12);
    z-index: 50;
}
.nav-dropdown-menu::before {
    /* Invisible bridge over the gap between the nav row and the menu, so
       moving the mouse from "Om os" down into the menu doesn't cross any
       un-hovered pixels and lose :hover before the click lands. */
    content: "";
    position: absolute;
    top: -12px;
    left: 0;
    right: 0;
    height: 12px;
}
.nav-dropdown-menu a {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    white-space: nowrap;
}
.nav-dropdown-menu a:hover { background: var(--cream); }

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown.open .nav-dropdown-menu { display: block; }

.site-header-cta { flex-shrink: 0; white-space: nowrap; }
.nav-cta-mobile { display: none; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 12px;
    cursor: pointer;
}

@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; }
    .site-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--border);
        flex-direction: column;
        align-items: flex-start;
        padding: 16px 24px 24px;
        gap: 14px;
    }
    .site-nav.open { display: flex; }
    .site-header { position: relative; }
    .site-header-cta { display: none; }
    .nav-cta-mobile { display: inline-flex; }

    .nav-dropdown { flex-wrap: wrap; }
    .nav-dropdown-menu {
        position: static;
        display: none;
        min-width: 0;
        padding: 4px 0 0 16px;
        border: none;
        box-shadow: none;
    }
    .nav-dropdown-menu a { padding: 4px 0; }
    .nav-dropdown:hover .nav-dropdown-menu { display: none; }
    .nav-dropdown.open .nav-dropdown-menu { display: block; }
}

/* -------------------------------------------------------------------- */
/* Hero                                                                  */
/* -------------------------------------------------------------------- */

.hero {
    position: relative;
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
    color: var(--white);
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

.hero.has-image { background-blend-mode: multiply; }

/* .hero-flex lays the text and the decorative map out as flex siblings, so
   the map simply fills whatever width is left after the text column - it
   starts exactly where the text ends, with no guessed offsets to
   maintain. Below the mobile breakpoint there's no room for a map at a
   size worth showing, so it's hidden entirely there instead - see the
   media query below. */
.hero-flex {
    display: flex;
    align-items: center;
    gap: 24px;
    /* Overrides .container's own padding (same element, both classes) -
       keep the same 24px side inset that rule set, since dropping it here
       would lose it entirely rather than add to it. */
    padding: 64px 24px 72px;
    /* The text column's own content is shorter than the old hero was tall
       (that extra height used to come from padding living directly on
       .hero-inner) - a min-height here gives the row enough vertical room
       for the map to actually stretch into via align-self:stretch below,
       instead of being squeezed down to the text's own natural height.
       Everything here is box-sizing:border-box, so min-height already
       includes the padding above - it has to be padding + the actual
       content height wanted, not just the content height on its own. */
    min-height: 640px;
}

.hero-inner {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 760px;
}

.hero-inner .eyebrow { color: var(--gold); }
.hero-inner h1 { color: var(--white); }
.hero-inner p { color: rgba(255,255,255,0.85); font-size: 1.1rem; }

/* Decorative Sjælland outline, behind the text, breaking up the flat navy
   gradient without competing for attention (fill is transparent, only the
   white coastline shows). Hidden entirely once an admin sets a custom hero
   photo (.has-image), since a real photo and this outline would just fight
   each other. .hero-map-inner is the positioning context the icons below
   are placed against - it shrink-wraps to the outline image itself, so an
   icon at top:16%;left:25% always lands on the same patch of coastline
   regardless of how much space .hero-map-decoration ends up with. */
.hero-map-decoration {
    position: relative;
    z-index: 0;
    flex: 1 1 0%;
    min-width: 0;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    pointer-events: none;
}

.hero-map-inner { position: relative; height: 96%; }

.hero-map-outline { display: block; height: 100%; width: auto; opacity: 0.4; }

.hero-map-icon {
    position: absolute;
    /* The source icon is 16x16 - kept close to its native size rather than
       blown up, so it stays crisp instead of blurring. */
    width: 20px;
    height: 20px;
    opacity: 0;
    animation: hero-map-icon-pulse 7s ease-in-out infinite;
    /* Hints the browser to promote each icon to its own compositor layer
       up front, rather than only while it happens to be mid-animation -
       Firefox in particular otherwise tends to repaint the navy background
       under each icon every frame instead of just moving a layer, which
       reads as laggy with this many icons animating independently. */
    will-change: opacity, transform;
}

/* A short pulse rather than a slow fade over the whole cycle - each icon
   sits at opacity:0 for most of its duration and is only actually visible
   for a brief window around the middle, so with several running at once
   (different delays/durations - see home.blade.php) only a couple are ever
   lit at the same time instead of most of them glowing at once. */
@keyframes hero-map-icon-pulse {
    0%, 15%, 45%, 100% { opacity: 0; transform: scale(0.75); }
    30% { opacity: 0.85; transform: scale(1); }
}

/* Too little width left over for the map to read as anything but a
   shrunken, cramped version of itself once the text wraps full-width - not
   worth it, so it's dropped rather than shown small. */
@media (max-width: 900px) {
    /* min-height: 640px above exists to give the map room to stretch into
       on wide screens (see .hero-flex's own comment) - on narrow screens
       the map is hidden entirely, so without resetting it here the hero
       would still reserve that full height behind a few lines of text,
       reading as a big empty navy box. */
    .hero-flex { display: block; padding: 72px 24px 88px; min-height: 0; }
    .hero-inner { max-width: 100%; }
    .hero-map-decoration { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-map-icon { animation: none; opacity: 0.5; }
}

/* -------------------------------------------------------------------- */
/* Sections                                                              */
/* -------------------------------------------------------------------- */

.section { padding: 72px 0; }
.section.tight { padding: 48px 0; }
.section.on-cream { background: var(--cream); }
.section.on-navy { background: var(--navy); color: rgba(255,255,255,0.85); }
.section.on-navy h2 { color: var(--white); }

.section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}
.section-head p { color: var(--muted); max-width: 520px; margin: 0; }
.section.on-navy .section-head p { color: rgba(255,255,255,0.75); }

/* -------------------------------------------------------------------- */
/* Card grids (news, policy, politicians, board, branches)               */
/* -------------------------------------------------------------------- */

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 24px;
}

/* Fixed three per row (e.g. Lokalforeninger, where long names need the room). */
.card-grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 860px) { .card-grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .card-grid.cols-3 { grid-template-columns: 1fr; } }

.card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}
a.card:hover { box-shadow: 0 12px 28px rgba(16, 35, 63, 0.1); transform: translateY(-2px); }

.card-image {
    aspect-ratio: 4 / 3;
    background: var(--cream);
    overflow: hidden;
}
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.news-card .card-image { aspect-ratio: 2 / 1; }

/* Article page hero image (resources/views/news/show.blade.php) - unlike
   the card thumbnail above (a fixed box every image must fill), this is
   deliberately NOT forced to width:100% - a narrower upload than the
   ~1120px content column would otherwise get stretched (and blurred) to
   fill it. max-width:100% still caps it so it downscales, never upscales;
   aspect-ratio+object-fit still crop a non-2:1 source to the same 2:1 shape
   once its own width is resolved, so the crop stays consistent either way. */
.article-cover {
    display: block;
    max-width: 100%;
    aspect-ratio: 2 / 1;
    object-fit: cover;
    border-radius: var(--radius-lg);
    margin: 0 auto 32px;
}

/* Vedtægter - the browser's own PDF viewer inside an iframe, same frame
   treatment as .webmail-message-frame. */
.pdf-embed {
    width: 100%;
    height: 80vh;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    background: var(--white);
}

.card-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }
.card-category {
    text-transform: uppercase;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--gold-dark);
    margin-bottom: 8px;
}
.card-title { font-size: 1.05rem; font-weight: 700; color: var(--navy); margin: 0 0 10px; line-height: 1.3; }
.card-title a { color: inherit; text-decoration: none; }
.card-title a:hover { text-decoration: underline; }
.card-meta { margin-top: auto; display: flex; align-items: center; gap: 10px; font-size: 0.85rem; color: var(--muted); }
.card-meta .avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--cream); object-fit: cover; flex-shrink: 0;
}

.card-muted { opacity: 0.7; }

.event-map-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    color: var(--gold-dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.85rem;
}
.event-map-link:hover { text-decoration: underline; }

.person-card { text-align: left; }
.person-card .card-image { aspect-ratio: 1 / 1; }
.person-card .card-title { margin-bottom: 2px; }
.person-card .person-role { font-size: 0.85rem; color: var(--muted); margin-bottom: 10px; }
.person-card .card-body p { font-size: 0.92rem; color: var(--navy-text); }

.udvalg-badges { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 10px; }
.udvalg-badge {
    display: inline-block;
    background: var(--navy);
    color: var(--white);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--radius);
}

/* Contact area: fixed slots (e-mail, phone, social row) pinned to the bottom of
   the card, so cards in a row line up whatever any one person has filled in. */
.person-footer { margin-top: auto; padding-top: 14px; }
.person-footer .person-contact { margin-top: 0; }

.person-contact { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; font-size: 0.88rem; }
.person-contact-line { min-height: 1.6em; }
.person-contact a { display: inline-flex; align-items: center; gap: 6px; color: var(--navy-text); text-decoration: none; }
.person-contact a:hover { color: var(--navy); text-decoration: underline; }
.person-contact svg { color: var(--gold-dark); flex-shrink: 0; }

.person-social { display: flex; gap: 8px; margin-top: 10px; min-height: 30px; }
.person-social a {
    width: 30px; height: 30px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: var(--cream); color: var(--navy); text-decoration: none;
    font-size: 0.78rem; font-weight: 700;
}
.person-social a:hover { background: var(--navy); color: var(--white); }

/* -------------------------------------------------------------------- */
/* Banner CTA (photo + overlay)                                          */
/* -------------------------------------------------------------------- */

.banner-cta {
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, var(--navy) 0%, var(--navy-deep) 100%);
    background-size: cover;
    background-position: center;
    background-blend-mode: multiply;
    color: var(--white);
    padding: 56px 40px;
    text-align: center;
}
.banner-cta .eyebrow { color: var(--gold); }
.banner-cta h2 { color: var(--white); }
.banner-cta p { color: rgba(255,255,255,0.85); max-width: 560px; margin: 0 auto 24px; }

/* -------------------------------------------------------------------- */
/* Promo card row (footer-area)                                          */
/* -------------------------------------------------------------------- */

.promo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.promo-card {
    background: var(--cream);
    border-radius: var(--radius-lg);
    padding: 28px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.promo-card h3 { margin-bottom: 8px; }
.promo-card p { color: var(--muted); font-size: 0.92rem; margin-bottom: 20px; }
.promo-card .button { margin-top: auto; }

/* -------------------------------------------------------------------- */
/* Newsletter box                                                        */
/* -------------------------------------------------------------------- */

.newsletter-box {
    background: var(--navy);
    color: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
}
.newsletter-box h2 { color: var(--white); max-width: 560px; }
.newsletter-form {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    max-width: 640px;
    margin-top: 20px;
}
.newsletter-form .field.full { grid-column: 1 / -1; }
.newsletter-form input[type="text"],
.newsletter-form input[type="email"] {
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    font-family: var(--font);
    font-size: 0.95rem;
}
.newsletter-form .consent { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; font-size: 0.85rem; color: rgba(255,255,255,0.8); }
.newsletter-form .consent a { color: var(--white); text-decoration: underline; }
.newsletter-form .form-actions { grid-column: 1 / -1; margin: 0; }

/* -------------------------------------------------------------------- */
/* Footer                                                                 */
/* -------------------------------------------------------------------- */

.site-footer { background: var(--navy-deep); color: rgba(255,255,255,0.7); padding: 56px 0 28px; margin-top: 72px; }
.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 28px;
    margin-bottom: 40px;
}
.footer-columns h4 { color: var(--white); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 14px; }
.footer-columns a { display: block; color: rgba(255,255,255,0.7); text-decoration: none; font-size: 0.92rem; margin-bottom: 10px; }
.footer-columns a:hover { color: var(--white); }

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.12);
    padding-top: 24px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    font-size: 0.85rem;
}
.social-icons { display: flex; gap: 12px; }
.social-icons a {
    width: 34px; height: 34px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,0.08); color: var(--white); text-decoration: none;
}
.social-icons a:hover { background: rgba(255,255,255,0.18); }

/* -------------------------------------------------------------------- */
/* Forms (shared: admin + public contact/newsletter)                     */
/* -------------------------------------------------------------------- */

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 0.92rem; }
.field input[type="text"],
.field input[type="email"],
.field input[type="password"],
.field input[type="url"],
.field input[type="tel"],
.field input[type="number"],
.field input[type="datetime-local"],
.field input[type="file"],
.field select,
.field textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font);
    font-size: 0.95rem;
    color: var(--navy-text);
    background: var(--white);
}
.field textarea { resize: vertical; }
.field .hint { color: var(--muted); font-size: 0.82rem; margin: 6px 0 0; }
.field.checkbox-field { display: flex; align-items: center; gap: 10px; }
.field.checkbox-field input { width: auto; }
.field img.current-image { max-width: 160px; border-radius: var(--radius); margin-bottom: 10px; border: 1px solid var(--border); }

.form-actions { display: flex; gap: 12px; margin-top: 28px; }

/* -------------------------------------------------------------------- */
/* Alerts                                                                 */
/* -------------------------------------------------------------------- */

.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-size: 0.92rem; }
.alert-success { background: var(--success-bg); color: var(--success); }
.alert-error { background: var(--danger-bg); color: var(--danger); }
.alert-warning { background: var(--warning-bg); color: var(--warning); }

/* Autosave toast (Dagsorden/Referat, Nyhedsbrev - see admin-autosave.js) -
   fixed to the viewport, not the page, so it stays visible regardless of
   scroll position while typing further down a long form. */
.autosave-indicator {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px;
    border-radius: var(--radius);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(16, 35, 63, 0.12);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.autosave-indicator--saving { background: var(--warning-bg); color: var(--warning); }
.autosave-indicator--saved { background: var(--success-bg); color: var(--success); }
/* The only state with something to click, so it's the only one that needs
   to accept pointer events - the others stay click-through. */
.autosave-indicator--error { background: var(--danger-bg); color: var(--danger); pointer-events: auto; }
.autosave-retry {
    border: 1px solid var(--danger);
    background: transparent;
    color: var(--danger);
    border-radius: var(--radius);
    padding: 3px 10px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
}
.autosave-retry:hover { background: var(--danger); color: var(--white); }

/* -------------------------------------------------------------------- */
/* Cookie consent banner (public site only - see                         */
/* resources/views/partials/cookie-consent.blade.php and                 */
/* public_html/js/cookie-consent.js)                                     */
/* -------------------------------------------------------------------- */

.cookie-consent-dialog {
    border: none;
    border-radius: var(--radius-lg);
    padding: 0;
    max-width: 620px;
    width: calc(100% - 32px);
    max-height: calc(100vh - 64px);
    box-shadow: 0 20px 48px rgba(16, 35, 63, 0.3);
    overflow: hidden;
}
/* Scoped to [open], not plain .cookie-consent-dialog - a <dialog> is
   display:none by default (only the browser's own showModal()/show() adds
   [open] and switches that to block), so setting display here unconditionally
   would defeat that and leave the dialog sitting visible in the page's
   normal flow the whole time, open or not. */
.cookie-consent-dialog[open] { display: flex; flex-direction: column; }
.cookie-consent-dialog::backdrop { background: rgba(16, 35, 63, 0.55); }

.cookie-consent-header { display: flex; padding: 20px 24px 0; }
.cookie-consent-logo { display: flex; align-items: center; }

/* A real uploaded logo (resources/views/partials/cookie-consent.blade.php)
   is typically a wide wordmark, not a square - rendered at its own aspect
   ratio like the site header's own .site-logo img, not force-cropped into
   a circle. */
.cookie-consent-logo-image img { display: block; height: 36px; width: auto; max-width: 220px; }

/* Only the text-initials fallback (no logo uploaded yet) needs the circular
   badge treatment - there's no image to preserve the aspect ratio of. */
.cookie-consent-logo-fallback {
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--border);
    font-weight: 700;
    color: var(--navy);
    flex-shrink: 0;
}

.cookie-consent-tabs { display: flex; gap: 24px; padding: 14px 24px 0; border-bottom: 1px solid var(--border); margin-top: 8px; }
.cookie-consent-tab { background: none; border: none; padding: 0 0 12px; font-size: 0.95rem; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.cookie-consent-tab.active { color: var(--navy); border-bottom-color: var(--navy); }

.cookie-consent-panel { padding: 20px 24px; overflow-y: auto; }
.cookie-consent-panel h2 { margin: 0 0 10px; font-size: 1.15rem; color: var(--navy); }
.cookie-consent-panel p { margin: 0 0 14px; font-size: 0.92rem; line-height: 1.6; }
.cookie-consent-panel p:last-child { margin-bottom: 0; }

.cookie-category-list { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.cookie-category-row { display: flex; align-items: center; gap: 12px; }
.cookie-category-name, .cookie-detail-category-name { font-weight: 600; }

.cookie-detail-category { border-top: 1px solid var(--border); padding: 14px 0; }
.cookie-detail-category:first-child { border-top: none; padding-top: 0; }
.cookie-detail-category summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; list-style: none; }
.cookie-detail-category summary::-webkit-details-marker { display: none; }
.cookie-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 999px; background: var(--cream); color: var(--muted); font-size: 0.72rem; font-weight: 700; margin-left: 4px; }
.cookie-detail-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.cookie-detail-list li { background: var(--cream); border-radius: var(--radius); padding: 10px 14px; }
.cookie-detail-list li p { margin: 0 0 4px; font-size: 0.85rem; }
.cookie-detail-list li p:last-child { margin-bottom: 0; }
.cookie-detail-list li p.cookie-detail-name { font-size: 0.95rem; }
.cookie-detail-list li p.cookie-detail-name strong { display: inline; }

/* The switch itself - a hidden checkbox plus a styled sibling track, same
   technique as any plain CSS toggle switch. */
.cookie-toggle { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.cookie-toggle input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.cookie-toggle input:disabled { cursor: not-allowed; }
.cookie-toggle-track { position: absolute; inset: 0; background: #d8d4c8; border-radius: 999px; transition: background 0.15s ease; }
.cookie-toggle-track::before { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: var(--white); border-radius: 50%; transition: transform 0.15s ease; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.cookie-toggle input:checked + .cookie-toggle-track { background: var(--navy); }
.cookie-toggle input:checked + .cookie-toggle-track::before { transform: translateX(18px); }
.cookie-toggle input:disabled + .cookie-toggle-track { opacity: 0.6; }

.cookie-consent-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--border); background: var(--cream); }
.cookie-consent-actions .button { flex: 1; justify-content: center; min-width: 140px; }

.cookie-consent-fab {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 999;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--white);
    font-size: 1.3rem;
    box-shadow: 0 8px 20px rgba(16, 35, 63, 0.18);
    cursor: pointer;
}
.cookie-consent-fab:hover { background: var(--cream); }

.cookie-settings-dialog { padding: 24px; }
.cookie-settings-dialog h2 { margin: 0 0 14px; font-size: 1.1rem; color: var(--navy); }
.cookie-status-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.cookie-status-row { font-size: 0.9rem; }
.cookie-settings-dialog .cookie-consent-actions { margin: 0 -24px -24px; }

@media (max-width: 480px) {
    .cookie-consent-actions { flex-direction: column; }
    .cookie-consent-actions .button { width: 100%; }
}

/* -------------------------------------------------------------------- */
/* Admin shell                                                            */
/* -------------------------------------------------------------------- */

/* Locked to the viewport height, with the sidebar and the content area each
   scrolling independently (see .admin-content below) - otherwise a long
   page scrolls the sidebar away with it, and reaching "Log ud" etc. at the
   bottom means scrolling all the way down first. */
/* Admin status row(s) - a neutral, non-alert strip at the top of the
   content column (see admin/partials/_status-bar.blade.php), room left for
   more than one item so it can grow into a proper topbar later. */
.admin-status-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.admin-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 14px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 12px 20px;
    font-size: 0.88rem;
    color: var(--navy-text);
}
.admin-status-row .button { padding: 4px 14px; font-size: 0.8rem; flex-shrink: 0; }

.admin-shell { display: flex; height: 100vh; }

.admin-sidebar {
    width: 230px;
    flex-shrink: 0;
    height: 100vh;
    overflow-y: auto;
    background: var(--navy-deep);
    color: rgba(255,255,255,0.85);
    padding: 24px 18px;
    display: flex;
    flex-direction: column;
}

/* Mobile: the sidebar becomes an off-canvas panel toggled by the burger
   button, which otherwise stays hidden - see admin-sidebar.js. */
.admin-burger { display: none; }
.admin-sidebar-backdrop { display: none; }

@media (max-width: 900px) {
    .admin-burger {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        top: 14px;
        left: 14px;
        z-index: 40;
        width: 40px;
        height: 40px;
        border: none;
        border-radius: var(--radius);
        background: var(--navy-deep);
        color: var(--white);
        cursor: pointer;
    }
    .admin-burger svg { width: 20px; height: 20px; }

    .admin-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: 2px 0 16px rgba(0,0,0,0.3);
    }
    .admin-sidebar.open { transform: translateX(0); }

    .admin-sidebar-backdrop.open {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 45;
        background: rgba(0,0,0,0.4);
    }

    .admin-shell { display: block; }
}
.admin-sidebar .brand { color: var(--white); font-weight: 700; font-size: 1.1rem; text-decoration: none; margin-bottom: 28px; display: flex; justify-content: center; }
.admin-sidebar .brand span { color: var(--gold); }
.admin-sidebar .brand-logo { display: block; height: 32px; width: auto; max-width: 100%; }
.admin-nav { display: flex; flex-direction: column; gap: 4px; }
.admin-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.75);
    text-decoration: none;
    padding: 9px 12px;
    border-radius: var(--radius);
    font-size: 0.92rem;
}
.admin-nav a:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.admin-nav a.active { background: var(--gold); color: var(--navy-deep); font-weight: 600; }
.admin-nav a svg, .admin-nav-group summary svg { width: 17px; height: 17px; flex-shrink: 0; }
.admin-nav a span { flex: 1; }

/* Expandable sidebar group (a native <details>, no JS). */
.admin-nav-group summary {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: var(--radius);
    color: rgba(255,255,255,0.75);
    cursor: pointer;
    list-style: none;
    user-select: none;
}
.admin-nav-group summary span { flex: 1; }
.admin-nav-group summary::-webkit-details-marker { display: none; }
.admin-nav-group summary::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-right: 2px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.15s ease;
}
.admin-nav-group[open] summary::after { transform: rotate(-135deg); }
.admin-nav-group summary:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.admin-nav-group summary.in-section { color: var(--white); font-weight: 600; }
.admin-nav-sub { display: flex; flex-direction: column; gap: 4px; margin: 4px 0 6px 14px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,0.18); }

/* Collapsible sidebar categories (Indhold/Kommunikation/Organisation/
   Administration) - the toggle button's state is visual only; persistence
   and the actual collapse/expand is JS (admin-sidebar.js), so this stays
   functional even before JS runs (server renders the right initial class). */
.admin-nav-category { margin-top: 14px; }
.admin-nav-category-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    background: none;
    border: none;
    padding: 0 12px 6px;
    margin: 0;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.5);
    cursor: pointer;
}
.admin-nav-category-toggle:hover { color: rgba(255,255,255,0.75); }
.admin-nav-category-chevron { width: 12px; height: 12px; flex-shrink: 0; transition: transform 0.15s ease; }
.admin-nav-category-toggle[aria-expanded="false"] .admin-nav-category-chevron { transform: rotate(-90deg); }
.admin-nav-category-items { display: flex; flex-direction: column; gap: 4px; }
.admin-nav-category-items.collapsed { display: none; }
.admin-nav-category--bottom { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,0.15); }

.admin-nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 19px;
    height: 19px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--gold);
    color: var(--navy-deep);
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1;
}
.admin-nav a.active .admin-nav-badge { background: var(--navy-deep); color: var(--gold); }

.admin-sidebar .button.ghost {
    color: rgba(255,255,255,0.85);
    border-color: rgba(255,255,255,0.25);
}
.admin-sidebar .button.ghost:hover { background: rgba(255,255,255,0.08); color: var(--white); }

/* Profile / website / log out, pinned to the bottom of the sidebar as icons
   rather than taking up space in the main nav list. */
.admin-sidebar-bottom { margin-top: auto; padding-top: 10px; }
.admin-sidebar-icons { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; }
.admin-icon-form { display: contents; }
.admin-icon-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: rgba(255,255,255,0.75);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.admin-icon-link svg { width: 19px; height: 19px; }
.admin-icon-link:hover { background: rgba(255,255,255,0.08); color: var(--white); }
.admin-icon-link.active { background: var(--gold); color: var(--navy-deep); }
.admin-icon-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #e5484d;
    border: 1.5px solid var(--navy-deep);
}
.admin-sidebar-divider { border: none; border-top: 1px solid rgba(255,255,255,0.15); margin: 14px 4px 10px; }
.admin-version { display: block; text-align: center; font-size: 0.72rem; color: rgba(255,255,255,0.4); margin: 0; text-decoration: none; }
.admin-version:hover { color: rgba(255,255,255,0.7); text-decoration: underline; }

.admin-content { flex: 1; padding: 32px 40px; max-width: 1400px; height: 100vh; overflow-y: auto; }
.admin-content.wide { max-width: none; }

@media (max-width: 900px) {
    .admin-content { height: auto; padding-top: 72px; }
}

.admin-topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.admin-topbar h1 { margin: 0; }

.admin-table { width: 100%; border-collapse: collapse; background: var(--white); }
.admin-table th, .admin-table td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.admin-table th { color: var(--muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
.table-actions { display: flex; align-items: center; gap: 12px; }
.table-actions form { margin: 0; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.badge.published { background: var(--success-bg); color: var(--success); }
.badge.draft { background: var(--cream); color: var(--muted); }
.badge.scheduled { background: #e6eefb; color: #1d4f9a; }
.badge.sending { background: #fdecc8; color: #8a5a00; }
.badge.failed { background: var(--danger-bg); color: var(--danger); }
.badge.tag { background: var(--cream); color: var(--navy-text); border: 1px solid var(--border); margin: 0 4px 4px 0; }
.badge.role-admin { background: #fdecc8; color: #8a5a00; }
.badge.role-editor { background: var(--cream); color: var(--navy-text); }
.badge.type-storkreds { background: #e6eefb; color: #1d4f9a; }
.badge.type-lokalforening { background: var(--success-bg); color: var(--success); }
.badge.type-forretningsudvalg { background: #fdecc8; color: #8a5a00; }

/* Bestyrelsen -> Mailsetup: warns when an official address has neither a
   forward nor an account set up, so mail sent to it currently goes nowhere. */
.mailsetup-warning {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--danger);
    font-weight: 700;
    font-size: 0.82rem;
    text-decoration: none;
    white-space: nowrap;
}
.mailsetup-warning:hover { text-decoration: underline; }
.mailsetup-mode-toggle { display: flex; gap: 16px; margin-bottom: 10px; font-size: 0.88rem; }
.mailsetup-mode-toggle label { display: flex; align-items: center; gap: 6px; cursor: pointer; font-weight: 600; }
.mailsetup-mode-section { padding-top: 2px; }

.pagination { margin-top: 24px; }
.pagination-nav { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pagination-link { display: inline-flex; align-items: center; padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.85rem; color: var(--navy); background: var(--white); }
a.pagination-link:hover { background: var(--navy); border-color: var(--navy); color: var(--white); }
.pagination-link.current { background: var(--navy); border-color: var(--navy); color: var(--white); font-weight: 700; }
.pagination-link.disabled { color: var(--muted); cursor: default; }
.pagination-ellipsis { padding: 6px 4px; color: var(--muted); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 32px; }

/* Statistik (admin.analytics.index) - several report widgets side by side. */
.analytics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 20px; align-items: start; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px; min-width: 0; }
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; color: var(--navy); }
.stat-card .stat-label { color: var(--muted); font-size: 0.85rem; overflow-wrap: break-word; }

/* Newsletter admin: sub-navigation, panels, search, import report. */
.subnav { display: flex; flex-wrap: wrap; gap: 4px 20px; border-bottom: 1px solid var(--border); margin-bottom: 24px; }
.subnav a { padding: 10px 2px; color: var(--muted); text-decoration: none; font-weight: 600; font-size: 0.92rem; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.subnav a:hover { color: var(--navy); }
.subnav a.active { color: var(--navy); border-bottom-color: var(--gold); }
.subnav .count { display: inline-block; margin-left: 4px; padding: 1px 8px; border-radius: 999px; background: var(--cream); color: var(--muted); font-size: 0.75rem; }

.panel { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 20px 24px; margin-top: 32px; }
.panel h3 { margin-top: 0; }

/* Version (admin.versions.index / the "what's new" popup) */
.version-changes-list { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.version-changes-list li { display: flex; align-items: flex-start; gap: 8px; flex-wrap: wrap; }
.version-changes-list li .badge { flex-shrink: 0; margin-top: 2px; }
.version-changes-list li > span:last-child { flex: 1; min-width: 0; }
.version-changes-list li > form { margin-left: auto; }
.version-changes-list li > details { flex: 1; min-width: 0; }
.version-changes-list li > details > summary { cursor: pointer; display: flex; align-items: flex-start; gap: 8px; }
.version-changes-list li > details > summary > span:last-child { flex: 1; min-width: 0; }
.badge.version-addition { background: #e6eefb; color: #1d4f9a; }
.badge.version-minor { background: #fdecc8; color: #8a5a00; }
.badge.version-fix { background: var(--danger-bg); color: var(--danger); }
.version-dialog { border: none; border-radius: var(--radius-lg); padding: 28px; max-width: 920px; width: calc(100% - 40px); box-shadow: 0 20px 48px rgba(16, 35, 63, 0.25); }
.version-dialog::backdrop { background: rgba(16, 35, 63, 0.45); }
.version-dialog h2 { margin: 0 0 4px; }

/* Ticket admin: thread + reply on the left, audit log on the right. */
.ticket-layout { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 24px; align-items: start; }
@media (max-width: 900px) { .ticket-layout { grid-template-columns: 1fr; } }
.ticket-main .panel:first-child { margin-top: 0; }
.ticket-main .admin-table.narrow { width: auto; min-width: 0; max-width: 760px; }

/* "(?)" help buttons (see admin-help.js and its own doc comment for the
   markup pattern) - a small round icon, usually sitting top-right in an
   .admin-topbar (already a flex row with justify-content:space-between),
   revealing a dialog instead of a permanently-visible info box eating into
   the page's actual content width. */
.help-button {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--cream);
    color: var(--muted);
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
}
.help-button:hover { background: var(--border); color: var(--navy); }
.help-dialog { border: none; border-radius: var(--radius-lg); padding: 28px; max-width: 480px; width: calc(100% - 40px); box-shadow: 0 20px 48px rgba(16, 35, 63, 0.25); }
.help-dialog::backdrop { background: rgba(16, 35, 63, 0.45); }
.help-dialog h2 { margin: 0 0 12px; font-size: 1.1rem; }
.help-dialog p { margin: 0 0 12px; }
.help-dialog p:last-of-type { margin-bottom: 0; }

.ticket-thread { display: flex; flex-direction: column; gap: 14px; }
.ticket-message { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 20px; }
.ticket-message.outbound { background: var(--cream); }
.ticket-message.note { background: #fdecc8; border-color: #e8d4a0; }
.ticket-message-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 0.85rem; color: var(--muted); margin-bottom: 8px; }
.ticket-message-body { line-height: 1.6; word-wrap: break-word; }
.ticket-attachments { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.ticket-attachments a { color: var(--navy); font-weight: 600; text-decoration: none; }
.ticket-attachments a:hover { text-decoration: underline; }

.meeting-attachments-list { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.meeting-attachments-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.meeting-attachments-list a { color: var(--navy); font-weight: 600; text-decoration: none; }
.meeting-attachments-list a:hover { text-decoration: underline; }

.ticket-audit-log { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.ticket-audit-log li { font-size: 0.88rem; display: flex; flex-direction: column; gap: 2px; border-bottom: 1px solid var(--border); padding-bottom: 10px; }
.ticket-audit-log li:last-child { border-bottom: none; padding-bottom: 0; }
.ticket-audit-who { font-weight: 600; color: var(--navy); }
.ticket-audit-when { color: var(--muted); font-size: 0.78rem; }

.hits-chart { width: 100%; height: 140px; display: block; }
.hits-chart rect { fill: var(--navy); transition: fill 0.15s ease; }
.hits-chart rect:hover { fill: var(--gold); }
.hits-summary { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 14px; color: var(--muted); font-size: 0.9rem; }
.hits-summary strong { color: var(--navy); font-size: 1.15rem; }

.admin-search { display: flex; gap: 8px; margin-bottom: 20px; max-width: 420px; }
.admin-search input { flex: 1; padding: 10px 14px; border: 1px solid var(--border); border-radius: var(--radius); font: inherit; background: var(--white); }

/* Role sections in the elected-official form (ticking a box reveals its fields). */
.role-permission-grid { max-width: 420px; }
.role-permission-grid th:not(:first-child), .role-permission-grid td:not(:first-child) { text-align: center; width: 80px; }
.role-permission-grid input[type="checkbox"] { width: 18px; height: 18px; }

.role-block { border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 14px 18px; margin-bottom: 14px; background: var(--white); }
.role-block .checkbox-field { margin-bottom: 0; }
.role-fields { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.role-fields[hidden] { display: none; }

.import-result { margin: 0 0 8px; padding-left: 20px; }
.import-result li { margin-bottom: 4px; }

/* Shown above the public page when an editor previews a draft/unsaved article. */
.preview-banner { background: var(--gold); color: var(--navy-deep); text-align: center; padding: 10px 16px; font-weight: 600; font-size: 0.9rem; }

/* -------------------------------------------------------------------- */
/* Auth screens (login / password reset)                                 */
/* -------------------------------------------------------------------- */

.auth-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--navy-deep);
    padding: 24px;
}
.auth-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    width: 100%;
    max-width: 380px;
}
.auth-card h1 { font-size: 1.4rem; margin-bottom: 22px; }
.auth-card .auth-links { margin-top: 18px; font-size: 0.88rem; text-align: center; }

/* -------------------------------------------------------------------- */
/* Trix editor overrides (loads after trix.css, so wins)                 */
/* -------------------------------------------------------------------- */

trix-editor {
    min-height: 240px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 14px;
    font-family: var(--font);
    font-size: 0.95rem;
}
trix-toolbar { margin-bottom: 4px; }

.la-font-size-select {
    align-self: center;
    box-sizing: border-box;
    width: 110px;
    height: 28px;
    line-height: 26px;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: var(--white);
    color: var(--navy-text);
    font-size: 0.82rem;
    padding: 0 4px;
    margin: 0 4px;
}

/* Resizable/alignable images inserted into Trix (see
   public_html/js/trix-extensions.js) - editor-only chrome, never part of
   the saved/e-mailed HTML. Rendered as a single floating overlay attached
   to <body> and repositioned over whichever image is hovered, rather than
   appended inside the image's own wrapper - Trix re-renders an attachment's
   DOM straight from its saved content on every edit, which would silently
   wipe out any extra nodes appended inside it. */
.la-img-overlay {
    display: none;
    pointer-events: none;
    z-index: 50;
}
.la-img-controls {
    position: absolute;
    top: 6px;
    left: 6px;
    display: flex;
    gap: 2px;
    background: rgba(0, 41, 69, 0.85);
    border-radius: 6px;
    padding: 3px;
    pointer-events: auto;
}
.la-img-controls button {
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--white);
    cursor: pointer;
    font-size: 0.95rem;
    line-height: 1;
}
.la-img-controls button:hover { background: var(--gold); color: var(--navy-deep); }
.la-img-resize-handle {
    position: absolute;
    right: -7px;
    bottom: -7px;
    width: 14px;
    height: 14px;
    background: var(--gold);
    border: 2px solid var(--white);
    border-radius: 50%;
    cursor: nwse-resize;
    pointer-events: auto;
}

/* -------------------------------------------------------------------- */
/* Prose (article/policy/bio bodies)                                     */
/* -------------------------------------------------------------------- */

.prose { max-width: 760px; }
.prose p { margin: 0 0 1.2em; }
.prose h2, .prose h3 { margin-top: 1.4em; }
.prose img { border-radius: var(--radius); margin: 1em 0; }
.prose a { text-decoration: underline; }

/* -------------------------------------------------------------------- */
/* Misc                                                                   */
/* -------------------------------------------------------------------- */

.page-header { padding: 56px 0 8px; }
.page-header .eyebrow { color: var(--gold-dark); }

/* Article page: category kicker ("Politik:") over a slightly smaller title, date underneath. */
.article-header .eyebrow { font-size: 0.9rem; margin-bottom: 0.3em; }
.article-header h1 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: 0.3em; }
.article-header .article-date { color: var(--muted); font-size: 0.9rem; margin: 0.6em 0 0; }

.filter-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filter-bar a {
    display: inline-block;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    text-decoration: none;
    color: var(--navy-text);
    font-size: 0.88rem;
}
.filter-bar a.active { background: var(--navy); color: var(--white); border-color: var(--navy); }

.empty-state { color: var(--muted); padding: 32px 0; }

/* 404 / 403 (resources/views/errors/) - deliberately standalone, not
   extending layouts/app or layouts/admin, since an error can happen in
   either context and this needs to look right (and work) in both. */
.error-page-body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--cream);
    font-family: var(--font);
}
.error-page { max-width: 440px; padding: 48px 32px; text-align: center; }
.error-code { margin: 0; font-size: 1rem; font-weight: 700; letter-spacing: 0.08em; color: var(--gold-dark); }
.error-page h1 { margin: 8px 0 12px; color: var(--navy); }
.error-page p:not(.error-code) { color: var(--muted); line-height: 1.6; }
.error-actions { margin-top: 28px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* Webmail (resources/views/webmail/, layouts/webmail.blade.php) - a small,
   standalone shell, not the admin panel or the public site. */
.webmail-body { margin: 0; background: var(--cream); font-family: var(--font); color: var(--navy-text); }
.webmail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--navy-deep);
    color: var(--white);
    padding: 14px 24px;
}
.webmail-header .brand { color: var(--white); font-weight: 700; text-decoration: none; display: flex; align-items: center; }
.webmail-header .brand span { color: var(--gold); }
.webmail-header .brand-logo { display: block; height: 26px; width: auto; max-width: 100%; }
.webmail-title { color: rgba(255,255,255,0.6); font-size: 0.9rem; }
.webmail-header-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.webmail-account { font-size: 0.88rem; color: rgba(255,255,255,0.8); }
.webmail-header .button.ghost { color: rgba(255,255,255,0.85); border-color: rgba(255,255,255,0.3); padding: 6px 14px; font-size: 0.85rem; }

.webmail-main { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }

.webmail-login-card { max-width: 380px; margin: 60px auto; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; }
.webmail-login-card h1 { margin-top: 0; }
.webmail-login-email { display: flex; align-items: center; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.webmail-login-email input { border: none; flex: 1; min-width: 0; padding: 10px 12px; font: inherit; }
.webmail-login-email input:focus { outline: none; }
.webmail-login-email span { padding: 10px 12px; background: var(--cream); color: var(--muted); font-size: 0.9rem; white-space: nowrap; }

/* min-height gives align-items:stretch something to actually stretch
   against when the message list is short (an empty/near-empty inbox) - a
   grid row otherwise only ever grows to fit its tallest cell's own content,
   so without this .webmail-sidebar-bottom's margin-top:auto below has
   nowhere to push to and just sits right under the folder list instead of
   at the bottom of the page. */
.webmail-layout { display: grid; grid-template-columns: 200px 1fr; gap: 28px; align-items: stretch; min-height: calc(100vh - 220px); }
@media (max-width: 720px) { .webmail-layout { grid-template-columns: 1fr; min-height: 0; } }
.webmail-sidebar { display: flex; flex-direction: column; }
.webmail-folders { display: flex; flex-direction: column; gap: 2px; }
.webmail-folders a { padding: 8px 10px; border-radius: var(--radius); color: var(--navy-text); text-decoration: none; font-size: 0.92rem; }
.webmail-folders a:hover { background: var(--cream); }
.webmail-folders a.active { background: var(--navy); color: var(--white); }
.webmail-unread td { font-weight: 700; }

/* Pinned to the bottom of the sidebar column, same idea as the admin
   shell's own .admin-sidebar-bottom - Lagerplads/Opsætningsguide stay put
   at the bottom regardless of how many folders a mailbox has. The top
   border visually separates it from the folder list above it, and the
   muted/smaller link style keeps Opsætningsguide reading as a utility link
   rather than another folder in that list. */
.webmail-sidebar-bottom { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--border); }
.webmail-setup-guide-link { display: block; padding: 6px 10px; border-radius: var(--radius); color: var(--muted); text-decoration: none; font-size: 0.85rem; }
.webmail-setup-guide-link:hover { background: var(--cream); color: var(--navy-text); }

.webmail-quota { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--border); font-size: 0.78rem; }
.webmail-quota-label { display: flex; justify-content: space-between; color: var(--muted); margin-bottom: 4px; }
.webmail-quota-bar { height: 6px; border-radius: 999px; background: var(--cream); overflow: hidden; }
.webmail-quota-fill { height: 100%; background: var(--gold); border-radius: 999px; }
.webmail-quota-amount { margin: 6px 0 0; color: var(--muted); }

.webmail-bulk-bar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; padding: 10px 14px; background: var(--cream); border-radius: var(--radius); }
.webmail-bulk-bar select { padding: 6px 10px; }

.webmail-message-frame { width: 100%; height: 65vh; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--white); }

/* OpsÃ¦tningsguide (webmail/setup-guide.blade.php) - each mail-client guide
   is a plain click-to-expand card, no drag/edit involved. */
.guide-platform { display: flex; flex-direction: column; gap: 10px; }
.guide-card { border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--white); overflow: hidden; }
.guide-card-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: none;
    border: none;
    font: inherit;
    font-weight: 600;
    color: var(--navy);
    text-align: left;
    cursor: pointer;
}
.guide-card-toggle { font-weight: 400; font-size: 0.85rem; color: var(--muted); }
.guide-card-body { display: none; padding: 0 18px 18px; border-top: 1px solid var(--border); }
.guide-card.expanded .guide-card-body { display: block; padding-top: 16px; }
.guide-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 18px; }
.guide-steps li p { margin: 0 0 8px; }
.guide-steps img { max-width: 100%; width: 360px; border: 1px solid var(--border); border-radius: var(--radius); display: block; }

