:root {
    --ink: #0e2b47;          /* deep navy for header / hero / footer / banner */
    --ink-2: #143a5e;        /* slightly lighter navy for gradients */
    --navy: #1B4E8C;
    --blue: #1F5FA6;
    --lightblue: #5BA3D0;
    --teal: #2a9d8f;         /* brand teal accent (buttons, links, eyebrows) */
    --teal-dark: #23867a;
    --bg: #EEF3F9;
    --surface: #ffffff;
    --text: #1A2230;
    --muted: #5E748F;
    --border: #d9e2ee;
    --radius: 6px;
    --radius-lg: 10px;
    --maxw: 1240px;
    --stripes: repeating-linear-gradient(135deg, rgba(255,255,255,0.05) 0 1px, transparent 1px 13px);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 2rem 1.25rem; }
.narrow { max-width: 440px; }
/* Info/article pages — same width as the front page; magazine-style columns */
.article-page { max-width: var(--maxw); }
.page-hero { margin-bottom: 1.25rem; }
.page-hero .eyebrow { margin-bottom: 0.4rem; }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 0; letter-spacing: -0.5px; }
.page-hero .page-date { display: block; color: var(--muted); font-size: 0.9rem; margin-top: 0.3rem; }
.article-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 6px 22px rgba(14,43,71,0.05); padding: 2.75rem 3rem; }
.article-card .content { font-size: 1.02rem; line-height: 1.72; color: #26333f; }
.article-card .content > :first-child { margin-top: 0; }
.article-card .content p { margin: 0 0 1.05rem; }
.article-card .content p:last-child { margin-bottom: 0; }
.article-card .content h2 { color: var(--text); font-size: 1.5rem; letter-spacing: -0.3px; margin: 2rem 0 1rem; }
.article-card .content h3 { font-size: 1.12rem; color: var(--navy); margin: 1.7rem 0 0.4rem; }
.article-card .content h4 { font-size: 1rem; color: var(--navy); margin: 1.2rem 0 0.3rem; }
.article-card .content ul, .article-card .content ol { margin: 0 0 1.05rem; padding-left: 1.25rem; }
.article-card .content li { margin-bottom: 0.35rem; }
.article-card .content img { border-radius: 10px; margin: 1.25rem 0; max-width: 100%; height: auto; }
.article-card .content a { color: var(--blue); border-bottom: 1px solid rgba(31,95,166,0.3); }
.article-card .content a:hover { border-bottom-color: currentColor; text-decoration: none; }

/* Legacy pages: automatic multi-column flow */
.content-flow { column-width: 18.5rem; column-gap: 2.5rem; column-rule: 1px solid var(--border); }
.content-flow > :first-child { margin-top: 0; }
.content-flow h2 { column-span: all; padding-top: 1.9rem; border-top: 1px solid var(--border); margin-top: 2.25rem; }
.content-flow > h2:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.content-flow p, .content-flow ul, .content-flow ol, .content-flow li { break-inside: avoid; }
.content-flow img, .content-flow .board-block { column-span: all; }
@media (max-width: 720px) { .content-flow { column-width: auto; columns: 1; column-rule: none; } }

/* New pages: explicit sections with 1–3 columns */
.pg-section { margin: 0 0 1.75rem; }
.pg-section:last-child { margin-bottom: 0; }
.pg-cols-2, .pg-cols-3 { display: grid; gap: 0; align-items: stretch; }
.pg-cols-2 { grid-template-columns: 1fr 1fr; }
.pg-cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.pg-col > :first-child { margin-top: 0; }
/* Alternating full-height accent stripe. Spacing comes from padding (no gap),
   so the tint fills the whole column edge-to-edge instead of a pinched box. */
.pg-cols-2 > .pg-col, .pg-cols-3 > .pg-col { padding: 1.4rem 1.9rem; }
.pg-cols-2 > .pg-col:first-child, .pg-cols-3 > .pg-col:first-child { padding-left: 0; }
.pg-cols-2 > .pg-col:last-child, .pg-cols-3 > .pg-col:last-child { padding-right: 0; }
.pg-cols-2 > .pg-col + .pg-col, .pg-cols-3 > .pg-col + .pg-col { border-left: 1px solid var(--border); }
@media (max-width: 820px) {
    .pg-cols-2, .pg-cols-3 { grid-template-columns: 1fr; }
    .pg-cols-2 > .pg-col, .pg-cols-3 > .pg-col,
    .pg-cols-2 > .pg-col:first-child, .pg-cols-3 > .pg-col:first-child,
    .pg-cols-2 > .pg-col:last-child, .pg-cols-3 > .pg-col:last-child { padding: 1rem 1.15rem; }
    .pg-cols-2 > .pg-col + .pg-col, .pg-cols-3 > .pg-col + .pg-col { border-left: none; }
}
@media (max-width: 720px) { .article-card { padding: 1.6rem 1.4rem; } }

/* Dynamic board block ([[styrelse]]) — full-width bordered "field" */
.article-card .content .board-block { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 1.5rem 1.75rem; margin: 1.5rem 0; }
.board-block .board-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; margin: 0; }
.board-member { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.15rem; break-inside: avoid; }
.board-member .bm-role { color: var(--teal-dark); font-weight: 700; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.6px; }
.board-member .bm-name { font-weight: 700; font-size: 1.05rem; margin: 0.15rem 0 0.35rem; }
.board-member .bm-line { font-size: 0.9rem; color: var(--muted); line-height: 1.4; }
.board-member a { color: var(--blue); }

/* Board role badge in member list */
.tag-board { background: var(--teal); color: #fff; margin-left: 4px; }
.center { text-align: center; }
.muted { color: var(--muted); }

/* Header — light, minimal */
.site-header {
    color: var(--text);
    /* Soft teal→blue wash + a slim gradient accent stripe along the very top. */
    background:
        linear-gradient(90deg, var(--teal), var(--blue)) top / 100% 3px no-repeat,
        linear-gradient(180deg, #f2f8f6, #eef4fb);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 1rem 1.25rem 0.7rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}
/* Logo + tagline stacked and centred above the menu (matches the classic site). */
.brand { display: flex; flex-direction: column; align-items: center; gap: 8px; color: var(--text); text-align: center; }
.brand:hover { text-decoration: none; }
.brand-logo { height: 88px; width: auto; max-width: 220px; object-fit: contain;
    transition: transform 0.25s ease; }
.brand:hover .brand-logo { transform: scale(1.03); }
.brand-tagline { font-size: 1rem; color: var(--teal-dark); letter-spacing: 0.3px; font-weight: 600; }

.main-nav { display: flex; align-items: center; justify-content: center; gap: 1.65rem; flex-wrap: wrap; }
.main-nav a { color: var(--muted); font-weight: 500; font-size: 0.9rem; }
.main-nav a:hover { color: var(--text); text-decoration: none; }
.nav-cta { color: var(--muted); }
.nav-nem { color: var(--teal); font-weight: 700; }
.nav-nem:hover { color: var(--teal-dark); text-decoration: none; }

/* Clearer top menu: darker info-page links with a teal hover/active underline,
   and a subtle divider before the account/language links. */
.main-nav .nav-page { position: relative; color: var(--ink); font-weight: 600; font-size: 0.95rem;
    padding: 4px 1px; transition: color 0.15s ease; }
/* Underline grows out from the centre on hover / for the active page. */
.main-nav .nav-page::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
    background: var(--teal); border-radius: 2px;
    transform: scaleX(0); transform-origin: center;
    transition: transform 0.2s ease;
}
.main-nav .nav-page:hover { color: var(--navy); text-decoration: none; }
.main-nav .nav-page:hover::after,
.main-nav .nav-page.is-active::after { transform: scaleX(1); }
.main-nav .nav-page.is-active { color: var(--navy); }
.nav-sep { width: 1px; height: 18px; background: var(--border); margin: 0 0.2rem; display: inline-block; }
.nav-login { color: var(--muted); font-weight: 600; }
.nav-login:hover { color: var(--text); }
.nav-files { color: var(--muted); font-weight: 600; }
.nav-files:hover { color: var(--text); }
.lang-switch {
    border: 1px solid var(--border); border-radius: 6px;
    padding: 4px 9px; font-size: 0.78rem; color: var(--muted) !important;
}
.lang-switch:hover { border-color: var(--teal); text-decoration: none; }
.inline-form { display: inline; margin: 0; }
/* Logout sits far right, visually separated from the rest of the nav. */
.nav-logout { margin-left: 0.4rem; padding-left: 1.15rem; border-left: 1px solid var(--border); }
.linklike {
    background: none; border: none; color: var(--muted); cursor: pointer;
    font: inherit; font-weight: 600; font-size: 0.9rem; padding: 0;
}
.linklike:hover { color: var(--teal); text-decoration: none; }

/* Hero — full-bleed photo behind a legibility scrim.
   Swap the image by replacing /public/img/hero.jpg, or by changing the
   --hero-image url set inline on the .hero element in home.php. */
.hero {
    --hero-image: none;
    color: #fff;
    position: relative;
    overflow: hidden;
    min-height: 560px;
    display: flex; align-items: flex-end;
    background-color: var(--ink);
    background-image:
        linear-gradient(90deg, rgba(8,24,40,0.94) 0%, rgba(8,24,40,0.62) 44%, rgba(8,24,40,0.12) 100%),
        linear-gradient(0deg, rgba(8,24,40,0.85) 0%, rgba(8,24,40,0) 55%),
        var(--hero-image);
    background-size: cover, cover, cover;
    background-position: center, center, center;
    background-repeat: no-repeat;
}
.hero-inner {
    position: relative;
    max-width: var(--maxw); width: 100%;
    margin: 0 auto; padding: 2.5rem 1.5rem 3rem;
}
.hero-inner h1 { font-size: clamp(3.5rem, 12vw, 8rem); margin: 0; line-height: 0.9; letter-spacing: 1px; font-weight: 800; }
.hero-inner .hero-tagline { margin: 1rem 0 0; font-size: clamp(1rem, 2.5vw, 1.5rem); font-weight: 600; }
.hero-inner .hero-sub { margin: 0.15rem 0 0; font-size: clamp(0.85rem, 2vw, 1.05rem); color: #9fb6cf; }

/* Home sections */
.eyebrow { display: block; color: var(--teal); font-size: 0.78rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 0.6rem; }

.om-row { display: grid; grid-template-columns: 1.6fr 1fr; gap: 2.5rem; align-items: start; }
.om-main h2 { font-size: 1.7rem; color: var(--text); margin: 0 0 1rem; line-height: 1.3; font-weight: 700; }
.om-main p { font-size: 1.05rem; margin: 0 0 1rem; }
.arrow-link { display: inline-block; font-weight: 700; color: var(--navy); border-bottom: 2px solid var(--teal); padding-bottom: 2px; }
.arrow-link:hover { text-decoration: none; color: var(--teal-dark); }

.aktuellt-card { background: #e9f3f1; border-radius: var(--radius-lg); padding: 1.6rem 1.75rem; }
.aktuellt-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.aktuellt-head h2 { margin: 0; font-size: 1.4rem; color: var(--text); }
.aktuellt-date { font-size: 0.82rem; color: var(--muted); white-space: nowrap; }
.aktuellt-card .news-eyebrow { color: var(--teal); font-size: 0.72rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; margin: 1.1rem 0 0.4rem; }
.aktuellt-card .news-headline { font-weight: 700; font-size: 1.05rem; margin: 0 0 0.5rem; color: var(--text); }
.aktuellt-card p { margin: 0.2rem 0; color: var(--muted); }

/* NEM banner */
.nem-banner {
    position: relative; overflow: hidden;
    background: linear-gradient(150deg, var(--ink), var(--ink-2));
    color: #fff; border-radius: var(--radius-lg);
    padding: 0.9rem 1.5rem;
    display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; flex-wrap: wrap;
}
.nem-banner::before { content: ""; position: absolute; inset: 0; background: var(--stripes); pointer-events: none; }
.nem-banner > * { position: relative; }
.nem-banner .eyebrow { color: var(--teal); margin-bottom: 0.1rem; font-size: 0.7rem; }
.nem-banner h2 { margin: 0 0 0.15rem; font-size: 1.1rem; }
.nem-banner p { margin: 0; color: #c4d4e6; max-width: 520px; font-size: 0.83rem; }
.nem-banner .btn-teal { padding: 8px 18px; }
.nem-banner .btn-teal { flex-shrink: 0; }

.btn-teal { display: inline-block; background: var(--teal); color: #fff; padding: 12px 26px; border-radius: var(--radius); font-weight: 600; border: none; cursor: pointer; font: inherit; }
.btn-teal:hover { background: var(--teal-dark); text-decoration: none; color: #fff; }

/* A link to the map inside article content renders as a prominent button.
   Targets the href (not a class) so it survives WYSIWYG editing. */
.article .content a[href="/karta"] {
    display: inline-flex; align-items: center; gap: 0.55rem;
    background: var(--teal); color: #fff;
    padding: 0.8rem 1.5rem; border-radius: var(--radius);
    font-weight: 700; font-size: 1.02rem; line-height: 1.2;
    box-shadow: 0 4px 14px rgba(42,157,143,0.25);
    transition: background .15s, transform .15s, box-shadow .15s;
    margin: 0.4rem 0;
}
.article .content a[href="/karta"]:hover {
    background: var(--teal-dark); color: #fff; text-decoration: none;
    transform: translateY(-1px); box-shadow: 0 7px 20px rgba(42,157,143,0.32);
}

/* Feature cards */
.cards-eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .75rem; font-weight: 700;
    color: var(--muted); margin: 0 0 .9rem; }
.feature-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem; }
.feature-card { display: block; background: #fff; border: 1px solid var(--border); border-top: 3px solid var(--cat, var(--teal)); border-radius: var(--radius-lg); padding: 1.5rem; color: inherit; transition: box-shadow .15s, border-color .15s, transform .15s; }
.feature-card:hover { text-decoration: none; border-color: var(--cat, var(--teal)); box-shadow: 0 6px 22px rgba(14,43,71,0.10); transform: translateY(-2px); }
.feature-card .fc-icon { color: var(--cat, var(--teal)); font-size: 1.3rem; line-height: 1; margin-bottom: 0.9rem; }
.fc-owner { --cat: var(--teal); }
.fc-org   { --cat: var(--blue); }
.feature-card h3 { margin: 0 0 0.4rem; color: var(--text); font-size: 1.1rem; }
.feature-card p { margin: 0; color: var(--muted); font-size: 0.92rem; }

/* ===== Minimal editorial home — hero as one connected panel ===== */
.hero-wrap { max-width: var(--maxw); margin: 0 auto; padding: 1.5rem 1.5rem 0; }
/* Two separate, equal-height cards with a small gap between them. */
.hero-panel { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 1rem; align-items: stretch; }
.hero-copy, .hero-news {
    background: #fff; border: 1px solid var(--border); border-radius: 12px;
    box-shadow: 0 6px 22px rgba(14,43,71,0.05);
    display: flex; flex-direction: column; justify-content: center;
}
.hero-copy { padding: 2.25rem; }
.hero-copy .accent { width: 56px; height: 4px; background: var(--teal); border-radius: 2px; margin-bottom: 1.1rem; }
.hero-copy .hero-eyebrow { color: var(--teal); font-weight: 700; letter-spacing: 1px; font-size: 0.78rem; text-transform: uppercase; }
.hero-copy h1 { font-size: clamp(2.1rem, 4.6vw, 3.2rem); line-height: 1.05; margin: 0.7rem 0 1rem; letter-spacing: -0.5px; }
.hero-copy p { color: var(--muted); max-width: 440px; margin: 0 0 1.3rem; font-size: 1.05rem; }

/* Aktuellt card */
.hero-news { padding: 2rem; }
.hero-news-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.05rem; }
.hero-news-head .section-title { font-size: 1.4rem; }
.hero-news-head .arrow-link { font-size: 0.8rem; border: none; color: var(--muted); font-weight: 600; padding: 0; }
.hero-news-head .arrow-link:hover { color: var(--teal-dark); }
.hn-feature { padding-bottom: 1.05rem; margin-bottom: 0.3rem; border-bottom: 1px solid var(--border); }
.hn-feature .nf-date { color: var(--teal-dark); font-weight: 700; font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.5px; }
.hn-feature h3 { font-size: 1.18rem; line-height: 1.25; margin: 0.35rem 0 0.5rem; }
.hn-feature p { color: var(--muted); margin: 0 0 0.7rem; font-size: 0.93rem; }
.hero-news .news-item { border: none; background: transparent; border-radius: 0; padding: 0.55rem 0; border-top: 1px solid var(--border); }
.hero-news .news-item:first-of-type { border-top: none; }
.hero-news .news-item:hover { box-shadow: none; }

/* Prominent Aktuellt / news section (full-bleed tinted band) */
.band-teal { background: #e9f4f1; }
.news-section .section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.section-title { font-size: 1.9rem; margin: 0; letter-spacing: -0.3px; }
.section-title .dot { color: var(--teal); }
.news-feature-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 1.5rem; align-items: start; }
.news-feature-grid.single { grid-template-columns: 1fr; max-width: 760px; }
.news-feature {
    background: #fff; border-radius: 18px; padding: 2rem 2.2rem;
    border-left: 5px solid var(--teal); box-shadow: 0 10px 30px rgba(14,43,71,0.07);
}
.news-feature .nf-date { color: var(--teal-dark); font-weight: 700; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
.news-feature h3 { font-size: 1.55rem; line-height: 1.2; margin: 0.5rem 0 0.7rem; }
.news-feature p { color: var(--muted); margin: 0 0 1.2rem; }
.news-side { display: flex; flex-direction: column; gap: 0.9rem; }
.news-item { display: block; background: #fff; border-radius: 12px; padding: 1.05rem 1.25rem; text-decoration: none; color: inherit; border: 1px solid var(--border); transition: border-color .15s, box-shadow .15s; }
.news-item:hover { border-color: var(--teal); box-shadow: 0 6px 18px rgba(14,43,71,0.08); text-decoration: none; }
.news-item .ni-date { display: block; color: var(--muted); font-size: 0.76rem; margin-bottom: 2px; }
.news-item strong { font-weight: 600; color: var(--text); }
.news-empty { color: var(--muted); }

/* Two column (legacy) */
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 2rem; }
.lead { font-size: 1.1rem; }
.col-side h2 { color: var(--navy); font-size: 1.15rem; border-bottom: 2px solid var(--teal); padding-bottom: 6px; }
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li { padding: 0.6rem 0; border-bottom: 1px solid var(--border); }
.news-date { display: block; font-size: 0.75rem; color: var(--muted); }
.news-title { font-weight: 500; }

/* Forms */
.form label { display: block; margin-bottom: 1rem; font-weight: 500; }
.form input {
    display: block; width: 100%; margin-top: 4px; padding: 10px 12px;
    border: 1px solid var(--border); border-radius: var(--radius); font: inherit;
    background: var(--surface);
}
.form input:focus { outline: 2px solid var(--lightblue); border-color: var(--blue); }
.btn {
    display: inline-block; padding: 10px 20px; border-radius: var(--radius);
    border: none; font: inherit; font-weight: 500; cursor: pointer;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--navy); text-decoration: none; }
.alert { padding: 10px 14px; border-radius: var(--radius); margin-bottom: 1rem; }
.alert-error { background: #fdecec; color: #a12a2a; border: 1px solid #f5c2c2; }

/* Footer */
.site-footer {
    background: var(--ink); color: #9fb6cf; margin-top: 3rem;
    font-size: 0.85rem;
}
.footer-inner {
    max-width: var(--maxw); margin: 0 auto; padding: 1.5rem 1.5rem;
    display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
}
.footer-links a { color: #9fb6cf; }
.footer-links a:hover { color: #fff; }

/* Home section wrapper */
.home-section { max-width: var(--maxw); margin: 0 auto; padding: 2.25rem 1.5rem; }
.home-section.tight { padding-top: 2rem; padding-bottom: 2.25rem; }
/* Top NEM banner sits close to the hero below it. */
.home-section.nem-top { padding-top: 1.25rem; padding-bottom: 0; }
.nem-top + .hero-wrap { padding-top: 1rem; }

/* Buttons, tags, misc */
.btn-small { padding: 5px 12px; font-size: 0.85rem; background: #fff; border: 1px solid var(--border); color: var(--navy); }
.btn-small:hover { background: var(--bg); text-decoration: none; }
.btn-link { color: var(--blue); margin-left: 8px; }
.btn-danger { background: #fff; border: 1px solid #f0b7b7; color: #a12a2a; }
.btn-danger:hover { background: #fdecec; text-decoration: none; }
.danger-zone { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px dashed var(--border); display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 0.75rem; background: var(--bg); color: var(--navy); }
.tag-ok, .tag-approved { background: #e2f5ee; color: #0d7a5f; }
.tag-warn, .tag-pending { background: #fdf2dd; color: #8a5a00; }
.tag-rejected { background: #fdecec; color: #a12a2a; }
.alert-success { background: #e2f5ee; color: #0d7a5f; border: 1px solid #b6e3d2; }
.alert-info { background: #e6f1fb; color: #1b4e8c; border: 1px solid #bcd8f2; }
.flash-wrap { padding-top: 1rem; }

/* Cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.card { display: block; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.1rem 1.25rem; color: inherit; }
a.card:hover { border-color: var(--lightblue); text-decoration: none; box-shadow: 0 2px 10px rgba(27,78,140,0.08); }
.card h3 { margin: 0 0 6px; color: var(--navy); }
.card-accent { border-left: 4px solid var(--teal); }

/* Doc/news/event lists */
.doc-list, .event-list { list-style: none; padding: 0; }
.doc-list li, .event-list li { padding: 0.6rem 0; border-bottom: 1px solid var(--border); display: flex; justify-content: space-between; gap: 1rem; }
.news-entry { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.news-entry h2 { margin: 4px 0 0; font-size: 1.2rem; }
.article .content { font-size: 1.05rem; }
.article .content img { max-width: 100%; height: auto; }
.event-date { color: var(--teal); font-weight: 500; }

/* Page head + tables */
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.page-head > h1, .page-head > h2, .page-head > h3 { margin: 0; }
.data-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.data-table th, .data-table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); font-size: 0.92rem; }
.data-table th { background: var(--bg); color: var(--navy); font-weight: 600; }
.data-table tr:last-child td { border-bottom: none; }
.filter-bar { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }

/* Forms extra */
.form-wide { max-width: 900px; }
.form-wide textarea, .form-wide input, .form select { width: 100%; padding: 9px 11px; border: 1px solid var(--border); border-radius: var(--radius); font: inherit; }
.form select { background: #fff; }
.form-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.form-row label { flex: 1; min-width: 160px; }
.lang-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.lang-cols fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; }
.lang-cols legend { color: var(--navy); font-weight: 600; padding: 0 6px; }
.check { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.check input { width: auto; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.25rem 0; }
.role-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 6px 0; border-bottom: 1px solid var(--border); }
.visibility { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin: 1rem 0; }
.visibility legend { font-weight: 600; color: var(--navy); }

/* Admin shell */
.admin { background: #f3f6fa; }
.admin-shell { display: flex; min-height: 100vh; }
.admin-sidebar { width: 220px; background: var(--navy); color: #dbe6f4; display: flex; flex-direction: column; padding: 1rem 0; flex-shrink: 0; }
.admin-brand { display: flex; align-items: center; gap: 8px; color: #fff; padding: 0 1.25rem 1rem; font-weight: 600; }
.admin-brand img { height: 30px; filter: brightness(0) invert(1); }
.admin-nav { display: flex; flex-direction: column; }
.admin-nav a { color: #cdddf0; padding: 10px 1.25rem; }
.admin-nav a:hover { background: rgba(255,255,255,0.08); text-decoration: none; }
.admin-nav a.is-active { background: var(--blue); color: #fff; }
.admin-sidebar-foot { margin-top: auto; padding: 1rem 1.25rem 0; display: flex; flex-direction: column; gap: 8px; font-size: 0.85rem; }
.admin-sidebar-foot a, .admin-sidebar-foot .linklike { color: #cdddf0; }
.admin-main { flex: 1; padding: 1.75rem 2rem; max-width: 1100px; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1rem; margin: 1.25rem 0; }
.stat { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; }
.stat-num { display: block; font-size: 2rem; font-weight: 700; color: var(--navy); }
.stat-label { color: var(--muted); font-size: 0.85rem; }
.notif-list { list-style: none; padding: 0; }
.notif { display: flex; align-items: center; gap: 1rem; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 0.75rem 1rem; margin-bottom: 8px; }
.notif-type { font-size: 0.7rem; text-transform: uppercase; padding: 2px 8px; border-radius: 12px; background: var(--bg); color: var(--navy); }
.notif-msg { flex: 1; }
.notif-actions { display: flex; gap: 6px; }
.split { display: grid; grid-template-columns: 1fr 300px; gap: 2rem; }

/* Integrated admin: site header + this sub-bar (no separate dark shell) */
.admin-bar { background: #eaf1fa; border-bottom: 1px solid var(--border); }
.admin-bar-inner { max-width: var(--maxw); margin: 0 auto; padding: 0.55rem 1.5rem; display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.admin-bar-title { font-weight: 800; color: var(--navy); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 1.5px; }
.admin-bar-nav { display: flex; gap: 1.15rem; flex-wrap: wrap; }
.admin-bar-nav a { color: var(--muted); font-weight: 500; font-size: 0.9rem; padding: 2px 0; }
.admin-bar-nav a:hover { color: var(--text); text-decoration: none; }
.admin-bar-nav a.is-active { color: var(--teal-dark); border-bottom: 2px solid var(--teal); }
.admin-content { max-width: var(--maxw); margin: 0 auto; padding: 1.9rem 1.5rem 3rem; }
.admin-content h1 { margin-top: 0.2rem; }

/* Members accordion (click a row to edit inline) */
.member-acc { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; margin-top: 1rem; }
.macc-head, .macc-sum { display: grid; grid-template-columns: 1.6fr 2.4fr 0.9fr 1.2fr 22px; gap: 1rem; align-items: center; padding: 0.7rem 1.25rem; }
.macc-head { background: var(--bg); font-weight: 600; color: var(--navy); font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.3px; border-bottom: 1px solid var(--border); }
.macc { border-bottom: 1px solid var(--border); }
.macc:last-child { border-bottom: none; }
.macc-sum { cursor: pointer; list-style: none; }
.macc-sum::-webkit-details-marker { display: none; }
.macc-sum::after { content: '⌄'; color: var(--muted); justify-self: end; font-size: 1.1rem; line-height: 1; }
.macc[open] > .macc-sum { background: #eef4fb; }
.macc[open] > .macc-sum::after { content: '⌃'; }
.macc-sum:hover { background: #f6f9fd; }
.mc-name { font-weight: 600; }
.mc-email { color: var(--muted); font-size: 0.9rem; word-break: break-all; }
.macc-body { padding: 1.25rem 1.5rem 1.5rem; background: #fbfcfe; border-top: 1px solid var(--border); }
.macc-body .panel { background: #fff; margin: 1rem 0 0; }
.macc-body h4 { margin: 0 0 0.6rem; color: var(--navy); font-size: 1rem; }
.pwd-reset { display: block; margin: 0.4rem 0 0; }
.coord { font-size: 0.8rem; }
@media (max-width: 760px) {
    .macc-head { display: none; }
    .macc-sum { grid-template-columns: 1fr auto 22px; }
    .mc-email, .mc-role { display: none; }
}

/* Admin "edit this page" button on public pages */
.admin-edit-hint { display: flex; justify-content: flex-end; margin: -0.5rem 0 1rem; }
.nowrap { white-space: nowrap; }

/* Member area */
.member-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 1.5rem; align-items: stretch; margin-top: 1.25rem; }
.member-actions { display: flex; flex-direction: column; gap: 1rem; }
.member-actions .card { flex: 1 1 0; display: flex; flex-direction: column; justify-content: center; }
.member-docs .doc-list a { font-weight: 500; }
@media (max-width: 900px) {
    .member-grid { grid-template-columns: 1fr; }
    .member-actions .card { flex: 0 0 auto; justify-content: flex-start; }
}

/* Inline graphical edit mode (admins) */
.inline-edit-bar { position: fixed; bottom: 1.1rem; left: 50%; transform: translateX(-50%); z-index: 1200; background: var(--ink); color: #fff; border-radius: 10px; box-shadow: 0 10px 34px rgba(0,0,0,0.3); padding: 0.5rem 0.6rem; display: flex; align-items: center; gap: 0.5rem; }
.inline-edit-bar .ieb-actions { display: flex; align-items: center; gap: 0.5rem; }
.ieb-btn { background: rgba(255,255,255,0.14); color: #fff; border: none; border-radius: 7px; padding: 8px 14px; font: inherit; font-weight: 600; font-size: 0.9rem; cursor: pointer; }
.ieb-btn:hover { background: rgba(255,255,255,0.24); }
.ieb-primary { background: var(--teal); }
.ieb-primary:hover { background: var(--teal-dark); }
.ieb-status { color: #b9cde0; font-size: 0.85rem; padding: 0 0.3rem; }
/* Minimise button + collapsed (small floating) state. */
.ieb-min { background: rgba(255,255,255,0.14); color: #fff; border: none; border-radius: 7px;
    width: 30px; height: 32px; font: inherit; font-size: 1.1rem; line-height: 1; cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center; }
.ieb-min:hover { background: rgba(255,255,255,0.24); }
.inline-edit-bar.is-collapsed { left: auto; right: 1.1rem; transform: none;
    padding: 0; gap: 0; background: transparent; box-shadow: none; }
.inline-edit-bar.is-collapsed > *:not(.ieb-min) { display: none; }
.inline-edit-bar.is-collapsed .ieb-min { width: 46px; height: 46px; border-radius: 50%;
    background: var(--teal); font-size: 1.25rem; box-shadow: 0 8px 24px rgba(0,0,0,0.28); }
.inline-edit-bar.is-collapsed .ieb-min:hover { background: var(--teal-dark); }
[contenteditable].is-editable { outline: 2px dashed var(--teal); outline-offset: 4px; border-radius: 3px; cursor: text; }
[contenteditable].is-editable:focus { outline: 2px solid var(--teal); background: rgba(42,157,143,0.05); }

/* Hero call-to-action buttons (editable group) */
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; }
.hero-btn { position: relative; }
.is-editing-group { outline: 2px dashed var(--border); outline-offset: 8px; border-radius: 6px; }
.is-editing-group .hero-btn { padding-right: 2.9rem; }
.ieb-bctl { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); display: inline-flex; gap: 2px; }
.ieb-bctl button { background: rgba(255,255,255,0.9); color: var(--ink); border: 1px solid var(--border);
    border-radius: 5px; width: 22px; height: 22px; line-height: 1; font-size: 0.72rem; cursor: pointer; padding: 0; }
.ieb-bctl button:hover { background: #fff; }
.ieb-bctl button[data-bact="del"]:hover { color: #a12a2a; border-color: #f0b7b7; }
.ieb-addbtn { background: #fff; border: 1px dashed var(--teal); color: var(--teal-dark);
    border-radius: var(--radius); padding: 10px 16px; font: inherit; font-weight: 600; cursor: pointer; }
.ieb-addbtn:hover { background: rgba(42,157,143,0.08); }

/* Map */
.map-search { display: flex; gap: 8px; align-items: center; margin: 1rem 0; flex-wrap: wrap; }
.map-search input { flex: 1; min-width: 200px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--radius); }
.ssvo-pin { display: block; }
.ssvo-pin.marker { width: 22px; height: 30px; background: var(--pin); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,0.4); }
.ssvo-pin.dot { width: 14px; height: 14px; background: var(--pin); border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 1px 4px rgba(14,43,71,0.4); }
.ssvo-pin.dot:hover { transform: scale(1.2); }
/* Shared workplace: bigger dot with a vet count */
.ssvo-pin.multi { width: 24px; height: 24px; background: var(--pin); border-radius: 50%; border: 2.5px solid #fff; box-shadow: 0 1px 5px rgba(14,43,71,0.45); display: flex; align-items: center; justify-content: center; }
.ssvo-pin.multi:hover { transform: scale(1.12); }
.ssvo-pin.multi .pin-count { color: #fff; font-size: 12px; font-weight: 700; line-height: 1; }

/* Cluster bubbles restyled on-brand (loaded after MarkerCluster.Default.css) */
.marker-cluster-small, .marker-cluster-medium, .marker-cluster-large { background: rgba(42,157,143,0.22) !important; }
.marker-cluster-small div, .marker-cluster-medium div, .marker-cluster-large div { background: var(--teal) !important; color: #fff !important; font-weight: 600; }

/* Karta / Lista toggle + panelist list */
.view-toggle { display: inline-flex; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.vt-btn { background: #fff; border: none; padding: 8px 18px; font: inherit; font-weight: 600; font-size: 0.9rem; color: var(--muted); cursor: pointer; }
.vt-btn.is-active { background: var(--teal); color: #fff; }
.panelist-list { list-style: none; padding: 0; margin: 1rem 0 2rem; display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.75rem; align-items: start; }
.panelist-item { background: #fff; border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.25rem; }
.panelist-item .pi-clinic { font-weight: 700; }
.panelist-item .pi-addr { font-size: 0.88rem; margin-bottom: 0.55rem; }
.panelist-item .pi-vets { display: flex; flex-direction: column; gap: 0.35rem; }
.panelist-item .pi-vet { font-size: 0.92rem; }
@media (max-width: 760px) { .panelist-list { grid-template-columns: 1fr; } }

/* Map popup: several vets at one clinic */
.leaflet-popup-content .pop-addr { display: block; color: var(--muted); margin-bottom: 0.15rem; }
.leaflet-popup-content .pop-phone { margin: 0 0 0.15rem; }
.leaflet-popup-content .pop-vet { margin-top: 0.45rem; }
.leaflet-popup-content .pop-vet:first-of-type { margin-top: 0.6rem; padding-top: 0.55rem; border-top: 1px solid var(--border); }
.leaflet-popup-content .pop-spec { color: var(--muted); font-size: 0.85em; }
.panelist-item .pi-phone { font-size: 0.85rem; margin-bottom: 0.5rem; }

/* Map + in-view list, side by side (better use of width for a tall country) */
.map-split { display: grid; grid-template-columns: 1.7fr 1fr; gap: 1rem; align-items: stretch; }
.map-split #ssvo-map { width: 100%; height: 72vh; min-height: 460px; border-radius: 10px; }
.map-inview { display: flex; flex-direction: column; height: 72vh; min-height: 460px; background: #fff; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.map-inview .mi-head { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border); flex: none; }
.inview-list { overflow-y: auto; padding: 0.35rem; }
.inview-item { padding: 0.6rem 0.75rem; border-radius: 8px; cursor: pointer; border-bottom: 1px solid var(--border); }
.inview-item:last-child { border-bottom: none; }
.inview-item:hover { background: var(--bg); }
/* Clinic is the heading; the vets who work there sit grouped underneath. */
.inview-item .ii-clinic { font-weight: 700; color: var(--text); font-size: 0.98rem; line-height: 1.3; }
.inview-item .ii-addr { display: inline-block; color: var(--blue); font-size: 0.82rem; margin-top: 2px; text-decoration: none; }
.inview-item .ii-vets { margin-top: 0.55rem; display: flex; flex-direction: column; gap: 0.15rem; }
.inview-item .ii-vet { font-weight: 600; color: var(--ink); font-size: 0.9rem; line-height: 1.4; }
.inview-item .ii-vet .ii-spec { font-weight: 400; color: var(--muted); font-size: 0.76rem; margin-left: 6px; }
.inview-item .ii-addr:hover { text-decoration: underline; }
.inview-item.item-hl { background: #e5f2ef; box-shadow: inset 3px 0 0 var(--teal); }
.inview-empty { padding: 0.9rem; }

/* Pin highlighted from a list-row hover */
.ssvo-pin-wrap.mk-hl { z-index: 1000 !important; }
.ssvo-pin-wrap.mk-hl .ssvo-pin { transform: scale(1.7); box-shadow: 0 0 0 4px rgba(42,157,143,0.4); }

/* Red marker dropped at the searched location. */
.ssvo-search-pin { display: block; width: 22px; height: 22px; background: #e63946;
    border-radius: 50% 50% 50% 0; transform: rotate(-45deg);
    border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.4); }
.ssvo-search-pin::after { content: ""; position: absolute; top: 6px; left: 6px;
    width: 6px; height: 6px; background: #fff; border-radius: 50%; }
@media (max-width: 820px) {
    .map-split { grid-template-columns: 1fr; }
    .map-split #ssvo-map { height: 58vh; }
    .map-inview { height: auto; max-height: 45vh; }
}

/* Map hover tooltip */
.leaflet-tooltip.ssvo-tip { background: #fff; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 6px 18px rgba(14,43,71,0.16); padding: 8px 11px; font-size: 0.85rem; color: var(--text); line-height: 1.35; }
.leaflet-tooltip.ssvo-tip .tip-addr { color: var(--muted); }
.leaflet-tooltip.ssvo-tip .tip-name { display: block; }
.leaflet-tooltip.ssvo-tip::before { border-top-color: var(--border); }
.pin-preview { display: flex; align-items: center; justify-content: center; height: 80px; background: var(--bg); border-radius: var(--radius); }
.pin-preview .pin.marker { width: 22px; height: 30px; background: var(--pin); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); border: 2px solid #fff; }
.pin-preview .pin.dot { width: 16px; height: 16px; background: var(--pin); border-radius: 50%; border: 2px solid #fff; }

/* Block/section page editor (admin) */
.en-opts { border: 1px solid var(--border); border-radius: var(--radius); padding: 0.75rem 1.25rem 1rem; margin-bottom: 1rem; background: var(--bg); }
.en-opts legend { color: var(--navy); font-weight: 600; padding: 0 6px; }
.en-opts .check { margin: 0.4rem 0; }
.pe-lang { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin-bottom: 1.25rem; }
.pe-lang legend { color: var(--navy); font-weight: 600; padding: 0 6px; }
.pe-label { display: block; font-weight: 500; margin: 0.75rem 0 0.25rem; }
.page-editor { margin-top: 0.25rem; }
.pe-section { border: 1px solid var(--border); border-radius: 10px; padding: 0.85rem; margin-bottom: 0.85rem; background: var(--bg); }
.pe-sec-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.65rem; }
.pe-sec-label { font-weight: 600; color: var(--navy); font-size: 0.9rem; }
.pe-cols { padding: 5px 8px; border: 1px solid var(--border); border-radius: 6px; font: inherit; font-size: 0.85rem; background: #fff; }
.pe-sec-ctrls { margin-left: auto; display: flex; gap: 4px; }
.pe-cols-wrap { display: grid; gap: 0.75rem; }
.pe-cols-wrap.pe-cols-1 { grid-template-columns: 1fr; }
.pe-cols-wrap.pe-cols-2 { grid-template-columns: 1fr 1fr; }
.pe-cols-wrap.pe-cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.pe-col { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: #fff; }
.pe-col.pe-hidden { display: none; }
.pe-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 3px; padding: 5px; background: #f3f6fa; border-bottom: 1px solid var(--border); }
.pe-style { font-size: 0.8rem; border: 1px solid var(--border); border-radius: 4px; padding: 2px 4px; background: #fff; }
.pe-btn { background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 2px 8px; font-size: 0.82rem; cursor: pointer; color: var(--navy); }
.pe-btn:hover { background: var(--lightblue); color: #fff; }
.pe-area { min-height: 110px; padding: 10px 12px; outline: none; font-size: 0.95rem; line-height: 1.6; }
.pe-area:focus { box-shadow: inset 0 0 0 2px var(--lightblue); }
.pe-area img { max-width: 100%; height: auto; border-radius: 6px; }
.pe-area h2 { font-size: 1.3rem; margin: 0.5rem 0; }
.pe-area h3 { font-size: 1.1rem; margin: 0.5rem 0; color: var(--navy); }
.pe-add { margin-top: 0.25rem; }

/* Media library picker (overlay) + manage grid */
.media-ov { position: fixed; inset: 0; background: rgba(14,43,71,0.55); z-index: 2000; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.media-ov[hidden] { display: none; }
.media-panel { background: #fff; border-radius: 12px; width: min(780px, 95vw); max-height: 85vh; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.35); }
.media-head { display: flex; justify-content: space-between; align-items: center; padding: 0.9rem 1.1rem; border-bottom: 1px solid var(--border); }
.media-grid { overflow-y: auto; padding: 1rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 0.75rem; }
.media-item { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; cursor: pointer; background: #fff; padding: 0; aspect-ratio: 1 / 1; }
.media-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-item:hover { border-color: var(--teal); box-shadow: 0 4px 14px rgba(14,43,71,0.14); }

.media-manage { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; margin-top: 1rem; }
.media-card { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: #fff; }
.media-card img { width: 100%; height: 150px; object-fit: cover; display: block; background: var(--bg); }
.media-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.5rem; padding: 0.5rem 0.6rem; }
.media-card-foot .media-name { font-size: 0.78rem; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 900px) { .pe-cols-wrap.pe-cols-2, .pe-cols-wrap.pe-cols-3 { grid-template-columns: 1fr; } }

/* WYSIWYG editor */
.wysiwyg { border: 1px solid var(--border); border-radius: var(--radius); background: #fff; margin-top: 4px; }
.wysiwyg-toolbar { display: flex; flex-wrap: wrap; gap: 2px; padding: 6px; border-bottom: 1px solid var(--border); background: var(--bg); }
.wysiwyg-btn { background: #fff; border: 1px solid var(--border); border-radius: 4px; padding: 3px 8px; font-size: 0.8rem; cursor: pointer; color: var(--navy); }
.wysiwyg-btn:hover { background: var(--lightblue); color: #fff; }
.wysiwyg-area { min-height: 180px; padding: 12px; outline: none; }
.wysiwyg-area:focus { box-shadow: inset 0 0 0 2px var(--lightblue); }

/* Cookie banner */
.cookie-banner { position: fixed; left: 1rem; right: 1rem; bottom: 1rem; max-width: 720px; margin: 0 auto; background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 6px 24px rgba(0,0,0,0.18); padding: 1rem 1.25rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; z-index: 1000; }
/* The [hidden] attribute must win over display:flex, otherwise the banner
   never hides when the visitor clicks accept/reject. */
.cookie-banner[hidden] { display: none; }
.cookie-banner p { margin: 0; flex: 1; min-width: 220px; font-size: 0.9rem; }
.cookie-actions { display: flex; gap: 8px; }

@media (max-width: 900px) {
    .lang-cols { grid-template-columns: 1fr; }
    .split { grid-template-columns: 1fr; }
    .admin-shell { flex-direction: column; }
    .admin-sidebar { width: auto; flex-direction: row; flex-wrap: wrap; align-items: center; }
    .admin-nav { flex-direction: row; flex-wrap: wrap; }
    .admin-sidebar-foot { margin: 0 0 0 auto; flex-direction: row; }
    .admin-main { padding: 1.25rem; }
}

@media (max-width: 980px) {
    .feature-cards { grid-template-columns: repeat(2, 1fr); }
    .om-row { grid-template-columns: 1fr; gap: 1.75rem; }
    .hero-panel { grid-template-columns: 1fr; }
    .news-feature-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
    .two-col { grid-template-columns: 1fr; }
    .hero { min-height: 380px; }
    .main-nav { gap: 0.9rem; }
    .feature-cards { grid-template-columns: 1fr; }
    .nem-banner { padding: 1.75rem; }
    .nem-banner h2 { font-size: 1.5rem; }
    .home-section { padding: 2rem 1.25rem; }
    .page-head { flex-direction: column; align-items: flex-start; }
    .data-table { display: block; overflow-x: auto; }
}

/* ---------- File library ------------------------------------------------- */
.files-page { padding-top: 1.5rem; padding-bottom: 3rem; }
.tag-sm { font-size: 0.68rem; padding: 1px 7px; }
.linklike.danger { color: #a12a2a; }
.linklike.danger:hover { color: #c0392b; }

.crumbs { margin: 0.25rem 0 1.25rem; font-size: 0.95rem; color: var(--muted); }
.crumbs a { color: var(--blue); font-weight: 500; }
.crumbs .crumb-sep { margin: 0 0.4rem; color: var(--border); }
.crumbs .crumb-current { color: var(--text); font-weight: 600; }

.files-empty { padding: 1.5rem 0; }

.folder-grid { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid;
    grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.75rem; }
.folder-card { position: relative; background: #fff; border: 1px solid var(--border);
    border-radius: var(--radius-lg); transition: border-color .15s, box-shadow .15s; }
.folder-card:hover { border-color: var(--lightblue); box-shadow: 0 2px 10px rgba(27,78,140,.08); }
.folder-link { display: flex; align-items: center; gap: 0.6rem; padding: 0.9rem 1rem; color: var(--text); }
.folder-link:hover { text-decoration: none; }
.folder-ico { font-size: 1.4rem; line-height: 1; }
.folder-name { font-weight: 600; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-meta { display: flex; align-items: center; }
.folder-del { position: absolute; top: 6px; right: 8px; opacity: 0; transition: opacity .15s; }
.folder-card:hover .folder-del { opacity: 1; }
.folder-del button { font-size: 0.72rem; }

.file-list { list-style: none; padding: 0; margin: 0 0 1.5rem; }
.file-row { display: flex; align-items: center; gap: 1rem; padding: 0.65rem 0.25rem;
    border-bottom: 1px solid var(--border); }
.file-main { display: flex; align-items: center; gap: 0.7rem; flex: 1; min-width: 0; color: var(--text); }
.file-main:hover { text-decoration: none; }
.file-main:hover .file-name { color: var(--blue); text-decoration: underline; }
.file-ico { font-size: 1.25rem; line-height: 1; }
.file-text { min-width: 0; }
.file-name { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-desc { display: block; font-size: 0.82rem; }
.file-meta { font-size: 0.82rem; white-space: nowrap; }
.file-del { flex-shrink: 0; }

.file-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 1.5rem; }
.file-tools .panel { margin: 0; }
.form-inline { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.75rem; }
.form-inline label { display: flex; flex-direction: column; font-size: 0.85rem; gap: 0.25rem; }
.doc-recent-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: .04em; margin: 0.5rem 0 0.25rem; }

/* Move menu (fallback, works without JS) */
.file-row details.move { flex-shrink: 0; position: relative; }
.file-row details.move > summary { list-style: none; cursor: pointer; font-size: 0.82rem;
    color: var(--blue); font-weight: 500; }
.file-row details.move > summary::-webkit-details-marker { display: none; }
.file-row details.move[open] > summary { color: var(--navy); }
.move-form { position: absolute; right: 0; top: 100%; z-index: 5; margin-top: 6px;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    box-shadow: 0 6px 20px rgba(14,43,71,.12); padding: 0.6rem; display: flex; gap: 0.4rem;
    align-items: center; white-space: nowrap; }
.move-form select { max-width: 220px; }

/* Drag-and-drop states */
.file-row.is-dragging { opacity: 0.4; }
.file-row[draggable="true"] { cursor: grab; }
.folder-card.drop-hot { border-color: var(--teal); box-shadow: 0 0 0 2px var(--teal) inset; }
.crumbs a.drop-hot { background: var(--teal); color: #fff; border-radius: 4px; padding: 1px 6px; }

.dropzone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 0.9rem;
    text-align: center; color: var(--muted); font-size: 0.9rem; margin-bottom: 0.8rem; }

/* Hint only — never captures pointer events, so it can't lock the page. */
.drop-overlay { position: fixed; inset: 0; z-index: 999; background: rgba(14,43,71,.35);
    display: flex; align-items: center; justify-content: center; pointer-events: none; }
.drop-overlay[hidden] { display: none; }
.drop-overlay-box { background: #fff; border: 3px dashed var(--teal); border-radius: var(--radius-lg);
    padding: 2rem 3rem; font-weight: 700; color: var(--navy); font-size: 1.1rem; }

@media (max-width: 700px) {
    .file-tools { grid-template-columns: 1fr; }
    .file-meta { display: none; }
    .folder-del { opacity: 1; }
    .move-form { right: auto; left: 0; }
}
