
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url('../fonts/schibsted-grotesk-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('../fonts/dm-sans-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/dm-mono-400-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'DM Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/dm-mono-500-latin.woff2') format('woff2');
}


:root {

  --accent:         #1E3F36;
  --accent-light:   #3D6B5E;
  --accent-dark:    #2A5247;
  --blue:           #5B8DEF;
  --accent-glow:    rgba(30,63,54,.12);


  --green:  #4A9669;
  --red:    #B8493C;
  --orange: #C8883A;
  --success: #4A9669;
  --success-bg: rgba(74, 150, 105, .12);
  --success-border: rgba(74, 150, 105, .28);
  --warning: #C8883A;
  --warning-bg: rgba(200, 136, 58, .13);
  --danger: #B8493C;
  --danger-bg: rgba(184, 73, 60, .11);
  --yellow: #D4A93A;


  --bg:           #F4EFE4;
  --bg-card:      #FDFAF3;
  --bg-input:     #FDFAF3;
  --bg-sidebar:   #F0EBE0;
  --bg-hover:     #EDE6D5;
  --bg-stripe:    #EDE6D5;
  --border:       #DDD8C8;
  --border-input: #CCC6B3;
  --text:         #1C1D18;
  --text-muted:   #6A6659;
  --text-subtle:  #9B9486;
  --shadow:       0 1px 2px rgba(30,63,54,.05), 0 2px 8px -4px rgba(30,63,54,.10);
  --shadow-md:    0 2px 4px rgba(30,63,54,.05), 0 10px 32px -12px rgba(30,63,54,.18);
  --shadow-lg:    0 4px 8px rgba(30,63,54,.06), 0 28px 56px -20px rgba(30,63,54,.28);
  --radius:       12px;
  --radius-sm:    8px;
  --radius-lg:    20px;


  --toggle-off: #CCC6B3;


  --sidebar-w:       240px;
  --topbar-h:        56px;

  --display: 'Schibsted Grotesk', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --body:    'DM Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono:    'DM Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --mono-nums: 'Courier New', Courier, monospace;

  color-scheme: light;
}

[data-theme="system"] {
  color-scheme: light dark;
}

[data-theme="dark"] {
  color-scheme: dark;
  --toggle-off:   #2F4A38;
  --bg:           #121C18;
  --bg-card:      #192420;
  --bg-input:     #1F2E29;
  --bg-sidebar:   #172119;
  --bg-hover:     #1D2B22;
  --bg-stripe:    #1D2B22;
  --border:       #253B2E;
  --border-input: #2F4A38;
  --text:         #EDF2EC;
  --text-muted:   #94A898;
  --text-subtle:  #5A6E60;
  --shadow:       0 1px 3px rgba(0,0,0,.4);
  --shadow-md:    0 4px 12px rgba(0,0,0,.5);
  --shadow-lg:    0 8px 32px rgba(0,0,0,.6);
  --accent:       #78C49A;
  --accent-dark:  #90D4AF;
  --accent-light: #A8DEC3;
  --green:        #78C49A;
  --red:          #E07A70;
  --orange:       #D4A05A;
  --blue:         #7BA8F5;
  --accent-glow:  rgba(120,196,154,.18);
}

@media (prefers-color-scheme: dark) {
  [data-theme="system"] {
    --toggle-off:   #2F4A38;
    --bg:           #121C18;
    --bg-card:      #192420;
    --bg-input:     #1F2E29;
    --bg-sidebar:   #172119;
    --bg-hover:     #1D2B22;
    --bg-stripe:    #1D2B22;
    --border:       #253B2E;
    --border-input: #2F4A38;
    --text:         #EDF2EC;
    --text-muted:   #94A898;
    --text-subtle:  #5A6E60;
    --shadow:       0 1px 3px rgba(0,0,0,.4);
    --shadow-md:    0 4px 12px rgba(0,0,0,.5);
    --shadow-lg:    0 8px 32px rgba(0,0,0,.6);
    --accent:       #78C49A;
    --accent-dark:  #90D4AF;
    --accent-light: #A8DEC3;
    --green:        #78C49A;
    --red:          #E07A70;
    --orange:       #D4A05A;
    --blue:         #7BA8F5;
    --accent-glow:  rgba(120,196,154,.18);
  }
}


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { font-size: 16px; -webkit-text-size-adjust: 100%; overscroll-behavior: none; }
body {
  font-family: var(--body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}
h1, h2, h3, h4, .page-title, .card-title, .panel-title {
  font-family: var(--display);
  letter-spacing: -0.022em;
  line-height: 1.08;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a.btn:hover, a.idx-btn-primary:hover, a.idx-btn-secondary:hover { text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; color: inherit; }
input, select, textarea {
  font: inherit; color: inherit;
  background: var(--bg-input);
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-sm);
  padding: .5rem .75rem;
  width: 100%;
  transition: border-color .15s, box-shadow .15s;
  outline: none;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
input[type="checkbox"]:focus {
  border-color: unset;
  box-shadow: none;
}
input.input-error {
  border-color: var(--red);
}


.date-input-wrap { position: relative; }
.date-input-label {
  display: block;
  font-size: .8125rem;
  color: var(--text-muted);
  margin-bottom: .2rem;
}
input[type="date"],
input[type="datetime-local"] {
  text-align: left;
  height: 2.75rem;
  -webkit-appearance: none;
  appearance: none;
}


input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  opacity: 0;
  cursor: pointer;
  position: absolute;
  right: 0; top: 0;
  width: 2.5rem; height: 100%;
}
/* Fields wrapped in .date-input-wrap show their own icon on the left (padding-left below) -
   align the invisible native picker trigger with it instead of the default right edge. */
.date-input-wrap input[type="date"]::-webkit-calendar-picker-indicator,
.date-input-wrap input[type="datetime-local"]::-webkit-calendar-picker-indicator {
  left: 0; right: auto;
}
.date-input-wrap input[type="datetime-local"] { padding-left: 2.25rem; width: 100%; }


input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 44px;
  height: 26px;
  padding: 0;
  border: none;
  border-radius: 999px;
  background: var(--toggle-off);
  cursor: pointer;
  flex-shrink: 0;
  vertical-align: middle;
  transition: background .22s ease;
  outline: none;
}
input[type="checkbox"]::before {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
  transition: transform .22s ease;
}
input[type="checkbox"]:checked {
  background: var(--accent);
}
input[type="checkbox"]:checked::before {
  transform: translateX(18px);
}
input[type="checkbox"]:focus-visible {
  box-shadow: 0 0 0 3px rgba(74,150,105,.3);
}


.hidden { display: none !important; }
.flex   { display: flex; }
.gap-1  { gap: .5rem; }
.gap-2  { gap: 1rem; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.text-muted  { color: var(--text-muted); }
.text-small  { font-size: .8125rem; }
.text-right  { text-align: right; }
.text-center { text-align: center; }
.font-bold   { font-weight: 600; }
.positive    { color: var(--green); }
.negative    { color: var(--red); }
.mt-1  { margin-top: .5rem; }
.mt-2  { margin-top: 1rem; }
.mt-3  { margin-top: 1.5rem; }
.w-full { width: 100%; }


.btn {
  display: inline-flex; align-items: center; gap: .5em;
  padding: .8em 1.45em; border-radius: var(--radius);
  border: 1.5px solid transparent;
  font-family: var(--body); font-size: .95rem; font-weight: 600;
  line-height: 1;
  transition: transform .15s ease, box-shadow .2s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97) translateY(0) !important; }
.btn:disabled { opacity: .4; cursor: not-allowed; pointer-events: none; }
.btn-primary {
  background: var(--accent);
  color: #F4EFE4;
  box-shadow: 0 4px 16px -6px rgba(30,63,54,.6);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px -8px rgba(30,63,54,.65);
}
[data-theme="dark"] .btn-primary {
  background: #1E4A38;
  color: #C8EDD8;
  box-shadow: 0 4px 16px -6px rgba(0,0,0,.4);
}
[data-theme="dark"] .btn-primary:hover {
  background: #26604A;
  box-shadow: 0 10px 24px -8px rgba(0,0,0,.45);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .btn-primary {
    background: #1E4A38;
    color: #C8EDD8;
    box-shadow: 0 4px 16px -6px rgba(0,0,0,.4);
  }
  [data-theme="system"] .btn-primary:hover {
    background: #26604A;
    box-shadow: 0 10px 24px -8px rgba(0,0,0,.45);
  }
}
.btn-secondary {
  background: var(--accent-glow);
  border: 1.5px solid transparent;
  color: var(--accent);
}
.btn-secondary:hover { background: color-mix(in srgb, var(--accent) 20%, transparent); color: var(--accent-dark); transform: translateY(-1px); }
.btn-danger { background: transparent; border-color: color-mix(in srgb, var(--red) 35%, var(--border)); color: var(--red); }
.btn-danger:hover { background: rgba(184,73,60,.11); transform: translateY(-1px); }
.btn-danger-solid { background: var(--red); border-color: var(--red); color: #F4EFE4; }
.btn-danger-solid:hover { background: color-mix(in srgb, var(--red) 85%, black); transform: translateY(-1px); }
.btn-secondary-red { color: var(--red); border-color: var(--red); }
.btn-secondary-red:hover { background: rgba(184,73,60,.11); border-color: var(--red); color: var(--red); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text-muted); border-color: var(--border-input); }
.btn-ghost:hover { background: var(--bg-hover); border-color: var(--accent-dark); }
.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: .5rem .9rem; font-size: .8125rem; border-radius: var(--radius-sm); }
.btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: background .15s, color .15s;
}
.btn-icon:hover { background: var(--bg-hover); color: var(--text); }
.btn-icon svg { width: 18px; height: 18px; }


.auth-screen {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 55% 45%;
  position: relative;
}


.auth-teaser {
  background: linear-gradient(160deg, var(--accent) 0%, var(--accent-dark) 55%, var(--accent) 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 3rem 3rem 3rem 3.5rem;
  min-height: 100dvh;
  overflow: hidden;
}
[data-theme="dark"] .auth-teaser {
  background: linear-gradient(160deg, #0A1F15 0%, #122E1F 55%, #0A1F15 100%);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .auth-teaser {
    background: linear-gradient(160deg, #0A1F15 0%, #122E1F 55%, #0A1F15 100%);
  }
}
.auth-teaser-inner { max-width: 480px; width: 100%; }

.auth-teaser-logo {
  display: flex; align-items: center; gap: .65rem;
  margin-bottom: 2.75rem;
}
.auth-teaser-logo span {
  font-size: 1.2rem; font-weight: 700;
  color: rgba(255,255,255,.9);
  letter-spacing: -.01em;
}

.auth-teaser-headline h1 {
  font-size: 1.875rem; font-weight: 700;
  color: #fff;
  line-height: 1.2;
  margin-bottom: .875rem;
  letter-spacing: -.025em;
}
.auth-teaser-headline p {
  font-size: .9375rem;
  color: rgba(255,255,255,.7);
  line-height: 1.65;
}

.auth-teaser-features {
  list-style: none; margin: 2rem 0 0; padding: 0;
  display: flex; flex-direction: column; gap: .875rem;
}
.auth-teaser-features li {
  display: flex; align-items: center; gap: .75rem;
  color: rgba(255,255,255,.82);
  font-size: .875rem;
}
.auth-teaser-features li svg {
  width: 17px; height: 17px; flex-shrink: 0;
  opacity: .85;
}

.auth-teaser-screenshots {
  margin-top: 2.25rem;
  width: 100%;
}
.auth-carousel {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}
.auth-carousel-track {
  display: flex;
  -webkit-transition: -webkit-transform .4s cubic-bezier(.4,0,.2,1);
  transition: transform .4s cubic-bezier(.4,0,.2,1);
  will-change: transform;
}
.auth-carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
}
.auth-screenshot {
  width: 100%;
  height: 180px;
  object-fit: cover;
  object-position: top;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
  display: block;
  transition: opacity .15s ease;
}
.auth-carousel:hover .auth-screenshot {
  opacity: .88;
}
.auth-carousel::after {
  content: '';
  position: absolute;
  top: .65rem;
  right: .65rem;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(0,0,0,.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23fff' stroke-width='1.75' stroke-linecap='round'%3E%3Ccircle cx='9' cy='9' r='5'/%3E%3Cpath d='M14 14l3 3'/%3E%3C/svg%3E") center/15px no-repeat;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.auth-carousel:hover::after {
  opacity: 1;
}
.auth-carousel-dots {
  display: flex;
  justify-content: center;
  gap: .5rem;
  margin-top: .65rem;
}
.auth-carousel-dot {
  width: 6px; height: 6px;
  border-radius: 3px;
  border: none;
  background: rgba(255,255,255,.3);
  cursor: pointer;
  padding: 0;
  transition: background .25s ease, width .25s ease;
}
.auth-carousel-dot.active {
  background: rgba(255,255,255,.9);
  width: 18px;
}
.auth-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.auth-lightbox.open {
  opacity: 1;
  pointer-events: all;
}
.auth-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.88);
}
.auth-lightbox-content {
  position: relative;
  z-index: 1;
  width: 90vw;
  padding: 0 1rem;
  transform: scale(0.82);
  transition: transform .35s cubic-bezier(.34,1.9,.64,1);
}
.auth-lightbox.open .auth-lightbox-content {
  transform: scale(1);
}
.auth-lightbox-close {
  position: absolute;
  top: -2.75rem;
  right: 1rem;
  background: none;
  border: none;
  color: rgba(255,255,255,.75);
  cursor: pointer;
  padding: .25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color .15s ease;
}
.auth-lightbox-close:hover { color: #fff; }
.auth-lightbox-close svg { width: 26px; height: 26px; }
#auth-lightbox-img {
  width: 100%;
  max-height: 90vh;
  border-radius: 10px;
  display: block;
  box-shadow: 0 24px 64px rgba(0,0,0,.6);
  object-fit: contain;
}

.auth-teaser-signup {
  display: block;
  width: fit-content;
  margin: 2.25rem auto 0;
  padding: .6rem 1.5rem;
  border: 1.5px solid rgba(255,255,255,.55);
  border-radius: var(--radius-sm);
  background: transparent;
  color: rgba(255,255,255,.88);
  font-size: .875rem; font-weight: 500;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease;
}
.auth-teaser-signup:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.85);
  color: #fff;
}

.auth-teaser-learnmore {
  display: inline-flex; align-items: center; gap: .35rem;
  margin-top: 1rem;
  padding: .35rem .75rem;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 99px;
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.8);
  font-size: .8125rem; font-weight: 500;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
  text-decoration: none;
}
.auth-teaser-learnmore:hover {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.55);
  color: #fff;
}
.auth-teaser-learnmore svg { width: 13px; height: 13px; transition: transform .15s ease; }
.auth-teaser-learnmore:hover svg { transform: translateX(2px); }


.teaser-lm {
  position: fixed; inset: 0; z-index: 600;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .22s ease;
}
.teaser-lm.open { opacity: 1; pointer-events: all; }
.teaser-lm-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.72);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.teaser-lm-card {
  position: relative; z-index: 1;
  background: linear-gradient(160deg, var(--accent) 0%, var(--accent-light) 50%, var(--accent) 100%);
  border-radius: 16px;
  padding: 2.25rem 2.5rem 2.5rem;
  max-width: 620px; width: 100%;
  max-height: 88vh; overflow-y: auto;
  box-shadow: 0 32px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.07);
  transform: scale(.93) translateY(10px);
  transition: transform .3s cubic-bezier(.34,1.4,.64,1);
  scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent;
}
.teaser-lm.open .teaser-lm-card { transform: scale(1) translateY(0); }
.teaser-lm-card::-webkit-scrollbar { width: 5px; }
.teaser-lm-card::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }
.teaser-lm-close {
  position: absolute; top: 1.1rem; right: 1.1rem;
  background: rgba(255,255,255,.09); border: none;
  border-radius: 50%; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: rgba(255,255,255,.7);
  transition: background .15s ease, color .15s ease;
}
.teaser-lm-close:hover { background: rgba(255,255,255,.18); color: #fff; }
.teaser-lm-close svg { width: 16px; height: 16px; }
.teaser-lm-logo {
  display: flex; align-items: center; gap: .5rem;
  margin-bottom: 1.5rem;
  color: rgba(255,255,255,.75); font-size: .875rem; font-weight: 600;
}
.teaser-lm-logo img { width: 26px; height: 26px; }
.teaser-lm-card h2 {
  font-size: 1.5rem; font-weight: 700;
  color: #fff; letter-spacing: -.03em; line-height: 1.2;
  margin-bottom: .625rem;
}
.teaser-lm-card .teaser-lm-intro {
  font-size: .9375rem; color: rgba(255,255,255,.68); line-height: 1.65;
  margin-bottom: 2rem;
}
.teaser-lm-section { margin-bottom: 1.75rem; }
.teaser-lm-section h3 {
  font-size: .75rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: rgba(255,255,255,.4);
  margin-bottom: .875rem;
}
.teaser-lm-features {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: .7rem;
}
.teaser-lm-features li {
  display: flex; align-items: flex-start; gap: .75rem;
  color: rgba(255,255,255,.82); font-size: .875rem; line-height: 1.55;
}
.teaser-lm-features li svg {
  width: 16px; height: 16px; flex-shrink: 0;
  margin-top: .15rem; opacity: .75;
}
.teaser-lm-features li strong { color: #fff; font-weight: 600; }
.teaser-lm-divider {
  border: none; border-top: 1px solid rgba(255,255,255,.1);
  margin: 1.75rem 0;
}
.teaser-lm-privacy {
  display: flex; align-items: flex-start; gap: .75rem;
  padding: 1rem 1.125rem;
  background: rgba(255,255,255,.06); border-radius: 10px;
  border: 1px solid rgba(255,255,255,.09);
  margin-bottom: 2rem;
}
.teaser-lm-privacy svg { width: 18px; height: 18px; flex-shrink: 0; margin-top: .1rem; opacity: .7; }
.teaser-lm-privacy p { font-size: .8125rem; color: rgba(255,255,255,.65); line-height: 1.6; margin: 0; }
.teaser-lm-cta {
  display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
}
.teaser-lm-cta-btn {
  padding: .65rem 1.75rem;
  background: rgba(255,255,255,.95); border: none; border-radius: var(--radius-sm);
  color: var(--accent); font-size: .9375rem; font-weight: 700;
  cursor: pointer; transition: background .15s ease, transform .15s ease;
  white-space: nowrap;
}
.teaser-lm-cta-btn:hover { background: #fff; transform: translateY(-1px); }
.teaser-lm-cta-note { font-size: .8125rem; color: rgba(255,255,255,.45); }
@media (max-width: 640px) {
  .teaser-lm-card { padding: 1.75rem 1.5rem 2rem; }
  .teaser-lm-card h2 { font-size: 1.25rem; }
}


.auth-panel {
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  min-height: 100dvh;
  padding: calc(max(1rem,env(safe-area-inset-top)) + 3.5rem) 2rem max(2.5rem,env(safe-area-inset-bottom));
  background: var(--bg);
  position: relative;
}

.auth-footer {
  position: absolute;
  bottom: max(.75rem, env(safe-area-inset-bottom));
  left: 55%; right: 0;
  text-align: center;
  font-size: .75rem;
  color: var(--text-subtle);
  pointer-events: auto;
}
@media (max-width: 768px) {
  .auth-footer {
    position: static;
    order: 2;
    padding: .875rem 1rem max(.875rem, env(safe-area-inset-bottom));
    background: linear-gradient(160deg, var(--accent) 0%, var(--accent-dark) 100%);
    color: rgba(255,255,255,.45);
  }
  .auth-footer a { color: rgba(255,255,255,.6) !important; }
}


@media (max-width: 768px) {
  .auth-screen {
    display: flex; flex-direction: column;
  }
  .auth-panel {
    order: -1;
    min-height: auto;
    padding: calc(max(1rem,env(safe-area-inset-top)) + 3rem) 1rem 2.5rem;
  }
  .auth-teaser {
    order: 1;
    min-height: auto;
    padding: 2.5rem 1.5rem max(3rem, env(safe-area-inset-bottom));
    border-radius: 2rem 2rem 0 0;
    margin-top: -1px;
    position: relative;
  }
  .auth-teaser::before {
    content: '';
    position: absolute;
    top: .75rem;
    left: 50%;
    transform: translateX(-50%);
    width: 2.5rem; height: 4px;
    background: rgba(255,255,255,.3);
    border-radius: 2px;
  }
  .auth-teaser-inner {
    align-items: center; text-align: center;
  }
  .auth-teaser-logo { margin-bottom: 1.5rem; justify-content: center; }
  .auth-teaser-headline h1 { font-size: 1.375rem; }
  .auth-teaser-features {
    margin-top: 1.5rem;
    width: fit-content; margin-left: auto; margin-right: auto;
    text-align: left;
  }
  .auth-screenshot { height: 150px; }
  .auth-teaser-signup { margin-top: 1.75rem; }
}

.auth-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 2.5rem 2rem;
  width: 100%; max-width: 400px;
  border: 1px solid var(--border);
}
.auth-logo {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: 2rem;
}
.auth-logo svg { width: 40px; height: 40px; }
.auth-logo span { font-size: 1.5rem; font-weight: 700; color: var(--text); }
.auth-card h2 { font-size: 1.25rem; margin-bottom: 1.25rem; }
.auth-switch { margin-top: 1.25rem; font-size: .875rem; color: var(--text-muted); text-align: center; }
.auth-switch a { margin-left: .35rem; }
.form-group { margin-bottom: 1rem; min-width: 0; }
.form-group label { display: block; font-size: .875rem; font-weight: 500; margin-bottom: .35rem; }
.required-star { color: var(--red); }
.date-input-wrap { position: relative; }
.date-input-wrap input[type="date"] { padding-left: 2.25rem; width: 100%; }
.date-input-icon { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); width: 1rem; height: 1rem; color: var(--text-muted); pointer-events: none; }
.form-error   { color: var(--red);   font-size: .875rem; padding: .5rem; background: rgba(184,73,60,.08);  border-radius: var(--radius-sm); margin-bottom: .75rem; }
.form-success { color: #2D7A50;      font-size: .875rem; padding: .5rem; background: rgba(74,150,105,.10);  border-radius: var(--radius-sm); margin-bottom: .75rem; }


#app { display: flex; flex-direction: column; min-height: 100dvh; }


.app-topnav {
  position: sticky; top: 0; z-index: 200;
  height: var(--topbar-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(30,63,54,.04);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 2rem;
}
.app-topnav-logo {
  display: flex; align-items: center; gap: .5rem;
  font-size: 1rem; font-weight: 700; color: var(--text);
  text-decoration: none; flex-shrink: 0;
}
.app-topnav-logo:hover { text-decoration: none; }
.app-topnav-logo img { display: block; }
.app-topnav-links {
  display: flex; align-items: center; gap: .25rem;
  flex: 1; margin-left: .75rem;
}
.app-topnav-link {
  font-size: .875rem; font-weight: 500; color: var(--text-muted);
  background: none; border: none; cursor: pointer;
  padding: 0 .65rem; height: var(--topbar-h);
  display: inline-flex; align-items: center;
  position: relative;
  transition: color .18s;
}
.app-topnav-link:hover { color: var(--accent); }
.app-topnav-link.active { color: var(--accent); font-weight: 650; }
.app-topnav-link.active::after {
  content: ""; position: absolute;
  left: .65rem; right: .65rem; bottom: 0;
  height: 3px; border-radius: 3px 3px 0 0;
  background: var(--accent);
}
.app-topnav-actions {
  display: flex; align-items: center; gap: .5rem; flex-shrink: 0;
  margin-left: auto;
}
.app-topnav .lang-btn.active { color: var(--accent); border-color: var(--accent); }
.topnav-page-title {
  display: none; 
  flex: 1; min-width: 0;
  font-size: 1rem; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin: 0;
}


.app-hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 36px; height: 36px;
  background: none; border: none; cursor: pointer;
  padding: 0; border-radius: var(--radius-sm); transition: background .15s; flex-shrink: 0;
}
.app-hamburger:hover { background: var(--bg-hover); }
.app-hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .2s, opacity .2s; transform-origin: center;
}
.app-topnav.menu-open .app-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.app-topnav.menu-open .app-hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.app-topnav.menu-open .app-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }


.app-user-menu { position: relative; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .875rem; flex-shrink: 0;
  border: none; cursor: pointer;
  transition: opacity .15s;
}
.user-avatar:hover { opacity: .85; }
.avatar-notif-dot {
  position: absolute; top: 0; right: 0;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--red);
  border: 2px solid var(--bg-card);
  pointer-events: none;
}


.settings-popup {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 220px;
  background: var(--bg-card); border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
  padding: .3rem 0; z-index: 300;
}
.settings-popup-header {
  display: flex; align-items: center; gap: .6rem;
  padding: .65rem .85rem .5rem;
}
.settings-popup-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9375rem; flex-shrink: 0;
}
.settings-popup-info { overflow: hidden; min-width: 0; }
.settings-menu-item {
  display: flex; align-items: center; gap: .6rem;
  width: 100%; padding: .55rem .85rem;
  font-size: .875rem; color: var(--text); text-align: left;
  background: none; border: none; cursor: pointer;
  transition: background .12s;
  position: relative;
}
.notif-dot {
  position: absolute; top: 6px; right: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); pointer-events: none;
}
.settings-menu-item:hover { background: var(--bg-hover); }
a.settings-menu-item { text-decoration: none; }
.settings-menu-item svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-muted); }
.settings-menu-danger { color: var(--red) !important; }
.settings-menu-danger svg { color: var(--red) !important; }
.settings-menu-divider { border-top: 1px solid var(--border); margin: .3rem 0; }
.user-name { display: block; font-size: .875rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-email { display: block; font-size: .75rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


.app-mobile-menu {
  display: none;
  position: fixed; top: var(--topbar-h); left: 1rem; z-index: 199;
  width: 200px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(30,63,54,.14), 0 2px 6px rgba(30,63,54,.08);
  flex-direction: column;
  overflow: hidden;
  max-height: 0;
  transition: max-height .25s ease, opacity .2s ease;
  opacity: 0;
}
.app-mobile-menu.open { max-height: 360px; opacity: 1; }
.app-mobile-link {
  display: flex; align-items: center; gap: .65rem;
  padding: .75rem 1rem;
  font-size: .9375rem; font-weight: 500; color: var(--text-muted);
  text-decoration: none; background: none; border: none; cursor: pointer;
  width: 100%; text-align: left;
  border-bottom: 1px solid var(--border);
  transition: background .12s, color .12s;
}
.app-mobile-link:last-child { border-bottom: none; }
.app-mobile-link:hover { background: var(--bg-hover); color: var(--text); }
.app-mobile-link.active { color: var(--accent); font-weight: 600; }
.app-mobile-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.app-mobile-danger { color: var(--red) !important; }
.app-mobile-divider { border-top: 2px solid var(--border); margin: 0; }


.admin-mobile-chevron { width: 14px; height: 14px; margin-left: auto; flex-shrink: 0; transition: transform .2s; }
#nav-admin-mobile.submenu-open .admin-mobile-chevron { transform: rotate(90deg); }
.admin-mobile-submenu {
  display: none;
  position: fixed; top: var(--topbar-h); left: calc(1rem + 200px - 20px); z-index: 200;

  min-width: 175px;
  background: var(--bg-card);
  border: 1px solid var(--border); border-top: 2px solid var(--accent); border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(30,63,54,.14), 0 2px 6px rgba(30,63,54,.08);
  flex-direction: column; overflow: hidden;
  max-height: 0; opacity: 0; pointer-events: none;
  transition: max-height .25s ease, opacity .2s ease;
}
.admin-mobile-submenu.open { max-height: 400px; overflow-y: auto; opacity: 1; pointer-events: auto; }
@media (max-width: 768px) {
  .admin-mobile-submenu { display: flex; }
}


.main-content {
  flex: 1;
  display: flex; flex-direction: column;
  min-width: 0;
}
.topbar-title { font-size: 1.1rem; font-weight: 600; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: .5rem; }
.notif-badge {
  position: absolute; top: 2px; right: 2px;
  min-width: 16px; height: 16px; padding: 0 4px;
  background: var(--red); color: #fff;
  border-radius: 999px; font-size: .65rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none; line-height: 1;
}
.notif-panel {
  position: fixed; top: calc(var(--topbar-h) + 8px); right: 8px;
  width: min(380px, calc(100vw - 16px)); height: calc(100dvh - var(--topbar-h) - 16px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column;
  z-index: 300; transform: translateX(110%);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
  pointer-events: none;
}
.notif-panel.open { transform: translateX(0); pointer-events: auto; }
.notif-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--topbar-h); flex-shrink: 0;
  padding: 0 1rem 0 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: .9375rem; font-weight: 600; color: var(--text);
}
.notif-panel-body { flex: 1; overflow-y: auto; }
.notif-panel-header .btn-icon { color: var(--accent); }
.notif-panel-header .btn-icon:hover { background: var(--accent-glow); color: var(--accent-dark); }


.notif-tabs { display: flex; gap: 1rem; height: 100%; align-items: center; min-width: 0; }
.notif-tab-btn {
  background: none; border: none; border-bottom: 2px solid transparent;
  height: calc(100% - 2px); padding: 0; margin: 0;
  font: inherit; font-size: .875rem; font-weight: 600;
  color: var(--text-muted); cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: .35rem;
  transition: color .15s, border-color .15s;
}
.notif-tab-btn:hover { color: var(--text); }
.notif-tab-btn.active { color: var(--text); border-bottom-color: var(--accent); }
.notif-tab-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--red); flex-shrink: 0;
}


.changelog-item { padding: .875rem 1.25rem; border-bottom: 1px solid var(--border); }
.changelog-item.unread { background: color-mix(in srgb, var(--accent) 5%, var(--bg-card)); border-left: 3px solid var(--accent); padding-left: calc(1.25rem - 3px); }
.changelog-item-meta { font-size: .8rem; color: var(--text-muted); margin-bottom: .5rem; }
.changelog-item-meta strong { color: var(--text); font-size: .875rem; }
.changelog-item ul { margin: 0; padding: 0; list-style: none; font-size: .8125rem; }
.changelog-item li { display: flex; gap: .5rem; align-items: baseline; margin-bottom: .35rem; }
.changelog-item li:last-child { margin-bottom: 0; }
.changelog-item li.changelog-announcement { background: color-mix(in srgb, var(--orange) 12%, transparent); border-radius: var(--radius-sm); padding: .4rem .6rem; font-weight: 600; }


.announcement-banner { display: flex; align-items: flex-start; gap: .6rem; padding: .875rem 1.25rem .875rem calc(1.25rem - 3px); margin: .75rem; background: var(--bg-card); border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: var(--radius); font-weight: 600; font-size: .875rem; }
.announcement-banner .announcement-icon { font-weight: 700; line-height: 1.4; }
.announcement-banner .announcement-icon-wrap { display: flex; flex-direction: column; align-items: center; gap: .25rem; flex-shrink: 0; }
.announcement-banner.severity-info    { background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));  border-left-color: var(--accent); }
.announcement-banner.severity-warning { background: color-mix(in srgb, var(--orange) 8%, var(--bg-card)); border-left-color: var(--orange); }
.announcement-banner.severity-error   { background: color-mix(in srgb, var(--red) 8%, var(--bg-card));    border-left-color: var(--red); }
#ann-preview .announcement-banner { margin: 0; }
#notif-announcement:empty { display: none; }
#notif-announcement .announcement-banner { margin: .75rem .75rem 0; }
@media (max-width: 768px) {
  .notif-panel { height: calc(100dvh - var(--topbar-h) - 40px); }
}

.notif-swipe-wrap { position: relative; overflow: hidden; }
.notif-bg-read,
.notif-bg-delete {
  position: absolute; top: 0; bottom: 0;
  display: flex; align-items: center; gap: .4rem;
  font-size: .8125rem; font-weight: 600; color: #fff;
  padding: 0 1.25rem; pointer-events: none;
}
.notif-bg-read   { inset: 0; background: var(--accent); justify-content: flex-start; opacity: 0; z-index: 0; }
.notif-bg-delete { inset: 0; background: var(--red);    justify-content: flex-end;   opacity: 0; z-index: 0; }
.notif-swipe-wrap.sw-read   .notif-bg-read   { opacity: 1; }
.notif-swipe-wrap.sw-delete .notif-bg-delete { opacity: 1; }

@media (hover: hover) {
  .notif-bg-read, .notif-bg-delete { display: none; }
}

.notif-item {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: .875rem 1.25rem; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .12s;
  background: var(--bg-card); position: relative; width: 100%; z-index: 1;
}
.notif-item:hover { background: var(--bg-hover); }
.notif-item.unread { background: color-mix(in srgb, var(--accent) 5%, var(--bg-card)); border-left: 3px solid var(--accent); }


.notif-item-actions { display: none; gap: .15rem; align-items: center; flex-shrink: 0; margin-left: auto; }
.notif-item-actions .btn-icon { width: 30px; height: 30px; }
@media (hover: hover) {
  .notif-item-actions { display: flex; opacity: 0; transition: opacity .15s; }
  .notif-item:hover .notif-item-actions { opacity: 1; }
}
.notif-item-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); flex-shrink: 0; margin-top: .35rem;
  opacity: 0;
}
.notif-item.unread .notif-item-dot { opacity: 1; }
.notif-item-content { flex: 1; min-width: 0; }
.notif-item-title { font-size: .875rem; font-weight: 600; margin-bottom: .15rem; }
.notif-item-body  { font-size: .8125rem; color: var(--text-muted); line-height: 1.4; }
.notif-item-time  { font-size: .75rem; color: var(--text-subtle); margin-top: .2rem; }
.notif-empty {
  display: flex; align-items: center; justify-content: center;
  height: 100%; color: var(--text-muted); font-size: .9375rem;
}
.lang-switcher { display: flex; gap: 2px; }
.lang-btn {
  font-size: .75rem; font-weight: 600; padding: .25rem .45rem;
  border-radius: var(--radius-sm); color: var(--text-muted);
  border: 1.5px solid transparent;
  transition: all .15s;
}
.lang-btn.active { color: var(--accent); border-color: var(--accent); }
.content-area { flex: 1 1 auto; padding: 1.5rem; overflow-x: hidden; display: block; }
.app-footer {
  padding: .75rem 1.5rem;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: .75rem;
  color: var(--text-subtle);
}


.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem;
}
.card-title { font-size: 1rem; font-weight: 600; margin-bottom: 1rem; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border-input);
  border-radius: var(--radius);
  padding: 1.1rem 1.25rem;
  box-shadow: var(--shadow-md);
}
.stat-label { font-size: .8rem; color: var(--text-muted); margin-bottom: .25rem; }
.stat-value { font-size: 1.5rem; font-weight: 700; }
.stat-sub   { font-size: .75rem; color: var(--text-muted); margin-top: .2rem; }


.badge {
  display: inline-block; font-size: .7rem; font-weight: 600;
  padding: .15rem .5rem; border-radius: 20px;
}
.badge-shared         { background: rgba(30,63,54,.12);    color: var(--accent); }
.badge-plan           { background: rgba(30,63,54,.10);  color: var(--accent); }
.badge-template       { background: var(--bg-hover); color: var(--text-muted); border: 1px solid var(--border); }
.badge-closed         { background: rgba(184,73,60,.10); color: var(--red); }


.shares-list { display: flex; flex-direction: column; gap: .5rem; max-height: 260px; overflow-y: auto; }
.share-item {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto;
  gap: .2rem .5rem; padding: .6rem .75rem;
  background: var(--bg-hover); border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.share-item-main { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-width: 0; }
.share-item-main > div { min-width: 0; overflow: hidden; }
.share-item-name { font-weight: 600; font-size: .875rem; }
.share-item-email { font-size: .75rem; margin-left: .25rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; max-width: 100%; vertical-align: bottom; }
.share-item-meta  { grid-column: 1; display: flex; flex-wrap: wrap; gap: .35rem; }
.share-item-meta span { font-size: .72rem; color: var(--text-muted); }
.share-item-revoke {
  grid-column: 2; grid-row: 1 / 3; align-self: center;
  background: none; border: none; cursor: pointer;
  color: var(--text-subtle); font-size: 1.1rem; line-height: 1;
  padding: .2rem .35rem; border-radius: var(--radius-sm);
  transition: color .15s, background .15s;
}
.share-item-revoke:hover { color: var(--red); background: rgba(184,73,60,.08); }
.share-search-found {
  display: flex; align-items: center; gap: .4rem;
  font-size: .8rem; padding: .3rem .5rem;
  background: rgba(74,150,105,.08); border-radius: var(--radius-sm);
  color: var(--text);
}
.share-search-found svg { color: var(--green); flex-shrink: 0; }
.share-add-form,
.anon-link-form {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin-top: .5rem;
}
.share-row {
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.share-row .date-input-wrap { width: 100%; }
.share-row button { align-self: flex-end; }


.admin-subnav {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1.5rem;
}
.admin-subnav-btn {
  background: none; border: none; border-bottom: 2px solid transparent;
  padding: .6rem 1.1rem; margin-bottom: -1px;
  font: inherit; font-size: .875rem; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  transition: color .15s, border-color .15s;
}
.admin-subnav-btn:hover { color: var(--text); }
.admin-subnav-btn.active { color: var(--accent); border-bottom-color: var(--accent); }

/* -- Modal tabs */
.modal-tabs {
  display: flex; gap: 0;
  border-bottom: 1px solid var(--border);
  margin-bottom: 1rem;
}
.modal-tab-btn {
  background: none; border: none; border-bottom: 2px solid transparent;
  padding: .5rem 1rem; margin-bottom: -1px;
  font: inherit; font-size: .875rem; font-weight: 500;
  color: var(--text-muted); cursor: pointer;
  transition: color .15s, border-color .15s;
}
.modal-tab-btn:hover { color: var(--text); }
.modal-tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.cm-row-actions { display: flex; align-items: center; gap: .35rem; flex-shrink: 0; }
@media (max-width: 768px) {
  .cm-row { flex-wrap: wrap; }
  .cm-row-actions { width: 100%; justify-content: flex-end; padding-top: .35rem; border-top: 1px solid var(--border); margin-top: .35rem; }
}
.admin-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff; font-size: .7rem; font-weight: 700; margin-left: .3rem; vertical-align: middle; }
.admin-pagination { display: flex; gap: .35rem; margin-top: 1rem; flex-wrap: wrap; }
@media (max-width: 768px) {
  .admin-subnav { display: none; }
}


.admin-log-row { cursor: pointer; border-bottom: 1px solid var(--border); transition: background .12s; }
.admin-log-row:last-child { border-bottom: none; }
.admin-log-row:hover { background: var(--bg-hover); }

.admin-log-detail { display: flex; flex-direction: column; gap: 0; }
.admin-log-detail-section { display: flex; flex-direction: column; gap: .6rem; padding: .25rem 0; }
.admin-log-detail-divider { border-top: 1px solid var(--border); margin: .5rem 0 .75rem; }
.admin-log-detail-row { display: flex; gap: 1rem; align-items: baseline; }
.admin-log-detail-label {
  flex-shrink: 0; width: 130px;
  font-size: .8rem; font-weight: 600; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .02em;
}
.admin-log-detail-value { flex: 1; font-size: .9rem; line-height: 1.4; }

.admin-user-row {
  display: flex; align-items: center; gap: .75rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
}
.admin-user-row:last-child { border-bottom: none; }
.admin-user-info { flex: 1; min-width: 0; }
.admin-user-name {
  font-size: .875rem; font-weight: 500;
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap;
}
.admin-user-email {
  font-size: .8rem; color: var(--text-muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-top: .1rem;
}
.admin-user-meta {
  font-size: .72rem; color: var(--text-subtle); margin-top: .15rem;
}
.admin-user-actions { display: flex; gap: .3rem; flex-shrink: 0; }
.data-table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.data-table th { text-align: left; padding: .5rem .75rem; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); border-bottom: 1px solid var(--border); white-space: nowrap; }
.data-table td { padding: .55rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-hover); }
.admin-user-name-btn {
  background: none; border: none; padding: 0; margin: 0;
  font: inherit; font-weight: 500; font-size: .875rem;
  color: var(--text); cursor: pointer; text-align: left;
  text-decoration: underline; text-decoration-color: transparent;
  transition: text-decoration-color .15s, color .15s;
}
.admin-user-name-btn:hover { color: var(--accent); text-decoration-color: var(--accent); }


.user-stats-kpis {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem;
  margin-bottom: 1.25rem;
}
.user-stats-kpi {
  background: var(--bg-hover); border-radius: 8px;
  padding: .75rem; text-align: center;
}
.user-stats-kpi .kpi-value { font-size: 1.6rem; font-weight: 700; color: var(--accent); line-height: 1; }
.user-stats-kpi .kpi-label { font-size: .72rem; color: var(--text-subtle); margin-top: .25rem; }
.user-stats-login {
  display: flex; align-items: center; gap: .5rem;
  font-size: .8rem; color: var(--text-muted); margin-bottom: .5rem;
  padding: .5rem .75rem; background: var(--bg-hover); border-radius: 6px;
}
.user-stats-login:last-child { margin-bottom: 0; }
@media (max-width: 480px) { .user-stats-kpis { grid-template-columns: 1fr 1fr; } }

/* -- Admin user stats modal (large) */
#modal-overlay.modal-large .modal { max-width: 900px; }

.ust-loading { min-height: 200px; display: flex; align-items: center; justify-content: center; }

.ust-modal { display: flex; flex-direction: column; gap: .875rem; }

.ust-metrics {
  display: grid; grid-template-columns: repeat(5, 1fr); gap: .625rem;
}
.ust-metric {
  background: var(--bg-hover); border-radius: var(--radius-sm);
  padding: .625rem .75rem; min-width: 0;
}
.ust-metric-label { font-size: .7rem; color: var(--text-subtle); margin-bottom: .2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ust-metric-value { font-size: 1.25rem; font-weight: 700; color: var(--accent); line-height: 1.15; }
.ust-metric-value-sm { font-size: .85rem; font-weight: 600; }
.ust-metric-sub { font-size: .7rem; color: var(--text-subtle); margin-top: .15rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }


.ust-body {
  display: grid; grid-template-columns: 230px 1fr; gap: .625rem; align-items: start;
}
.ust-right { display: flex; flex-direction: column; gap: .625rem; }
.ust-grid-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .625rem; }
.ust-bottom { display: grid; grid-template-columns: repeat(3, 1fr); gap: .625rem; }

.ust-panel {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.ust-panel-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: .45rem .75rem; background: var(--bg); border-bottom: 1px solid var(--border);
}
.ust-panel-title { font-size: .75rem; font-weight: 600; color: var(--text); }
.ust-acc-btn { display: none; }
.ust-panel-body { padding: .5rem .75rem; }

.ust-rows { display: flex; flex-direction: column; }
.ust-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: .375rem; font-size: .75rem; padding: .25rem 0;
  border-bottom: 1px solid var(--bg-hover);
}
.ust-row:last-child { border-bottom: none; }
.ust-row span:first-child { color: var(--text-muted); flex: 1 1 0; min-width: 0; }
.ust-row span:last-child  { color: var(--text); font-weight: 500; text-align: right; flex-shrink: 1; white-space: normal; padding-left: .375rem; }
.ust-row-sub { display: block; font-size: .68rem; font-weight: 400; color: var(--text-muted); }

.ust-account-footer { display: flex; flex-direction: column; gap: .5rem; padding-top: .5rem; }
.ust-badges-row { display: flex; flex-wrap: wrap; gap: .35rem; }
.ust-badge {
  display: inline-flex; align-items: center; gap: .2rem;
  font-size: .7rem; font-weight: 500; padding: .18rem .45rem;
  border-radius: 999px; white-space: nowrap; line-height: 1.4;
}
.ust-badge-ok   { background: rgba(74,150,105,.12); color: var(--green); }
.ust-badge-off  { background: var(--bg-hover); color: var(--text-subtle); }
.ust-badge-warn { background: rgba(200,136,58,.12); color: var(--orange); }
[data-theme="dark"] .ust-badge-ok   { background: rgba(74,150,105,.2); }
[data-theme="dark"] .ust-badge-warn { background: rgba(200,136,58,.2); }

.ust-signals { display: flex; flex-wrap: wrap; gap: .35rem; padding: .25rem 0; }

.ust-footnote {
  font-size: .7rem; color: var(--text-subtle);
  border-top: 1px solid var(--border); padding-top: .625rem; margin: 0;
}

@media (max-width: 768px) {
  #modal-overlay.modal-large .modal { max-width: 100%; }
  .ust-metrics { grid-template-columns: 1fr 1fr; }
  .ust-body { display: block; }
  .ust-right { gap: 0; }
  .ust-grid-row, .ust-bottom { display: block; }
  .ust-panel { border-radius: 0; border-left: none; border-right: none; margin-top: -1px; }
  .ust-panel-body { display: none; }
  .ust-panel.ust-open .ust-panel-body { display: block; }
  .ust-acc-btn {
    display: flex; align-items: center; justify-content: center;
    width: 24px; height: 24px; border: none; background: none;
    cursor: pointer; color: var(--text-muted); flex-shrink: 0;
    transition: transform .2s; border-radius: var(--radius-sm);
  }
  .ust-acc-btn:hover { background: var(--bg-hover); }
  .ust-panel.ust-open .ust-acc-btn { transform: rotate(180deg); }
  .ust-bottom { margin-top: 0; }
  .ust-modal { gap: 0; }
  .ust-metrics { gap: .5rem; margin-bottom: .75rem; }
}


.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1.5rem; flex-wrap: wrap; gap: .75rem; }
.page-header h2 { font-size: 1.35rem; font-weight: 700; margin: 0; }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.page-title-row { display: flex; align-items: center; gap: .5rem; }
.page-back-btn { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; flex-shrink: 0; border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--bg-card); cursor: pointer; color: var(--text-muted); transition: background .15s, color .15s, border-color .15s; }
.page-back-btn:hover { background: var(--bg-hover); color: var(--text); border-color: var(--border-input); }
.page-header-left { min-width: 0; }
.page-header-right { display: flex; align-items: center; gap: 1rem; }
.header-summary { display: flex; align-items: center; gap: .3rem; }
.hs-item { padding: .2rem .65rem; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); }
.hs-label { font-size: .7rem; color: var(--text-muted); white-space: nowrap; margin-bottom: .1rem; }
.hs-value { font-size: .95rem; font-weight: 700; white-space: nowrap; }
@media (min-width: 901px) {
  .page-header > .header-summary { order: 2; }
  .page-header > .page-actions  { order: 3; }
}
@media (max-width: 900px) {
  .page-header { align-items: flex-start; }
  .page-header-left { flex: 1; order: 1; }
  .page-header > .page-actions { order: 1; align-self: flex-start; }
  .header-summary { display: grid; grid-template-columns: repeat(5, 1fr); width: 100%; gap: .2rem; order: 3; }
  .hs-item { padding: .15rem .25rem; text-align: center; }
  .hs-label { font-size: .58rem; white-space: normal; line-height: 1.2; }
  .hs-value { font-size: .72rem; }
}


.breadcrumb { display: flex; align-items: center; gap: .2rem; margin-bottom: .3rem; font-size: .75rem; min-width: 0; }
.breadcrumb .bc-link { color: var(--text-muted); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; transition: color .15s; }
.breadcrumb .bc-link:hover { color: var(--text); text-decoration: underline; }
.breadcrumb .bc-sep { color: var(--text-subtle); flex-shrink: 0; }
.breadcrumb .bc-current { color: var(--text-subtle); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
@media (max-width: 768px) {
  .breadcrumb .bc-link:not(.bc-parent),
  .breadcrumb .bc-sep,
  .breadcrumb .bc-current { display: none; }
  .breadcrumb .bc-parent { font-size: .825rem; color: var(--accent); max-width: none; }
  .breadcrumb .bc-parent::before { content: '‹ '; }
}


.action-menu { position: relative; display: inline-flex; flex-shrink: 0; }
.card-menu-btn {
  display: inline-flex; flex-direction: column; justify-content: center; align-items: center;
  gap: 3.5px; width: 30px; height: 30px;
  background: none; border: none; cursor: pointer;
  padding: 0; border-radius: var(--radius-sm); transition: background .15s; flex-shrink: 0;
}
.card-menu-btn:hover { background: var(--bg-hover); }
.card-menu-btn .cmb {
  display: block; width: 14px; height: 2px;
  background: var(--text-muted); border-radius: 2px;
  transition: transform .2s, opacity .2s, background .15s;
  transform-origin: center; flex-shrink: 0;
}
.card-menu-btn:hover .cmb { background: var(--text); }
.action-menu.is-open .card-menu-btn .cmb:nth-child(1) { transform: translateY(5px) rotate(45deg); background: var(--text); }
.action-menu.is-open .card-menu-btn .cmb:nth-child(2) { opacity: 0; transform: scaleX(0); }
.action-menu.is-open .card-menu-btn .cmb:nth-child(3) { transform: translateY(-5px) rotate(-45deg); background: var(--text); }
.action-menu-dropdown {
  position: absolute; right: 0; top: calc(100% + 6px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  min-width: 190px;
  z-index: 500;
  overflow: hidden;
}
.action-menu-item {
  display: block; width: 100%;
  padding: .6rem 1rem;
  font-size: .875rem; text-align: left;
  color: var(--text); white-space: nowrap;
  transition: background .12s;
}
.action-menu-item:hover { background: var(--bg-hover); }
.action-menu-item.danger { color: var(--red); }
.action-menu-divider { height: 1px; background: var(--border); margin: .25rem 0; }
.house-picker-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  background: none; border: none; cursor: pointer;
  font: inherit; font-size: 1.4rem; font-weight: 700; color: var(--text);
  padding: 0; border-radius: var(--radius-sm);
}
.house-picker-btn svg { color: var(--text-muted); flex-shrink: 0; margin-top: 3px; }
.house-picker-btn:hover svg { color: var(--text); }
.house-picker-item { display: flex; align-items: center; gap: .4rem; }
.house-picker-check { width: 1em; flex-shrink: 0; color: var(--accent); font-weight: 700; }






.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 500; display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 520px;
  max-height: 90dvh; display: flex; flex-direction: column;
  overflow: hidden;
}
.modal::before {
  content: '';
  display: block;
  height: 4px;
  background: var(--accent);
  flex-shrink: 0;
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.modal-header .btn-icon { color: var(--accent); }
.modal-header .btn-icon:hover { background: var(--accent-glow); color: var(--accent-dark); }
.modal-header h3 { font-size: 1rem; font-weight: 600; }
.modal-body { padding: 1.25rem; overflow-y: auto; flex: 1; min-height: 0; }
.modal-footer {
  padding: .875rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex; justify-content: flex-end; align-items: flex-start; gap: .5rem;
  flex-wrap: wrap;
}


.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.form-check { display: flex; align-items: center; justify-content: space-between; gap: .65rem; margin-top: .75rem; }
.form-check input[type="checkbox"] { order: 2; flex-shrink: 0; }
.form-check label { order: 1; flex: 1; }
.form-check input:not([type="checkbox"]) { width: auto; }
.form-hint { font-size: .8rem; color: var(--text-muted); margin-top: .25rem; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 7l3 3 3-3' stroke='%236B7280' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right .6rem center; background-size: 18px; padding-right: 2rem; }


.pm-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.5);
  z-index: 900;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.pm-modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 720px;
  max-height: 88dvh;
  display: flex; flex-direction: column;
  overflow: hidden;
  transform: scale(.96);
  transition: transform .25s cubic-bezier(.34,1.4,.64,1);
}
.pm-overlay:not(.hidden) .pm-modal { transform: scale(1); }
.pm-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.pm-header h3 { font-size: 1rem; font-weight: 600; }
.pm-header .btn-icon { color: var(--accent); }
.pm-header .btn-icon:hover { background: var(--accent-glow); color: var(--accent-dark); }
.pm-body { padding: 0 1.5rem 2rem; overflow-y: auto; overflow-x: hidden; flex: 1; min-height: 0; }
.pm-drag-handle { display: none; }


.policy-hero {
  background: linear-gradient(180deg, #EBF3EE 0%, #F4EFE4 100%);
  border-bottom: 1px solid #DDD8C8;
  padding: 3rem 1.5rem 2.5rem;
  text-align: center;
}
[data-theme="dark"] .policy-hero { background: rgba(74,150,105,.04); border-color: rgba(74,150,105,.12); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .policy-hero { background: rgba(74,150,105,.04); border-color: rgba(74,150,105,.12); }
}
.policy-hero .idx-eyebrow { margin: 0 auto 1.1rem; }
.policy-hero h1 { font-size: 1.75rem; font-weight: 700; letter-spacing: -.02em; margin: 0 0 .6rem; color: var(--text); }
.policy-hero p { color: var(--text-muted); font-size: .875rem; margin: 0; }
.policy-page { max-width: 700px; margin: 0 auto; padding: 1.5rem 1.25rem 4rem; }
.policy-section a { color: var(--accent); }
.policy-page h2 { font-size: 1.35rem; margin-bottom: .5rem; }
.policy-meta { font-size: .78rem; color: var(--text-subtle); margin-bottom: 1.75rem; }
.policy-section { margin-bottom: 2rem; }
.policy-section h3 {
  font-size: 1rem; font-weight: 600; color: var(--text);
  margin-bottom: .5rem; padding-bottom: .4rem;
  border-bottom: 1px solid var(--border);
}
.policy-section p, .policy-section li {
  font-size: .875rem; color: var(--text-muted); line-height: 1.65; margin-bottom: .4rem;
}
.policy-section ul { padding-left: 1.25rem; }
.policy-section li { list-style: disc; }
.policy-badge {
  display: inline-block; font-size: .7rem; font-weight: 600;
  letter-spacing: .04em; padding: .2rem .6rem; border-radius: 99px;
  background: rgba(30,63,54,.1); color: var(--accent); margin-bottom: 1.25rem;
}
.policy-divider { border: none; border-top: 2px dashed var(--border); margin: 2rem 0; }
.policy-notice {
  background: rgba(30,63,54,.07); border: 1px solid rgba(30,63,54,.2);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm); padding: .875rem 1rem;
  font-size: .8rem; color: var(--text-muted); line-height: 1.6;
}
.policy-notice strong { color: var(--text); }
.faq-q { font-weight: 600; color: var(--text); margin-bottom: .2rem; }
.faq-item { margin-bottom: 1.1rem; }


.faq-pwa-cta {
  display: flex; align-items: center; gap: .875rem;
  background: rgba(30,63,54,.06); border: 1px solid rgba(30,63,54,.18);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: .875rem 1.1rem; margin-bottom: 1.25rem;
  font-size: .875rem;
}
.faq-pwa-cta svg { width: 20px; height: 20px; color: var(--accent); flex-shrink: 0; align-self: flex-start; margin-top: .1rem; }
.faq-pwa-cta div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.faq-pwa-cta strong { font-weight: 600; color: var(--text); }
.faq-pwa-cta span { color: var(--text-muted); font-size: .825rem; }
.faq-pwa-cta a { color: var(--accent); text-decoration: none; font-size: .825rem; margin-top: .25rem; }
.faq-pwa-cta a:hover { text-decoration: underline; }
.faq-nav-section {
  background: linear-gradient(180deg, #EBF3EE 0%, #F4EFE4 100%);
  border-top: 1px solid #DDD8C8;
  border-bottom: 1px solid #DDD8C8;
  padding: 2rem 0 2.5rem;
}
[data-theme="dark"] .faq-nav-section {
  background: rgba(74,150,105,.04);
  border-color: rgba(74,150,105,.12);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .faq-nav-section {
    background: rgba(74,150,105,.04);
    border-color: rgba(74,150,105,.12);
  }
}
.faq-tiles-wrap {
  max-width: 1100px; margin: 0 auto; padding: 0 1.5rem;
}
.faq-nav-grid {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: .75rem;
}
.faq-nav-card {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: .45rem; padding: 1.1rem .75rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); text-decoration: none; color: var(--text);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.faq-nav-card:hover { border-color: var(--accent); box-shadow: var(--shadow); text-decoration: none; }
.faq-nav-card.active { border-color: var(--accent); background: rgba(30,63,54,.06); box-shadow: var(--shadow); }
.faq-nav-card.active .faq-nav-card-icon { background: rgba(30,63,54,.15); }
.faq-nav-card-icon {
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  background: rgba(30,63,54,.1); color: var(--accent);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: background .15s;
}
.faq-nav-card-icon.green  { background: rgba(74,150,105,.12); color: var(--green); }
.faq-nav-card-icon.orange { background: rgba(200,136,58,.12); color: var(--orange); }
[data-theme="dark"] .faq-nav-card-icon.green { color: var(--green); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .faq-nav-card-icon.green { color: var(--green); }
}
.faq-nav-card-icon svg { width: 18px; height: 18px; }
.faq-nav-card-title { font-size: .78rem; font-weight: 600; color: var(--text); line-height: 1.3; }
.faq-nav-card-count { font-size: .7rem; color: var(--text-muted); }
.faq-accordion { display: flex; flex-direction: column; gap: .4rem; margin-bottom: 1.5rem; }
.faq-sec { display: none; border: 1px solid var(--border); border-left-width: 3px; border-radius: var(--radius); overflow: hidden; scroll-margin-top: 80px; }
.faq-sec.faq-sec--visible { display: block; }
.faq-embed .faq-sec { display: block; }
.faq-sec--green  { border-left-color: var(--green); }
.faq-sec--orange { border-left-color: var(--orange); }
.faq-sec--blue   { border-left-color: var(--accent); }
.faq-sec-hdr {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .8rem 1.1rem; background: var(--bg-card); border: none; cursor: pointer;
  text-align: left; font-weight: 600; font-size: .875rem; color: var(--text);
  transition: background .15s;
}
.faq-sec-hdr:hover, .faq-sec-hdr.open { background: var(--bg-hover); }
.faq-sec-body { overflow: hidden; height: 0; transition: height .25s ease; }
.faq-sec-body-inner { padding: .15rem 0 .25rem; }
.faq-acc-item { border-top: 1px solid var(--border); }
.faq-q-btn {
  width: 100%; display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem;
  padding: .65rem 1.1rem; background: none; border: none; cursor: pointer;
  text-align: left; font-weight: 500; font-size: .85rem; color: var(--text);
  transition: background .15s; line-height: 1.45;
}
.faq-q-btn:hover { background: var(--bg-hover); }
.faq-a-body { overflow: hidden; height: 0; transition: height .2s ease; }
.faq-a-body-inner { padding: 0 1.1rem .8rem 1.1rem; }
.faq-a-body-inner p { font-size: .85rem; color: var(--text-muted); line-height: 1.65; margin-bottom: .4rem; }
.faq-a-body-inner p:last-child { margin-bottom: 0; }
.faq-a-body-inner a { color: var(--accent); }
.faq-chevron {
  flex-shrink: 0; margin-top: .1rem;
  transition: transform .2s ease; color: var(--text-muted);
}
.faq-sec-hdr.open .faq-chevron,
.faq-q-btn.open .faq-chevron { transform: rotate(90deg); }

.policy-footer { text-align: center; font-size: .75rem; color: var(--text-subtle); padding: 1.5rem 0 .5rem; }
.policy-topbar {
  position: sticky; top: 0; z-index: 100;
  height: 56px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(30,63,54,.03);
  display: flex; align-items: center; gap: .75rem;
  padding: 0 1.25rem;
}
.policy-topbar-title { font-size: 1.05rem; font-weight: 600; flex: 1; color: var(--text); }
@supports (padding: env(safe-area-inset-top)) {
  .policy-topbar {
    padding-top: env(safe-area-inset-top);
    height: calc(56px + env(safe-area-inset-top));
  }
}
@media print { .policy-topbar { display: none !important; } }


.toast-container {
  position: fixed; bottom: 1.5rem; right: 1.5rem;
  display: flex; flex-direction: column; gap: .5rem;
  z-index: 900;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: .75rem 1.1rem;
  font-size: .875rem; font-weight: 500;
  max-width: 320px;
  display: flex; align-items: center; gap: .6rem;
  animation: slideIn .25s ease;
}
.toast.success { border-left: 3px solid var(--green); }
.toast.error   { border-left: 3px solid var(--red);   }
.toast.info    { border-left: 3px solid var(--accent); }
@keyframes slideIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: translateX(0); } }


#sw-update-banner {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--accent);
  color: #fff;
  padding: .5rem .75rem .5rem 1rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 9998;
  white-space: nowrap;
  animation: slideIn .25s ease;
}
#sw-update-banner button {
  background: rgba(255,255,255,.2);
  border: none;
  color: #fff;
  padding: .25rem .6rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .875rem;
}
#sw-update-banner button:hover { background: rgba(255,255,255,.35); }


.settings-section { margin-bottom: 2rem; }
.settings-section h3 { font-size: .9rem; font-weight: 600; margin-bottom: .75rem; }


.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4rem 2rem; color: var(--text-muted); text-align: center; gap: 1rem;
}
.empty-state svg { width: 56px; height: 56px; opacity: .35; }
.empty-state p { font-size: .95rem; max-width: 320px; }




.action-menu-item { display: flex; align-items: center; }


.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute; right: 0; top: calc(100% + 4px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  min-width: 160px; z-index: 300;
  overflow: hidden;
}
.dropdown-item {
  display: flex; align-items: center; gap: .5rem;
  width: 100%; padding: .6rem 1rem;
  font-size: .875rem; color: var(--text);
  transition: background .15s;
}
.dropdown-item:hover { background: var(--bg-hover); }
.dropdown-item.danger { color: var(--red); }
.dropdown-divider { height: 1px; background: var(--border); }



.spinner {
  width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  animation: spin .7s linear infinite;
  margin: 2rem auto;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-wrap { display: flex; justify-content: center; padding: 3rem; }


@media (min-width: 769px) and (max-width: 1024px) {
  .content-area { padding: 1.25rem; }
}


@media (max-width: 768px) {
  .app-topnav { padding: 0 1rem; }
  .app-topnav-links { display: none; }
  .app-hamburger { display: flex; }
  .app-mobile-menu { display: flex; }
  .app-topnav-actions { margin-left: auto; }
  .app-topnav-actions .lang-switcher { display: none; }
  .content-area { padding: 1rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .page-header { flex-direction: row; align-items: center; }


  input, select, textarea { font-size: 16px; }


  .toast-container { left: 1rem; right: 1rem; bottom: 1rem; }
  .toast { max-width: none; }


  .page-actions { flex-wrap: wrap; }
}


@media (max-width: 480px) {
  .app-topnav { padding: 0 .75rem; gap: .5rem; }
  .topnav-page-title { font-size: 1rem; }
  .content-area { padding: .75rem; }
  .page-header { margin-bottom: 1rem; gap: .5rem; }
  .page-header h2 { font-size: 1.15rem; }

  .btn-sm { padding: .45rem .8rem; font-size: .8rem; }
  .page-actions .btn { font-size: .8rem; padding: .45rem .8rem; }
  .modal-footer .btn { padding: .6rem .95rem; font-size: .875rem; }

  .auth-card { padding: 1.75rem 1.25rem; }
  .stats-grid { grid-template-columns: 1fr; }

  .lang-switcher { gap: 1px; }
  .lang-btn { padding: .2rem .35rem; }
}


@media (max-height: 500px) {
  .content-area { padding-top: .5rem; padding-bottom: .5rem; }
  .page-header { margin-bottom: .5rem; }
}

@supports (padding: env(safe-area-inset-bottom)) {
  .app-topnav {
    padding-top: env(safe-area-inset-top);
    height: calc(var(--topbar-h) + env(safe-area-inset-top));
    padding-left:  max(2rem, env(safe-area-inset-left));
    padding-right: max(2rem, env(safe-area-inset-right));
  }
  .app-mobile-menu {
    top: calc(var(--topbar-h) + env(safe-area-inset-top));
  }
  .app-footer {
    padding-bottom: max(.75rem, env(safe-area-inset-bottom));
  }
  .content-area {
    padding-bottom: max(.25rem, env(safe-area-inset-bottom));
  }
  .toast-container {
    bottom: max(1.5rem, env(safe-area-inset-bottom));
    right:  max(1.5rem, env(safe-area-inset-right));
  }
  @media (max-width: 768px) {
    .app-topnav {
      padding-left:  max(1rem, env(safe-area-inset-left));
      padding-right: max(1rem, env(safe-area-inset-right));
    }
    .content-area {
      padding-left:   max(.75rem, env(safe-area-inset-left));
      padding-right:  max(.75rem, env(safe-area-inset-right));
      padding-bottom: max(1rem,   env(safe-area-inset-bottom));
    }
    .toast-container {
      left:   max(1rem, env(safe-area-inset-left));
      right:  max(1rem, env(safe-area-inset-right));
      bottom: max(1rem, env(safe-area-inset-bottom));
    }
  }
}




.help-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--bg-stripe); border: 1px solid var(--border-input);
  color: var(--text-muted); font-size: 9px; font-weight: 700;
  cursor: pointer; margin-left: 4px; vertical-align: middle;
  line-height: 1; flex-shrink: 0; font-style: italic;
  transition: background .15s, color .15s;
}
.help-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

.help-popover {
  position: fixed; z-index: 700;
  background: var(--bg-card); border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  padding: .6rem .85rem; font-size: .825rem; line-height: 1.55;
  color: var(--text); pointer-events: none;
}



.wizard-body { text-align: center; padding: .5rem 0; }
.wizard-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.wizard-title { font-size: 1.05rem; font-weight: 700; margin-bottom: .6rem; }
.wizard-desc { font-size: .9rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 1rem; }
.wizard-dots { display: flex; justify-content: center; gap: .4rem; margin-top: .75rem; }
.wizard-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--border-input); transition: background .2s;
}
.wizard-dot.active { background: var(--accent); }
.wizard-footer { display: flex; justify-content: space-between; align-items: center; width: 100%; }








.page-constrained { max-width: 860px; }


.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: .85rem;
}
.section-header h2 { font-size: 1.35rem; font-weight: 700; }
.section-header h3 { font-size: 1rem; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: .05em; }




.plan-form-section { border-top: 1px solid var(--border); padding-top: .875rem; margin-top: .875rem; }
.plan-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.plan-form-toggles { display: flex; gap: .5rem; border-top: 1px solid var(--border); padding-top: .875rem; margin-top: .875rem; }
.plan-form-toggle-item { flex: 1; display: flex; align-items: center; justify-content: space-between; gap: .65rem; background: var(--bg-hover); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .6rem .75rem; }
.plan-form-toggle-item label { font-size: .875rem; font-weight: 500; cursor: pointer; flex: 1; }
.plan-form-modules { border-top: 1px solid var(--border); padding-top: .875rem; margin-top: .875rem; }
.plan-form-section-label { font-size: .72rem; font-weight: 700; color: var(--text-subtle); text-transform: uppercase; letter-spacing: .07em; margin: 0 0 .5rem; }
.plan-mod-group + .plan-mod-group { margin-top: .875rem; }
.plan-mod-group-label { font-size: .8rem; font-weight: 600; color: var(--text); margin: 0 0 .4rem; }
.plan-mod-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .3rem; }
.plan-mod-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem; padding: .45rem .65rem; border-radius: var(--radius-sm); background: var(--bg-hover); border: 1px solid var(--border); }
.plan-mod-label { flex: 1; font-size: .8rem; cursor: pointer; }


.landing-nav {
  position: sticky; top: 0; z-index: 100;
  height: 60px;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(30,63,54,.04);
  display: flex; align-items: center; gap: 1rem;
  padding: 0 2rem;
}
.landing-nav-logo {
  display: flex; align-items: center; gap: .5rem;
  font-size: 1rem; font-weight: 700; color: var(--text);
  text-decoration: none; flex-shrink: 0;
}
.landing-nav-logo:hover { text-decoration: none; }
.landing-nav-logo img { display: block; }
.landing-nav-links {
  display: flex; align-items: center; justify-content: center; gap: .25rem;
  flex: 1;
}
.landing-nav-link {
  font-size: .875rem; font-weight: 500; color: var(--text-muted);
  text-decoration: none; padding: 0 .75rem;
  height: 60px; display: inline-flex; align-items: center;
  position: relative;
  transition: color .18s;
}
.landing-nav-link:hover { color: var(--accent); text-decoration: none; }
[data-theme="dark"] .landing-nav-link { color: var(--text-muted); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .landing-nav-link { color: var(--text-muted); }
}
.landing-nav-link.active { color: var(--accent); font-weight: 650; }
.landing-nav-link.active::after {
  content: ""; position: absolute;
  left: .75rem; right: .75rem; bottom: 0;
  height: 3px; border-radius: 3px 3px 0 0;
  background: var(--accent);
}
.landing-nav-actions {
  display: flex; align-items: center; gap: .5rem; flex-shrink: 0; margin-left: auto;
}
@supports (padding: env(safe-area-inset-top)) {
  .landing-nav {
    padding-top: env(safe-area-inset-top);
    height: calc(60px + env(safe-area-inset-top));
  }
  .landing-nav-link { height: calc(60px + env(safe-area-inset-top)); }
  .landing-mobile-menu {
    top: calc(60px + env(safe-area-inset-top));
  }
}
.landing-hamburger {
  display: none;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px; width: 36px; height: 36px;
  background: none; border: none; cursor: pointer;
  padding: 0; border-radius: var(--radius-sm);
  transition: background .15s;
}
.landing-hamburger:hover { background: var(--bg-hover); }
.landing-hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--text); border-radius: 2px;
  transition: transform .2s, opacity .2s;
  transform-origin: center;
}
.landing-nav.menu-open .landing-hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.landing-nav.menu-open .landing-hamburger span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.landing-nav.menu-open .landing-hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.landing-mobile-menu {
  display: none;
  position: fixed; top: 60px; left: 1rem; z-index: 98;
  width: 180px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(30,63,54,.14), 0 2px 6px rgba(30,63,54,.08);
  flex-direction: column;
  overflow: hidden;
  max-height: 0;
  transition: max-height .25s ease, opacity .2s ease;
  opacity: 0;
}
.landing-mobile-menu.open { max-height: 260px; opacity: 1; }
.landing-mobile-link {
  display: block; padding: .75rem 1.1rem;
  font-size: .9375rem; font-weight: 500; color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: color .15s, background .15s;
}
[data-theme="dark"] .landing-mobile-link { color: var(--text-muted); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .landing-mobile-link { color: var(--text-muted); }
}
.landing-mobile-link:last-child { border-bottom: none; }
.landing-mobile-link:hover { color: var(--accent); background: rgba(30,63,54,.04); text-decoration: none; }
[data-theme="dark"] .landing-mobile-link:hover { color: var(--green); background: rgba(74,150,105,.06); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .landing-mobile-link:hover { color: var(--green); background: rgba(74,150,105,.06); }
}
.landing-mobile-link.active { color: var(--accent); font-weight: 650; }
[data-theme="dark"] .landing-mobile-link.active { color: var(--green); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .landing-mobile-link.active { color: var(--green); }
}

@media (max-width: 768px) {
  .landing-nav { padding-left: 1rem; padding-right: 1rem; }
  .landing-nav-links { display: none; }
  .landing-hamburger { display: flex; }
  .landing-mobile-menu { display: flex; }
  .landing-nav.menu-open ~ .landing-mobile-menu { max-height: 320px; }
}
@supports (padding: env(safe-area-inset-top)) {
  @media (max-width: 768px) {
    .landing-nav {
      padding-top: env(safe-area-inset-top);
      height: calc(60px + env(safe-area-inset-top));
    }
    .landing-mobile-menu {
      top: calc(60px + env(safe-area-inset-top));
    }
  }
}


.btn-lg { padding: .75rem 1.75rem; font-size: 1rem; font-weight: 600; }

.lp-hero {
  padding: 2rem 1.5rem 0;
  background:
    radial-gradient(circle, rgba(0,0,0,.07) 1px, transparent 1px),
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(30,63,54,.13) 0%, transparent 65%),
    radial-gradient(ellipse 45% 35% at 75% 15%, rgba(74,150,105,.09) 0%, transparent 55%);
  background-size: 22px 22px, 100% 100%, 100% 100%;
}
[data-theme="dark"] .lp-hero {
  background:
    radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1px),
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(30,63,54,.13) 0%, transparent 65%),
    radial-gradient(ellipse 45% 35% at 75% 15%, rgba(74,150,105,.09) 0%, transparent 55%);
  background-size: 22px 22px, 100% 100%, 100% 100%;
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .lp-hero {
    background:
      radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1px),
      radial-gradient(ellipse 90% 55% at 50% 0%, rgba(30,63,54,.13) 0%, transparent 65%),
      radial-gradient(ellipse 45% 35% at 75% 15%, rgba(74,150,105,.09) 0%, transparent 55%);
    background-size: 22px 22px, 100% 100%, 100% 100%;
  }
}
.lp-hero-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: start;
}
.lp-hero-text { display: flex; flex-direction: column; align-items: flex-start; }
.lp-hero-h1 {
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800; line-height: 1.1;
  letter-spacing: -.03em;
  margin: .75rem 0 1.25rem;
  background: linear-gradient(130deg, var(--accent) 0%, var(--accent-light) 65%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.lp-hero-sub {
  font-size: .9375rem; color: var(--text-muted);
  line-height: 1.65; margin: 0 0 1.25rem;
}
.lp-hero-explainer {
  max-width: 600px; margin: 0 auto 2rem;
  text-align: left;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.lp-hero-explainer p {
  font-size: .875rem; color: var(--text-muted); line-height: 1.7; margin: 0;
}
.lp-hero-explainer p + p { margin-top: .75rem; }
.lp-hero-actions {
  display: flex; align-items: center; justify-content: center;
  gap: .75rem; flex-wrap: wrap; margin-bottom: 1rem;
}
.lp-hero-trial { font-size: .8rem; color: var(--text-subtle); margin: 0; }
.lp-hero-device-hint {
  display: flex; align-items: center; gap: .4rem; flex-wrap: wrap; justify-content: center;
  font-size: .8rem; color: var(--text-subtle); margin: 1.25rem 0 0;
}
.lp-hero-device-hint svg { width: 14px; height: 14px; flex-shrink: 0; opacity: .7; }
.lp-hero-device-hint a { color: var(--accent); text-decoration: none; white-space: nowrap; }
.lp-hero-device-hint a:hover { text-decoration: underline; }


.lp-hero-img {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,.12), 0 3px 10px rgba(0,0,0,.06);
  border: 1px solid var(--border);
}
.lp-hero-img img { width: 100%; display: block; }


.lp-trust-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2rem;
  padding: 1.25rem 1.5rem .5rem;
}
.lp-trust-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.lp-trust-item svg { width: 14px; height: 14px; color: var(--accent); flex-shrink: 0; }

.lp-section { padding: 4.5rem 1.5rem; }
.lp-section--alt { background: rgba(74,150,105,.06); border-top: 1px solid rgba(74,150,105,.13); border-bottom: 1px solid rgba(74,150,105,.13); }
[data-theme="dark"] .lp-section--alt { background: rgba(74,150,105,.08); border-top-color: rgba(74,150,105,.16); border-bottom-color: rgba(74,150,105,.16); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .lp-section--alt { background: rgba(74,150,105,.08); border-top-color: rgba(74,150,105,.16); border-bottom-color: rgba(74,150,105,.16); }
}
.lp-section--cta {
  text-align: center;
  background: linear-gradient(160deg, var(--accent-dark) 0%, var(--accent) 55%, var(--accent) 100%);
  padding: 4rem 1.5rem;
}
.lp-section--cta h2 { font-size: 1.75rem; font-weight: 700; color: #fff; margin: 0 0 .6rem; }
.lp-section--cta p { font-size: 1rem; color: rgba(255,255,255,.75); margin: 0 0 2rem; }
.lp-section--cta .btn-primary { background: #fff; color: var(--accent); border-color: transparent; }
.lp-section--cta .btn-primary:hover { background: rgba(255,255,255,.9); color: var(--accent); }
.lp-section--cta .btn-secondary { background: transparent; border-color: rgba(255,255,255,.4); color: #fff; }
.lp-section--cta .btn-secondary:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.6); }
.lp-section-inner { max-width: 900px; margin: 0 auto; }
.lp-section-title {
  font-size: clamp(1.4rem, 3vw, 1.875rem);
  font-weight: 700; color: var(--text);
  text-align: center; margin: 0 0 .5rem;
}
.lp-section-sub { font-size: .95rem; color: var(--text-muted); text-align: center; margin: 0 0 2.5rem; }

.lp-features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1.5rem; margin-top: 2.5rem;
}
.lp-feature-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: transform .18s ease, box-shadow .18s ease;
}
.lp-feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,.09);
}
[data-theme="dark"] .lp-feature-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.35); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .lp-feature-card:hover { box-shadow: 0 8px 24px rgba(0,0,0,.35); }
}
.lp-feature-icon {
  width: 40px; height: 40px;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem; color: var(--accent);
}
.lp-feature-icon svg { width: 20px; height: 20px; }
.lp-feature-card h3 { font-size: .9375rem; font-weight: 600; margin: 0 0 .5rem; color: var(--text); }
.lp-feature-card p { font-size: .85rem; color: var(--text-muted); line-height: 1.6; margin: 0; }
.lp-features > .lp-feature-card:nth-child(2) .lp-feature-icon,
.lp-features > .lp-feature-card:nth-child(5) .lp-feature-icon { background: rgba(74,150,105,.12); color: var(--green); }
.lp-features > .lp-feature-card:nth-child(3) .lp-feature-icon,
.lp-features > .lp-feature-card:nth-child(6) .lp-feature-icon { background: rgba(200,136,58,.12); color: var(--orange); }


.lp-steps {
  display: flex; align-items: flex-start; gap: 1rem; margin-top: 2.5rem; flex-wrap: wrap;
}
.lp-step { flex: 1 1 180px; text-align: center; }
.lp-step-icon {
  width: 52px; height: 52px;
  background: rgba(30,63,54,.12);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1rem; color: var(--accent);
}
.lp-step-icon svg { width: 22px; height: 22px; }
.lp-step-icon--green { background: rgba(74,150,105,.12); color: var(--green); }
.lp-step-icon--orange { background: rgba(200,136,58,.12); color: var(--orange); }
.lp-step h3 { font-size: .9375rem; font-weight: 600; margin: 0 0 .4rem; color: var(--text); }
.lp-step p { font-size: .85rem; color: var(--text-muted); line-height: 1.6; margin: 0; }
.lp-step-arrow { font-size: 1.25rem; color: var(--text-subtle); padding-top: 1rem; flex-shrink: 0; align-self: flex-start; margin-top: 1rem; }


.lp-showcase {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3.5rem; align-items: center;
  max-width: 1000px; margin: 0 auto;
}
.lp-showcase--reverse .lp-showcase-img { order: 2; }
.lp-showcase--reverse .lp-showcase-text { order: 1; }
.lp-showcase-tag {
  font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  color: var(--accent); margin-bottom: .75rem; display: inline-block;
  background: rgba(30,63,54,.08); border: 1px solid rgba(30,63,54,.18);
  padding: .2rem .65rem; border-radius: 99px;
}
.lp-showcase-text h2 {
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  font-weight: 700; line-height: 1.2;
  margin: .25rem 0 1rem; color: var(--text);
}
.lp-showcase-text > p { font-size: .9375rem; color: var(--text-muted); line-height: 1.7; margin: 0 0 1.25rem; }
.lp-check-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.lp-check-list li { font-size: .875rem; color: var(--text-muted); padding-left: 1.5rem; position: relative; line-height: 1.4; }
.lp-check-list li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.lp-screenshot { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow-lg); border: 1px solid var(--border); display: block; }


.lp-feature-card-header { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .5rem; }
.lp-feature-card-header h3 { margin: 0; }
.lp-feature-plan-badge {
  font-size: .65rem; font-weight: 700; letter-spacing: .04em;
  background: rgba(30,63,54,.12); color: var(--blue);
  border-radius: 99px; padding: .15rem .5rem; white-space: nowrap; flex-shrink: 0;
}
.lp-coming-badge {
  font-size: .65rem; font-weight: 700; letter-spacing: .04em;
  background: rgba(200,136,58,.12); color: var(--orange, #f97316);
  border-radius: 99px; padding: .15rem .5rem; white-space: nowrap; flex-shrink: 0;
}


.lp-device-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.lp-device-panel {
  padding: 1.75rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
}
.lp-device-panel--primary {
  border-color: var(--accent);
  border-width: 2px;
  box-shadow: 0 0 0 4px rgba(30,63,54,.08);
}
.lp-device-panel-head {
  display: flex;
  align-items: flex-start;
  gap: .875rem;
  margin-bottom: 1.25rem;
}
.lp-device-panel-icon {
  width: 44px; height: 44px;
  background: var(--bg-hover);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
}
.lp-device-panel-icon svg { width: 22px; height: 22px; }
.lp-device-panel-head h3 { margin: 0 0 .2rem; font-size: 1rem; }
.lp-device-pwa-cta {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  background: rgba(30,63,54,.06);
  border: 1px solid rgba(30,63,54,.2);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent);
}
.lp-device-pwa-icon {
  flex-shrink: 0;
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  padding-top: .1rem;
}
.lp-device-pwa-icon svg { width: 28px; height: 28px; }
.lp-device-pwa-cta strong { display: block; margin-bottom: .3rem; font-size: .9375rem; }
.lp-device-pwa-cta p { margin: 0; line-height: 1.5; }


.lp-features-inner { column-gap: 3rem; row-gap: 0; }

.lp-features-inner .policy-badge      { grid-column: 1; grid-row: 1; justify-self: start; align-self: start; }
.lp-features-inner .lp-features-copy  { grid-column: 1; grid-row: 2; align-self: start; }
.lp-features-inner .lp-hero-explainer { grid-column: 1; grid-row: 3; align-self: start; margin: 0 0 2.5rem; }
.lp-features-inner .faq-pwa-cta       { grid-column: 1; grid-row: 3; align-self: start; margin: 0; }
.lp-hero-inner > .guides-hero-img      { grid-column: 2; grid-row: 1 / 3; align-self: start; }
.lp-hero-inner > .faq-pwa-cta         { grid-column: 1; grid-row: 2; align-self: start; }
.lp-hero-inner > .lp-hero-explainer   { grid-column: 1; grid-row: 2; align-self: start; margin: 0 0 2.5rem; }
.lp-features-inner .guides-hero-img   { grid-column: 2; grid-row: 1 / 4; align-self: start; }

@media (max-width: 768px) {
  .lp-hero { padding: 2rem 1.25rem 2rem; background: radial-gradient(ellipse 120% 50% at 50% 0%, rgba(30,63,54,.08) 0%, transparent 70%) !important; background-size: 100% 100% !important; }
  .lp-hero-inner { grid-template-columns: 1fr; gap: 1.75rem; }
  .lp-hero-text { align-items: center; text-align: center; }
  .lp-hero-img { border-radius: var(--radius); }

  .lp-features-inner { row-gap: 0; text-align: center; }
  .lp-features-inner .policy-badge      { grid-column: 1; grid-row: 1; justify-self: center; margin-bottom: .4rem; }
  .lp-features-inner .lp-features-copy  { grid-column: 1; grid-row: 2; }
  .lp-features-inner .guides-hero-img   { grid-column: 1; grid-row: 3; max-width: 280px; margin: 1rem auto 0; }
  .lp-features-inner .lp-hero-explainer { grid-column: 1; grid-row: 4; text-align: left; margin-top: 1rem; }
  .lp-features-inner .faq-pwa-cta       { grid-column: 1; grid-row: 4; margin-top: 1rem; }
  .lp-hero-inner > .guides-hero-img     { grid-column: 1; grid-row: 2; max-width: 280px; margin: 0 auto; }
  .lp-hero-inner > .faq-pwa-cta        { grid-column: 1; grid-row: 3; margin-top: 0; }
  .lp-hero-inner > .lp-hero-explainer  { grid-column: 1; grid-row: 3; margin: 0; }
  .lp-trust-strip { gap: 1rem .875rem; padding: .75rem 1rem; }
  .lp-trust-item { font-size: .75rem; }
  .lp-section { padding: 3rem 1.25rem; }
  .lp-features { grid-template-columns: 1fr; gap: 1rem; }
  .lp-steps { flex-direction: column; align-items: center; }
  .lp-step-arrow { transform: rotate(90deg); align-self: center; margin: 0; }
  .lp-showcase { grid-template-columns: 1fr; gap: 1.5rem; }
  .lp-showcase--reverse .lp-showcase-img { order: unset; }
  .lp-showcase--reverse .lp-showcase-text { order: unset; }
  .lp-device-split { grid-template-columns: 1fr; }
  .lp-device-panel--primary { box-shadow: none; }
}


.landing-login-overlay {
  position: fixed; inset: 0; z-index: 800;
  background: rgba(0,0,0,.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.landing-login-overlay.open { opacity: 1; pointer-events: all; }
.landing-login-card {
  position: relative;
  max-height: 90dvh; overflow-y: auto;
  animation: none;
}
.landing-login-card.auth-card { padding: 0; }
.lm-top-bar {
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--green));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.lm-body { padding: 2rem 2rem 1.75rem; }
@media (max-width: 480px) { .lm-body { padding: 1.5rem 1.25rem 1.5rem; } }
.landing-login-card .auth-logo { margin-bottom: 1.5rem; }
.landing-login-card h2 { font-size: 1.35rem; font-weight: 800; letter-spacing: -.025em; margin: 0 0 .35rem; }
.landing-login-card .lm-sub { font-size: .875rem; color: var(--text-muted); line-height: 1.6; margin: 0 0 1.25rem; }
.landing-login-card .lm-info-msg { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .75rem; font-size: .875rem; margin-bottom: .75rem; }
.landing-login-card .idx-btn-primary { width: 100%; justify-content: center; }
.landing-login-card .auth-switch { font-size: .8125rem; margin-top: 1rem; }
.landing-login-card a { color: var(--accent); }
.landing-login-card .auth-switch a { text-decoration: none; margin-left: 0; }
.landing-login-card .auth-switch a:hover { text-decoration: underline; }
#lm-signup-terms-label a, #signup-terms-label a { color: var(--accent-light); text-decoration: underline; font-weight: 500; }
#lm-signup-terms-label a:hover, #signup-terms-label a:hover { color: var(--accent-dark); }
.lm-success-state { text-align: center; padding: .5rem 0; }
.lm-success-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: rgba(30,63,54,.1); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
}
.landing-login-close {
  position: absolute; top: .75rem; right: .75rem;
  width: 32px; height: 32px;
  color: var(--accent);
}
.landing-login-close:hover { background: var(--accent-glow); color: var(--accent-dark); }


.pwa-guide-card {
  position: relative;
  background: var(--bg-card); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 100%; max-width: 520px;
  max-height: 90dvh; overflow-y: auto;
  padding: 2rem 1.75rem 1.75rem;
}
.pwa-guide-header {
  display: flex; align-items: flex-start; gap: 1rem;
  margin-bottom: 1.5rem;
}
.pwa-guide-icon {
  width: 40px; height: 40px; flex-shrink: 0;
  color: var(--accent);
}
.pwa-guide-header h2 { font-size: 1.15rem; margin: 0 0 .3rem; }
.pwa-guide-header p { margin: 0; font-size: .875rem; }
.pwa-tabs {
  display: flex; gap: .5rem; margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border); padding-bottom: .75rem;
}
.pwa-tab {
  display: flex; align-items: center; gap: .4rem;
  padding: .4rem .75rem; border-radius: var(--radius-sm);
  font-size: .8rem; font-weight: 500;
  background: none; border: 1px solid transparent;
  color: var(--text-muted); cursor: pointer;
  transition: background .15s, color .15s;
}
.pwa-tab svg { width: 14px; height: 14px; flex-shrink: 0; }
.pwa-tab:hover { background: var(--bg-hover); color: var(--text); }
.pwa-tab.active { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme="dark"] .pwa-tab.active { color: #000; }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .pwa-tab.active { color: #000; }
}
.pwa-steps {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column; gap: .75rem;
}
.pwa-steps li {
  display: flex; gap: .875rem; align-items: flex-start;
}
.pwa-step-num {
  flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-size: .75rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-top: .1rem;
}
[data-theme="dark"] .pwa-step-num { color: #000; }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .pwa-step-num { color: #000; }
}
.pwa-steps li > div { flex: 1; }
.pwa-steps li strong { display: block; font-size: .9rem; margin-bottom: .2rem; }
.pwa-steps li p { margin: 0; font-size: .8rem; color: var(--text-muted); line-height: 1.5; }
.pwa-step-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; margin-top: .4rem;
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.pwa-step-icon svg { width: 18px; height: 18px; color: var(--text-muted); }
@media (max-width: 560px) {
  .pwa-guide-card { padding: 1.5rem 1.25rem 1.25rem; }
  .pwa-tabs { gap: .35rem; }
  .pwa-tab { padding: .35rem .5rem; font-size: .75rem; }
}


.auth-screen--simple {
  display: flex; align-items: center; justify-content: center;
  grid-template-columns: unset;
  background: var(--bg);
}
.auth-screen--simple .auth-panel {
  background: transparent;
  min-height: 100dvh;
  width: 100%;
  padding-top: 60px;
}
.auth-screen--simple .auth-card {
  border-top: 4px solid var(--accent);
  box-shadow: 0 8px 32px rgba(30,63,54,.13), 0 2px 8px rgba(0,0,0,.06);
}
[data-theme="dark"] .auth-screen--simple .auth-card {
  box-shadow: 0 8px 32px rgba(30,63,54,.18), 0 2px 8px rgba(0,0,0,.22);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .auth-screen--simple .auth-card {
    box-shadow: 0 8px 32px rgba(30,63,54,.18), 0 2px 8px rgba(0,0,0,.22);
  }
}
.auth-screen--simple .btn-primary {
  height: 52px;
  padding: 0 22px;
  font-size: .9375rem;
  font-weight: 700;
}
.auth-screen--simple .btn-secondary {
  height: 48px;
  padding: 0 22px;
  font-size: .9375rem;
  font-weight: 600;
}
.auth-screen--simple .auth-footer {
  left: 0;
  background: none;
  color: var(--text-subtle);
}
.auth-screen--simple .auth-footer a { color: var(--accent) !important; }
.auth-screen--simple .auth-card a { color: var(--accent); }
.auth-screen--simple .auth-card a.btn-primary { color: #fff; text-decoration: none; }
.auth-screen--simple .auth-card a.btn-secondary { color: var(--text); text-decoration: none; }
.auth-screen--simple .auth-card a.btn-secondary:hover { color: var(--accent); }
.auth-topbar {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 60px;
  display: flex; align-items: center; gap: 1rem;
  padding: 0 2rem;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(30,63,54,.04);
  z-index: 2;
}
@supports (padding: env(safe-area-inset-top)) {
  .auth-topbar {
    padding-top: env(safe-area-inset-top);
    height: calc(60px + env(safe-area-inset-top));
  }
}
.auth-topbar-logo {
  display: flex; align-items: center; gap: .5rem;
  font-size: 1rem; font-weight: 700; color: var(--text);
  text-decoration: none; flex-shrink: 0;
}
.auth-topbar-logo:hover { text-decoration: none; color: var(--text); opacity: .8; }
.auth-topbar-logo img { display: block; }
.auth-topbar-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
@media (max-width: 768px) {
  .auth-screen--simple .auth-footer {
    position: absolute;
    bottom: max(.75rem, env(safe-area-inset-bottom));
    left: 0; right: 0;
    background: none;
    color: var(--text-subtle);
  }
}


.gd-hero { padding-top: 48px; }
@media (max-width: 600px) { .gd-hero { padding-top: 40px; } }


.gd-articles-section {
  background: linear-gradient(180deg, #EBF3EE 0%, #F4EFE4 100%);
  border-top: 1px solid #DDD8C8;
  border-bottom: 1px solid #DDD8C8;
}
[data-theme="dark"] .gd-articles-section {
  background: rgba(74,150,105,.04);
  border-color: rgba(74,150,105,.12);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .gd-articles-section {
    background: rgba(74,150,105,.04);
    border-color: rgba(74,150,105,.12);
  }
}


.gd-quicklinks {
  margin-top: 1.5rem;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem 1.125rem;
  max-width: 480px;
}
.gd-quicklinks-head { margin-bottom: .875rem; }
.gd-quicklinks-head strong { display: block; font-size: .875rem; font-weight: 700; color: var(--text); margin-bottom: .2rem; }
.gd-quicklinks-head span { font-size: .775rem; color: var(--text-muted); line-height: 1.4; }
.gd-quicklinks-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; }
.gd-quicklink {
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  padding: .625rem .375rem; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg);
  text-decoration: none; color: var(--text-muted);
  font-size: .72rem; font-weight: 500; text-align: center; line-height: 1.3;
  transition: border-color .15s, color .15s, background .15s;
}
.gd-quicklink:hover { border-color: var(--accent); color: var(--accent); background: rgba(30,63,54,.05); text-decoration: none; }
.gd-quicklink-icon {
  width: 36px; height: 36px; border-radius: 8px;
  background: rgba(30,63,54,.1); color: var(--accent);
  display: flex; align-items: center; justify-content: center;
}
[data-theme="dark"] .gd-quicklink-icon { background: rgba(74,150,105,.15); color: var(--green); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .gd-quicklink-icon { background: rgba(74,150,105,.15); color: var(--green); }
}
.gd-quicklink-icon svg { width: 18px; height: 18px; }
@media (max-width: 768px) { .gd-quicklinks { display: none; } }


.guides-hero {
  padding: 2rem 1.5rem 1.5rem;
  background:
    radial-gradient(circle, rgba(0,0,0,.07) 1px, transparent 1px),
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(30,63,54,.13) 0%, transparent 65%),
    radial-gradient(ellipse 45% 35% at 75% 15%, rgba(74,150,105,.09) 0%, transparent 55%);
  background-size: 22px 22px, 100% 100%, 100% 100%;
}
[data-theme="dark"] .guides-hero {
  background:
    radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1px),
    radial-gradient(ellipse 90% 55% at 50% 0%, rgba(30,63,54,.13) 0%, transparent 65%),
    radial-gradient(ellipse 45% 35% at 75% 15%, rgba(74,150,105,.09) 0%, transparent 55%);
  background-size: 22px 22px, 100% 100%, 100% 100%;
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .guides-hero {
    background:
      radial-gradient(circle, rgba(255,255,255,.06) 1px, transparent 1px),
      radial-gradient(ellipse 90% 55% at 50% 0%, rgba(30,63,54,.13) 0%, transparent 65%),
      radial-gradient(ellipse 45% 35% at 75% 15%, rgba(74,150,105,.09) 0%, transparent 55%);
    background-size: 22px 22px, 100% 100%, 100% 100%;
  }
}
.guides-hero-inner {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3rem; align-items: start;
}
.guides-hero-text { display: flex; flex-direction: column; align-items: flex-start; grid-column: 1; grid-row: 1; }
.guides-hero-img  { grid-column: 2; grid-row: 1 / 3; align-self: start; }
.guides-hero-inner > .guides-featured-card { grid-column: 1; grid-row: 2; }
.guides-hero-label {
  display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  padding: .2rem .65rem; border-radius: 99px;
  background: rgba(30,63,54,.1); color: var(--accent); margin-bottom: 1.25rem;
}
.guides-hero-title {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800; line-height: 1.15; letter-spacing: -.025em;
  margin: .75rem 0 1rem;
  background: linear-gradient(130deg, var(--accent) 0%, var(--accent-light) 65%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.guides-hero-sub { font-size: .9375rem; color: var(--text-muted); line-height: 1.65; margin: 0 0 1.25rem; }
.guides-hero-img img { width: 100%; display: block; border-radius: var(--radius-lg); }


.guides-featured-card {
  display: flex; flex-direction: row; gap: .875rem; align-items: center;
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: .75rem;
  text-decoration: none; color: inherit;
  transition: box-shadow .15s, border-color .15s;
}
.guides-featured-card:hover { border-color: var(--accent); box-shadow: var(--shadow); text-decoration: none; }
.guides-featured-card:hover * { text-decoration: none; }
.guides-featured-card-img {
  width: 110px; height: 82px; flex-shrink: 0;
  border-radius: var(--radius-sm); overflow: hidden; background: var(--bg-hover);
  display: flex;
}
.guides-featured-card-img img { width: 110px; height: 82px; object-fit: cover; object-position: center; display: block; flex-shrink: 0; }
.guides-featured-card-body { display: flex; flex-direction: column; gap: .2rem; min-width: 0; }
.guides-featured-card-label { font-size: .7rem; font-weight: 600; letter-spacing: .04em; color: var(--accent); text-transform: uppercase; }
.guides-featured-card-title { font-size: .875rem; font-weight: 600; color: var(--text); line-height: 1.35; margin: 0; }
.guides-featured-card-read { font-size: .775rem; color: var(--text-muted); margin-top: .15rem; }


.guides-filter-bar {
  max-width: 1160px; margin: 0 auto;
  padding: 1.25rem 1.5rem 0;
}
.guides-chips { display: flex; flex-wrap: wrap; gap: .5rem; }
.guides-chip {
  padding: .375rem .875rem; border-radius: 99px;
  font-size: .8125rem; font-weight: 500;
  background: var(--bg-card); border: 1.5px solid var(--border);
  color: var(--text-muted); cursor: pointer; transition: all .15s; white-space: nowrap;
}
.guides-chip:hover { border-color: var(--accent); color: var(--accent); }
.guides-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }


.guides-grid-section { max-width: 1160px; margin: 0 auto; padding: 2rem 1.5rem 4rem; }
.guides-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}
.guides-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  text-decoration: none; color: inherit;
  display: flex; flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease;
}
.guides-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); text-decoration: none; }
.guides-card.hidden { display: none; }
.guides-card-img { aspect-ratio: 16/10; overflow: hidden; background: rgba(74,150,105,.06); }
.guides-card-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.guides-card-img-placeholder {
  width: 100%; height: 100%;
  background: linear-gradient(135deg, rgba(74,150,105,.12), rgba(30,63,54,.1));
  display: flex; align-items: center; justify-content: center; min-height: 120px;
}
.guides-card-img-placeholder svg { width: 48px; height: 48px; color: var(--accent); opacity: .35; }
.guides-card-body {
  padding: 1.125rem 1.125rem 1.25rem;
  flex: 1; display: flex; flex-direction: column; gap: .45rem;
}
.guides-card-cat {
  font-size: .65rem; font-weight: 700; letter-spacing: .1em;
  color: var(--accent); text-transform: uppercase;
}
.guides-card-title { font-size: .9375rem; font-weight: 700; line-height: 1.35; color: var(--text); margin: 0; }
.guides-card-teaser { font-size: .8125rem; color: var(--text-muted); line-height: 1.55; margin: 0; flex: 1; }
.guides-card-readtime {
  font-size: .75rem; color: var(--text-subtle);
  display: flex; align-items: center; gap: .3rem; margin-top: .25rem;
}
.guides-card-readtime svg { width: 12px; height: 12px; flex-shrink: 0; }


.guides-cta-section {
  background: rgba(74,150,105,.07); border-top: 1px solid rgba(74,150,105,.14);
  padding: 3rem 1.5rem;
}
[data-theme="dark"] .guides-cta-section { background: rgba(74,150,105,.05); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .guides-cta-section { background: rgba(74,150,105,.05); }
}
.guides-cta-inner {
  max-width: 900px; margin: 0 auto;
  display: flex; align-items: center; gap: 2rem;
}
.guides-cta-icon {
  width: 64px; height: 64px; flex-shrink: 0;
  background: var(--accent); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.guides-cta-icon svg { width: 32px; height: 32px; }
.guides-cta-text { flex: 1; }
.guides-cta-text h2 { font-size: 1.25rem; font-weight: 700; color: var(--text); margin: 0 0 .35rem; }
.guides-cta-text p { font-size: .875rem; color: var(--text-muted); margin: 0; line-height: 1.6; }


.guide-page-wrap {
  max-width: 1100px; margin: 0 auto; padding: 2.5rem 1.5rem 5rem;
}

.guide-meta-left { justify-content: flex-start; border-bottom: none; padding-bottom: 0; margin-top: .5rem; }
.guide-header { max-width: 760px; margin: 0 auto 2rem; text-align: center; }
.guide-label {
  display: inline-block; font-size: .7rem; font-weight: 700; letter-spacing: .08em;
  padding: .2rem .65rem; border-radius: 99px;
  background: #EBF3EE; color: var(--accent); margin-bottom: .75rem;
}
[data-theme="dark"] .guide-label { background: rgba(74,150,105,.15); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .guide-label { background: rgba(74,150,105,.15); }
}
.guide-h1 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 800; line-height: 1.2; letter-spacing: -.025em;
  margin: 0 0 1rem; color: var(--text);
}
.guide-intro { font-size: 1.0625rem; color: var(--text-muted); line-height: 1.7; margin: 0 0 1.25rem; }
.guide-meta {
  display: flex; align-items: center; justify-content: center; gap: 1rem; flex-wrap: wrap;
  font-size: .8125rem; color: var(--text-muted);
  padding-bottom: 1.25rem; border-bottom: 1px solid var(--border);
}
.guide-meta-item { display: flex; align-items: center; gap: .35rem; }
.guide-meta-item svg { width: 14px; height: 14px; flex-shrink: 0; }


.guide-hero-img {
  border-radius: var(--radius-lg); overflow: hidden; margin: 0 auto 2.5rem;
  background: rgba(74,150,105,.06); max-width: 560px;
}
.guide-hero-img img { width: 100%; display: block; height: auto; }
.guide-hero-placeholder {
  height: 320px; border-radius: var(--radius-lg); margin-bottom: 2.5rem;
  background: linear-gradient(135deg, rgba(74,150,105,.13), rgba(30,63,54,.08));
  display: flex; align-items: center; justify-content: center;
}
.guide-hero-placeholder svg { width: 80px; height: 80px; color: var(--accent); opacity: .3; }


.guide-benefits { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2.5rem; }
.guide-benefit {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
  display: flex; gap: .75rem; align-items: flex-start;
}
.guide-benefit-icon {
  width: 36px; height: 36px; flex-shrink: 0;
  background: rgba(30,63,54,.1); border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center; color: var(--accent);
}
[data-theme="dark"] .guide-benefit-icon { background: rgba(74,150,105,.15); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .guide-benefit-icon { background: rgba(74,150,105,.15); }
}
.guide-benefit-icon svg { width: 18px; height: 18px; }
.guide-benefit-text h4 { font-size: .8125rem; font-weight: 600; color: var(--text); margin: 0 0 .2rem; }
.guide-benefit-text p { font-size: .75rem; color: var(--text-muted); margin: 0; line-height: 1.5; }


.guide-layout { display: grid; grid-template-columns: 1fr 320px; gap: 3rem; align-items: start; }
.guide-content h2 {
  font-size: 1.1875rem; font-weight: 700; color: var(--text);
  margin: 2rem 0 .75rem; padding-top: 1.5rem; border-top: 1px solid var(--border);
}
.guide-content h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.guide-content p { font-size: .9375rem; color: var(--text-muted); line-height: 1.75; margin: 0 0 1rem; }
.guide-content ul { margin: 0 0 1rem; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.guide-content ul li {
  font-size: .9375rem; color: var(--text-muted); line-height: 1.6;
  padding-left: 1.5rem; position: relative;
}
.guide-content ul li::before { content: '✓'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.guide-content ol { margin: 0 0 1rem; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: .5rem; counter-reset: guide-ol; }
.guide-content ol li { font-size: .9375rem; color: var(--text-muted); line-height: 1.6; padding-left: 1.5rem; position: relative; counter-increment: guide-ol; }
.guide-content ol li::before { content: counter(guide-ol) '.'; position: absolute; left: 0; color: var(--accent); font-weight: 700; }
.guide-tip {
  background: rgba(30,63,54,.07); border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 1rem 1.25rem; margin: 1.25rem 0;
}
.guide-tip p { margin: 0; font-size: .875rem; color: var(--text); line-height: 1.65; }
.guide-tip strong { color: var(--accent); }
.guide-article-cta {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.5rem; text-align: center; margin-top: 2.5rem;
}
.guide-article-cta h3 { font-size: 1rem; font-weight: 700; color: var(--text); margin: 0 0 .5rem; }
.guide-article-cta p { font-size: .875rem; color: var(--text-muted); margin: 0 0 1rem; }


.guide-sidebar { position: sticky; top: calc(60px + 1rem); }
.guide-sidebar-cta {
  background: linear-gradient(160deg, var(--accent-dark) 0%, var(--accent) 100%);
  border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1.5rem; text-align: center;
}
.guide-sidebar-cta h3 { font-size: 1rem; font-weight: 700; color: #fff; margin: 0 0 .5rem; }
.guide-sidebar-cta p { font-size: .8125rem; color: rgba(255,255,255,.75); margin: 0 0 1.25rem; line-height: 1.6; }
.guide-sidebar-cta .btn-primary {
  background: #fff; color: var(--accent); border-color: transparent;
  width: 100%; justify-content: center; display: flex;
}
.guide-sidebar-cta .btn-primary:hover { background: rgba(255,255,255,.9); }
.guide-related-title {
  font-size: .8rem; font-weight: 700; letter-spacing: .08em;
  color: var(--text-muted); text-transform: uppercase; margin: 0 0 .875rem;
}
.guide-related-list { display: flex; flex-direction: column; gap: .625rem; }
.guide-related-item {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  text-decoration: none; color: inherit; display: flex; gap: 0;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.guide-related-item:hover {
  border-color: var(--accent); text-decoration: none;
  box-shadow: 0 4px 14px rgba(30,63,54,.12);
  transform: translateY(-1px);
}
.guide-related-img { width: 76px; flex-shrink: 0; overflow: hidden; background: rgba(30,63,54,.07); }
.guide-related-img img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s; }
.guide-related-item:hover .guide-related-img img { transform: scale(1.07); }
.guide-related-img-placeholder {
  width: 100%; height: 100%; min-height: 58px;
  background: linear-gradient(135deg, rgba(30,63,54,.12), rgba(74,150,105,.06));
  display: flex; align-items: center; justify-content: center;
}
.guide-related-img-placeholder svg { width: 22px; height: 22px; color: var(--accent); opacity: .45; }
.guide-related-text { padding: .625rem .875rem .625rem .75rem; flex: 1; }
.guide-related-cat { font-size: .63rem; font-weight: 700; letter-spacing: .08em; color: var(--accent); margin-bottom: .2rem; }
.guide-related-name { font-size: .8125rem; font-weight: 600; color: var(--text); line-height: 1.3; }


@media (max-width: 1024px) {
  .guide-benefits { grid-template-columns: repeat(2, 1fr); }
  .guide-layout { grid-template-columns: 1fr; }
  .guide-sidebar { position: static; }
}
@media (max-width: 768px) {
  .guides-hero-inner { grid-template-columns: 1fr; gap: 1.25rem; text-align: center; }
  .guides-hero-text { align-items: center; grid-column: 1; grid-row: 1; }
  .guides-hero-img  { grid-column: 1; grid-row: 2; max-width: 280px; margin: 0 auto; }
  .guides-hero-inner > .guides-featured-card { grid-column: 1; grid-row: 3; text-align: left; }
  .guides-featured-card-img { width: 64px; height: 48px; }
  .faq-tiles-wrap { padding: 0 1rem; }
  .faq-nav-grid { grid-template-columns: repeat(2, 1fr); gap: .6rem; }
  .guides-chips { justify-content: center; }
  .guides-grid { grid-template-columns: 1fr; }
  .guides-cta-inner { flex-direction: column; text-align: center; }
  .guide-benefits { grid-template-columns: 1fr; }
  .guide-hero-placeholder { height: 200px; }
  .guide-article-cta { display: none; }
}

.landing-footer {
  padding: 2rem 1.5rem 2.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  background: var(--bg-card);
}
.landing-footer-links {
  display: flex; align-items: center; justify-content: center;
  gap: .4rem 1.5rem; flex-wrap: wrap; margin-bottom: .8rem;
}
.landing-footer-links a {
  font-size: .84rem; font-weight: 600; color: var(--text-muted);
  text-decoration: none;
  transition: color .15s;
}
[data-theme="dark"] .landing-footer-links a { color: var(--text-muted); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .landing-footer-links a { color: var(--text-muted); }
}
.landing-footer-links a:hover { color: var(--accent); text-decoration: none; }
.landing-footer-links a:hover svg { fill: var(--accent); }
.footer-social-link { display: inline-flex !important; align-items: center; }
.footer-social-link svg { width: 1rem; height: 1rem; fill: var(--text-muted); display: block; transition: fill .15s; }
[data-theme="dark"] .footer-social-link svg { fill: var(--text-muted); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .footer-social-link svg { fill: var(--text-muted); }
}
.landing-footer-copy { font-size: .78rem; color: var(--text-subtle); margin: 0; }
[data-theme="dark"] .landing-footer-copy { color: var(--text-subtle); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .landing-footer-copy { color: var(--text-subtle); }
}

.feat-hero-explainer {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.25rem 1.5rem; margin-top: 1.25rem;
}
.feat-hero-explainer p { font-size: .875rem; color: var(--text-muted); line-height: 1.7; margin: 0; }
.feat-hero-explainer p + p { margin-top: .75rem; }
.feat-section-inner { max-width: 900px; margin: 0 auto; }


.abt-section {
  padding: 72px 1.5rem;
  border-top: 1px solid #DDD8C8;
  border-bottom: 1px solid #DDD8C8;
}
[data-theme="dark"] .abt-section { border-color: var(--border); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .abt-section { border-color: var(--border); }
}
.abt-section.alt {
  background: linear-gradient(180deg, #EBF3EE 0%, #F4EFE4 100%);
  border-top: 1px solid #DDD8C8;
  border-bottom: 1px solid #DDD8C8;
}
[data-theme="dark"] .abt-section.alt {
  background: rgba(74,150,105,.05);
  border-color: rgba(74,150,105,.12);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .abt-section.alt {
    background: rgba(74,150,105,.05);
    border-color: rgba(74,150,105,.12);
  }
}
.abt-section-inner { max-width: 900px; margin: 0 auto; }
.abt-section-title {
  font-size: clamp(22px, 2.5vw, 32px); font-weight: 800;
  color: var(--text); margin: 0 0 1.25rem; letter-spacing: -.03em; line-height: 1.15;
}
.abt-section-sub { font-size: .9375rem; color: var(--text-muted); margin: 0 0 2rem; }
@media (max-width: 600px) { .abt-section { padding: 48px 1.25rem; } }
.about-hero-inner { max-width: 640px; margin: 0 auto; padding: 3.5rem 1.5rem 2.5rem; text-align: center; }
.about-hero-sub { font-size: 1.05rem; color: var(--text-muted); line-height: 1.75; margin: 0; }
.about-prose p { font-size: .95rem; color: var(--text-muted); line-height: 1.85; margin: 0 0 1rem; }
.about-prose p:last-child { margin-bottom: 0; }
.about-person { display: flex; gap: 1.5rem; align-items: flex-start; max-width: 520px; margin: 0 auto; }
.about-person-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 1.3rem; font-weight: 700; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.about-person-body { display: flex; flex-direction: column; }
.about-person-name { font-size: 1rem; font-weight: 700; color: var(--text); }
.about-person-role { font-size: .82rem; color: var(--text-subtle); margin: .2rem 0 .65rem; }
.about-person-bio { font-size: .9rem; color: var(--text-muted); line-height: 1.7; margin: 0; }
.about-philosophy { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; margin-top: 2rem; }
.about-phil-block h3 { font-size: 1rem; font-weight: 700; margin: 0 0 .75rem; }
.about-phil-block p { font-size: .9rem; color: var(--text-muted); line-height: 1.7; margin: 0 0 .75rem; }
.about-phil-block p:last-child { margin-bottom: 0; }
.about-not-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .5rem; }
.about-not-list li { font-size: .875rem; color: var(--text-muted); padding-left: 1.5rem; position: relative; line-height: 1.4; }
.about-not-list li::before { content: '×'; position: absolute; left: 0; color: var(--red); font-weight: 700; font-size: 1.1rem; line-height: 1.2; }
.about-not-list.positive li::before { content: '✓'; color: var(--green); font-size: .95rem; }
.about-feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 0 2.5rem; margin-top: 2rem; }
.about-feat-item { display: flex; flex-direction: column; gap: .25rem; padding: 1rem 0; border-top: 1px solid var(--border); }
.about-feat-item strong { font-size: .9rem; font-weight: 600; }
.about-feat-item span { font-size: .875rem; color: var(--text-muted); line-height: 1.55; }
.about-product-link { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
@media (max-width: 600px) { .about-feature-list { grid-template-columns: 1fr; } }
.about-contact { text-align: center; }
.about-embed-first { margin-top: 0; }
.about-embed-card { display: flex; flex-direction: column; gap: .75rem; background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.25rem 1.5rem 0; }
.about-hero-card { display: flex; flex-direction: column; gap: .75rem; width: 100%; background: rgba(30,63,54,.06); border: 1px solid rgba(30,63,54,.18); border-left: 3px solid var(--accent); border-radius: var(--radius); padding: 1rem 1.25rem; margin-top: 1.25rem; }
.about-hero-card-person { display: flex; align-items: center; gap: .75rem; }
.about-hero-card-facts { display: flex; flex-direction: column; gap: .35rem; padding-top: .65rem; border-top: 1px solid var(--border); font-size: .82rem; color: var(--text-muted); }
.about-hero-card-facts a:not(.btn) { color: var(--accent); text-decoration: none; }
.about-hero-card-facts a:not(.btn):hover { text-decoration: underline; }
@media (max-width: 768px) { .about-hero-card { grid-column: 1; } }
.about-email-link { display: inline-block; font-size: 1.05rem; font-weight: 600; color: var(--accent); text-decoration: none; padding: .6rem 1.4rem; border: 2px solid var(--accent); border-radius: var(--radius); transition: background .15s, color .15s; }
.about-email-link:hover { background: var(--accent); color: #fff; }
[data-theme="dark"] .about-email-link:hover { color: #000; }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .about-email-link:hover { color: #000; }
}
.cm-consent-label { font-size: .8125rem; color: var(--text-muted); line-height: 1.5; margin-bottom: 1.25rem; }
.cm-consent-label a { color: var(--accent); text-decoration: underline; }
#cm-privacy-overlay { z-index: 810; }
.about-story p { margin: 0 0 .6rem; }
.about-story p:last-child { margin-bottom: 0; }
@media (max-width: 768px) {
  .about-hero-inner { padding: 2.5rem 1.25rem 2rem; }
  .about-philosophy { grid-template-columns: 1fr; gap: 1.5rem; }
  .about-person { flex-direction: column; align-items: center; text-align: center; }
}


#tour-backdrop {
  position: fixed;
  inset: 0;
  z-index: 910;
  cursor: default;
}
#tour-backdrop.tour-backdrop--intro { background: rgba(0,0,0,.48); }
#tour-spotlight {
  position: fixed;
  z-index: 911;
  border-radius: var(--radius-sm);
  box-shadow: 0 0 0 9999px rgba(0,0,0,.48);
  pointer-events: none;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  transition: top .18s ease, left .18s ease, width .18s ease, height .18s ease;
}
#tour-intro {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 912;
  background: var(--bg-card);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  padding: 1.75rem 1.75rem 1.4rem;
  width: 400px;
  max-width: calc(100vw - 2rem);
  box-shadow: var(--shadow-lg);
}
#tour-intro .tour-close { position: absolute; top: 1rem; right: 1.1rem; }
.tour-intro-badge {
  display: inline-block;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  border-radius: 20px;
  padding: .2rem .7rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: .9rem;
}
.tour-intro-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding-top: .9rem;
  border-top: 1px solid var(--border);
  margin-top: .5rem;
}
#tour-tooltip {
  position: fixed;
  z-index: 912;
  background: var(--bg-card);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius);
  padding: 1rem 1.1rem .9rem;
  width: 300px;
  max-width: calc(100vw - 1.5rem);
  box-shadow: var(--shadow-md);
  font-size: .9rem;
  color: var(--text);
}
#tour-tooltip::before {
  content: '';
  position: absolute;
  left: var(--tour-arrow-left, 50%);
  width: 10px;
  height: 10px;
  background: var(--bg-card);
  border: 1.5px solid var(--accent);
  pointer-events: none;
}
#tour-tooltip.tour-arrow-top::before {
  top: -6px;
  transform: translateX(-50%) rotate(45deg);
  border-right: none;
  border-bottom: none;
}
#tour-tooltip.tour-arrow-bottom::before {
  bottom: -6px;
  transform: translateX(-50%) rotate(-135deg);
  border-right: none;
  border-bottom: none;
}
#tour-tooltip.tour-centered::before { display: none; }
.tour-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .4rem;
}
.tour-step-count {
  font-size: .75rem;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.tour-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1.2rem;
  line-height: 1;
  padding: 0;
  opacity: .6;
  transition: opacity .15s;
}
.tour-close:hover { opacity: 1; }
.tour-title {
  font-weight: 700;
  font-size: .975rem;
  margin-bottom: .3rem;
  color: var(--text);
  line-height: 1.3;
}
.tour-body {
  font-size: .855rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: .9rem;
}
.tour-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding-top: .7rem;
  border-top: 1px solid var(--border);
}
.tour-skip {
  background: none;
  border: none;
  cursor: pointer;
  font-size: .8rem;
  color: var(--text-subtle);
  padding: .15rem 0;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.tour-skip:hover { color: var(--text-muted); }
.tour-nav-btns { display: flex; gap: .4rem; align-items: center; }
@media (max-width: 480px) {
  #tour-tooltip, #tour-intro { width: calc(100vw - 1.5rem); }
}


.wizard-step-indicator {
  font-size: .8rem;
  font-weight: 600;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .75rem;
}
.wizard-question {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 1rem;
}
.wizard-options {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.wizard-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  background: var(--bg-input);
  user-select: none;
}
.wizard-option:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
}
.wizard-option.selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-input));
}
.wizard-option span {
  order: 1;
  flex: 1;
  font-size: .9rem;
  color: var(--text);
}
button.wizard-option {
  width: 100%;
  font-family: inherit;
  font-size: inherit;
  text-align: left;
  border: 1.5px solid var(--border);
  color: var(--text);
  outline: none;
}
button.wizard-option:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.wizard-option input[type=checkbox] {
  order: 2;
  flex-shrink: 0;
  cursor: pointer;
}
.wizard-preview-loading {
  color: var(--text-muted);
  font-size: .9rem;
  padding: .5rem 0;
}
.wizard-preview-groups {
  list-style: none;
  padding: 0;
  margin: 0 0 .5rem;
  display: flex;
  flex-direction: column;
  gap: .3rem;
}
.wizard-preview-groups li {
  padding: .4rem .75rem;
  background: var(--bg-stripe);
  border-radius: var(--radius-sm);
  font-size: .9rem;
  color: var(--text);
}
.wizard-preview-groups li::before {
  content: '·';
  margin-right: .5rem;
  color: var(--accent);
  font-weight: 700;
}
.wizard-preview-count {
  margin: .5rem 0 0;
}
@media (max-width: 480px) {
  .wizard-option { padding: .65rem .75rem; }
}


.my-plan-info-box {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  margin-bottom: 1.25rem;
}
.my-plan-info-box .pricing-tier-name {
  font-size: .8rem;
  margin-bottom: .3rem;
}
.my-plan-info-box .pricing-annual {
  font-size: .75rem;
}
.my-plan-usage {
  display: flex; flex-direction: column; gap: .6rem;
  margin-top: .75rem; padding-top: .75rem;
  border-top: 1px solid var(--border);
}

.my-plan-mods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem .75rem;
}
.my-plan-mods .my-plan-mod-extra { display: none; }
.my-plan-mods.expanded .my-plan-mod-extra { display: flex; }
.my-plan-mod {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .8125rem;
  line-height: 1.3;
}
.my-plan-mod-icon {
  flex-shrink: 0;
  width: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.my-plan-mod-on  { color: var(--text); }
.my-plan-mod-on .my-plan-mod-icon  { color: var(--green); font-size: .85rem; }
.my-plan-mod-off { color: var(--text-muted); }
.my-plan-mod-off .my-plan-mod-icon { color: var(--text-subtle, var(--text-muted)); }
@media (max-width: 480px) {
  .my-plan-mods { grid-template-columns: 1fr; }
}


.upg-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem;
  align-items: start;
}

.pricing-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  display: flex; flex-direction: column;
  overflow: hidden;
  transition: box-shadow .15s, border-color .15s;
}
.upg-pricing-grid .pricing-card { cursor: pointer; }
.upg-pricing-grid .pricing-card:hover { box-shadow: var(--shadow-md); }
.upg-pricing-grid .pricing-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 6px 24px rgba(30,63,54,.1);
  border-top: 3px solid var(--accent);
}
.upg-plan-limits {
  display: flex; flex-direction: column; gap: .3rem; margin-bottom: .1rem;
}
.upg-plan-limits span {
  display: flex; align-items: center; gap: .35rem;
  font-size: .78rem; font-weight: 600; color: var(--text-muted);
}
.upg-plan-limits span svg { flex-shrink: 0; opacity: .7; }
.pricing-card-head { padding: 1.1rem 1rem .9rem; }
.pricing-tier-name {
  font-size: .7rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); margin-bottom: .5rem;
}
.pricing-price {
  line-height: 1; display: flex; align-items: baseline; gap: .25rem;
  margin-bottom: .2rem; min-height: 2.4rem;
}
.pricing-price .amount  { font-size: 2rem; font-weight: 800; color: var(--text); }
.pricing-price .period  { font-size: .78rem; font-weight: 500; color: var(--text-muted); }
.pricing-price .free-label { font-size: 1.5rem; font-weight: 800; color: var(--green, var(--green)); }
.pricing-annual { font-size: .7rem; color: var(--text-subtle, var(--text-muted)); min-height: 1em; }
.pricing-annual strong { color: var(--green, var(--green)); }
.pricing-card-body { padding: 0 1rem 1rem; flex: 1; display: flex; flex-direction: column; }
.pricing-divider { border: none; border-top: 1px solid var(--border); margin: .75rem 0; }
.pricing-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: .4rem; }
.pricing-features li {
  font-size: .775rem; color: var(--text-muted);
  display: flex; align-items: flex-start; gap: .45rem; line-height: 1.4;
}
.pricing-features li .icon { flex-shrink: 0; margin-top: .1rem; }
.icon-check { color: var(--accent); }
.icon-plus  { color: var(--accent); }
.pricing-feature-inherits {
  color: var(--text-muted); font-style: italic;
  padding-bottom: .3rem; margin-bottom: .1rem;
  border-bottom: 1px solid var(--border);
}
.pricing-feature-inherits strong { font-style: normal; color: var(--text); }
.pricing-feature-section-label {
  font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em;
  color: var(--text-muted); opacity: .6;
}

.billing-toggle {
  display: flex; align-items: center;
  gap: .75rem;
}
.billing-toggle span { font-size: .825rem; color: var(--text-muted); }
.billing-toggle span.active { font-weight: 600; color: var(--text); }
.toggle-switch {
  position: relative; width: 44px; height: 24px;
  background: var(--accent); border-radius: 99px;
  cursor: pointer; transition: background .2s;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: ''; position: absolute;
  top: 3px; left: 3px;
  width: 18px; height: 18px;
  border-radius: 50%; background: #fff;
  transition: transform .2s;
}
.toggle-switch.monthly::after { transform: translateX(0); }
.toggle-switch.yearly::after  { transform: translateX(20px); }
.billing-save-badge {
  font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  padding: .15rem .5rem; border-radius: 99px;
  background: rgba(22,163,74,.12); color: var(--green, var(--green));
}

.pricing-ribbon {
  position: absolute; top: 35px; right: -50px;
  width: 190px;
  background: linear-gradient(130deg, var(--accent) 0%, var(--accent-light) 65%); color: #fff;
  font-size: .6rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  text-align: center; padding: .3rem 0;
  transform: rotate(45deg);
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}

.pr-testimonials { text-align: center; margin-bottom: 2rem; padding: 1.5rem; background: var(--bg); border-radius: var(--radius-lg); }
.pr-testimonials-title { font-size: .72rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 1rem; }
.pr-testimonials-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 640px) { .pr-testimonials-grid { grid-template-columns: 1fr; } }
.pr-testimonial-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem 1.25rem; text-align: left; background: var(--bg-card); }
.pr-testimonial-quote { font-size: .85rem; color: var(--text); line-height: 1.5; margin: 0 0 .5rem; }
.pr-testimonial-author { font-size: .75rem; color: var(--text-muted); }

.pr-trust-icons { display: flex; justify-content: center; gap: 2.5rem; margin-bottom: 2rem; padding: 1rem 0; }
.pr-trust-icon-item { display: flex; flex-direction: column; align-items: center; gap: .4rem; color: var(--text-muted); }
.pr-trust-icon-item svg { color: var(--green, var(--green)); }
.pr-trust-icon-item span { font-size: .78rem; font-weight: 500; }
@media (max-width: 480px) { .pr-trust-icons { gap: 1.5rem; } .pr-trust-icon-item span { font-size: .72rem; } }

.pr-inline-faq { padding-top: 1.5rem; margin-bottom: 2rem; }
.pr-inline-faq-title { font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: 1.25rem; }
.pr-inline-faq-item { border-left: 3px solid var(--green, var(--green)); padding: .75rem 1rem; margin-bottom: .5rem; background: var(--bg); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.pr-inline-faq-item strong { font-size: .85rem; color: var(--text); display: block; margin-bottom: .25rem; }
.pr-inline-faq-item p { font-size: .8rem; color: var(--text-muted); margin: 0; line-height: 1.5; }




#stripe-loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 502;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
#stripe-loading-overlay.hidden { display: none; }
.stripe-loading-box {
  background: var(--bg-card);
  border-radius: var(--radius);
  padding: 2rem 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.stripe-payment-wrap {
  min-height: 120px;
  margin-bottom: 1rem;
}


.stripe-consent-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  cursor: pointer;
  padding: .5rem 0;
}
.stripe-consent-toggle-row span {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}
.stripe-consent-text {
  font-size: .75rem;
  color: var(--text-muted);
  line-height: 1.55;
  padding: .6rem .75rem;
  background: var(--bg-stripe, var(--bg-hover));
  border-radius: var(--radius-sm);
  margin-bottom: .5rem;
}


.idx-hero {
  position: relative;
  padding: 72px 1.5rem 64px;
  background:
    radial-gradient(circle at 76% 20%, rgba(30,63,54,.09), transparent 28%),
    radial-gradient(circle at 5%  82%, rgba(30,63,54,.07), transparent 20%),
    linear-gradient(180deg, var(--bg-card) 0%, var(--bg) 100%);
  overflow: hidden;
}
[data-theme="dark"] .idx-hero {
  background:
    radial-gradient(circle at 76% 20%, rgba(74,150,105,.07), transparent 28%),
    radial-gradient(circle at 5%  82%, rgba(74,150,105,.05), transparent 20%),
    var(--bg-card);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-hero {
    background:
      radial-gradient(circle at 76% 20%, rgba(74,150,105,.07), transparent 28%),
      radial-gradient(circle at 5%  82%, rgba(74,150,105,.05), transparent 20%),
      var(--bg-card);
  }
}
.idx-hero-inner {
  max-width: 1160px; margin: 0 auto;
  display: grid; grid-template-columns: .9fr 1.1fr;
  align-items: flex-start; gap: 52px;
}
.idx-hero-text { display: flex; flex-direction: column; align-items: flex-start; }
.idx-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 13px; border-radius: 999px;
  background: #EBF3EE; color: var(--accent);
  font-size: .72rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; margin-bottom: 20px;
}
[data-theme="dark"] .idx-eyebrow { background: rgba(74,150,105,.15); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-eyebrow { background: rgba(74,150,105,.15); }
}
.idx-h1 {
  margin: 0 0 18px;
  font-size: clamp(36px, 4.5vw, 62px);
  font-weight: 800; line-height: 1.07; letter-spacing: -.04em;
  color: var(--text);
}
.idx-h1 .idx-accent { color: inherit; }
.idx-hero-sub {
  margin: 0 0 28px; max-width: 520px;
  font-size: 1.05rem; line-height: 1.72; color: var(--text-muted);
}
.idx-hero-actions {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin-bottom: 22px;
}
.idx-btn-primary {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 22px; border-radius: 12px;
  background: var(--accent);
  color: #fff; font-size: .9375rem; font-weight: 700;
  text-decoration: none; border: none;
  box-shadow: 0 12px 24px rgba(30,63,54,.25);
  transition: transform .15s, box-shadow .15s; cursor: pointer;
}
.idx-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 28px rgba(30,63,54,.32); color: #fff; text-decoration: none; }
.idx-btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  height: 52px; padding: 0 22px; border-radius: 12px;
  background: #fff; color: var(--text);
  font-size: .9375rem; font-weight: 600; text-decoration: none;
  border: 1px solid var(--border-input); box-shadow: 0 1px 3px rgba(30,63,54,.05);
  transition: border-color .15s, color .15s, transform .15s;
}
.idx-btn-secondary:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); text-decoration: none; }
[data-theme="dark"] .idx-btn-secondary { background: var(--bg-card); border-color: var(--border); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-btn-secondary { background: var(--bg-card); border-color: var(--border); }
}
.idx-trust-row { display: flex; flex-wrap: wrap; gap: 14px 20px; margin-bottom: 10px; }
.idx-trust-item {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: .82rem; font-weight: 600; color: var(--text-muted);
}
.idx-trust-check {
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: #EBF3EE; color: var(--accent);
  font-size: 11px; font-weight: 900; flex-shrink: 0; font-style: normal;
}
[data-theme="dark"] .idx-trust-check { background: rgba(74,150,105,.18); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-trust-check { background: rgba(74,150,105,.18); }
}
[data-theme="dark"] .idx-trust-item { color: var(--text-muted); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-trust-item { color: var(--text-muted); }
}
.idx-device-hint {
  display: flex; align-items: center; gap: 6px;
  margin-top: 10px; font-size: .78rem; color: var(--text-subtle);
}
.idx-device-hint svg { width: 14px; height: 14px; flex-shrink: 0; opacity: .7; }


.idx-hero-visual { position: relative; }
.idx-device-card {
  position: relative; border-radius: 22px; padding: 14px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(207,215,228,.9);
  box-shadow: 0 18px 50px rgba(30,63,54,.10);
  transform: rotate(.3deg);
}
[data-theme="dark"] .idx-device-card {
  background: rgba(26,29,39,.88);
  border-color: rgba(46,51,71,.9);
  box-shadow: 0 20px 52px rgba(0,0,0,.4);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-device-card {
    background: rgba(26,29,39,.88);
    border-color: rgba(46,51,71,.9);
    box-shadow: 0 20px 52px rgba(0,0,0,.4);
  }
}
.idx-device-card::after {
  content: ""; position: absolute;
  left: 10%; right: 10%; bottom: -16px;
  height: 24px; border-radius: 999px;
  background: rgba(30,63,54,.13); filter: blur(14px); z-index: -1;
}
[data-theme="dark"] .idx-device-card::after { background: rgba(0,0,0,.35); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-device-card::after { background: rgba(0,0,0,.35); }
}
.idx-device-card img { border-radius: 14px; border: 1px solid #DDD8C8; width: 100%; height: auto; display: block; }


.idx-steps-section {
  padding: 80px 1.5rem;
  background: linear-gradient(180deg, #EBF3EE 0%, #F4EFE4 100%);
  border-top: 1px solid #DDD8C8;
  border-bottom: 1px solid #DDD8C8;
}
[data-theme="dark"] .idx-steps-section {
  background: rgba(74,150,105,.05);
  border-color: rgba(74,150,105,.12);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-steps-section {
    background: rgba(74,150,105,.05);
    border-color: rgba(74,150,105,.12);
  }
}
.idx-intro-split {
  max-width: 900px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3.5rem; align-items: start;
}
@media (max-width: 640px) {
  .idx-intro-split { grid-template-columns: 1fr; gap: 2rem; }
}
.idx-steps-inner { max-width: 900px; margin: 0 auto; text-align: center; }
.idx-section-title {
  font-size: clamp(26px, 3.5vw, 44px); font-weight: 800;
  letter-spacing: -.04em; line-height: 1.1; color: var(--text); margin: 0 0 10px;
}
.idx-section-sub { font-size: .9375rem; color: var(--text-muted); margin: 0 0 48px; }
.idx-steps {
  display: grid; grid-template-columns: 1fr 44px 1fr 44px 1fr;
  align-items: start; gap: 16px;
}
.idx-step { text-align: center; position: relative; }
.idx-step-number {
  position: absolute; top: -6px; left: 50%; margin-left: -46px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: inline-grid; place-items: center;
  font-size: .68rem; font-weight: 800;
}
[data-theme="dark"] .idx-step-number { color: #050e05; }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-step-number { color: #050e05; }
}
.idx-icon-bubble {
  width: 88px; height: 88px; margin: 0 auto 18px; border-radius: 50%;
  display: grid; place-items: center;
  background: #EBF3EE; color: var(--accent);
}
[data-theme="dark"] .idx-icon-bubble { background: rgba(74,150,105,.15); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-icon-bubble { background: rgba(74,150,105,.15); }
}
.idx-icon-bubble.blue { background: #EBF3EE; color: var(--blue); }
[data-theme="dark"] .idx-icon-bubble.blue { background: rgba(30,63,54,.15); color: var(--blue); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-icon-bubble.blue { background: rgba(30,63,54,.15); color: var(--blue); }
}
.idx-icon-bubble.orange { background: rgba(200,136,58,.13); color: var(--orange); }
[data-theme="dark"] .idx-icon-bubble.orange { background: rgba(200,136,58,.15); color: var(--orange); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-icon-bubble.orange { background: rgba(200,136,58,.15); color: var(--orange); }
}
.idx-icon-bubble svg { width: 32px; height: 32px; }
.idx-step h3 { font-size: 1rem; font-weight: 700; margin: 0 0 8px; letter-spacing: -.02em; color: var(--text); }
.idx-step p { margin: 0 auto; max-width: 215px; color: var(--text-muted); font-size: .875rem; line-height: 1.6; }
.idx-step-arrow {
  font-size: 1.4rem; line-height: 88px; text-align: center;
  color: var(--accent); opacity: .9; margin-top: 18px;
}


.idx-showcase-section {
  padding: 80px 1.5rem;
  background: var(--bg-card);
  border-top: 1px solid #DDD8C8;
  border-bottom: 1px solid #DDD8C8;
}
.idx-showcase-section.alt {
  background: linear-gradient(180deg, #EBF3EE 0%, #F4EFE4 100%);
  border-top: 1px solid #DDD8C8;
  border-bottom: 1px solid #DDD8C8;
}
[data-theme="dark"] .idx-showcase-section { background: var(--bg-card); border-color: var(--border); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-showcase-section { background: var(--bg-card); border-color: var(--border); }
}
[data-theme="dark"] .idx-showcase-section.alt {
  background: rgba(74,150,105,.05);
  border-color: rgba(74,150,105,.12);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-showcase-section.alt {
    background: rgba(74,150,105,.05);
    border-color: rgba(74,150,105,.12);
  }
}
.idx-showcase {
  max-width: 1100px; margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: 56px; align-items: center;
}
.idx-showcase.reverse { grid-template-columns: .95fr 1.05fr; }
.idx-showcase.reverse .idx-showcase-media { order: 2; }
.idx-showcase.reverse .idx-showcase-text  { order: 1; }
.idx-showcase-media {
  border-radius: 22px; background: var(--bg-card);
  padding: 10px; border: 1px solid var(--border); box-shadow: 0 12px 32px rgba(30,63,54,.08);
}
.idx-showcase-media img { border-radius: 14px; width: 100%; display: block; }
.idx-showcase-tag {
  display: inline-block; padding: 4px 10px; border-radius: 6px;
  background: #EBF3EE; color: var(--accent);
  font-size: .7rem; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; margin-bottom: 14px;
}
[data-theme="dark"] .idx-showcase-tag { background: rgba(74,150,105,.15); color: var(--green); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-showcase-tag { background: rgba(74,150,105,.15); color: var(--green); }
}
.idx-showcase-text h2 {
  font-size: clamp(24px, 3vw, 38px); font-weight: 800;
  letter-spacing: -.04em; line-height: 1.1; color: var(--text); margin: 0 0 14px;
}
.idx-showcase-text > p { font-size: .9375rem; color: var(--text-muted); line-height: 1.72; margin: 0 0 20px; }
.idx-check-list { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.idx-check-list li {
  display: flex; gap: 9px; align-items: flex-start;
  font-size: .875rem; font-weight: 600; color: var(--text-muted);
}
[data-theme="dark"] .idx-check-list li { color: var(--text-muted); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-check-list li { color: var(--text-muted); }
}
.idx-check-icon {
  width: 20px; height: 20px; border-radius: 50%;
  display: inline-grid; place-items: center;
  background: #EBF3EE; color: var(--accent);
  font-size: 11px; font-weight: 900; flex-shrink: 0; margin-top: 1px; font-style: normal;
}
[data-theme="dark"] .idx-check-icon { background: rgba(74,150,105,.18); color: var(--green); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-check-icon { background: rgba(74,150,105,.18); color: var(--green); }
}


.idx-features-section {
  padding: 80px 1.5rem;
  background: var(--bg-card);
  border-top: 1px solid #DDD8C8;
  border-bottom: 1px solid #DDD8C8;
}
[data-theme="dark"] .idx-features-section { background: var(--bg); border-color: var(--border); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-features-section { background: var(--bg); border-color: var(--border); }
}
.idx-features-section.alt {
  background: linear-gradient(180deg, #EBF3EE 0%, #F4EFE4 100%);
  border-top: 1px solid #DDD8C8;
  border-bottom: 1px solid #DDD8C8;
}
[data-theme="dark"] .idx-features-section.alt {
  background: rgba(74,150,105,.05);
  border-color: rgba(74,150,105,.12);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-features-section.alt {
    background: rgba(74,150,105,.05);
    border-color: rgba(74,150,105,.12);
  }
}
.idx-features-inner { max-width: 1060px; margin: 0 auto; text-align: center; }
.idx-cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px; margin-top: 40px;
}
.idx-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: 18px; padding: 22px; box-shadow: var(--shadow);
  text-align: left; transition: box-shadow .18s, transform .18s;
}
.idx-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.idx-card-icon {
  width: 48px; height: 48px; display: grid; place-items: center;
  border-radius: 12px; background: rgba(30,63,54,.1); color: var(--accent);
  margin-bottom: 14px;
}
[data-theme="dark"] .idx-card-icon { background: rgba(74,150,105,.12); color: var(--green); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-card-icon { background: rgba(74,150,105,.12); color: var(--green); }
}
.idx-card-icon svg { width: 21px; height: 21px; }
.idx-card-icon.blue { background: rgba(30,63,54,.12); color: var(--accent); }
.idx-card-icon.orange { background: rgba(200,136,58,.12); color: var(--orange); }
.idx-card-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.idx-card h3 { font-size: .9375rem; font-weight: 700; margin: 0 0 6px; color: var(--text); letter-spacing: -.01em; }
.idx-card-header h3 { margin: 0; }
.idx-card > p { font-size: .84rem; color: var(--text-muted); line-height: 1.6; margin: 0; }
.idx-plan-badge {
  display: inline-flex; align-items: center;
  border-radius: 999px; padding: 3px 8px;
  background: rgba(30,63,54,.12); color: var(--blue);
  font-size: .67rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}
.idx-coming-badge {
  display: inline-flex; align-items: center;
  border-radius: 999px; padding: 3px 8px;
  background: rgba(200,136,58,.12); color: var(--orange);
  font-size: .67rem; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}

/* -- Index pricing plan grid */
.idx-pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  align-items: start;
  text-align: left;
  margin-top: .5rem;
}
.pricing-ribbon {
  position: absolute; top: 35px; right: -50px; width: 190px;
  background: linear-gradient(130deg, var(--accent-dark) 0%, var(--accent-light) 65%); color: #fff;
  font-size: .6rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase;
  text-align: center; padding: .3rem 0;
  transform: rotate(45deg);
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0,0,0,.15);
}
.idx-pc-free { border-top: 3px solid var(--green); }
.idx-pc-highlighted {
  border-color: var(--accent);
  border-top: 3px solid var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 8px 32px rgba(30,63,54,.1);
}
[data-theme="dark"] .idx-pc-highlighted { box-shadow: 0 0 0 1px var(--accent), 0 8px 32px rgba(30,63,54,.2); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-pc-highlighted { box-shadow: 0 0 0 1px var(--accent), 0 8px 32px rgba(30,63,54,.2); }
}
.idx-pricing-limits {
  display: flex; flex-direction: column; gap: .3rem; margin-top: .5rem;
}
.idx-pricing-limits span {
  display: flex; align-items: center; gap: .35rem;
  font-size: .78rem; font-weight: 500; color: var(--text-muted);
}
.idx-pricing-limits span svg { flex-shrink: 0; opacity: .7; }
.idx-pricing-cta { margin-top: auto; padding-top: 1rem; }
@media (max-width: 600px) {
  .idx-pricing-grid { grid-template-columns: 1fr; }
}


.idx-articles-section {
  padding: 80px 1.5rem;
  background: var(--bg-hover);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .idx-articles-section {
  background: color-mix(in srgb, var(--bg-card) 97%, #b88a30);
  border-color: rgba(255,255,255,.07);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-articles-section {
    background: color-mix(in srgb, var(--bg-card) 97%, #b88a30);
    border-color: rgba(255,255,255,.07);
  }
}
.idx-articles-inner { max-width: 1060px; margin: 0 auto; text-align: center; }
.idx-article-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 36px; }
.idx-article-card {
  overflow: hidden; background: var(--bg-card);
  border-radius: 20px; border: 1px solid var(--border);
  box-shadow: var(--shadow); text-decoration: none !important; color: inherit;
  display: flex; flex-direction: column;
  transition: box-shadow .18s, transform .18s;
}
.idx-article-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); text-decoration: none; }
.idx-article-card picture, .idx-article-card picture img { width: 100%; aspect-ratio: 16/10; object-fit: cover; display: block; }
.idx-article-body { padding: 18px; flex: 1; text-align: left; }
.idx-article-cat {
  font-size: .69rem; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 6px;
}
.idx-article-body h3 {
  font-size: .9375rem; font-weight: 700; margin: 0 0 6px;
  color: var(--text); line-height: 1.35; letter-spacing: -.02em;
}
.idx-article-body p { font-size: .8125rem; color: var(--text-muted); margin: 0; line-height: 1.55; }


/* -- Index roles section */
.idx-roles-section {
  padding: 72px 1.5rem;
  background: var(--bg);
  border-top: 1px solid #DDD8C8;
  border-bottom: 1px solid #DDD8C8;
}
[data-theme="dark"] .idx-roles-section { border-color: var(--border); }
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-roles-section { border-color: var(--border); }
}
.idx-roles-inner { max-width: 900px; margin: 0 auto; text-align: center; }
.idx-roles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin: 2.5rem 0 2rem;
}
.idx-role-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem 1.25rem;
  text-align: center;
}
.idx-role-icon {
  width: 2rem;
  height: 2rem;
  margin: 0 auto .75rem;
  color: var(--accent);
}
.idx-role-icon svg {
  width: 2rem;
  height: 2rem;
}
.idx-role-item strong {
  display: block;
  font-family: var(--display);
  font-size: 1rem;
  color: var(--text);
  margin-bottom: .5rem;
}
.idx-role-item p {
  font-size: .8125rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}
.idx-roles-cta { margin-top: .5rem; }
@media (max-width: 768px) {
  .idx-roles-grid { grid-template-columns: repeat(2, 1fr); }
  .idx-roles-section { padding: 52px 1.25rem; }
}
@media (max-width: 480px) {
  .idx-roles-grid { grid-template-columns: 1fr; }
}

.idx-cta-section {
  padding: 64px 1.5rem;
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(30,63,54,.07) 100%);
}
[data-theme="dark"] .idx-cta-section {
  background: linear-gradient(180deg, var(--bg-card) 0%, rgba(74,150,105,.06) 100%);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-cta-section {
    background: linear-gradient(180deg, var(--bg-card) 0%, rgba(74,150,105,.06) 100%);
  }
}
.idx-cta-box {
  max-width: 1000px; margin: 0 auto;
  display: grid; grid-template-columns: auto 1fr auto;
  align-items: center; gap: 24px; padding: 30px;
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(30,63,54,.06), var(--bg-card));
  border: 1px solid rgba(30,63,54,.15); box-shadow: var(--shadow-md);
}
[data-theme="dark"] .idx-cta-box {
  background: linear-gradient(135deg, rgba(74,150,105,.05), var(--bg-card));
  border-color: rgba(74,150,105,.15);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .idx-cta-box {
    background: linear-gradient(135deg, rgba(74,150,105,.05), var(--bg-card));
    border-color: rgba(74,150,105,.15);
  }
}
.idx-cta-icon {
  width: 72px; height: 72px; border-radius: 18px;
  display: grid; place-items: center;
  background: var(--accent);
  color: #fff; flex-shrink: 0;
  box-shadow: 0 12px 28px rgba(30,63,54,.22);
}
.idx-cta-icon svg { width: 32px; height: 32px; }
.idx-cta-text h2 {
  font-size: 1.4rem; font-weight: 800; letter-spacing: -.03em;
  margin: 0 0 4px; color: var(--text);
}
.idx-cta-text p { font-size: .875rem; color: var(--text-muted); margin: 0; }


@media (max-width: 1100px) {
  .idx-hero-inner { gap: 36px; }
  .idx-showcase   { gap: 40px; }
}
@media (max-width: 860px) {
  .idx-hero-inner,
  .idx-showcase,
  .idx-showcase.reverse { grid-template-columns: 1fr; }
  .idx-hero-inner  { gap: 32px; }
  .idx-hero-text   { align-items: center; text-align: center; }
  .idx-hero-sub    { margin-left: auto; margin-right: auto; }
  .idx-hero-actions, .idx-trust-row { justify-content: center; }
  .idx-device-hint { justify-content: center; }
  .idx-hero-visual { max-width: 720px; margin: 0 auto; }
  .idx-device-card { transform: none; }
  .idx-showcase.reverse .idx-showcase-media,
  .idx-showcase.reverse .idx-showcase-text { order: unset; }
  .idx-steps { grid-template-columns: 1fr; gap: 20px; }
  .idx-step-arrow { line-height: 1; transform: rotate(90deg); margin: -4px 0; }
  .idx-step-number { margin-left: -36px; }
  .idx-cards, .idx-article-grid { grid-template-columns: 1fr 1fr; }
  .idx-cta-box { grid-template-columns: 1fr; text-align: center; justify-items: center; }
}
@media (max-width: 600px) {
  .idx-hero { padding: 40px 1.25rem 48px; }
  .idx-steps-section, .idx-showcase-section,
  .idx-features-section, .idx-articles-section,
  .idx-cta-section { padding: 56px 1.25rem; }
  .idx-h1 { font-size: clamp(32px, 10vw, 42px); }
  .idx-hero-sub { font-size: 1rem; }
  .idx-hero-actions { flex-direction: column; align-items: stretch; }
  .idx-btn-primary, .idx-btn-secondary { justify-content: center; }
  .idx-trust-row { justify-content: flex-start; flex-direction: column; gap: 8px; }
  .idx-device-hint { justify-content: flex-start; }
  .idx-hero-text { align-items: flex-start; text-align: left; }
  .idx-cards, .idx-article-grid { grid-template-columns: 1fr; }
  .idx-cta-box { padding: 20px; }
  .idx-cta-icon { width: 58px; height: 58px; }
  .idx-cta-text h2 { font-size: 1.2rem; }
}


.hp-field {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* -- Houses -------------------------------------------------- */

.houses-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}
.houses-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0;
}

.houses-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
}
.houses-grid + .houses-section-header {
  margin-top: 2rem;
}

.houses-section-header h3 {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-muted);
  margin: 0 0 .75rem;
}

.house-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.house-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.house-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .5rem;
}
.house-card-name {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.3;
}
.house-card-addr {
  font-size: .84rem;
  color: var(--text-muted);
  margin: 0 0 .75rem;
}
.house-card-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
}
.house-card--shared {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
}
.house-card-shared {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  color: var(--text-muted);
  margin: 0 0 .75rem;
}
.house-card-shared svg {
  color: var(--accent);
  flex: none;
}
.house-card-shared strong {
  color: var(--text);
  font-weight: 600;
}

.house-empty-state {
  max-width: 420px;
  margin: 3rem auto;
}

/* -- House invitation card */
.house-invitation-card {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  background: var(--bg-card);
  border: 1.5px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  box-shadow: 0 2px 12px rgba(30,63,54,.10);
}
.house-invitation-icon {
  flex: none;
  width: 52px;
  height: 52px;
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  display: grid;
  place-items: center;
}
.house-invitation-body {
  flex: 1;
  min-width: 0;
}
.house-invitation-eyebrow {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--accent);
  margin: 0 0 .35rem;
}
.house-invitation-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 .3rem;
  line-height: 1.2;
}
.house-invitation-meta {
  font-size: .875rem;
  color: var(--text-muted);
  margin: 0 0 .75rem;
}
.house-invitation-meta strong {
  color: var(--text);
  font-weight: 600;
}
.house-invitation-role {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}
.house-invitation-role-label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-muted);
}
.house-invitation-actions {
  flex: none;
  display: flex;
  align-items: flex-start;
  padding-top: .2rem;
}
@media (max-width: 600px) {
  .house-invitation-card {
    flex-wrap: wrap;
  }
  .house-invitation-actions {
    width: 100%;
    padding-top: 0;
  }
  .house-invitation-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* -- House detail -------------------------------------------- */

.house-detail {
}
.house-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.house-detail-header h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin: 0 0 .15rem;
}

.print-header {
  display: none;
  flex-direction: row;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.print-header-left {
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.print-header-datetime {
  font-size: .78rem;
  color: var(--text-muted);
  white-space: nowrap;
}
.print-header-brand {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.3rem;
  margin-bottom: .5rem;
}
.print-header-name {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.1rem;
}
.print-header-addr {
  font-size: .8rem;
  color: var(--text-muted);
}

.house-section {
  margin-bottom: 1.5rem;
}
.house-section h3 {
  font-size: 1rem;
  font-weight: 700;
  margin: 0;
}
.house-section h4 {
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 .75rem;
}
.house-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .75rem;
}

.house-members-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.house-member-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.house-member-info {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex: 1;
  min-width: 0;
}
.house-member-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: .9rem;
  flex-shrink: 0;
}
.house-invite-row .house-member-avatar {
  background: var(--bg-hover);
  color: var(--text-muted);
  font-size: 1.2rem;
}
.house-member-name {
  font-weight: 600;
  font-size: .92rem;
  display: block;
}
.house-member-email {
  font-size: .8rem;
  color: var(--text-muted);
  display: block;
}

.btn-danger-text {
  color: var(--red) !important;
}

.house-danger-zone {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.house-danger-zone-card {
  margin-top: 1.25rem;
  border: 1px solid color-mix(in srgb, var(--red) 35%, var(--border));
}

.house-danger-zone-title {
  margin: 0 0 .75rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--red);
}

.role-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(30, 63, 54, .08);
  color: var(--accent-light);
  padding: .2em .6em;
  font-size: .72rem;
  font-weight: 700;
  white-space: nowrap;
}

[data-theme="dark"] .role-pill {
  background: rgba(255, 255, 255, .08);
  color: var(--accent-light);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .role-pill {
    background: rgba(255, 255, 255, .08);
    color: var(--accent-light);
  }
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  font-family: inherit;
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .02em;
  padding: .32em .75em;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
}
.chip-success {
  background: var(--success-bg);
  color: #2D7A50;
  border-color: var(--success-border);
}
.chip-warning {
  background: var(--warning-bg);
  color: #9A6420;
  border-color: rgba(200, 136, 58, .30);
}
.chip-danger {
  background: var(--danger-bg);
  color: var(--danger);
  border-color: rgba(184, 73, 60, .24);
}
.chip-info {
  background: rgba(30, 63, 54, .08);
  color: var(--accent-light);
  border-color: rgba(30, 63, 54, .15);
}

.ics-feed-pill {
  margin-left: .5rem;
  vertical-align: middle;
}

/* -- House tabs ----------------------------------------------- */

.house-detail-body {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
}
.house-sidenav {
  width: 168px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  position: sticky;
  top: calc(var(--topbar-h) + 1.25rem);
}
.house-sidenav-btn {
  display: block;
  width: 100%;
  text-align: left;
  padding: .5rem .85rem;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  font: inherit;
  font-size: .9rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: background .12s, color .12s;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.house-sidenav-btn:hover {
  background: var(--bg-hover);
  color: var(--text);
}
.house-sidenav-btn.active {
  background: var(--bg-hover);
  color: var(--accent);
  font-weight: 600;
}
#house-tab-content {
  flex: 1;
  min-width: 0;
  max-width: 1035px;
}
.content-area.house-view .page-constrained { max-width: 1235px; }

/* -- Overblik (house overview tab) */
.overview-card {
  background: var(--bg-card);
  border: 1px solid var(--border-input);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: .9rem 1rem;
  min-width: 0;
}
.overview-card h3 {
  margin: 0 0 .5rem;
  font-size: .95rem;
}
.overview-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .5rem;
}
.overview-card-header h3 { margin: 0; }
.overview-top-row {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  margin-bottom: .85rem;
}
.overview-calendar-col {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  flex: 0 0 660px;
  max-width: 660px;
  min-width: 0;
}
.overview-side-stack {
  display: flex;
  flex-direction: column;
  gap: .85rem;
  flex: 0 1 360px;
  min-width: 0;
}
.overview-tiles-row,
.overview-bottom-row {
  display: flex;
  align-items: stretch;
  gap: .85rem;
  margin-bottom: .85rem;
}
.overview-storage-missing-row {
  display: flex;
  align-items: stretch;
  gap: .85rem;
  flex: 0 0 660px;
  max-width: 660px;
}
.overview-storage-missing-row > .overview-card,
.overview-bottom-row > .overview-card,
.overview-bottom-row > .overview-economy-col {
  flex: 1 1 0;
  min-width: 0;
}
.overview-economy-col {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.overview-economy-col > .overview-card {
  flex: 1 1 auto;
}
.overview-consumption-col {
  display: flex;
  flex: 0 1 360px;
  min-width: 0;
}
.overview-consumption-col > .overview-card {
  flex: 1 1 auto;
  width: 100%;
}
.overview-card-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 70px;
}
.overview-request-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .4rem 0;
  border-top: 1px solid var(--border);
  cursor: pointer;
}
.overview-request-row:first-of-type { border-top: none; }
.overview-request-name { font-weight: 600; }
.overview-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .3rem 0;
  border-top: 1px solid var(--border);
}
.overview-list-row:first-of-type { border-top: none; }
.overview-next-stay-name { font-weight: 600; margin-bottom: .15rem; }
.overview-scroll-list {
  height: 150px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.overview-card-requests .overview-scroll-list {
  height: 195px;
}
.overview-scroll-list::-webkit-scrollbar { width: 5px; }
.overview-scroll-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.overview-meter-block + .overview-meter-block { margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--border); }
.overview-meter-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  margin-bottom: .35rem;
}
@media (max-width: 1100px) {
  .overview-top-row {
    flex-wrap: wrap;
  }
  .overview-calendar-col {
    max-width: 100%;
    flex: 1 1 100%;
  }
  .overview-side-stack {
    flex: 1 1 100%;
  }
  .overview-tiles-row,
  .overview-bottom-row {
    flex-wrap: wrap;
  }
  .overview-storage-missing-row {
    max-width: 100%;
    flex: 1 1 100%;
  }
  .overview-consumption-col {
    flex: 1 1 100%;
  }
  .overview-storage-missing-row > .overview-card,
  .overview-bottom-row > .overview-card,
  .overview-bottom-row > .overview-economy-col {
    flex: 1 1 260px;
  }
}
.house-tabs-mobile {
  display: none;
  position: relative;
  margin-bottom: 1.25rem;
}
.house-tabs-mobile-toggle {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font: inherit;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}
.house-tabs-mobile-toggle svg {
  transition: transform .2s;
}
.house-tabs-mobile.is-open .house-tabs-mobile-toggle svg {
  transform: rotate(180deg);
}
.house-tabs-mobile-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  z-index: 199;
  width: 200px;
  margin-top: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgba(30,63,54,.14), 0 2px 6px rgba(30,63,54,.08);
  flex-direction: column;
  overflow: hidden;
}
.house-tabs-mobile.is-open .house-tabs-mobile-menu {
  display: flex;
}
.house-tabs-mobile-menu button {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .75rem 1rem;
  font: inherit;
  font-size: .9375rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: none;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  width: 100%;
  text-align: left;
  transition: background .12s, color .12s;
}
.house-tabs-mobile-menu button:last-child { border-bottom: none; }
.house-tabs-mobile-menu button:hover { background: var(--bg-hover); color: var(--text); }
.house-tabs-mobile-menu button.active { color: var(--accent); font-weight: 600; }

@media (max-width: 768px) {
  .house-tabs-mobile { display: block; }
  .house-sidenav { display: none; }
  .house-detail-body { display: block; }
  #house-tab-content > .house-section:first-child > h3:only-child { display: none; }
}

/* -- Calendar & Stays ----------------------------------------- */

.calendar-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 1.125rem;
}

.calendar-toolbar {
  display: flex;
  align-items: center;
  gap: .625rem;
  margin-bottom: 1rem;
}
.calendar-month-title {
  font-weight: 700;
  font-size: 1rem;
  min-width: 10ch;
  text-align: center;
  text-transform: capitalize;
}

.calendar-grid {
  border-top: 1px solid var(--border);
  border-left: 1px solid var(--border);
  overflow: hidden;
  border-radius: var(--radius-sm);
}

.calendar-header-row {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-day-header {
  font-size: .72rem;
  font-weight: 500;
  text-transform: uppercase;
  color: var(--text-subtle);
  text-align: center;
  padding: .5rem 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--bg-hover);
}

.calendar-week {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: auto;
  grid-auto-rows: min-content;
}

.calendar-day-bg {
  background: rgba(255,255,255,.35);
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .calendar-day-bg {
  background: rgba(255,255,255,.03);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .calendar-day-bg {
    background: rgba(255,255,255,.03);
  }
}
.calendar-day-bg.is-muted {
  background: color-mix(in srgb, var(--bg) 65%, var(--bg-card));
}
[data-theme="dark"] .calendar-day-bg.is-muted {
  background: rgba(255,255,255,.01);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .calendar-day-bg.is-muted {
    background: rgba(255,255,255,.01);
  }
}

.calendar-day-num {
  position: relative;
  z-index: 2;
  padding: 6px 8px 4px;
  cursor: default;
}
.calendar-day-num[onclick] {
  cursor: pointer;
}
.calendar-day-num[onclick]:hover {
  background: rgba(30, 63, 54, .06);
  border-radius: var(--radius-sm);
}
[data-theme="dark"] .calendar-day-num[onclick]:hover {
  background: rgba(255, 255, 255, .05);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .calendar-day-num[onclick]:hover {
    background: rgba(255, 255, 255, .05);
  }
}
.calendar-day-num.is-muted {
  color: var(--text-subtle);
}

.calendar-day-num .day-number {
  font-size: .8rem;
  font-weight: 600;
  display: inline-block;
  line-height: 1;
}

.calendar-day-num.is-today .day-number {
  background: var(--accent);
  color: #fff;
  border-radius: 999px;
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  font-size: .75rem;
}

.calendar-event-bar {
  position: relative;
  z-index: 1;
  height: 22px;
  padding: 2px 8px;
  font-size: .68rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: pointer;
  line-height: 18px;
  margin: 1px 0 6px;
  border-radius: 0;
}
.calendar-event-bar.is-start {
  border-radius: 999px 0 0 999px;
  margin-left: 2px;
}
.calendar-event-bar.is-end {
  border-radius: 0 999px 999px 0;
  margin-right: 2px;
}
.calendar-event-bar.is-start.is-end {
  border-radius: 999px;
}
.calendar-event-bar.is-booked {
  background: var(--accent);
  color: #fff;
}
[data-theme="dark"] .calendar-event-bar.is-booked {
  background: #1E4A38;
  color: #C8EDD8;
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .calendar-event-bar.is-booked {
    background: #1E4A38;
    color: #C8EDD8;
  }
}
.calendar-event-bar.is-own {
  background: rgba(74, 150, 105, .15);
  color: #2D7A50;
  border: 1px solid rgba(74, 150, 105, .28);
}
[data-theme="dark"] .calendar-event-bar.is-own {
  background: rgba(74, 150, 105, .18);
  color: #7EC9A0;
  border-color: rgba(74, 150, 105, .35);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .calendar-event-bar.is-own {
    background: rgba(74, 150, 105, .18);
    color: #7EC9A0;
    border-color: rgba(74, 150, 105, .35);
  }
}
.calendar-event-bar.is-blocked {
  background: var(--bg-hover);
  color: var(--text-muted);
  border: 1px dashed var(--border);
}
.calendar-event-bar.is-request {
  background: rgba(200, 136, 58, .12);
  color: var(--orange);
  border: 1px dashed var(--orange);
}
[data-theme="dark"] .calendar-event-bar.is-request {
  background: rgba(200, 136, 58, .2);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .calendar-event-bar.is-request {
    background: rgba(200, 136, 58, .2);
  }
}
.cal-ev-icon {
  display: inline-block;
  width: 9px;
  height: 9px;
  vertical-align: middle;
  margin-left: 3px;
  flex-shrink: 0;
}
.calendar-event-bar.is-completed {
  opacity: .55;
  background: var(--bg-hover, #EDE6D5);
  color: var(--text-muted, #6A6659);
}
[data-theme="dark"] .calendar-event-bar.is-completed {
  background: rgba(255, 255, 255, .08);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .calendar-event-bar.is-completed {
    background: rgba(255, 255, 255, .08);
  }
}
.calendar-event-spacer {
  position: relative;
  z-index: 1;
  height: 22px;
  margin: 1px 0;
}
.is-request-dot {
  background: rgba(200, 136, 58, .12);
  border: 1px dashed var(--orange);
}

.calendar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 1rem;
  font-size: .8rem;
  color: var(--text-muted);
}
.calendar-legend-item {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.calendar-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

/* -- Calendar week numbers and holidays */
.cal-week-num {
  display: block;
  font-size: .62rem;
  font-weight: 500;
  color: var(--text-subtle);
  line-height: 1;
  margin-top: 3px;
  font-family: var(--mono);
  white-space: nowrap;
  pointer-events: none;
}

.cal-holiday-label {
  display: block;
  font-size: .58rem;
  font-weight: 500;
  color: var(--accent-light);
  line-height: 1.2;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  pointer-events: none;
}

[data-theme="dark"] .cal-holiday-label {
  color: #7EC9A0;
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .cal-holiday-label {
    color: #7EC9A0;
  }
}

@media (max-width: 500px) {
  .cal-holiday-label {
    font-size: .52rem;
  }
  .cal-week-num {
    font-size: .55rem;
  }
}

.stay-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
}

.stay-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: .75rem;
}

/* -- Stay timeline */
.stay-timeline {
  margin: 1rem 0;
  padding: .875rem 1rem;
  background: var(--bg);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.sst-row {
  display: flex;
  align-items: stretch;
  gap: .75rem;
}
.sst-left {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 20px;
  min-width: 20px;
}
.sst-dot {
  width: 20px;
  height: 20px;
  min-width: 20px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--bg-card);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sst-row.is-done .sst-dot {
  background: var(--green);
  border-color: var(--green);
}
.sst-connector {
  flex: 1;
  width: 2px;
  min-height: 8px;
  background: var(--border);
  margin-top: 2px;
}
.sst-connector.is-done { background: var(--green); }
.sst-body {
  display: flex;
  flex: 1;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  min-height: 22px;
}
.sst-label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
  min-width: 80px;
}
.sst-time {
  font-size: .78rem;
  color: var(--text);
  font-weight: 600;
  font-family: var(--mono-nums);
  font-variant-numeric: tabular-nums;
}
.sst-row.is-pending .sst-label,
.sst-row.is-pending .sst-time { color: var(--text-subtle); }

@media (max-width: 768px) {
  .calendar-day-num {
    padding: 4px;
  }
  .calendar-day-num .day-number {
    font-size: .72rem;
  }
  .calendar-event-bar {
    font-size: .58rem;
    height: 18px;
    line-height: 14px;
    padding: 1px 5px;
  }
  .calendar-event-spacer {
    height: 18px;
  }
  .calendar-toolbar {
    flex-wrap: wrap;
    gap: .4rem;
  }
  .calendar-legend {
    gap: .5rem;
    font-size: .72rem;
  }
  .stay-form-row {
    grid-template-columns: 1fr;
  }
  .stay-detail-grid {
    grid-template-columns: 1fr;
  }
}

/* -- DAWA address autocomplete ------------------------------- */

.dawa-wrap {
  position: relative;
}
.dawa-list {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 50;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: none;
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: var(--shadow-md);
  max-height: 220px;
  overflow-y: auto;
}
.dawa-item {
  padding: .6rem .75rem;
  font-size: .88rem;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
}
.dawa-item:last-child {
  border-bottom: none;
}
.dawa-item:hover,
.dawa-item.active {
  background: var(--bg-hover);
}

@media (max-width: 768px) {
  .houses-grid {
    grid-template-columns: 1fr;
  }
  .house-detail-header {
    flex-direction: column;
  }
}

/* -- Booking requests ----------------------------------------- */

.booking-requests-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.row-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-stripe, var(--bg));
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: .05rem;
}

.booking-request-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: .85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background .15s;
}

.booking-request-row:hover {
  background: var(--bg-hover);
}

.booking-request-info {
  flex: 1;
  min-width: 0;
}

.booking-request-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .2rem;
}

.booking-request-name {
  font-weight: 600;
  font-size: .93rem;
}

.booking-request-dates {
  font-size: .82rem;
}

.booking-request-actions {
  display: flex;
  gap: .4rem;
  flex-shrink: 0;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .booking-request-row {
    flex-direction: column;
  }
  .booking-request-row > .row-icon,
  .house-links-list .row-icon,
  .house-member-avatar {
    display: none;
  }
  .booking-request-actions {
    width: 100%;
  }
}

/* -- Stay access links (owner modal panel) */

.stay-links-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.stay-links-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .6rem;
}

.stay-link-needed-hint {
  background: color-mix(in srgb, var(--orange) 12%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--orange) 35%, var(--border));
  border-radius: var(--radius-sm);
  padding: .55rem .75rem;
  font-size: .8rem;
  color: var(--text);
  margin-bottom: .75rem;
}

.stay-link-row {
  display: flex;
  align-items: flex-start;
  gap: .5rem;
  padding: .45rem 0;
  border-bottom: 1px solid var(--border);
}

.stay-link-row:last-child {
  border-bottom: none;
}

.stay-link-row-info {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  gap: .4rem;
  flex-wrap: wrap;
  min-width: 0;
}

.stay-link-row-name {
  font-weight: 600;
  font-size: .9rem;
}

.stay-link-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: .4rem;
}


.stay-link-row--new {
  background: color-mix(in srgb, var(--green) 8%, transparent);
  border-radius: var(--radius-sm);
  padding: .35rem .5rem;
  margin: 0 -.5rem;
}

.stay-link-url-row {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  align-items: center;
  margin: .35rem 0 .2rem;
  width: 100%;
}

.stay-link-copy-box {
  display: flex;
  gap: .5rem;
  margin-top: .75rem;
  align-items: center;
}

/* -- House links tab */

.house-links-group {
  margin-bottom: 2rem;
}

.house-links-group-title {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin-bottom: .6rem;
}

.house-links-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.house-links-group--muted .house-link-row {
  opacity: .6;
}

.house-link-row {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: .85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: background .15s;
}

.house-link-row:hover {
  background: var(--bg-hover);
}

.house-guests-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.house-guest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  padding: .6rem .85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.house-guest-row-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  min-width: 0;
}

.house-guest-row-name {
  font-weight: 600;
  font-size: .9rem;
}


.house-link-row-main {
  flex: 1;
  min-width: 0;
}

.house-link-row-who {
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
  margin-bottom: .25rem;
}

.house-link-row-name {
  font-weight: 600;
  font-size: .93rem;
}

.house-link-row-stay {
  font-size: .8rem;
  color: var(--text-muted);
}

.house-link-row-meta {
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-top: .25rem;
  color: var(--text-subtle);
  font-size: .78rem;
}

@media (max-width: 600px) {
  .house-link-row {
    flex-wrap: wrap;
  }
}

/* -- Guest stay page */

body.guest-stay-body {
  background: var(--bg);
  min-height: 100dvh;
  margin: 0;
}

.guest-stay-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.guest-stay-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--topbar-h);
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 3px rgba(30,63,54,.04);
  display: flex;
  align-items: center;
  padding: 0 2rem;
}

.guest-stay-header-inner {
  display: flex;
  align-items: center;
  width: 100%;
  max-width: 600px;
}

.guest-stay-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--display, sans-serif);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  text-decoration: none;
  flex-shrink: 0;
}

.guest-stay-logo:hover {
  text-decoration: none;
  opacity: .8;
}

.guest-stay-logo img {
  display: block;
}

.guest-stay-content {
  max-width: 600px;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
  width: 100%;
  box-sizing: border-box;
  flex: 1;
}

.guest-stay-hero {
  text-align: center;
  padding: 1.5rem 0 1rem;
}

.guest-stay-house-icon {
  width: 64px;
  height: 64px;
  background: var(--bg-card);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto .75rem;
  box-shadow: var(--shadow);
  color: var(--accent);
}

.guest-stay-house-name {
  font-family: var(--display, sans-serif);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 .25rem;
}

.guest-stay-address {
  color: var(--text-muted);
  font-size: .92rem;
  margin: 0 0 .6rem;
  line-height: 1.5;
  display: inline-flex;
  align-items: flex-start;
  gap: .4rem;
}
.guest-stay-address-map {
  flex-shrink: 0;
  color: var(--accent-light);
  opacity: .7;
  margin-top: 2px;
  transition: opacity .15s;
}
.guest-stay-address-map:hover { opacity: 1; }

.guest-stay-welcome {
  font-size: .95rem;
  color: var(--accent);
  font-weight: 600;
  margin: .5rem 0 0;
}

.guest-stay-section {
  margin-top: 1.5rem;
}

.guest-stay-section-title {
  font-family: var(--display, sans-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: .78rem;
  color: var(--text-muted);
}

.guest-stay-dates {
  display: flex;
  gap: .75rem;
  align-items: center;
}

.guest-stay-date-card {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .9rem 1rem;
  box-shadow: var(--shadow);
}

.guest-stay-date-label {
  font-size: .75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: .25rem;
}

.guest-stay-date-value {
  font-family: var(--display, sans-serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
}

.guest-stay-date-time {
  font-family: var(--mono-nums);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  font-size: .82rem;
  color: var(--text-muted);
  margin-top: .2rem;
}

.guest-stay-date-arrow {
  color: var(--text-muted);
  font-size: 1.2rem;
  flex-shrink: 0;
}

.guest-stay-guests {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-top: .75rem;
  color: var(--text-muted);
  font-size: .9rem;
}

.guest-stay-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.1rem;
  box-shadow: var(--shadow);
  font-size: .93rem;
  color: var(--text);
  line-height: 1.6;
}

.guest-stay-notes {
  white-space: pre-line;
}

.guest-stay-footer {
  margin-top: 2.5rem;
  text-align: center;
  color: var(--text-subtle);
  font-size: .8rem;
}

.guest-stay-error-card {
  text-align: center;
  padding: 3rem 1rem;
}

.guest-stay-error-icon {
  color: var(--red);
  margin-bottom: 1rem;
}

.guest-stay-error-card h2 {
  font-family: var(--display, sans-serif);
  font-size: 1.3rem;
  margin: 0 0 .5rem;
}

.guest-stay-error-card p {
  color: var(--text-muted);
  margin: 0 0 1.5rem;
}

@media (max-width: 480px) {
  .guest-stay-dates {
    flex-direction: column;
    align-items: stretch;
  }
  .guest-stay-date-arrow {
    text-align: center;
    transform: rotate(90deg);
  }
  .stay-link-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

.pc-section-header {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-bottom: .75rem;
}
.pc-section-header .guest-stay-section-title {
  margin-bottom: 0;
}
.pc-info-btn {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  border: 1.5px solid var(--text-subtle);
  background: none;
  color: var(--text-subtle);
  font-size: .65rem;
  font-style: italic;
  font-family: Georgia, serif;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  flex-shrink: 0;
  transition: border-color .15s, color .15s;
  line-height: 1;
}
.pc-info-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

@media (max-width: 768px) {
  body.public-cal .guest-stay-content {
    padding-top: .75rem;
    padding-bottom: 1.5rem;
  }
  body.public-cal .guest-stay-hero {
    padding: 1.25rem 0 .25rem;
  }
  body.public-cal .guest-stay-house-name {
    font-size: 1.3rem;
  }
  body.public-cal .guest-stay-section {
    margin-top: 1rem;
  }
  body.public-cal .calendar-card {
    padding: .75rem;
  }
}

/* -- Guest stay page: tasks -------------------------------------- */
.guest-stay-task-item {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--border);
}
.guest-stay-task-item:last-child {
  border-bottom: 0;
}
.guest-stay-task-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.guest-stay-task-title {
  font-weight: 500;
  font-size: .92rem;
}
.guest-stay-task-item.is-done .guest-stay-task-title {
  text-decoration: line-through;
  opacity: .5;
}

.missing-item-row {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .75rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: .5rem;
}
.missing-item-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.missing-item-title {
  font-weight: 500;
  font-size: .92rem;
}
.missing-item-meta {
  font-size: .78rem;
  color: var(--text-muted);
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: center;
}

/* -- Departure check & progress bars */
.guest-departure-progress {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1rem;
}
.guest-departure-progress-bar {
  flex: 1;
  height: 6px;
  background: var(--bg-hover, #EDE6D5);
  border-radius: 999px;
  overflow: hidden;
}
[data-theme="dark"] .guest-departure-progress-bar {
  background: rgba(255, 255, 255, .1);
}
@media (prefers-color-scheme: dark) {
  [data-theme="system"] .guest-departure-progress-bar {
    background: rgba(255, 255, 255, .1);
  }
}
.guest-departure-progress-fill {
  height: 100%;
  background: var(--green, #4A9669);
  border-radius: 999px;
  transition: width .3s ease;
}

/* -- Guest flow stepper */
.gfs-bar {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin: 0 0 1.25rem;
  padding: 0 .5rem;
}
.gfs-bar-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  min-width: 64px;
}
.gfs-bar-dot {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--border-input);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono, monospace);
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: background .25s, border-color .25s, color .25s;
}
.gfs-bar-node .gfs-num { display: block; }
.gfs-bar-node .gfs-check,
.gfs-bar-node .gfs-lock { display: none; }
.gfs-bar-node.is-done .gfs-num { display: none; }
.gfs-bar-node.is-done .gfs-check { display: block; }
.gfs-bar-node.is-locked .gfs-num { display: none; }
.gfs-bar-node.is-locked .gfs-lock { display: block; }
.gfs-bar-node.is-done .gfs-bar-dot {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.gfs-bar-node.is-active .gfs-bar-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.gfs-bar-node.is-locked .gfs-bar-dot {
  border-style: dashed;
  opacity: .6;
}
.gfs-bar-node > span {
  font-size: .7rem;
  color: var(--text-subtle);
  white-space: nowrap;
  text-align: center;
}
.gfs-bar-node.is-active > span { color: var(--accent); font-weight: 600; }
.gfs-bar-node.is-done > span { color: var(--green); font-weight: 600; }
.gfs-bar-line {
  flex: 1;
  height: 2px;
  background: var(--border);
  margin-top: 14px;
  max-width: 80px;
  transition: background .35s;
}
.gfs-bar-line.is-done { background: var(--green); }
.gfs-step {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .625rem;
  overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.gfs-step.is-active {
  border-color: var(--accent-light, var(--accent));
  box-shadow: var(--shadow);
}
.gfs-step.is-locked { opacity: .6; }
.gfs-step-hd {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .9rem 1.1rem;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition: background .15s;
}
.gfs-step:not(.is-locked) .gfs-step-hd:hover {
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}
.gfs-step.is-locked .gfs-step-hd { cursor: default; }
.gfs-step-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid var(--border-input);
  background: var(--bg-card);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-family: var(--mono, monospace);
  font-size: .85rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: background .25s, border-color .25s, color .25s;
}
.gfs-step-icon .gfs-num { display: block; }
.gfs-step-icon .gfs-check,
.gfs-step-icon .gfs-lock { display: none; }
.gfs-step-icon.is-done .gfs-num { display: none; }
.gfs-step-icon.is-done .gfs-check { display: block; }
.gfs-step-icon.is-locked .gfs-num { display: none; }
.gfs-step-icon.is-locked .gfs-lock { display: block; }
.gfs-step-icon.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.gfs-step-icon.is-done {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.gfs-step-icon.is-locked {
  border-style: dashed;
  opacity: .7;
}
.gfs-step-info { flex: 1; min-width: 0; }
.gfs-step-title {
  display: block;
  font-family: var(--display, sans-serif);
  font-weight: 600;
  font-size: .95rem;
  color: var(--text);
  line-height: 1.2;
}
.gfs-step-summary {
  display: block;
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: .15rem;
}
.gfs-step.is-locked .gfs-step-title { color: var(--text-muted); }
.gfs-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform .2s ease;
}
.gfs-step.is-active .gfs-chevron { transform: rotate(180deg); }
.gfs-step.is-locked .gfs-chevron { display: none; }
.gfs-step-bd {
  max-height: 0;
  overflow: hidden;
  transition: max-height .35s ease;
}
.gfs-step.is-active .gfs-step-bd { max-height: 4000px; }
.gfs-step-bd-inner {
  padding: .875rem 1.1rem 1.25rem;
  border-top: 1px solid var(--border);
}
.gfs-task-group { margin-bottom: .875rem; }
.gfs-task-group:last-child { margin-bottom: 0; }
.gfs-task-group-lbl {
  font-family: var(--mono, monospace);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin-bottom: .35rem;
}
.gfs-gate {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.gfs-gate--tight {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
}
.gfs-gate-prog {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: .75rem;
}
.gfs-gate-bar {
  flex: 1;
  height: 5px;
  background: var(--bg);
  border-radius: 999px;
  overflow: hidden;
}
.gfs-gate-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .3s ease;
}
.gfs-settlement-inline {
  margin-bottom: .75rem;
}

.gfs-settlement-inline .guest-stay-section-title {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 .5rem;
}

.gfs-settlement-inline-card {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.gfs-done-msg {
  text-align: center;
  padding: 1.25rem 1rem;
  color: var(--green);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: .625rem;
}
.gfs-done-msg h3 { color: var(--text); margin: 0 0 .25rem; font-size: 1rem; }
.gfs-done-msg p { color: var(--text-muted); font-size: .88rem; margin: 0; }
.gfs-pending-msg {
  text-align: center;
  padding: 1.25rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.gfs-pending-msg h3 { color: var(--text); margin: 0 0 .25rem; font-size: 1rem; }
.gfs-pending-msg p { color: var(--text-muted); font-size: .88rem; margin: 0; }
@media (max-width: 360px) {
  .gfs-bar-node { min-width: 50px; }
  .gfs-bar-node > span { font-size: .62rem; }
}
.form-hint {
  color: var(--text-muted);
  font-size: .8rem;
  margin-top: .25rem;
}
.drag-handle {
  cursor: grab;
  color: var(--text-subtle, #9B9486);
  padding: .25rem;
  flex-shrink: 0;
  touch-action: none;
}
.drag-handle:active { cursor: grabbing; }
.is-dragging {
  opacity: .4;
}

/* -- Meter readings ----------------------------------------------- */

.meter-photo-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0;
  border: 1.5px solid var(--border-input); border-radius: var(--radius-sm);
  background: var(--bg-input); cursor: pointer; color: var(--text-muted);
}
.meter-photo-btn svg { width: 18px; height: 18px; display: block; }
.meter-photo-btn.has-photo {
  background: var(--green); border-color: var(--green); color: white;
}
.meter-photo-btn--required {
  position: relative;
}
.meter-photo-btn--required::after {
  content: ''; position: absolute; top: -3px; right: -3px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--red); border: 1.5px solid var(--bg-card);
}
.meter-photo-btn--required.has-photo::after {
  display: none;
}
.meter-photo-thumb {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: var(--radius-sm);
  background: var(--bg-hover); text-decoration: none; color: var(--text-muted);
}
.meter-photo-thumb svg { width: 15px; height: 15px; display: block; }
.meter-photo-delete {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; padding: 0; font-size: .7rem; line-height: 1;
  border: none; border-radius: var(--radius-sm);
  background: var(--bg-hover); color: var(--text-muted); cursor: pointer;
}
.meter-photo-delete:hover { background: var(--red); color: #fff; }

/* Full-screen overlay for viewing a meter reading photo - sits above both app Modal
   layers (500/550) so it can be triggered from within a modal too, but below Toasts. */
.photo-lightbox-overlay {
  position: fixed; inset: 0; z-index: 600;
  background: rgba(0,0,0,.88);
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
}
.photo-lightbox-content { position: relative; max-width: 90vw; max-height: 90vh; }
.photo-lightbox-content img {
  display: block; max-width: 90vw; max-height: 90vh;
  border-radius: var(--radius); box-shadow: var(--shadow-lg);
}
.photo-lightbox-close {
  position: absolute; top: -2.5rem; right: 0;
  background: none; border: none; color: rgba(255,255,255,.8);
  cursor: pointer; font-size: 1.75rem; line-height: 1; padding: .25rem;
}
.photo-lightbox-close:hover { color: #fff; }

.meter-list {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}

.meter-row {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.meter-row-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
}

.meter-chev {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  cursor: pointer;
  flex-shrink: 0;
}

.meter-chev::after {
  content: '';
  display: block;
  border-style: solid;
  border-width: 5px 0 5px 8px;
  border-color: transparent transparent transparent var(--text-muted);
  transition: transform .15s;
}

.meter-chev.open::after {
  transform: rotate(90deg);
}

.meter-history-content {
  padding: .75rem 1rem;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg-card) 75%, var(--bg-hover) 25%);
}

.meter-chart-wrap {
  margin: .5rem 0 .75rem;
}

.meter-readings-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .85rem;
}

.meter-readings-table th {
  text-align: left;
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  padding: .3rem .5rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.meter-readings-table td {
  padding: .4rem .5rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.meter-readings-table tr:last-child td {
  border-bottom: none;
}

.meter-row-info {
  display: flex;
  align-items: center;
  gap: .75rem;
}

.meter-type-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-hover);
}

.meter-type-icon { color: var(--text-muted); }
.meter-type-icon svg { display: block; }

/* Stay detail meter section */
.stay-meters-section {
  border-top: 1px solid var(--border);
  padding-top: 1rem;
  margin-top: .5rem;
}

.stay-meters-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}

.meter-readings-group {
  margin-bottom: .75rem;
}

.meter-readings-group-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .4rem;
  font-size: .9rem;
}

.meter-consumption {
  font-size: .75rem;
  color: var(--text-muted);
  margin-left: auto;
}

.meter-reading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .4rem .6rem;
  border-radius: var(--radius-sm);
  background: var(--bg-hover);
  margin-bottom: .25rem;
  gap: .5rem;
}

.meter-reading-info {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex: 1;
  min-width: 0;
}

.meter-reading-phase {
  font-size: .8rem;
  color: var(--text-muted);
  width: 70px;
  flex-shrink: 0;
}

.meter-reading-value {
  font-family: var(--mono-nums);
  font-variant-numeric: tabular-nums;
  font-size: .9rem;
  font-weight: 600;
}

/* Guest stay meter section */
.guest-meter-input-row {
  display: flex;
  gap: .5rem;
  align-items: center;
}

@media (max-width: 768px) {
  .meter-reading-row { flex-wrap: wrap; }
  .meter-consumption { margin-left: 0; }
}

/* -- Husindstillinger (settings tab) -------------------------------- */

.settings-form-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.25rem 1.5rem;
}

/* -- Kontoplan (house accounts) ------------------------------------ */

.accounts-list {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.account-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .5rem .75rem;
}

/* -- Settlements -------------------------------------------------- */

.pricing-rule-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .65rem .75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: .4rem;
}
.pricing-rule-info { flex: 1; min-width: 0; }
.pricing-rule-name { font-weight: 600; font-size: .9rem; margin-bottom: .1rem; }

.stay-settlement-section {
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}

/* -- Stay house info preview (member stay modal) */
.stay-info-preview {
  margin-top: 1rem;
  padding-top: .75rem;
  border-top: 1px solid var(--border);
}
.stay-info-preview > strong {
  display: block;
  margin-bottom: .5rem;
  font-size: .875rem;
}
.stay-settlement-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .5rem;
}

.settlement-body { padding-top: .25rem; }

.settlement-lines-list {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  margin-bottom: .5rem;
}

.settlement-line-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .4rem .5rem;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  gap: .5rem;
}
.settlement-line-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .1rem;
}
.settlement-line-amount {
  font-family: var(--mono-nums);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.settlement-payment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .3rem 0;
  border-top: 1px solid var(--border);
}

.settlement-payments-section {
  margin-top: .75rem;
  padding-top: .5rem;
  border-top: 1px solid var(--border);
}

.settlement-instructions {
  margin-top: .75rem;
  padding: .6rem .75rem;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.settlement-instructions-text {
  font-size: .9rem;
  white-space: pre-wrap;
  word-break: break-word;
}

.settlement-remaining-row {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
  color: var(--orange);
  padding-top: .35rem;
  margin-top: .2rem;
  border-top: 1px dashed var(--border);
}

/* Guest stay settlement */
.guest-stay-settlement-card { padding: 1.25rem; }

.guest-stay-settlement-pending-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.25rem;
}

.guest-stay-settlement-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.guest-stay-settlement-amount {
  font-family: var(--mono-nums);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}

.guest-stay-settlement-lines {
  display: flex;
  flex-direction: column;
  gap: 0;
  border-top: 1px solid var(--border);
  margin-bottom: .75rem;
}

.guest-stay-settlement-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: .55rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.guest-stay-settlement-line-label { font-weight: 500; display: block; }
.guest-stay-settlement-line-detail { display: block; }
.guest-stay-settlement-line-amount {
  font-family: var(--mono-nums);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  font-weight: 600;
}

.guest-stay-settlement-total-row {
  display: flex;
  justify-content: space-between;
  padding: .6rem 0 0;
  font-size: 1.05rem;
}
.guest-stay-settlement-total-row strong:last-child {
  font-family: var(--mono-nums);
  font-variant-numeric: tabular-nums;
}

.guest-stay-settlement-payment { margin-top: 1rem; }
.guest-stay-settlement-instr-title { font-size: .85rem; font-weight: 600; margin-bottom: .3rem; }
.guest-stay-settlement-instr {
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
  padding: .7rem .85rem;
  font-size: .9rem;
  line-height: 1.5;
  margin-bottom: .75rem;
  white-space: pre-wrap;
}
.guest-stay-settlement-btns {
  display: flex;
  align-items: center;
  gap: .6rem;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .guest-stay-settlement-amount { font-size: 1.25rem; }
  .settlement-line-row { flex-wrap: wrap; }
}

/* -- Economy tab */
.economy-year-bar {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.economy-year-bar label {
  font-size: .85rem;
  color: var(--text-muted);
  font-family: var(--mono);
}
.economy-year-select {
  padding: .35rem .65rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-input);
  background: var(--bg-input);
  color: var(--text);
  font-size: .9rem;
  cursor: pointer;
  width: auto;
}
.economy-statement {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.75rem;
}
.economy-stmt-section { margin-bottom: .5rem; }
.economy-stmt-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: .5rem 0;
  font-weight: 600;
  font-size: .95rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}
.economy-stmt-header--expense { margin-top: .75rem; }
.economy-stmt-sub-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: .3rem .5rem;
  font-size: .88rem;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
}
.economy-stmt-sub-row:nth-child(even) { background: var(--bg-hover); }
.economy-amount { font-family: var(--mono-nums); font-variant-numeric: tabular-nums; font-weight: 600; color: var(--text); }
.economy-stmt-empty { color: var(--text-subtle); font-style: italic; }
.economy-stmt-divider {
  border: none;
  border-top: 2px solid var(--border);
  margin: .75rem 0 .5rem;
}
.economy-stmt-net-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: .4rem 0;
  font-weight: 700;
  font-size: 1.05rem;
  font-variant-numeric: tabular-nums;
}
.economy-stmt-net-row .positive { color: var(--green); }
.economy-stmt-net-row .negative { color: var(--red); }

.economy-cat-table-wrap {
  margin-top: .5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.economy-cat-thead,
.economy-cat-row {
  display: grid;
  grid-template-columns: 1fr repeat(3, 115px);
  align-items: center;
  gap: .5rem;
  padding: .4rem .75rem;
  font-size: .88rem;
}
.economy-cat-thead {
  font-size: .75rem;
  font-family: var(--mono);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .03em;
  background: var(--bg-hover);
  border-bottom: 1px solid var(--border);
}
.economy-cat-thead span:not(:first-child),
.economy-cat-row span:not(:first-child) { text-align: right; }
.economy-cat-row span:not(:first-child) { font-family: var(--mono-nums); font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.economy-cat-row span:not(:first-child) a { color: var(--text); text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.economy-cat-row span:not(:first-child) a:hover { text-decoration: underline; text-decoration-style: solid; color: var(--accent-light); }
.economy-cat-zero { display: block; text-align: center; }
.economy-cat-entry { border-bottom: 1px solid var(--border); }
.economy-cat-entry:last-child { border-bottom: none; }
.economy-cat-entry:nth-child(even) > .economy-cat-row { background: var(--bg); }
.economy-cat-label { color: var(--text); }
.economy-cat-total-row {
  font-weight: 600;
  background: var(--bg-hover) !important;
  border-top: 1px solid var(--border);
}
.economy-cat-row .positive { color: var(--green); }
.economy-cat-row .negative { color: var(--red); }
.economy-cat-detail {
  display: none;
  padding: .35rem .75rem .45rem;
  border-top: 1px solid var(--border);
  background: var(--bg-hover);
}
.eco-det-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .15rem 0;
  font-size: .85rem;
}
.eco-det-label { color: var(--text-muted); font-size: .75rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: .03em; }
.eco-det-row a { color: var(--text); font-family: var(--mono-nums); font-variant-numeric: tabular-nums; font-weight: 600; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.eco-det-row a:hover { text-decoration-style: solid; color: var(--accent-light); }
@media (max-width: 600px) {
  .economy-cat-thead,
  .economy-cat-row { grid-template-columns: 1fr auto; }
  .economy-cat-row > span:nth-child(2),
  .economy-cat-row > span:nth-child(3),
  .economy-cat-thead > span:nth-child(2),
  .economy-cat-thead > span:nth-child(3) { display: none; }
  .economy-cat-entry > .economy-cat-row { cursor: pointer; }
  .economy-cat-entry.eco-expanded .economy-cat-detail { display: block; }
}

.economy-section { margin-bottom: 1.5rem; }
.economy-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}
.economy-section-header h4 {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
}

.economy-expense-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.economy-expense-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .55rem .1rem;
  border-bottom: 1px solid var(--border);
  gap: .75rem;
}
.economy-expense-row:last-child { border-bottom: none; }
.economy-expense-info { flex: 1; min-width: 0; }
.economy-expense-meta {
  font-size: .78rem;
  color: var(--text-muted);
  font-family: var(--mono-nums);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}
.economy-expense-desc {
  font-size: .88rem;
  color: var(--text);
}
.economy-expense-amount {
  font-family: var(--mono-nums);
  font-size: .95rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

@media print {
  #app-topnav, .app-mobile-menu, .house-sidenav, .house-tabs-mobile,
  .breadcrumb, .house-detail-header,
  .economy-year-bar .btn, .economy-expense-row .btn-icon { display: none !important; }
  .print-header {
    display: flex !important;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #fff;
    padding: 16px 24px 12px;
    margin: 0;
    z-index: 1000;
  }
  .page-constrained { padding-top: 130px; }
  .economy-statement { break-inside: avoid; }
  body { background: white !important; }
}

/* -- Driftslog (activity log) -------------------------------- */
.activity-feed {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.activity-row {
  display: flex; gap: .75rem; align-items: flex-start;
  padding: .875rem 1.25rem; border-bottom: 1px solid var(--border);
}
.activity-row:last-child { border-bottom: none; }
.activity-row-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent-light); flex-shrink: 0; margin-top: .45rem;
}
.activity-row-content { flex: 1; min-width: 0; }
.activity-row-title { font-size: .875rem; font-weight: 600; color: var(--text); }
.activity-row-meta { font-size: .75rem; color: var(--text-subtle); margin-top: .2rem; }
.activity-feed-empty {
  padding: 2rem 1.25rem; text-align: center; color: var(--text-muted); font-size: .9375rem;
}
.activity-feed-load-more { text-align: center; padding: 1rem; }
.activity-feed-compact {
  background: none; border: none;
}
.activity-feed-compact .activity-row { padding: .5rem 0; }

/* -- Delete account feedback (exit reason step) --------------- */
.reason-list {
  display: flex; flex-direction: column; gap: .4rem;
  margin-bottom: .85rem;
}
.reason-item {
  display: flex; align-items: center; justify-content: space-between; gap: .75rem;
  padding: .65rem .85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-weight: normal;
  transition: border-color .15s, background .15s;
}
.reason-item:hover { border-color: var(--accent); background: var(--bg-hover); }
.reason-item:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-glow);
}
.reason-item input[type=radio] { order: 2; flex-shrink: 0; width: auto; accent-color: var(--accent); }
.reason-item-label { order: 1; }

/* -- Opgaver (tasks) ------------------------------------------ */

.tasks-layout {
  display: grid;
  grid-template-columns: 224px 1fr;
  gap: 0;
  min-height: 520px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Sidebar */
.tasks-sidebar {
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: .5rem 0 1rem;
  background: var(--bg);
  overflow-y: auto;
}
.tasks-sidebar-section {
  padding: 0 .5rem .25rem;
}
.tasks-sidebar-section-lists {
  flex: 1;
}
.tasks-sidebar-label {
  font-size: .67rem;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding: .75rem .75rem .25rem;
  display: block;
}
.tasks-sidebar-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .25rem;
  padding: .75rem .75rem .25rem;
  font-size: .67rem;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-subtle);
}
.tasks-sidebar-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  padding: .1rem .25rem;
  line-height: 1;
  border-radius: 4px;
}
.tasks-sidebar-toggle:hover { background: var(--bg-hover); color: var(--accent); }
.tasks-sidebar-add-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  color: var(--text-muted);
  padding: 0 .2rem;
  border-radius: 4px;
  transition: color .12s;
}
.tasks-sidebar-add-btn:hover { color: var(--accent); }
.tasks-sidebar-empty {
  font-size: .8rem;
  color: var(--text-subtle);
  padding: .25rem .75rem .5rem;
  margin: 0;
}
.tasks-nav-btn {
  display: flex;
  align-items: center;
  gap: .55rem;
  width: 100%;
  padding: .5rem .75rem;
  border: none;
  background: none;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: left;
  transition: background .15s, color .15s;
  min-width: 0;
}
.tasks-nav-btn:hover { background: var(--bg-hover); color: var(--text); }
.tasks-nav-btn.active { background: var(--accent); color: var(--bg); font-weight: 600; }
.tasks-nav-btn.active .tasks-nav-icon { opacity: 1; }
.tasks-nav-btn.active .tasks-badge { background: rgba(255,255,255,.18); color: var(--bg); }
.tasks-nav-icon { flex-shrink: 0; opacity: .55; transition: opacity .15s; }
.tasks-nav-btn:hover .tasks-nav-icon { opacity: .9; }
.tasks-nav-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.tasks-nav-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tasks-nav-label-muted { color: var(--text-subtle); }
.tasks-nav-sublabel {
  font-size: .72rem;
  font-weight: 400;
  color: var(--text-subtle);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
  margin-top: .05rem;
}
.tasks-nav-btn.active .tasks-nav-sublabel { color: rgba(244,239,228,.7); }
.tasks-badge {
  flex-shrink: 0;
  margin-left: auto;
  background: var(--bg-hover);
  color: var(--text-muted);
  font-family: var(--mono);
  font-size: .68rem;
  font-weight: 700;
  border-radius: 999px;
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  padding: 0 .35em;
}
.tasks-list-dot {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .65rem;
  font-weight: 700;
  color: #fff;
  line-height: 1;
}
.tasks-list-lock {
  flex-shrink: 0;
  color: var(--text-subtle);
  margin-left: auto;
}

/* Main */
.tasks-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-y: auto;
  background: var(--bg-card);
}
.tasks-main-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .875rem 1.25rem .7rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.tasks-main-header h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.tasks-main-header-left { display: flex; align-items: center; gap: .6rem; min-width: 0; flex-wrap: wrap; }
.tasks-main-header-right { display: flex; align-items: center; gap: .5rem; flex-shrink: 0; }
.tasks-main-actions {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem 1.25rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  background: var(--bg);
}

/* Column header row */
.tasks-col-header {
  display: flex;
  align-items: center;
  padding: 0 1.25rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.tasks-col-header-task {
  flex: 1;
  min-width: 0;
  font-size: .7rem;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding: .45rem 0;
}
.tasks-col-header-cell {
  width: 90px;
  flex-shrink: 0;
  font-size: .7rem;
  font-family: var(--mono);
  font-weight: 600;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: var(--text-subtle);
  padding: .45rem 0;
}
.tasks-col-header-spacer { width: 36px; flex-shrink: 0; }

/* Task list */
.tasks-task-list {
  list-style: none;
  margin: 0;
  padding: 0;
  flex: 1;
}
.tasks-task-row {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 0 .875rem 0 1rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .12s;
  min-height: 48px;
}
.tasks-task-row:last-child { border-bottom: 0; }
.tasks-task-row:hover { background: var(--bg-hover); }
.tasks-task-row.done { opacity: .55; }
.tasks-task-row.archived { opacity: .38; }
.tasks-task-check {
  flex-shrink: 0;
  width: 36px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
}
.tasks-task-check:hover svg circle { stroke: var(--accent); }
.tasks-task-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .1rem;
  padding: .6rem .5rem .6rem 0;
}
.tasks-task-title {
  font-size: .9rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
}
.tasks-task-title.done { text-decoration: line-through; color: var(--text-muted); }
.tasks-task-desc {
  font-size: .78rem;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tasks-task-meta-mobile {
  display: none;
  align-items: center;
  gap: .35rem;
  flex-wrap: wrap;
  margin-top: .15rem;
}
.tasks-task-col {
  flex-shrink: 0;
  width: 90px;
  display: flex;
  align-items: center;
  font-size: .78rem;
  color: var(--text-muted);
}
.tasks-task-col-pri   { }
.tasks-task-col-status { }
.tasks-task-col-assignee { }
.tasks-task-col-due { }
.tasks-task-col-due.overdue { color: var(--red); font-weight: 600; }
.tasks-task-col-empty { color: var(--text-subtle); }
.tasks-task-chip { font-size: .68rem; }
.tasks-task-listname {
  font-size: .72rem;
  font-family: var(--mono);
  color: var(--text-muted);
}
.tasks-assignee-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent-light);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.tasks-empty {
  margin: 1.5rem 1.25rem;
  border: 1px dashed var(--border-input);
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--bg-card) 72%, var(--bg));
  padding: 2.5rem 1.5rem;
  text-align: center;
  color: var(--text-muted);
  font-size: .9rem;
  line-height: 1.5;
}
.tasks-archived-row {
  padding: .5rem 1.25rem;
  border-top: 1px solid var(--border);
}
.tasks-archived-toggle { color: var(--text-muted); }

/* Mini feedback section below tasks */
.tasks-mini-feedback {
  border-top: 1px solid var(--border);
  background: var(--bg);
  margin-top: auto;
}
.tasks-mini-feedback-header {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .75rem 1.25rem .5rem;
}
.tasks-mini-feedback-title {
  font-size: .82rem;
  font-weight: 600;
  color: var(--text);
}
.tasks-mini-feedback-row {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  padding: .5rem 1.25rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.tasks-mini-feedback-msg {
  flex: 1;
  min-width: 160px;
  font-size: .84rem;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tasks-mini-feedback-meta {
  font-size: .75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}
.tasks-mini-feedback-actions {
  display: flex;
  gap: .35rem;
  flex-shrink: 0;
}

/* Task detail modal */
.tasks-detail-desc {
  font-size: .9rem;
  color: var(--text-muted);
  margin: 0 0 .25rem;
  line-height: 1.55;
}
.tasks-detail-chips {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.tasks-detail-rows {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  padding-top: .5rem;
  border-top: 1px solid var(--border);
  margin-top: .25rem;
}
.tasks-detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .5rem;
  font-size: .86rem;
}
.tasks-detail-label {
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 100px;
}

/* Feedback inbox */
.tasks-feedback-status { cursor: default; }
.tasks-feedback-status:hover svg circle { stroke: initial; }
.tasks-feedback-quote {
  border-left: 3px solid var(--border-input);
  padding-left: .65rem;
  color: var(--text-muted);
  font-style: italic;
  font-size: .88rem;
  line-height: 1.5;
}
.tasks-feedback-stay-link {
  font-size: .85rem;
  color: var(--accent);
  text-decoration: none;
}
.tasks-feedback-stay-link:hover { text-decoration: underline; }

.tasks-sidebar-mobile-toggle { display: none; }

/* Mobile responsive */
@media (max-width: 768px) {
  .tasks-layout {
    grid-template-columns: 1fr;
    min-height: unset;
    box-shadow: none;
  }
  .tasks-sidebar {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0;
    overflow: hidden;
  }
  .tasks-sidebar-mobile-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .65rem .875rem;
    cursor: pointer;
    font-size: .875rem;
    font-weight: 600;
    color: var(--text);
    background: var(--bg);
    border-bottom: 1px solid transparent;
  }
  .tasks-sidebar.mobile-open .tasks-sidebar-mobile-toggle {
    border-bottom-color: var(--border);
  }
  .tasks-sidebar-section {
    display: none;
    padding: .25rem .5rem .5rem;
  }
  .tasks-sidebar.mobile-open .tasks-sidebar-section { display: block; }
  .tasks-nav-btn { padding: .45rem .625rem; font-size: .84rem; }
  .tasks-col-header { display: none; }
  .tasks-task-col { display: none; }
  .tasks-task-meta-mobile { display: flex; }
  .tasks-task-row { padding: .6rem .875rem; min-height: unset; }
  .tasks-task-check { width: 32px; height: auto; padding: .6rem 0; }
  .tasks-task-body { padding: .5rem .5rem .5rem 0; }
  .tasks-feedback-card { margin: .5rem .625rem; }
  .tasks-main-header { padding: .75rem .875rem .6rem; }
  .tasks-main-actions { padding: .5rem .875rem; }
  .tasks-empty { margin: 1rem .875rem; padding: 1.75rem 1rem; }
  .tasks-mini-feedback-row { flex-direction: column; gap: .4rem; }
  .tasks-mini-feedback-msg { white-space: normal; }
}


/* -- Husinformation */

.info-loading { padding: 2rem; color: var(--text-muted); }

.info-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1.5rem;
  gap: 1rem;
}
.info-empty-icon { color: var(--accent-light); }
.info-empty h3 { font-family: var(--display); font-size: 1.2rem; margin: 0; }
.info-empty p { color: var(--text-muted); max-width: 420px; margin: 0; }
.info-empty-actions { display: flex; gap: .75rem; flex-wrap: wrap; justify-content: center; margin-top: .5rem; }
.info-empty-member { padding: 2rem 1.5rem; color: var(--text-muted); text-align: center; }


.info-guide-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: none;
  border: none;
  cursor: pointer;
  font: inherit;
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text);
  padding: .25rem .25rem;
  border-radius: var(--radius-sm);
}
.info-guide-picker-btn svg { color: var(--text-muted); flex-shrink: 0; }
.info-guide-picker-btn:hover svg { color: var(--text); }
.info-guide-default-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
  margin-left: .15rem;
}

.info-editor { display: flex; flex-direction: column; gap: 0; }
.info-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--border);
  gap: .75rem;
  flex-wrap: wrap;
}

.info-editor-body {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 520px;
  border-bottom: 1px solid var(--border);
}
.info-sections-panel {
  border-right: 1px solid var(--border);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}
.info-form-panel { overflow-y: auto; padding: 1.25rem 1.5rem; }
.info-modal-preview { padding: .25rem 0; }

.info-sections-list { flex: 1; }
.info-add-section-btn {
  display: block;
  width: 100%;
  padding: .6rem 1rem;
  text-align: left;
  background: none;
  border: none;
  border-top: 1px solid var(--border);
  color: var(--accent-light);
  font-size: .875rem;
  cursor: pointer;
  margin-top: auto;
}
.info-add-section-btn:hover { background: var(--bg-hover); }

.info-section-row { border-bottom: 1px solid var(--border); }
.info-section-row.dragging { opacity: .5; }
.info-section-row.drag-over > .info-section-row-main { background: var(--bg-hover); border-top: 2px solid var(--accent); }
.info-section-row-main {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .625rem .75rem;
  cursor: pointer;
  user-select: none;
}
.info-section-row-main:hover { background: var(--bg-hover); }
.info-section-row.is-open > .info-section-row-main { background: var(--bg-hover); font-weight: 600; }
.info-section-title { flex: 1; font-size: .9rem; }
.info-section-meta { font-size: .78rem; font-family: var(--mono); }
.info-section-menu-btn { margin-left: auto; flex-shrink: 0; }

.info-drag-handle {
  cursor: grab;
  color: var(--text-subtle);
  font-size: 1rem;
  flex-shrink: 0;
  touch-action: none;
}
.info-drag-handle:active { cursor: grabbing; }

.info-items-list { background: var(--bg); padding: .25rem 0 .5rem; }
.info-item-row {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem .75rem .4rem 1.5rem;
  cursor: pointer;
  font-size: .875rem;
}
.info-item-row:hover { background: var(--bg-hover); }
.info-item-row.is-selected { background: color-mix(in srgb, var(--accent) 10%, transparent); font-weight: 600; }
.info-item-row.dragging { opacity: .5; }
.info-item-row.drag-over { border-top: 2px solid var(--accent); }
.info-item-row.info-row-inactive { opacity: .5; }
.info-section-row.info-row-inactive > .info-section-row-main { opacity: .6; }
.info-item-row-title { flex: 1; }
.info-vis-badges { display: flex; gap: .2rem; flex-shrink: 0; }
.info-vis-badge { color: var(--text-muted); display: flex; }
.info-vis-guest { color: var(--accent-light); }
.info-add-item-in-section {
  display: block;
  padding: .35rem .75rem .35rem 1.75rem;
  font-size: .82rem;
  color: var(--accent-light);
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  text-align: left;
}
.info-add-item-in-section:hover { background: var(--bg-hover); }

.info-form-placeholder { display: flex; align-items: center; justify-content: center; height: 100%; min-height: 200px; }
.info-form h3.info-form-title { font-family: var(--display); font-size: 1rem; margin: 0 0 1rem; }
.info-form-label { display: block; font-size: .825rem; font-weight: 600; margin: .75rem 0 .3rem; color: var(--text-muted); }
.info-form-input {
  width: 100%;
  padding: .5rem .75rem;
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  font-size: .9rem;
  color: var(--text);
}
.info-form-input:focus { outline: none; border-color: var(--accent-light); }
.info-md-toolbar { display: flex; gap: .25rem; margin-bottom: .25rem; }
.info-md-btn {
  padding: .25rem .55rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-size: .85rem;
  cursor: pointer;
  color: var(--text);
  line-height: 1;
  display: flex;
  align-items: center;
}
.info-md-btn:hover { background: var(--bg-hover); }
.info-form-textarea {
  width: 100%;
  padding: .5rem .75rem;
  border: 1.5px solid var(--border-input);
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  font-size: .9rem;
  color: var(--text);
  resize: vertical;
  font-family: var(--body);
  line-height: 1.6;
}
.info-form-textarea:focus { outline: none; border-color: var(--accent-light); }
.info-char-count { font-size: .78rem; color: var(--text-subtle); text-align: right; margin-top: .2rem; }

.info-image-area {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  flex-wrap: wrap;
  padding: .5rem 0;
}
.info-current-img { max-width: 160px; max-height: 120px; border-radius: var(--radius-sm); object-fit: cover; border: 1px solid var(--border); }
.info-image-btns { display: flex; flex-direction: column; gap: .375rem; }

.info-vis-toggles { margin-top: 1rem; display: flex; flex-direction: column; gap: .75rem; }
.info-vis-toggle-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.info-vis-toggle-row p { margin: .15rem 0 0; }

.info-section-inactive-hint {
  display: none;
  font-size: .825rem;
  color: var(--orange);
  background: color-mix(in srgb, var(--orange) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--orange) 30%, transparent);
  border-radius: var(--radius-sm);
  padding: .4rem .6rem;
  margin-top: .4rem;
}
.info-section-inactive-hint.visible { display: block; }
.info-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.info-icon { display: flex; align-items: center; color: var(--accent-light); flex-shrink: 0; }
.info-icon-sm svg { width: 15px; height: 15px; }
.info-icon-placeholder { width: 18px; flex-shrink: 0; }

.info-icon-picker { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .25rem; }
.info-icon-pick-btn {
  width: 36px;
  height: 36px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.info-icon-pick-btn:hover { border-color: var(--accent-light); color: var(--accent-light); }
.info-icon-pick-btn.is-selected { border-color: var(--accent); background: var(--accent); color: #fff; }

.info-sections-empty { padding: 1rem; color: var(--text-muted); font-size: .875rem; }

.info-preview-section {
  border-bottom: 1px solid var(--border);
}
.info-preview-section summary.info-preview-section-title {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .6rem .75rem;
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: var(--bg-hover);
  border-radius: var(--radius-sm);
}
.info-preview-section summary.info-preview-section-title::after {
  content: '';
  display: block;
  width: 14px;
  height: 14px;
  margin-left: auto;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236A6659' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  transition: transform .18s ease;
}
.info-preview-section[open] > summary.info-preview-section-title::after {
  transform: rotate(180deg);
}
.info-preview-section summary::-webkit-details-marker { display: none; }
.info-preview-item { padding: .5rem .75rem .75rem 1rem; }
.info-preview-item-title { display: block; font-size: .85rem; margin-bottom: .35rem; }

.info-item-body { font-size: .875rem; line-height: 1.6; color: var(--text); }
.info-item-body p { margin: 0 0 .5rem; }
.info-item-body p:last-child { margin-bottom: 0; }
.info-item-body ul { margin: 0 0 .5rem; padding-left: 1.25rem; }
.info-item-body li { margin-bottom: .15rem; }
.info-item-body a { color: var(--accent-light); text-decoration: underline; }
.info-item-img { max-width: 100%; border-radius: var(--radius-sm); margin-top: .5rem; display: block; }

.info-member-view { padding: 1rem 1.5rem; max-width: 720px; }
.info-member-section { margin-bottom: 1.75rem; }
.info-member-section-title { display: flex; align-items: center; gap: .5rem; font-family: var(--display); font-size: 1rem; font-weight: 600; margin-bottom: .75rem; }
.info-member-item { padding: .75rem 0; border-bottom: 1px solid var(--border); }
.info-member-item:last-child { border-bottom: none; }
.info-member-item-title { font-weight: 600; font-size: .9rem; margin: 0 0 .4rem; }


/* guest_stay.php Praktisk information link card */
/* -- Praktisk information inline (guest_stay.php) */
.gs-info-details { border: 1.5px solid var(--border); border-radius: var(--radius); background: var(--bg-card); overflow: hidden; }
.gs-info-summary {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .875rem 1rem;
  cursor: pointer;
  list-style: none;
  color: var(--text);
  font-weight: 600;
  font-size: .95rem;
}
.gs-info-summary::-webkit-details-marker { display: none; }
.gs-info-summary > svg:first-child { color: var(--accent-light); flex-shrink: 0; }
.gs-info-summary > span { flex: 1; }
.gs-info-chevron { color: var(--text-muted); flex-shrink: 0; transition: transform .2s; }
.gs-info-details[open] > .gs-info-summary .gs-info-chevron { transform: rotate(180deg); }
.gs-info-body { border-top: 1px solid var(--border); }
.gs-info-section { border-bottom: 1px solid var(--border); }
.gs-info-section:last-child { border-bottom: none; }
.gs-info-section-summary {
  display: flex;
  align-items: center;
  gap: .625rem;
  padding: .75rem 1rem;
  cursor: pointer;
  list-style: none;
  font-weight: 500;
  font-size: .9rem;
}
.gs-info-section-summary::-webkit-details-marker { display: none; }
.gs-info-section-icon { color: var(--accent-light); flex-shrink: 0; display: flex; }
.gs-info-section-summary > span:not(.gs-info-section-icon) { flex: 1; }
.gs-info-section[open] > .gs-info-section-summary .gs-info-chevron { transform: rotate(180deg); }
.gs-info-section-body { padding: 0 1rem .75rem 1rem; }
.gs-info-item { padding: .625rem 0; border-top: 1px solid var(--border); }
.gs-info-item:first-child { border-top: none; }
.gs-info-item-title { font-size: .875rem; font-weight: 600; margin: 0 0 .25rem; }
.gs-info-item-body { font-size: .875rem; color: var(--text-muted); line-height: 1.55; }
.gs-info-item-body p { margin: 0 0 .35rem; }
.gs-info-item-body ul { margin: 0 0 .35rem; padding-left: 1.2rem; }
.gs-info-item-body a { color: var(--accent-light); }
.gs-info-item-body a:hover { text-decoration: underline; }
.gs-info-item-img { max-width: 100%; border-radius: var(--radius-sm); margin-top: .5rem; display: block; }

@media (max-width: 768px) {
  .info-editor-body { grid-template-columns: 1fr; min-height: 0; }
  .info-sections-panel { border-right: none; border-bottom: 1px solid var(--border); max-height: none; }
  .info-editor-header { gap: .5rem; }
  .info-form-panel { padding: 1rem; }
  .info-form-panel:has(> .info-form-placeholder) { display: none; }
  .info-image-area { flex-direction: column; }
  .info-form-input, .info-form-textarea { font-size: 16px; }
}

/* -- Roles & access view */
.roles-view { padding: .25rem 0 2rem; }

.roles-info-cards {
  display: flex;
  gap: 0;
  margin-bottom: 1.25rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.roles-info-card {
  flex: 1;
  padding: .6rem .9rem;
}
.roles-info-card + .roles-info-card {
  border-left: 1px solid var(--border);
}
.roles-info-card-label {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-subtle);
  margin-bottom: .2rem;
}
.roles-info-card-value {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
}
.roles-info-card-desc {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: .2rem;
}

.roles-matrix {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.roles-matrix-header {
  display: grid;
  grid-template-columns: 1fr repeat(4, 100px);
  background: var(--bg-stripe, var(--bg-hover));
  border-bottom: 1px solid var(--border);
}
.roles-matrix-header .roles-matrix-perm-col,
.roles-matrix-header .roles-matrix-role-col {
  padding: .55rem .6rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.roles-matrix-header .viewer-col {
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.roles-matrix-group-header {
  padding: .5rem .9rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-subtle);
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.roles-matrix-row {
  display: grid;
  grid-template-columns: 1fr repeat(4, 100px);
  border-bottom: 1px solid var(--border);
}
.roles-matrix-row:last-child { border-bottom: none; }
.roles-matrix-row.row-locked { opacity: .55; }
.roles-matrix-perm-col {
  padding: .6rem .9rem;
  font-size: .85rem;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.roles-matrix-cell {
  padding: .5rem .75rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
  align-items: center;
  min-width: 0;
}
.roles-access-cell {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
}
.access-full        { color: var(--green); }
.access-read        { color: var(--green); }
.access-conditional { color: var(--orange); }
.access-none        { color: var(--border); font-weight: 400; }
.access-locked      { color: var(--text-muted); }
.roles-access-viewer { font-weight: 700; }

.roles-cond-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  border: 1.5px solid var(--orange);
  color: var(--orange);
  font-size: .6rem;
  font-style: italic;
  font-weight: 700;
  background: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  margin-left: 3px;
}
.roles-cond-btn:hover { background: color-mix(in srgb, var(--orange) 12%, transparent); }
.roles-cond-popup {
  position: fixed;
  background: var(--text);
  color: var(--bg-card);
  font-size: .78rem;
  font-style: normal;
  padding: .35rem .65rem;
  border-radius: var(--radius-sm);
  max-width: 200px;
  z-index: 600;
  pointer-events: none;
  line-height: 1.4;
  box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
  .roles-matrix-header,
  .roles-matrix-row {
    grid-template-columns: 1fr repeat(4, 64px);
  }
  .roles-matrix-perm-col,
  .roles-matrix-cell { padding: .45rem .3rem; }
  .roles-access-cell { font-size: .85rem; }
}

/* -- Roles public page */
.ra-role-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
}
.ra-role-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}
.ra-role-card-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: .5rem;
  margin-bottom: 1rem;
}
.ra-role-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ra-role-icon svg { width: 22px; height: 22px; }
.ra-role-name { font-size: 1rem; font-weight: 700; color: var(--text); }
.ra-role-badge { display: inline-block; font-size: .7rem; font-weight: 600; padding: .2rem .6rem; border-radius: 20px; white-space: nowrap; }
.ra-role-badge-owner  { background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); }
.ra-role-badge-partner { background: color-mix(in srgb, var(--text-muted) 15%, transparent); color: var(--text-muted); }
.ra-role-badge-member  { background: color-mix(in srgb, var(--orange) 12%, transparent); color: var(--orange); }
.ra-role-desc { font-size: .875rem; color: var(--text-muted); margin: 0 0 1rem; line-height: 1.5; }
.ra-role-feats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .4rem; }
.ra-role-feats li { font-size: .82rem; color: var(--text); display: flex; align-items: flex-start; gap: .4rem; }
.ra-role-feats li::before { content: ''; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--green); margin-top: .35rem; flex-shrink: 0; }
.ra-role-feats li.ra-feat-no::before { background: var(--border); }
.ra-role-feats li.ra-feat-cond::before { background: var(--orange); }

.ra-plan-note {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 15%, transparent);
  border-radius: var(--radius-sm);
  padding: 1rem 1.25rem;
  font-size: .875rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.ra-plan-note strong { color: var(--accent); }

.ra-matrix-wrap { border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; font-size: .85rem; }
.ra-matrix-header {
  display: grid;
  grid-template-columns: 1fr 100px 100px 100px 100px;
  background: var(--bg-stripe, var(--bg-hover));
  border-bottom: 1px solid var(--border);
}
.ra-matrix-header > div {
  padding: .6rem .75rem;
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ra-matrix-header > div:not(:first-child) { text-align: center; }
.ra-matrix-group-header {
  padding: .45rem .9rem;
  font-size: .73rem;
  font-weight: 600;
  color: var(--text-subtle);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.ra-matrix-row { display: grid; grid-template-columns: 1fr 100px 100px 100px 100px; border-bottom: 1px solid var(--border); }
.ra-matrix-row:last-child { border-bottom: none; }
.ra-matrix-row > div { padding: .55rem .75rem; overflow-wrap: anywhere; min-width: 0; }
.ra-matrix-row > div:first-child { color: var(--text); }
.ra-matrix-row > div:not(:first-child) { text-align: center; }
.ra-matrix-cell-yes    { color: var(--green); font-weight: 600; }
.ra-matrix-cell-no     { color: var(--text-subtle); }
.ra-matrix-cell-cond   { color: var(--orange); display: flex; align-items: center; justify-content: center; gap: 4px; }
.ra-matrix-cell-locked { color: var(--text-muted); display: flex; align-items: center; justify-content: center; }
.ra-matrix-cell-locked svg { width: 13px; height: 13px; }
.ra-matrix-group-header .ra-plan-lock { display: inline-flex; align-items: center; vertical-align: middle; margin-bottom: 1px; }
.ra-matrix-group-header .ra-plan-lock svg { width: 11px; height: 11px; }

@media (max-width: 768px) {
  .ra-role-cards { grid-template-columns: 1fr; }
  .ra-matrix-header,
  .ra-matrix-row { grid-template-columns: 1fr 68px 68px 68px 68px; }
  .ra-matrix-header > div,
  .ra-matrix-row > div { padding: .5rem .3rem; font-size: .72rem; }
}

/* -- Over-limit banner */
#over-limit-bar {
  display: none;
  position: sticky;
  top: var(--topbar-h);
  z-index: 300;
  background: var(--red);
  color: #fff;
  padding: .75rem 1.25rem;
  gap: .75rem;
  align-items: flex-start;
  box-shadow: 0 2px 8px rgba(0,0,0,.18);
}
#over-limit-bar.visible { display: flex; }
#over-limit-bar p {
  flex: 1;
  margin: 0;
  font-size: .875rem;
  line-height: 1.4;
}
#over-limit-bar .olb-actions {
  display: flex;
  gap: .5rem;
  flex-shrink: 0;
  flex-wrap: wrap;
  align-items: center;
}
#over-limit-bar .olb-btn {
  padding: .35rem .85rem;
  border-radius: var(--radius-sm);
  font-size: .8rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}
#over-limit-bar .olb-btn-primary {
  background: #fff;
  color: var(--red);
}
#over-limit-bar .olb-btn-ghost {
  background: rgba(255,255,255,.18);
  color: #fff;
}
#over-limit-bar .olb-btn-ghost:hover { background: rgba(255,255,255,.28); }
@media (max-width: 768px) {
  #over-limit-bar { flex-direction: column; top: 0; }
  #over-limit-bar .olb-actions { width: 100%; }
  #over-limit-bar .olb-btn { flex: 1; text-align: center; }
}
