/* Figma palette; approved Public Sans substitutes for decoded ABC Social. */
:root {
  --magnea-bg: #06091c; --magnea-sidebar: #111524; --magnea-card: #111524;
  --magnea-text: #f3f4f7; --magnea-muted: #97a2bd; --magnea-border: #282d3d;
  --magnea-accent: #437cff; --magnea-hover: #19233b;
  color-scheme: dark;
}
:root[data-theme="light"] {
  --magnea-bg: #f4f6fa; --magnea-sidebar: #ffffff; --magnea-card: #ffffff;
  --magnea-text: #17213a; --magnea-muted: #53617a; --magnea-border: #d7deea;
  --magnea-accent: #275bd7; --magnea-hover: #e8eefb;
  color-scheme: light;
}
body { background: var(--magnea-bg); color: var(--magnea-text); }
.admin-layout-shell { display: flex; min-height: 100vh; background: var(--magnea-bg); color: var(--magnea-text); font-family:var(--magnea-font); }
.admin-layout-main { flex: 1; min-width: 0; padding: 24px 32px; }
.admin-layout-main.is-contained { max-width: 1600px; margin: 0 auto; }
.admin-layout-content { margin-top: 24px; }
.magnea-toolbar { display: flex; align-items: center; justify-content: flex-end; gap: 8px; min-height: 44px; margin-bottom: 24px; border-bottom: 1px solid var(--magnea-border); padding-bottom: 16px; }
.magnea-toolbar button, .magnea-toolbar select { min-height: 40px; border: 1px solid var(--magnea-border); border-radius: 8px; padding: 8px 12px; background: var(--magnea-card); color: var(--magnea-text); font: inherit; cursor: pointer; }
.magnea-toolbar button:focus-visible, .magnea-toolbar select:focus-visible { outline: 2px solid var(--magnea-accent); outline-offset: 3px; }
.magnea-menu-toggle { display: none; margin-right: auto; }
.magnea-sidebar-overlay { display: none; position: fixed; inset: 0; z-index: 39; background: #0009; border: 0; }
.admin-layout-shell admin-header h1 { color: var(--magnea-text); background: none; -webkit-text-fill-color: currentColor; font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.25; }
.admin-layout-shell admin-header p { color: var(--magnea-muted); }
@media (max-width: 1023px) {
  .admin-layout-main { padding: 16px; }
  .magnea-menu-toggle { display: inline-flex; }
  .admin-layout-shell admin-sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; visibility: hidden; display: none; }
  .admin-layout-shell[data-menu-open] admin-sidebar { visibility: visible; display: block; }
  .admin-layout-shell[data-menu-open] .magnea-sidebar-overlay { display: block; }
}
@media (prefers-reduced-motion: reduce) { .admin-layout-shell * { transition: none !important; } }

:root { --magnea-sidebar-width: 13rem; }
.magnea-lens-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.magnea-lens-nav a { color: var(--magnea-muted); text-decoration: none; border: 1px solid var(--magnea-border); border-radius: 6px; padding: 8px 12px; font-size: 14px; }
.magnea-lens-nav a[aria-current="page"] { color: var(--magnea-bg); background: var(--magnea-text); }
.magnea-lens-nav a:focus-visible { outline: 2px solid var(--magnea-accent); outline-offset: 3px; }
admin-header { display: block; }
admin-header > :not(.magnea-header-copy) { margin-top: 16px; }
:root[data-theme="light"] body.seldan-gradient-page { background: var(--magnea-bg); color: var(--magnea-text); }
:root[data-theme="light"] body.seldan-gradient-page::before { opacity: 0; }
:root[data-theme="light"] .seldan-section-title,
:root[data-theme="light"] .seldan-card-title { color: var(--magnea-text); }
:root[data-theme="light"] :is(.seldan-inner-panel, .seldan-section-header) { background: var(--magnea-card); border-color: var(--magnea-border); }
:root[data-theme="light"] .text-white:not(.btn-primary) { color: var(--magnea-text); }
:root[data-theme="light"] :is(.text-gray-300,.text-gray-400,.text-magnea-gray) { color: var(--magnea-muted); }
.modal-content { max-width: calc(100vw - 32px) !important; max-height: calc(100dvh - 32px); overflow-y: auto; }
@media (max-width: 600px) { .magnea-toolbar { flex-wrap: wrap; } .magnea-lens-nav { order: 3; flex-basis: 100%; } }
:root[data-theme="light"] [class~="bg-[#06091c]"] { background-color: var(--magnea-bg); }
:root[data-theme="light"] [class~="text-[#06091c]"] { color: var(--magnea-bg); }
:root[data-theme="light"] [class~="border-[#06091c]"] { border-color: var(--magnea-bg); }
:root[data-theme="light"] [class~="bg-[#0c1024]"] { background-color: var(--magnea-sidebar); }
:root[data-theme="light"] [class~="text-[#0c1024]"] { color: var(--magnea-sidebar); }
:root[data-theme="light"] [class~="border-[#0c1024]"] { border-color: var(--magnea-sidebar); }
:root[data-theme="light"] [class~="bg-[#111524]"] { background-color: var(--magnea-card); }
:root[data-theme="light"] [class~="text-[#111524]"] { color: var(--magnea-card); }
:root[data-theme="light"] [class~="border-[#111524]"] { border-color: var(--magnea-card); }
:root[data-theme="light"] [class~="bg-[#171e33]"] { background-color: var(--magnea-border); }
:root[data-theme="light"] [class~="text-[#171e33]"] { color: var(--magnea-border); }
:root[data-theme="light"] [class~="border-[#171e33]"] { border-color: var(--magnea-border); }
:root[data-theme="light"] [class~="bg-[#191e2d]"] { background-color: var(--magnea-border); }
:root[data-theme="light"] [class~="text-[#191e2d]"] { color: var(--magnea-border); }
:root[data-theme="light"] [class~="border-[#191e2d]"] { border-color: var(--magnea-border); }
:root[data-theme="light"] [class~="bg-[#282d3d]"] { background-color: var(--magnea-border); }
:root[data-theme="light"] [class~="text-[#282d3d]"] { color: var(--magnea-border); }
:root[data-theme="light"] [class~="border-[#282d3d]"] { border-color: var(--magnea-border); }
:root[data-theme="light"] [class~="bg-[#f3f4f7]"] { background-color: var(--magnea-text); }
:root[data-theme="light"] [class~="text-[#f3f4f7]"] { color: var(--magnea-text); }
:root[data-theme="light"] [class~="border-[#f3f4f7]"] { border-color: var(--magnea-text); }
:root[data-theme="light"] [class~="bg-[#97a2bd]"] { background-color: var(--magnea-muted); }
:root[data-theme="light"] [class~="text-[#97a2bd]"] { color: var(--magnea-muted); }
:root[data-theme="light"] [class~="border-[#97a2bd]"] { border-color: var(--magnea-muted); }

/* Compiled legacy Tailwind embeds !important dark styles. Match their priority
   within the shared shell so light mode and accessible text use these tokens. */
:root body { background: var(--magnea-bg) !important; color: var(--magnea-text) !important; }
:root body::before { display: none; }
:root .admin-layout-shell { background: var(--magnea-bg) !important; }
.admin-layout-shell admin-header h1 { -webkit-text-fill-color: var(--magnea-text) !important; }
.admin-layout-shell :is(select, textarea, input.form-input) { background: var(--magnea-card) !important; color: var(--magnea-text) !important; border-color: var(--magnea-border) !important; }
.admin-layout-shell :is(th, td) { color: var(--magnea-text) !important; border-color: var(--magnea-border) !important; }
.admin-layout-shell th { background: var(--magnea-hover) !important; }

/* Measured from Dashboard.svg / Seldan.svg. 300px sidebar + 48px content inset;
   24px card gutters; 8px corners; #191E2D table/selection fills. */
:root { --magnea-sidebar-width:300px; --magnea-row:#191e2d; --magnea-font:"Public Sans", Arial, sans-serif; }
:root[data-theme="light"] { --magnea-row:#e8eefb; }
.admin-layout-shell { font-family:var(--magnea-font); font-size:14px; }
.admin-layout-main,.admin-layout-main.is-contained { position:relative; padding:40px 48px; max-width:none; margin:0; }
.admin-layout-content { margin-top:48px; }
.admin-layout-shell admin-header h1 { font:400 32px/40px var(--magnea-font); letter-spacing:-.6px; margin:0 0 8px; }
.admin-layout-shell admin-header h1 i { display:none; }
.admin-layout-shell admin-header p { font:400 16px/24px var(--magnea-font); margin:0; }
.magnea-toolbar { position:absolute; right:48px; top:40px; margin:0; padding:0; border:0; min-height:32px; }
.magnea-toolbar button,.magnea-toolbar select { font-size:13px; min-height:32px; height:32px; padding:4px 8px; border-radius:4px; }
/* Heim · Markaður · Verðspá (demo lens row); toolbar control size and the switcher's light-filled active state. */
.magnea-lens-nav { display:flex; flex-wrap:nowrap; gap:8px; margin-right:8px; }
.magnea-lens-nav a { display:inline-flex; align-items:center; gap:8px; height:32px; box-sizing:border-box; padding:0 12px; border-radius:4px; font-size:13px; line-height:18px; white-space:nowrap; background:transparent; }
.magnea-lens-nav a:hover { color:var(--magnea-text); border-color:var(--magnea-muted); }
.magnea-lens-nav a[aria-current="page"] { border-color:var(--magnea-text); }
.magnea-lens-icon { flex-shrink:0; }
.magnea-mobile-brand { display:none; }
admin-header { padding-right:220px; }
/* The toolbar (lens row + preferences, 461px) shares the title line only where both fit; below that
   it takes its own line above the title, as on narrow screens. */
@media(min-width:1024px) and (max-width:1319px) { .magnea-toolbar { position:static; justify-content:flex-end; margin-bottom:24px; } }
@media(min-width:1320px) { admin-header { padding-right:560px; } }
admin-header > :not(.magnea-header-copy) { margin-top:24px; }
@media(max-width:1023px) {
 .admin-layout-main,.admin-layout-main.is-contained { padding:104px 16px 32px; }
 .admin-layout-content { margin-top:24px; }
 .admin-layout-shell admin-header h1 { font-size:24px; line-height:28px; letter-spacing:-.4px; }
 .admin-layout-shell admin-header p { font-size:16px; line-height:19px; }
 admin-header { padding-right:0; }
 .magnea-toolbar { position:absolute; top:0; left:16px; right:20px; height:72px; justify-content:space-between; }
 .magnea-mobile-brand { display:block; width:150px; }
 .magnea-mobile-brand svg { width:150px; height:24px; }
 .magnea-mobile-brand path[fill="#F3F4F7"] { fill:var(--magnea-text); }
 .magnea-toolbar .magnea-menu-toggle { display:flex; margin:0; padding:0; width:24px; height:24px; min-height:24px; border:0; background:none; }
 .magnea-menu-toggle span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
 .magnea-toolbar .magnea-locale,.magnea-toolbar .magnea-theme { display:none; }
 .admin-layout-shell[data-menu-open] .magnea-locale,.admin-layout-shell[data-menu-open] .magnea-theme { display:block; position:fixed; z-index:45; top:80px; bottom:auto; }
 .admin-layout-shell[data-menu-open] .magnea-locale { left:28px; }
 .admin-layout-shell[data-menu-open] .magnea-theme { left:90px; }
 .admin-layout-shell[data-menu-open] admin-sidebar { padding-bottom:48px; background:var(--magnea-sidebar); }
 .admin-layout-shell admin-sidebar { max-width:calc(100vw - 32px); }
}

/* Keep preference controls operable above positioned legacy header actions. */
.magnea-toolbar { z-index:2; }

@media(max-width:1023px) {
 .admin-layout-shell[data-menu-open] .magnea-toolbar { z-index:41; pointer-events:none; } /* lifted for its controls; the box itself must not take the drawer's logo and close taps (R-002/correctness/001) */
 .admin-layout-shell[data-menu-open] .magnea-locale,.admin-layout-shell[data-menu-open] .magnea-theme { pointer-events:auto; }
 .admin-layout-shell[data-menu-open] .magnea-mobile-brand { visibility:hidden; }
}

/* Baseline alignment to outlined Figma heading; fallback typeface remains explicit. */
.admin-layout-shell admin-header h1 { position:relative;top:-4px; }

/* Public Sans is the approved self-hosted substitute; exact ABC Social parity is not claimed. */

/* Open mobile navigation is its own frame, 3048:9944: full 375px width,
   content inset16, rows343px, not the desktop 300px sidebar. */
@media(max-width:1023px){
 .admin-layout-shell[data-menu-open] admin-sidebar{--magnea-sidebar-width:100vw;width:100vw;max-width:100vw;padding-bottom:0}
 .admin-layout-shell[data-menu-open] .magnea-locale,.admin-layout-shell[data-menu-open] .magnea-theme{top:auto;bottom:16px}
 .admin-layout-shell[data-menu-open] .magnea-locale{left:24px}
 .admin-layout-shell[data-menu-open] .magnea-theme{left:90px}
}

@media(max-width:1023px){.admin-layout-shell[data-menu-open] .magnea-menu-toggle{visibility:hidden}}

/* Lens row on narrow screens: its own right-aligned line under the 72px mobile bar. */
@media(max-width:1023px){
 .admin-layout-main,.admin-layout-main.is-contained { padding-top:136px; }
 .magnea-toolbar .magnea-lens-nav { position:absolute; top:84px; right:0; margin:0; }
 .admin-layout-shell[data-menu-open] .magnea-lens-nav { display:none; } /* the drawer covers the page; its rows own the taps */
}
@media(max-width:420px){ .magnea-lens-nav a span { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); } }

/* Demo mode: the title chip is the global switch (style guide scope badge); .magnea-demo-tag is the
   per-card review chip. "Demodata" sits in its card's top right corner, out of the layout, in the board's Cobalt (the
   page's muted ink on its border colour, Cobalt 300 on 800), on Heim, Markaður and Verðspá alike; the weekend chip
   stays inline. */
:root { --magnea-warning-50:#FFF9EB; --magnea-warning-500:#F98B07; --magnea-warning-700:#B74506; --magnea-warning-950:#310E02;
  --magnea-cobalt-100:#E6E9EF; --magnea-cobalt-600:#384159; }
.magnea-header-copy:has(.magnea-demo-chip) h1 { display:inline-block; margin-right:16px; vertical-align:middle; }
.magnea-demo-chip { vertical-align:middle; position:relative; top:-4px; font:400 13px/20px var(--magnea-font); color:var(--magnea-accent); background:var(--magnea-hover); border:0; border-radius:20px; padding:3px 10px; cursor:pointer; }
.magnea-demo-chip:hover { color:var(--magnea-text); }
.magnea-demo-chip:focus-visible { outline:2px solid var(--magnea-accent); outline-offset:3px; }
.magnea-demo-tag { display:inline-block; font:500 12px/16px var(--magnea-font); letter-spacing:0; text-transform:none; white-space:nowrap; border-radius:999px; padding:2px 8px; }
.magnea-demo-tag[data-kind="weekend"] { color:var(--magnea-muted); background:var(--magnea-row); }
/* The card holding a Demodata chip anchors it; the chip fills the card's rounded top right corner (radius 8, border 1)
   above its content (every card has at least 14 px of top padding), so the card is the same with and without it. */
:is(.heim-card,.heim-price-box,.heim-verdict,.heim-species,.heim-tab,.seldan-panel,.markadur-tile,.verdspa-card,.verdspa-hero):has(.magnea-demo-tag:not([data-kind="weekend"])) { position:relative; }
.magnea-demo-tag:not([data-kind="weekend"]) { position:absolute; top:0; right:0; z-index:1; font:400 10px/14px var(--magnea-font); padding:0 6px; border-radius:0 7px 0 6px; color:var(--magnea-muted); background:var(--magnea-border); pointer-events:none; }
/* A product tab is no card: its chip sits on the tab's top right edge, above the label. */
.heim-tab > .magnea-demo-tag:not([data-kind="weekend"]) { top:-8px; right:-4px; border-radius:999px; }
:root[data-theme="light"] .magnea-demo-tag[data-kind="weekend"] { color:var(--magnea-cobalt-600); background:var(--magnea-cobalt-100); }
