/* Product Modal - New Layout */
#product-modal .modal-content { 
  width: 100%;
  max-width: 640px;
  height: auto;
  max-height: 90vh;
  margin: 5vh auto;
  border-radius: var(--radius);
  padding: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

#product-modal .pm-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(4px);
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  z-index: 10;
}

#product-modal .pm-close:hover {
  background: rgba(255,255,255,.15);
  border-color: rgba(255,255,255,.3);
}

/* Nav med abonnement-piller */
#product-modal .pm-nav {
  padding: 20px 24px 16px;
  display: flex;
  justify-content: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.02);
}

#product-modal .pm-product-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

#product-modal .pm-product-tab {
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.18);
  background: transparent;
  color: var(--text);
  border-radius: 999px;
  padding: 10px 20px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  white-space: nowrap;
}

#product-modal .pm-product-tab:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.25);
}

#product-modal .pm-product-tab.active {
  background: var(--secondary-18);
  border-color: var(--secondary-50);
  color: var(--secondary);
}

/* Scrollbart innhald */
#product-modal .pm-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 24px;
}

/* Hovudkort */
#product-modal .pm-card {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

#product-modal .pm-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}

#product-modal .pm-card-title h2 {
  margin: 0 0 8px 0;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
}

#product-modal .pm-description {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Prissamandrag-boks */
#product-modal .pm-price-box {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 20px;
}

#product-modal .pm-price-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

#product-modal .pm-price-amount {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

#product-modal .pm-price-unit {
  font-size: 1rem;
  color: var(--muted);
}

#product-modal .pm-price-divider {
  height: 1px;
  background: rgba(255,255,255,.1);
  margin: 16px 0;
}

#product-modal .pm-price-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#product-modal .pm-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
}

#product-modal .pm-price-label {
  font-size: 0.9rem;
  color: var(--muted);
}

#product-modal .pm-price-value {
  font-size: 0.9rem;
  color: var(--text);
  font-weight: 600;
  text-align: right;
}

/* Fordelar-liste (i detaljpanelet) */
#product-modal .pm-benefits-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#product-modal .pm-benefits-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.95rem;
  line-height: 1.4;
  color: var(--text);
}

#product-modal .pm-benefits-list li::before {
  content: "✓";
  color: var(--secondary);
  font-weight: 700;
  flex-shrink: 0;
}

/* Ressursar */
#product-modal .pm-resources-title {
  margin: 0 0 12px 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#product-modal .pm-resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
}

#product-modal .pm-resource-card {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

#product-modal .pm-resource-card:hover {
  transform: scale(1.03);
  box-shadow: 0 8px 20px rgba(0,0,0,.4);
}

#product-modal .pm-resource-card .pm-rc-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s ease;
}

#product-modal .pm-resource-card:hover .pm-rc-bg {
  transform: scale(1.08);
}

/* Fallback when no image */
#product-modal .pm-resource-card .pm-rc-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg-alt) 100%);
}

#product-modal .pm-resource-card .pm-rc-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.85) 0%, rgba(0,0,0,.3) 50%, transparent 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 10px;
}

#product-modal .pm-resource-card .name {
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
  line-height: 1.2;
  text-shadow: 0 1px 3px rgba(0,0,0,.5);
}

#product-modal .pm-resource-card .capacity {
  font-size: 0.7rem;
  color: rgba(255,255,255,.75);
  margin-top: 2px;
}

/* Footer */
#product-modal .pm-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: rgba(0,0,0,.2);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

#product-modal .pm-footer .btn {
  padding: 12px 24px;
}

#product-modal .pm-footer .btn.primary {
  flex-shrink: 0;
}

/* Detaljert pris-panel */
#product-modal .pm-details-panel {
  position: absolute;
  inset: 0;
  background: var(--surface);
  z-index: 20;
  display: flex;
  flex-direction: column;
  animation: pm-slide-in 0.25s ease;
}

@keyframes pm-slide-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

#product-modal .pm-details-header {
  padding: 16px 24px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#product-modal .pm-details-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

#product-modal .pm-details-close {
  background: transparent;
  border: 1px solid rgba(255,255,255,.18);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

#product-modal .pm-details-close:hover {
  background: rgba(255,255,255,.08);
}

#product-modal .pm-details-content {
  flex: 1;
  overflow-y: auto;
  padding: 24px;
}

#product-modal .pm-details-section {
  margin-bottom: 24px;
}

#product-modal .pm-details-section:last-child {
  margin-bottom: 0;
}

#product-modal .pm-details-section h4 {
  margin: 0 0 12px 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

#product-modal .pm-details-panel .pm-items {
  padding: 0;
}

#product-modal .pm-items .row { 
  display: grid; 
  grid-template-columns: 1fr auto; 
  gap: 12px; 
  padding: 12px 0; 
  border-bottom: 1px solid rgba(255,255,255,.06); 
}

#product-modal .pm-items .row:last-child {
  border-bottom: none;
}

#product-modal .pm-items .title { 
  font-weight: 600; 
  color: var(--text);
}

#product-modal .pm-items .meta { 
  color: var(--muted); 
  font-size: .9rem; 
  margin-top: 4px;
}

/* Mobile */
@media (max-width: 680px) {
  #product-modal .modal-content { 
    max-width: 100%;
    max-height: 100vh;
    height: 100vh;
    margin: 0;
    border-radius: 0;
  }
  
  #product-modal .pm-nav {
    padding: 16px 16px 12px;
  }
  
  #product-modal .pm-product-tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 4px;
  }
  
  #product-modal .pm-product-tabs::-webkit-scrollbar {
    display: none;
  }
  
  #product-modal .pm-product-tab {
    font-size: 0.9rem;
    padding: 8px 16px;
    flex-shrink: 0;
  }
  
  #product-modal .pm-scroll {
    padding: 20px 16px;
  }
  
  #product-modal .pm-card-header {
    flex-direction: column;
    gap: 12px;
  }
  
  #product-modal .pm-price-box {
    padding: 16px;
  }
  
  #product-modal .pm-price-amount {
    font-size: 1.8rem;
  }
  
  #product-modal .pm-price-row {
    flex-wrap: wrap;
  }
  
  #product-modal .pm-resource-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }
  
  #product-modal .pm-footer {
    padding: 12px 16px;
    flex-direction: column;
  }
  
  #product-modal .pm-footer .btn {
    width: 100%;
    text-align: center;
  }
}

/* Base */
:root {
  --bg: #0b0d12;
  --bg-alt: #0f1218;
  --surface: #151a22;
  --text: #e9eef5;
  --muted: #a9b3c1;
  --primary: #f9e622;
  --primary-600: #e3d312;
  --secondary: #56d364;
  --secondary-rgb: 86,211,100;
  --secondary-18: rgba(86,211,100,.18);
  --secondary-45: rgba(86,211,100,.45);
  --secondary-50: rgba(86,211,100,.50);
  --accent: #3ac2e0;
  --link: #7dc4ff;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 14px;
  --container: 1120px;
}

* { box-sizing: border-box; }
html { height: 100%; }
body { 
  min-height: 100vh;
  min-height: 100%;
}

/*html { scroll-behavior: smooth; }*/

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  color: var(--text);
  background: linear-gradient(180deg, #0b0d12 0%, #0d1117 60%, #0b0d12 100%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 { letter-spacing: .2px; }

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

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: static;
  width: auto; height: auto;
  padding: 8px 12px; margin: 8px;
  background: var(--primary);
  color: #0b0d12;
  border-radius: 8px;
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11,13,18,.7);
  backdrop-filter: saturate(160%) blur(8px);
  box-shadow: 0 1px 0 rgba(255,255,255,.04);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 64px;
}
.brand {
  color: var(--text); text-decoration: none; font-weight: 700; letter-spacing: .3px;
}

.nav-toggle { display: inline-flex; gap: 4px; flex-direction: column; align-items: center; justify-content: center; width: 44px; height: 44px; background: transparent; border: 1px solid rgba(255,255,255,.12); border-radius: 10px; color: var(--text); }
.nav-toggle .bar { width: 20px; height: 2px; background: var(--text); display: block; transition: transform .2s ease, opacity .2s ease; }

.nav { display: none; }
.nav.open { display: block; }
.nav-list { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.nav-list a { color: var(--muted); text-decoration: none; padding: 8px 10px; border-radius: 10px; white-space: nowrap; font-size: .9rem; }
.nav-list a:hover, .nav-list a:focus { color: var(--text); background: rgba(255,255,255,.06); }

@media (min-width: 880px) {
  .nav { display: block; }
  .nav-toggle { display: none; }
}

/* Body scroll lock when mobile menu is open (JS adds .menu-open) */
body.menu-open { overflow: hidden; }

/* Nav auth elements */
.nav-auth { margin-left: auto; }
.nav-auth-btn {
  background: transparent;
  border: 1px solid rgba(255,255,255,.18);
  color: var(--text);
  padding: 8px 16px;
  border-radius: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.nav-auth-btn:hover, .nav-auth-btn:focus {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.25);
}

/* User dropdown menu */
.nav-user-menu {
  position: relative;
}
.nav-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #0b0d12;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .5px;
  flex-shrink: 0;
}
.nav-user-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.18);
  color: var(--text);
  padding: 4px 8px 4px 4px;
  border-radius: 20px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}
.nav-user-btn:hover, .nav-user-btn:focus {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.25);
}
.nav-user-chevron {
  transition: transform .2s;
}
.nav-user-menu.open .nav-user-chevron {
  transform: rotate(180deg);
}
.nav-user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 8px 0;
  list-style: none;
  margin: 0;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity .15s, visibility .15s, transform .15s;
  z-index: 1000;
}
.nav-user-menu.open .nav-user-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-user-dropdown li {
  margin: 0;
}
.nav-user-dropdown a,
.nav-user-dropdown button {
  display: block;
  width: 100%;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: var(--muted);
  text-decoration: none;
  text-align: left;
  font-size: .95rem;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.nav-user-dropdown a:hover,
.nav-user-dropdown a:focus,
.nav-user-dropdown button:hover,
.nav-user-dropdown button:focus {
  background: rgba(255,255,255,.06);
  color: var(--text);
}

/* Booking controls */
.booking-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}
.booking-filter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  color: var(--muted);
}
.booking-filter input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

/* Mobile nav: overlay drawer (does not expand header), larger tap targets, hamburger → X */
@media (max-width: 879px) {
  /* Nav uses absolute so it's positioned relative to header; fixed would be trapped by header's backdrop-filter containing block */
  .header-inner {
    position: relative;
  }
  .nav.open {
    display: block;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    height: calc(100vh - 64px);
    z-index: 99;
    background: rgba(11,13,18,.98);
    backdrop-filter: saturate(180%) blur(12px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    /* Full viewport width: break out of .container padding */
    width: 100vw;
    margin-left: calc(-50vw + 50%);
  }
  .nav-list {
    flex-direction: column;
    gap: 0;
    padding: 20px 24px 32px;
    align-items: stretch;
  }
  .nav-list > li {
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  .nav-list > li:last-child {
    border-bottom: none;
  }
  .nav-list a {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 12px 20px;
    margin: 0 -20px;
    border-radius: 10px;
    font-size: 1rem;
  }
  .nav-auth {
    margin-left: 0;
    margin-top: 4px;
    padding-top: 12px;
    border-top: 1px solid rgba(255,255,255,.08);
  }
  .nav-auth .nav-auth-btn {
    min-height: 44px;
    padding: 12px 20px;
    width: 100%;
    justify-content: center;
  }
  /* User section: no dropdown on mobile – show Sida mi / Admin / Logg ut as direct items with section divider */
  #nav-user.nav-user-menu {
    flex-direction: column;
    align-items: stretch;
    border-top: 1px solid rgba(255,255,255,.12);
    padding-top: 16px;
    margin-top: 12px;
  }
  #nav-user .nav-user-btn {
    display: none;
  }
  #nav-user .nav-user-dropdown {
    display: block;
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    list-style: none;
  }
  #nav-user .nav-user-dropdown li {
    border-bottom: 1px solid rgba(255,255,255,.06);
  }
  #nav-user .nav-user-dropdown li:last-child {
    border-bottom: none;
  }
  #nav-user .nav-user-dropdown a,
  #nav-user .nav-user-dropdown button {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 12px 20px;
    margin: 0 -20px;
    border-radius: 10px;
    width: calc(100% + 40px);
    box-sizing: border-box;
    color: var(--muted);
    font-size: 1rem;
    text-decoration: none;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
  }
  #nav-user .nav-user-dropdown a:hover,
  #nav-user .nav-user-dropdown a:focus,
  #nav-user .nav-user-dropdown button:hover,
  #nav-user .nav-user-dropdown button:focus {
    color: var(--text);
    background: rgba(255,255,255,.06);
  }
  /* Hamburger → X when menu open */
  .nav-toggle.open .bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .nav-toggle.open .bar:nth-child(2) {
    opacity: 0;
  }
  .nav-toggle.open .bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }
}

/* Hero */
.hero {
  position: relative;
  background: radial-gradient(1000px 400px at 10% 10%, rgba(var(--secondary-rgb), .25), transparent 60%),
              radial-gradient(1200px 600px at 90% -10%, rgba(58,194,224,.18), transparent 60%),
              linear-gradient(180deg, #0b0d12 0%, #0f131a 60%, #0b0d12 100%);
  padding: 96px 0 64px;
  overflow-x: hidden;
}
.hero-inner { display: grid; grid-template-columns: 1fr; align-items: center; gap: 24px; min-width: 0; }
.hero-copy { min-width: 0; }
.hero-copy h1 { font-size: clamp(34px, 5vw, 56px); line-height: 1.05; margin: 0 0 12px; }
.hero .lead { color: var(--muted); font-size: clamp(16px, 2.1vw, 20px); max-width: 58ch; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.cta .btn { white-space: nowrap; }

.btn { display: inline-block; border: 1px solid transparent; border-radius: 12px; padding: 12px 16px; font-weight: 600; text-decoration: none; }
.btn.primary { background: var(--primary); color: #0b0d12; }
.btn.primary:hover { background: var(--primary-600); }
.btn.ghost { background: transparent; color: var(--text); border-color: rgba(255,255,255,.18); }
.btn.ghost:hover { background: rgba(255,255,255,.08); }
.btn.danger { background: #e74c3c; color: #fff; }
.btn.danger:hover { background: #c0392b; }

/* Sections */
.section { padding: 64px 0; }
.section h2 { margin-top: 0; font-size: clamp(22px, 2.6vw, 32px); }
/* Simple tooltip hint */
.hint { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); font-size: .9rem; cursor: help; color: var(--text); }
.hint:hover, .hint:focus { background: rgba(255,255,255,.08); }
/* Disable pseudo tooltip (we use JS-positioned tooltip to avoid viewport overflow) */
.hint::after { display: none !important; }

/* Floating tooltip element */
.ui-tip { position: fixed; background: #000; color: #fff; font-size: .85rem; padding: 8px 10px; border-radius: 8px; border: 1px solid rgba(255,255,255,.15); white-space: pre-wrap; width: max-content; max-width: min(90vw, 320px); box-shadow: var(--shadow); z-index: 10000; }
.section.alt { background: var(--bg-alt); }
.section.highlight { background: linear-gradient(180deg, rgba(var(--secondary-rgb), .08), rgba(58,194,224,.08)); border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); }

/* Pricing */
.pricing-section { margin-bottom: 3rem; }
.pricing-section:last-child { margin-bottom: 0; }
.pricing-section-title { 
  font-size: 1.5rem; 
  font-weight: 700;
  margin-bottom: 1.5rem; 
  padding-bottom: 0.5rem; 
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}
.pricing-grid { display: grid; grid-template-columns: 1fr; gap: 18px; margin-top: 16px; }

/* Meeting images */
.meeting-images {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  align-content: start;
}
.meeting-image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}
.meeting-images img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
  display: block;
}
.meeting-images img:hover {
  transform: scale(1.02);
  box-shadow: 0 6px 20px rgba(0,0,0,.4);
}
.meeting-image-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: #fff;
  padding: 8px 10px 10px;
  font-size: 0.85rem;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}
.meeting-image-wrapper:hover .meeting-image-caption {
  opacity: 1;
}

/* Tablet: workspace 2 cols, meeting stacks */
@media (min-width: 600px) {
  .pricing-grid[data-category="workspace"] { 
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px; 
  }
  .pricing-grid[data-category="meeting"] {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Desktop: workspace 3 cols, meeting side-by-side */
@media (min-width: 860px) { 
  .pricing-grid[data-category="workspace"] { 
    grid-template-columns: repeat(3, 1fr); 
    gap: 22px; 
  }
  .pricing-grid[data-category="meeting"] { 
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}
.pricing-card { background: var(--surface); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; height: 100%; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.pricing-card.highlight { outline: 2px solid var(--secondary-45); }
.pricing-card-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pricing-card:hover { transform: translateY(-2px); box-shadow: 0 8px 28px rgba(0,0,0,.35); border-color: rgba(255,255,255,.18); }
.badge { background: var(--secondary-18); color: var(--primary); border: 1px solid var(--secondary-50); border-radius: 999px; padding: 4px 8px; font-size: .85rem; }
.included-badges { display: none; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.badge-included { display: none; background: rgba(76, 175, 80, 0.15); color: #81c784; border: 1px solid rgba(76, 175, 80, 0.3); border-radius: 6px; padding: 4px 8px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.badge-discount { display: none; background: rgba(255, 152, 0, 0.15); color: #ffb74d; border: 1px solid rgba(255, 152, 0, 0.3); border-radius: 6px; padding: 4px 8px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.price { margin: 8px 0 10px; color: var(--text); }
.price .amount { font-weight: 800; font-size: 1.4rem; margin-right: 6px; }
.price .per { color: var(--muted); font-size: .95rem; }
.btn.block { text-align: center; width: 100%; }
/* Ensure equal card height and pin actions/buttons to bottom */
.pricing-card .features { margin-bottom: 12px; }
.pricing-card .actions { margin-top: auto; display: flex; gap: 8px; align-items: end; }

/* Gallery */
.gallery-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin-top: 14px; }
@media (max-width: 599px) {
  .gallery-grid {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    gap: 14px;
    margin-top: 14px;
    padding-bottom: 4px;
  }
  .gallery-grid::-webkit-scrollbar { display: none; }
  .gallery-grid .tile { flex: 0 0 auto; width: 78vw; max-width: 320px; }
}
@media (min-width: 600px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (min-width: 1024px) { .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 18px; } }
.gallery-grid .tile { position: relative; overflow: hidden; border-radius: var(--radius); background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); box-shadow: var(--shadow); }
/* Reset default figure margins so edges align with container */
.gallery-grid .tile { margin: 0; }
.gallery-grid .tile::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.06), rgba(0,0,0,.22)); opacity: 0; transition: opacity .25s ease; }
.gallery-grid .tile:hover::before { opacity: 1; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 16/9; transition: transform .35s ease; }
.gallery-grid .tile:hover img { transform: scale(1.03); }
.gallery-grid .tile .cap { position: absolute; left: 8px; bottom: 8px; right: 8px; background: linear-gradient(180deg, transparent, rgba(0,0,0,.55)); color: #fff; font-size: .85rem; padding: 28px 8px 8px; border-radius: 0 0 12px 12px; opacity: .95; }
/* Pointer cursor for gallery thumbnails */
.gallery-grid .tile, .gallery-grid img { cursor: pointer; }

/* Lists */
.features, .checklist, .contact { margin: 0; padding-left: 18px; }
.features li { margin: 6px 0; }
.checklist li { margin: 6px 0; }
.contact a { color: var(--accent); text-decoration: none; }
.contact a:hover { color: var(--text); text-decoration: underline; }

.small { color: var(--muted); font-size: .95rem; }

/* Footer */
.site-footer { border-top: 1px solid rgba(255,255,255,.06); padding: 28px 0; background: rgba(0,0,0,.12); }
.site-footer p { margin: 0; color: var(--muted); }

/* Map embed */
.map-embed { width: 100%; height: 260px; border: 0; margin-top: 10px; border-radius: 10px; box-shadow: var(--shadow); }
@media (min-width: 860px) { .map-embed { height: 320px; } }

/* Contact layout: ~40/60 split on desktop */
#kontakt .grid.two { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 860px) { #kontakt .grid.two { grid-template-columns: 3fr 7fr; align-items: start; gap: 24px; } }

/* Hero background photo override */
.hero {
  background: 
    linear-gradient(180deg, rgba(11,13,18,.60), rgba(11,13,18,.82)),
    url('../images/gallery/PXL_20240319_182339118.jpg') center / cover no-repeat;
}

/* Lightbox */
.lightbox { position: fixed; inset: 0; display: none; z-index: 9999; }
.lightbox.open { display: block; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.75); backdrop-filter: blur(4px); }
.lightbox-content { position: absolute; inset: 0; display: grid; grid-template-columns: 56px 1fr 56px; grid-template-rows: 1fr auto; align-items: center; gap: 10px; padding: 24px; pointer-events: none; }
.lightbox-image { max-width: 100%; max-height: 80vh; margin: 0 auto; border-radius: 12px; box-shadow: var(--shadow); pointer-events: auto; }
.lightbox-caption { grid-column: 1 / -1; text-align: center; color: var(--muted); margin-top: 8px; }
.lightbox-close { position: absolute; top: 12px; right: 12px; width: 44px; height: 44px; border-radius: 10px; border: 1px solid rgba(255,255,255,.2); background: rgba(0,0,0,.5); color: #fff; font-size: 24px; line-height: 1; cursor: pointer; z-index: 1; }
.lightbox-nav { width: 44px; height: 44px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25); background: rgba(0,0,0,.45); color: #fff; cursor: pointer; pointer-events: auto; font-size: 24px; display: inline-flex; align-items: center; justify-content: center; }
.lightbox-nav.prev { grid-column: 1; }
.lightbox-nav.next { grid-column: 3; }
@media (max-width: 640px) {
  .lightbox-content { grid-template-columns: 36px 1fr 36px; padding: 14px; }
  .lightbox-nav { width: 36px; height: 36px; font-size: 20px; }
}

/* Banner sections */
/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.06); text-align: left; }
.table thead th { position: sticky; top: 0; background: var(--bg-alt); color: var(--text); z-index: 1; }
.table tr:hover td { background: rgba(255,255,255,.03); }

/* Profile card */
.profile-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  overflow: hidden;
}
.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 24px;
}
.profile-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #0b0d12;
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: .5px;
  flex-shrink: 0;
}
.profile-identity {
  flex: 1;
  min-width: 0;
}
.profile-name {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile-email {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: .9rem;
}
.profile-rows {
  border-top: 1px solid rgba(255,255,255,.06);
}
.profile-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.profile-row:last-child { border-bottom: none; }
.profile-row-label {
  color: var(--muted);
  font-size: .9rem;
}
.profile-row-value {
  font-weight: 500;
  font-size: .9rem;
}

/* Profile edit form */
.profile-edit {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 24px;
}
.profile-form-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.profile-form-heading {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 600;
}
.profile-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-field-label {
  font-size: .85rem;
  font-weight: 500;
  color: var(--muted);
}
.profile-input {
  width: 100%;
  max-width: 400px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-size: .95rem;
}
.profile-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), .2);
}
.profile-input:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.profile-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
}
.profile-form-actions .small {
  flex: 1;
}
/* Pill toggle group (global) */
.pills {
  display: inline-flex;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  padding: 3px;
  gap: 2px;
}
.pill {
  position: relative;
  cursor: pointer;
  border: none;
  background: transparent;
  color: var(--muted);
  border-radius: 10px;
  padding: 8px 18px;
  font-size: .88rem;
  font-weight: 500;
  line-height: 1;
  transition: color .15s, background .15s;
  white-space: nowrap;
}
.pill:hover,
.pill:focus-visible {
  color: var(--text);
  background: rgba(255,255,255,.06);
}
.pill.active {
  color: #0b0d12;
  background: var(--primary);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,.25);
}

.profile-biz-section {
  border: 1px solid rgba(255,255,255,.06);
  border-radius: var(--radius);
  background: rgba(255,255,255,.02);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.profile-field-row {
  display: flex;
  gap: 12px;
}
.profile-form-divider {
  height: 1px;
  background: rgba(255,255,255,.06);
  margin: 24px 0;
}

/* Subscription card */
.sub-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 40px 24px;
  gap: 12px;
}
.sub-empty-icon {
  color: var(--muted);
  opacity: .5;
  margin-bottom: 4px;
}
.sub-empty-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}
.sub-empty-text {
  margin: 0;
  color: var(--muted);
  font-size: .9rem;
  max-width: 320px;
}
.sub-header {
  padding: 24px;
}
.sub-plan {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}
.sub-plan-name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
}
.sub-badge {
  display: inline-block;
  padding: 2px 10px;
  font-size: .75rem;
  font-weight: 600;
  border-radius: 999px;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.sub-badge.active {
  background: rgba(46,204,113,.15);
  color: #2ecc71;
}
.sub-badge.canceling {
  background: rgba(230,168,23,.15);
  color: #e6a817;
}
.sub-badge.canceled {
  background: rgba(231,76,60,.15);
  color: #e74c3c;
}
.sub-cancel-info {
  margin: 0;
  font-size: .85rem;
  color: var(--muted);
  font-style: italic;
}
.sub-plan-desc {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: .9rem;
}
.sub-meta {
  margin-top: 12px;
  display: flex;
  gap: 20px;
}
.sub-meta-item {
  font-size: .88rem;
  color: var(--muted);
}
.sub-meta-item strong {
  color: var(--text);
}
.sub-usage {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 20px 24px;
}
.sub-usage-title {
  margin: 0 0 14px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}
.sub-usage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
}
.sub-usage-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.sub-usage-item-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.sub-usage-label {
  font-weight: 600;
  font-size: .9rem;
}
.sub-usage-numbers {
  font-size: .8rem;
  color: var(--muted);
}
.sub-usage-bar {
  height: 6px;
  background: rgba(255,255,255,.08);
  border-radius: 3px;
  overflow: hidden;
}
.sub-usage-bar-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 3px;
  transition: width .4s ease;
}
.sub-usage-remaining {
  font-size: .8rem;
  color: var(--muted);
}
.sub-footer {
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 14px 24px;
  display: flex;
  justify-content: flex-end;
}

/* Booking status badges */
.booking-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 600;
  white-space: nowrap;
}
.booking-status.upcoming {
  background: rgba(var(--primary-rgb), .15);
  color: var(--primary);
}
.booking-status.ongoing {
  background: rgba(58, 194, 224, .15);
  color: var(--accent);
}
.booking-status.done {
  background: rgba(255,255,255,.06);
  color: var(--muted);
}
.booking-row-past td {
  opacity: .5;
}

.adm-input { width: 100%; border-radius: 8px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.04); color: var(--text); padding: 6px 8px; }
.dirty td { background: rgba(58,194,224,.08); }
.banner { position: relative; padding: 80px 0; border-top: 1px solid rgba(255,255,255,.06); border-bottom: 1px solid rgba(255,255,255,.06); }
.banner::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.35), rgba(0,0,0,.6)); }
.banner .banner-inner { position: relative; z-index: 1; }
.banner h2 { margin: 0 0 8px; font-size: clamp(22px, 3vw, 36px); }
.banner p { max-width: 60ch; }

.banner-u40 { 
  background: 
    url('../images/gallery/462539041_1332527124399844_3052844424648856526_n (1).jpg') center / cover no-repeat;
}

.banner-studentstova {
  background:
    url('../images/gallery/PXL_20240308_144228831.jpg') center / cover no-repeat;
}

/* Visual cards (U40 / Studentstova / Dartklubb) */
.card-visual { position: relative; overflow: hidden; border-radius: var(--radius); background: rgba(255,255,255,.03); box-shadow: var(--shadow); min-height: 200px; display: grid; place-items: end start; }
.card-visual::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.55)); z-index: 0; }
.card-visual .content { position: relative; z-index: 1; padding: 20px; max-width: 60ch; }
.card-visual h2 { margin: 0 0 8px; font-size: 1.3rem; }
.card-visual p { margin: 0 0 10px; font-size: 0.95rem; }

.card-u40 { background: url('../images/gallery/462539041_1332527124399844_3052844424648856526_n (1).jpg') center / cover no-repeat; }
.card-studentstova { background: url('../images/gallery/PXL_20240308_144228831.jpg') center / cover no-repeat; }
.card-dartklubb { background: url('../images/gallery/dartklubb.png') center / cover no-repeat; }

/* Heimebane asymmetric grid layout */
.heimebane-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.heimebane-grid .card-featured { min-height: 280px; }
.heimebane-grid .card-featured h2 { font-size: 1.6rem; }

@media (min-width: 700px) {
  .heimebane-grid {
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
  }
  .heimebane-grid .card-featured {
    grid-row: 1 / 3;
    min-height: 340px;
  }
  .heimebane-grid .card-studentstova,
  .heimebane-grid .card-dartklubb {
    min-height: 160px;
  }
}

/* Layout overrides for fellowship cards */
#fellesskap .grid.two { display: grid; grid-template-columns: 1fr; gap: 16px; }
@media (min-width: 700px) {
  #fellesskap .grid.two { display: grid; grid-template-columns: 1fr 1fr !important; align-items: stretch; }
}
@media (min-width: 1024px) {
  #fellesskap .grid.two { grid-template-columns: 1fr 1fr !important; }
}

/* Booking Wizard Modal */
.bm-content {
  max-width: 560px !important;
  padding: 0 !important;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.bm-close {
  position: absolute;
  top: 12px;
  right: 12px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  z-index: 2;
}
.bm-close:hover { color: var(--text); background: rgba(255,255,255,.06); }

/* Step indicator */
.bm-steps {
  display: flex;
  gap: 0;
  padding: 20px 24px 0;
}
.bm-step {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  position: relative;
  padding-bottom: 16px;
  border-bottom: 2px solid rgba(255,255,255,.08);
  color: var(--muted);
  font-size: .85rem;
  font-weight: 500;
  transition: color .2s, border-color .2s;
}
.bm-step.active {
  color: var(--text);
  border-color: var(--primary);
}
.bm-step.done {
  color: var(--primary);
  border-color: var(--primary);
}
.bm-step-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  font-size: .75rem;
  font-weight: 700;
  flex-shrink: 0;
}
.bm-step.done .bm-step-num::after {
  content: '✓';
}
.bm-step.done .bm-step-num {
  font-size: 0;
  background: var(--primary);
  border-color: var(--primary);
  color: #0b0d12;
}
.bm-step.done .bm-step-num::after {
  font-size: .75rem;
}

/* Panels */
.bm-panel {
  padding: 20px 24px;
}

/* Step 3: Terms */
.bm-terms-summary {
  margin-bottom: 20px;
  padding: 16px;
  background: rgba(255,255,255,.04);
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.08);
}
.bm-terms-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  font-size: .95rem;
}
.bm-terms-row .bm-terms-label {
  color: var(--muted);
  flex-shrink: 0;
}
.bm-terms-price {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-weight: 700;
  font-size: 1.05rem;
}
.bm-terms-price.bm-terms-included {
  color: var(--secondary);
  font-weight: 600;
}
.bm-terms-invoice-note {
  margin-top: 6px;
  font-size: .85rem;
  color: var(--muted);
  font-style: italic;
}
.bm-terms-box {
  padding: 16px 0 0;
  border-top: 1px solid rgba(255,255,255,.08);
}
.bm-terms-box h4 {
  margin: 0 0 10px;
  font-size: .9rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.bm-terms-box ul {
  margin: 0;
  padding-left: 20px;
  font-size: .88rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Time banner */
.bm-time-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 20px;
  font-size: .9rem;
}
.bm-time-fields {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bm-time-range-fields {
  display: flex;
  align-items: center;
  gap: 4px;
}
.bm-time-sep {
  color: var(--muted);
  font-size: .85rem;
}
.bm-time-input {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  color: var(--text);
  padding: 6px 8px;
  font-size: .85rem;
  font-family: inherit;
  outline: none;
  transition: border-color .15s;
}
.bm-time-input:focus {
  border-color: var(--primary);
}
.bm-time-input.bm-input-error {
  border-color: #e74c3c;
  background: rgba(231,76,60,.08);
}
input[type="date"].bm-time-input {
  width: 130px;
}
select.bm-time-input {
  width: 82px;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M0 0l5 6 5-6z' fill='rgba(255,255,255,.4)'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  padding-right: 22px;
  cursor: pointer;
}
.bm-duration-badge {
  background: rgba(var(--secondary-rgb), .15);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: .8rem;
  font-weight: 600;
}

/* Fields */
.bm-field {
  margin-bottom: 16px;
}
.bm-field-label {
  display: block;
  font-size: .85rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 8px;
}
.bm-optional {
  font-weight: 400;
  color: rgba(255,255,255,.3);
}
.bm-input {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 10px 14px;
  color: var(--text);
  font-size: .95rem;
}
.bm-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(var(--primary-rgb), .2);
}
.bm-input::placeholder {
  color: rgba(255,255,255,.25);
}

/* Resource pills in wizard */
.bm-resource-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.bm-resource-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: .9rem;
  transition: all .15s;
}
.bm-resource-pill:hover {
  background: rgba(255,255,255,.06);
  color: var(--text);
}
.bm-resource-pill.active {
  background: rgba(var(--primary-rgb), .12);
  border-color: var(--primary);
  color: var(--text);
}
.bm-resource-pill.unavailable {
  opacity: .35;
  cursor: not-allowed;
  pointer-events: none;
  text-decoration: line-through;
}
.bm-resource-pill .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Price preview */
.bm-price-preview {
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 12px 16px;
  margin-top: 4px;
}
.bm-price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.bm-price-detail {
  color: var(--muted);
  font-size: .85rem;
}
.bm-price-total {
  font-weight: 700;
  font-size: 1.1rem;
}
.bm-price-vat {
  color: var(--muted);
  font-size: .8rem;
  display: block;
  text-align: right;
  margin-top: 4px;
}

/* Success state */
.bm-success {
  text-align: center;
  padding: 12px 0 20px;
}
.bm-success-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
}
.bm-success h3 {
  margin: 0 0 4px;
  font-size: 1.15rem;
}
.bm-success-sub {
  color: var(--muted);
  font-size: .9rem;
  margin: 0;
}

/* Summary rows */
.bm-summary {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  overflow: hidden;
}
.bm-summary-row {
  display: flex;
  justify-content: space-between;
  padding: 10px 16px;
  font-size: .9rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.bm-summary-row:last-child {
  border-bottom: none;
}
.bm-label {
  color: var(--muted);
}

/* Subscription step */
.bm-sub-intro {
  margin: 0 0 12px;
  font-size: .9rem;
  color: var(--muted);
}
.bm-sub-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.bm-sub-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  background: rgba(255,255,255,.03);
  border: 2px solid rgba(255,255,255,.08);
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  color: var(--text);
}
.bm-sub-card:hover {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.15);
}
.bm-sub-card.current {
  border-color: rgba(255,255,255,.18);
  background: rgba(255,255,255,.04);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.bm-sub-card.selected {
  border-color: var(--primary);
  background: rgba(var(--primary-rgb), .08);
}
.bm-sub-card-header {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bm-sub-card-name {
  font-weight: 700;
  font-size: .95rem;
}
.bm-sub-card-badge {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .3px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(46,204,113,.15);
  color: #2ecc71;
}
.bm-sub-card-desc {
  margin: 0;
  font-size: .82rem;
  color: var(--muted);
  line-height: 1.4;
}
.bm-sub-card-price {
  font-size: .82rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 2px;
}
.bm-sub-card-check {
  position: absolute;
  top: 14px;
  right: 16px;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
}

.bm-sub-notice {
  padding: 10px 14px;
  margin-bottom: 12px;
  border-radius: 8px;
  background: rgba(var(--secondary-rgb), .1);
  border: 1px solid rgba(var(--secondary-rgb), .2);
  color: var(--text);
  font-size: .82rem;
  line-height: 1.4;
}

/* Footer */
.bm-footer {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,.06);
}
.bm-footer .btn { flex: 1; text-align: center; }

@media (max-width: 480px) {
  .bm-content { max-width: 100% !important; margin: 0 !important; border-radius: 16px 16px 0 0; align-self: flex-end; max-height: 90vh; }
  .bm-step-label { display: none; }
}

/* Booking message (calendar-level & in-modal) */
.booking-message, .bm-message {
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 10px;
  animation: booking-msg-fade 0.3s ease;
}
.booking-message.error, .bm-message.error {
  background: rgba(220, 53, 69, 0.15);
  border: 1px solid rgba(220, 53, 69, 0.3);
  color: #f8d7da;
}
.booking-message.warning, .bm-message.warning {
  background: rgba(255, 193, 7, 0.15);
  border: 1px solid rgba(255, 193, 7, 0.3);
  color: #fff3cd;
}
.booking-message.success, .bm-message.success {
  background: rgba(40, 167, 69, 0.15);
  border: 1px solid rgba(40, 167, 69, 0.3);
  color: #d4edda;
}
@keyframes booking-msg-fade {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Backward booking notice in modal (gentle warning) */
.bm-backward-notice {
  padding: 10px 14px;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.875rem;
  background: rgba(255, 193, 7, 0.12);
  border: 1px solid rgba(255, 193, 7, 0.25);
  color: #e6d9a8;
}

/* Booking calendar */
#booking .calendar {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px;
  position: relative;
}
@media (max-width: 600px) {
  #booking .calendar {
    touch-action: manipulation;
  }
}
#booking .tabs { display: inline-flex; gap: 8px; margin-bottom: 12px; }
@media (max-width: 600px) {
  #booking .tabs {
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    max-width: 100%;
  }
  #booking .tabs::-webkit-scrollbar { display: none; }
  #booking .tabs .tab { flex: 0 0 auto; }
}
#booking .tab { cursor: pointer; border: 1px solid rgba(255,255,255,.18); background: transparent; color: var(--text); border-radius: 999px; padding: 8px 12px; font-weight: 600; }
#booking .tab:hover, #booking .tab:focus { background: rgba(255,255,255,.08); }
#booking .tab.active { background: var(--secondary-18); border-color: var(--secondary-50); }

/* Admin tabs styled like buttons */
#admin-tabs { display: flex; gap: 8px; margin-bottom: 12px; }
#admin-tabs .tab { cursor: pointer; border: 1px solid rgba(255,255,255,.18); background: transparent; color: var(--text); border-radius: 999px; padding: 8px 12px; font-weight: 600; }
#admin-tabs .tab:hover, #admin-tabs .tab:focus { background: rgba(255,255,255,.08); }
#admin-tabs .tab.active { background: var(--secondary-18); border-color: var(--secondary-50); }

/* ─── Admin Dashboard ────────────────────────────────────── */

.dash-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 12px;
}
.dash-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
@media (max-width: 700px) {
  .dash-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .dash-grid { grid-template-columns: 1fr; }
}

.dash-card {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
}
.dash-label {
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.dash-value {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
}

.dash-section-title {
  margin: 24px 0 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--muted);
}

.dash-by-page {
  margin-top: 8px;
}
.dash-by-page ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.dash-by-page li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  font-size: .9rem;
}
.dash-by-page li:last-child {
  border-bottom: none;
}
.dash-page-name {
  color: var(--text);
  font-weight: 500;
}
.dash-page-count {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Booking resource pills – override global pills for filter-style chips (shared with #ics-card) */
#booking .pills,
#ics-card .pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; background: none; border: none; padding: 0; border-radius: 0; }
#booking .resource-pill-wrap,
#ics-card .resource-pill-wrap { display: inline-flex; align-items: center; gap: 4px; }
#booking .resource-pill-link { display: none; align-items: center; justify-content: center; width: 28px; height: 28px; padding: 0; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; background: transparent; color: var(--text); cursor: pointer; flex-shrink: 0; }
body.user-logged-in #booking .resource-pill-link { display: inline-flex; }
#booking .resource-pill-link:hover, #booking .resource-pill-link:focus { background: rgba(255,255,255,.08); color: var(--text); }
#booking .resource-pill-link svg { display: block; }

/* Resource pill tooltip */
#booking .resource-pill-wrap { position: relative; }
#booking .resource-pill-tooltip {
  position: absolute;
  bottom: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) translateY(6px);
  width: 260px;
  background: var(--card, #1a1f2b);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.45);
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease, transform .2s ease;
  z-index: 100;
}
#booking .resource-pill-wrap:hover .resource-pill-tooltip,
#booking .resource-pill-wrap:focus-within .resource-pill-tooltip {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}
#booking .resource-pill-tooltip::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%) rotate(45deg);
  width: 10px;
  height: 10px;
  background: var(--card, #1a1f2b);
  border-right: 1px solid rgba(255,255,255,.12);
  border-bottom: 1px solid rgba(255,255,255,.12);
}
#booking .resource-pill-tooltip img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
#booking .resource-pill-tooltip .rpt-body {
  padding: 10px 14px 12px;
}
#booking .resource-pill-tooltip .rpt-title {
  font-size: .85rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
#booking .resource-pill-tooltip .rpt-title .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
#booking .resource-pill-tooltip .rpt-desc {
  font-size: .78rem;
  color: var(--muted);
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
#booking .resource-pill-tooltip .rpt-no-img {
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.03);
  font-size: 1.5rem;
}

#booking .pill,
#ics-card .pill { border: 1px solid rgba(255,255,255,.18); background: transparent; color: var(--text); border-radius: 999px; padding: 6px 10px; font-weight: 600; line-height: 1; display: inline-flex; align-items: center; gap: 8px; box-shadow: none; }
#booking .pill .dot,
#ics-card .pill .dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; background: #999; flex-shrink: 0; }
#booking .pill:hover, #booking .pill:focus,
#ics-card .pill:hover, #ics-card .pill:focus { background: rgba(255,255,255,.08); }
#booking .pill.active,
#ics-card .pill.active { color: var(--text); background: var(--secondary-18); border-color: var(--secondary-50); }

/* Modal */
#booking .modal { position: fixed; inset: 0; display: none; z-index: 9998; }
#booking .modal.open { display: flex; align-items: center; justify-content: center; }
#booking .modal .modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(2px); }
#booking .modal .modal-content { position: relative; margin: 80px auto; max-width: 520px; background: var(--surface); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; z-index: 1; }
#booking .modal h3 { margin: 0 0 10px; }

/* Global modals (admin, etc.) */
.modal { position: fixed; inset: 0; display: none; z-index: 9998; }
.modal.open { display: flex; align-items: center; justify-content: center; }
.modal .modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.7); backdrop-filter: blur(2px); }
.modal .modal-content { position: relative; margin: 80px auto; max-width: 640px; background: var(--surface); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; z-index: 1; max-height: calc(100vh - 160px); overflow: auto; -webkit-overflow-scrolling: touch; }
.modal .modal-content-wide { max-width: 480px; }
.register-form-grid { display: grid; gap: 8px; grid-template-columns: 1fr; max-width: 100%; }

/* Auth modal – layout, sections (flyt B), Google button */
#register-modal .auth-modal-content {
  padding: 20px 24px 24px;
  min-width: 320px;
  max-width: 400px;
  max-height: calc(100vh - 80px);
  overflow: auto;
}
#register-modal .auth-modal-content .register-form-grid {
  max-width: 100%;
}
#register-modal .auth-modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: none;
  border-radius: var(--radius);
  background: rgba(255,255,255,.06);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease;
}
#register-modal .auth-modal-close:hover {
  background: rgba(255,255,255,.12);
}
#register-modal .auth-modal-close:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
#register-modal .auth-modal-title {
  margin: 0 0 14px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
}
#register-modal .auth-tabs {
  margin-bottom: 16px;
}
#register-modal .auth-form {
  margin-top: 0;
}
#register-modal .auth-form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
#register-modal .auth-password-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
#register-modal .auth-password-row .small {
  width: 100%;
  min-width: 0;
}
#register-modal .auth-password-row input#login-password {
  width: 100%;
  box-sizing: border-box;
}
#register-modal .auth-forgot-link {
  font-size: 0.85rem;
  color: var(--color-text-muted, var(--muted));
  text-decoration: none;
  white-space: nowrap;
  margin-top: 2px;
}
#register-modal .auth-forgot-link:hover {
  text-decoration: underline;
  color: var(--accent);
}
#register-modal .auth-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 4px;
}
#register-modal .auth-msg {
  margin-top: 2px;
  min-height: 1.2em;
}
#register-modal .auth-or {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0 10px;
}
#register-modal .auth-or hr {
  flex: 1;
  border: none;
  border-top: 1px solid var(--color-border, rgba(255,255,255,.12));
}
#register-modal .auth-or .small {
  color: var(--color-text-muted, var(--muted));
}
#register-modal .auth-google-wrap {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
}
#register-modal .auth-google-wrap > div,
#register-modal .auth-google-wrap iframe {
  margin: 0 auto;
}
#register-modal .auth-google-top {
  margin-bottom: 4px;
}
#register-modal .auth-section {
  margin-top: 18px;
  padding: 14px 16px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
#register-modal .auth-section:first-of-type {
  margin-top: 0;
}
#register-modal .auth-section-title {
  margin: 0 0 4px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 0.02em;
}
#register-modal .auth-zip-city {
  display: flex;
  gap: 10px;
}
#register-modal .auth-zip-city .small:first-child {
  flex: 0 0 100px;
}
#register-modal .auth-zip-city .small:last-child {
  flex: 1;
  min-width: 0;
}
@media (max-width: 420px) {
  #register-modal .auth-modal-content {
    min-width: 0;
    width: calc(100vw - 32px);
    margin: 16px;
  }
}

.modal h3 { margin: 0 0 10px; }
#pricing-explorer .modal-content { max-width: none !important; margin: 0 !important; max-height: none !important; }
#pricing-explorer .pe-content { width: 100vw; max-width: 100vw; height: 100vh; margin: 0; border-radius: 0; padding: 24px 32px; display: grid; grid-template-rows: auto 1fr; gap: 20px; animation: pe-fade .22s ease; }
#pricing-explorer .pe-content:focus { outline: none; }
#pricing-explorer .modal-backdrop { backdrop-filter: blur(4px); }
#pricing-explorer .pe-title { margin: 0; font-size: clamp(22px, 2.8vw, 28px); letter-spacing: .3px; font-weight: 700; }
#pricing-explorer .pe-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 8px; border-bottom: 1px solid rgba(255,255,255,.08); }
#pricing-explorer .pe-controls { display: flex; gap: 12px; align-items: center; }
#pricing-explorer .pe-body { display: grid; grid-template-columns: 420px 1fr; gap: 24px; height: calc(100vh - 140px); }
#pricing-explorer .pe-rail { border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); background: rgba(255,255,255,.04); overflow: auto; box-shadow: var(--shadow); }
#pricing-explorer .pe-details { border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); background: rgba(255,255,255,.04); overflow: auto; padding: 28px; display: flex; flex-direction: column; gap: 16px; box-shadow: var(--shadow); }
#pricing-explorer .pe-card { padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,.08); cursor: pointer; transition: transform .12s ease, background .12s ease; }
#pricing-explorer .pe-card:hover { background: rgba(255,255,255,.06); transform: translateY(-1px); }
#pricing-explorer .pe-card.active { outline: 2px solid var(--secondary-45); background: rgba(58,194,224,.1); }
#pricing-explorer .pe-card:focus-visible { outline: 2px solid var(--accent); }
#pricing-explorer .pe-price { font-weight: 800; font-size: clamp(20px, 2.8vw, 26px); }
#pricing-explorer .pe-unit { color: var(--muted); margin-left: 6px; font-size: 0.7em; }
#pricing-explorer .pe-tabs { display: inline-flex; gap: 10px; }
#pricing-explorer .pe-tab { cursor: pointer; border: 1px solid rgba(255,255,255,.2); background: transparent; color: var(--text); border-radius: 999px; padding: 8px 14px; font-weight: 600; font-size: 15px; }
#pricing-explorer .pe-tab:hover { background: rgba(255,255,255,.08); }
#pricing-explorer .pe-tab.active { background: var(--secondary-18); border-color: var(--secondary-50); }
#pricing-explorer .pe-rows .row { display: grid; grid-template-columns: 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
#pricing-explorer .pe-rows .row:last-child { border-bottom: 0; }
#pricing-explorer .pe-rows .title { font-weight: 600; font-size: 16px; }
#pricing-explorer .pe-rows .meta { color: var(--muted); font-size: .95rem; margin-top: 4px; }
#pricing-explorer .pe-long-description { margin: 16px 0; padding: 16px 20px; background: rgba(58,194,224,.08); border-left: 3px solid var(--accent); border-radius: 4px; line-height: 1.6; color: var(--text); }
#pricing-explorer .pe-content-sections { display: flex; flex-direction: column; gap: 24px; }
#pricing-explorer .pe-section { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); padding: 18px 20px; }
#pricing-explorer .pe-section-title { margin: 0 0 12px 0; font-size: 1.05rem; font-weight: 700; color: var(--accent); }
#pricing-explorer .pe-list { margin: 0; padding-left: 20px; list-style: none; }
#pricing-explorer .pe-list li { position: relative; padding: 6px 0; line-height: 1.5; }
#pricing-explorer .pe-list li::before { content: "•"; position: absolute; left: -16px; color: var(--accent); font-weight: bold; }
#pricing-explorer .pe-list strong { color: var(--text); font-weight: 600; }
#pricing-explorer .pe-list .small.muted { color: var(--muted); font-size: 0.9rem; }
#pricing-explorer .pe-rules-container { margin-top: 16px; border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); overflow: hidden; }
#pricing-explorer .pe-rules-toggle { width: 100%; background: rgba(255,255,255,.03); border: none; color: var(--text); padding: 12px 16px; text-align: left; cursor: pointer; display: flex; align-items: center; justify-content: space-between; font-size: 0.95rem; font-weight: 600; transition: background .2s ease; }
#pricing-explorer .pe-rules-toggle:hover { background: rgba(255,255,255,.06); }
#pricing-explorer .pe-rules-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
#pricing-explorer .pe-rules-icon { font-size: 0.75rem; transition: transform .25s ease; display: inline-block; }
#pricing-explorer .pe-rules-toggle.expanded .pe-rules-icon { transform: rotate(180deg); }
#pricing-explorer .pe-rules-content { background: rgba(255,255,255,.02); padding: 0 16px 12px 16px; border-top: 1px solid rgba(255,255,255,.06); max-height: 500px; opacity: 1; transition: max-height .3s ease, opacity .25s ease, padding .3s ease; overflow: hidden; }
#pricing-explorer .pe-rules-content.collapsed { max-height: 0; opacity: 0; padding: 0 16px; border-top: none; }
#pricing-explorer .pe-rules-content .pe-list { margin-top: 8px; }
#pricing-explorer .pe-sticky { position: sticky; bottom: 0; margin-top: auto; background: linear-gradient(180deg, rgba(21,26,34,.3), rgba(21,26,34,.9)); padding: 16px; display: flex; align-items: center; justify-content: center; gap: 16px; border-top: 1px solid rgba(255,255,255,.12); border-radius: 0 0 var(--radius) var(--radius); }
#pricing-explorer .pe-sticky .btn { min-width: 200px; padding: 14px 24px; font-size: 17px; font-weight: 600; }
#pricing-explorer .pills { background: none; border: none; padding: 0; }
#pricing-explorer .pill.active { color: var(--text); background: var(--secondary-18); border-color: var(--secondary-50); box-shadow: none; }
@keyframes pe-fade { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: translateY(0);} }
@media (max-width: 960px) { 
  #pricing-explorer .pe-body { grid-template-columns: 1fr; }
  #pricing-explorer .pe-sticky { flex-direction: column; align-items: stretch; }
}

/* Confirm modal */
.confirm-modal-content {
  max-width: 400px !important;
  padding: 28px 24px 20px !important;
  text-align: center;
}
.confirm-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0 0 8px !important;
}
.confirm-desc {
  font-size: .9rem;
  color: var(--muted);
  margin: 0 0 20px;
  line-height: 1.4;
}
.confirm-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
}
.confirm-actions .btn {
  min-width: 110px;
  padding: 10px 20px;
  font-size: .9rem;
}

/* Wider admin subscription modal for product pricing table */
#sub-edit-modal .modal-content { max-width: calc(100vw - 20px); width: calc(100vw - 20px); }
#booking #payment-modal .modal-content p { margin: 6px 0; }
#booking #payment-modal .modal-actions .btn { min-width: 160px; }
#booking #payment-modal strong { font-size: 1.15rem; }
#booking input[type="text"], #booking input[type="email"], #booking input[type="password"] { width: 100%; border-radius: 10px; border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.04); color: var(--text); padding: 10px 12px; }
#booking .modal .modal-sep { margin-top: 14px; border: 0; height: 1px; background: rgba(255,255,255,.12); }
#booking .fc { color: var(--text); font-family: inherit; }
#booking .fc .fc-toolbar-title { color: var(--text); letter-spacing: .2px; }
#booking .fc-theme-standard .fc-scrollgrid,
#booking .fc-theme-standard td,
#booking .fc-theme-standard th {
  border-color: rgba(255,255,255,.08);
}
#booking .fc .fc-col-header,
#booking .fc .fc-scrollgrid thead {
  background: var(--bg-alt);
}
#booking .fc .fc-col-header-cell {
  background: var(--bg-alt) !important;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
#booking .fc .fc-scrollgrid-section-sticky > * {
  background: var(--bg-alt) !important;
}
#booking .fc .fc-col-header-cell-cushion {
  color: var(--text);
  font-weight: 600;
  padding: 10px 8px;
}
#booking .fc .fc-timegrid-axis { background: var(--bg-alt); }
#booking .fc .fc-timegrid-axis-cushion,
#booking .fc .fc-daygrid-day-number { color: var(--muted); }

/* Header toolbar spacing and alignment */
#booking .fc .fc-toolbar { margin-bottom: 10px; }
#booking .fc .fc-toolbar-chunk { display: flex; gap: 12px; align-items: center; }
#booking .fc .fc-toolbar .fc-button-group > .fc-button { margin: 0 4px; }

/* Mobile toolbar adjustments */
@media (max-width: 700px) {
  #booking .fc .fc-toolbar { flex-wrap: wrap; row-gap: 8px; }
  #booking .fc .fc-toolbar-chunk { flex: 1 0 50%; }
  /* Title on its own row, centered */
  #booking .fc .fc-toolbar-chunk:nth-child(2) {
    order: -1;
    flex: 0 0 100%;
    justify-content: center;
  }
  /* Align right chunk (view buttons) to the right */
  #booking .fc .fc-toolbar-chunk:nth-child(3) { justify-content: flex-end; }
  /* Smaller buttons and tighter spacing */
  #booking .fc .fc-button { padding: 6px 8px; font-size: .9rem; }
  #booking .fc .fc-toolbar .fc-button-group > .fc-button { margin: 0 2px; }
  /* Hide Month button to save space */
  #booking .fc .fc-dayGridMonth-button { display: none; }
  /* Larger tap targets: minimum slot height on mobile */
  #booking .fc .fc-timegrid-slots tbody tr[data-time] td { min-height: 44px; }
  /* Stronger selection feedback for touch */
  #booking .fc .fc-highlight {
    background: rgba(58,194,224,.28);
    transition: background .2s ease;
  }
}

/* Buttons align with .btn ghost/primary */
#booking .fc .fc-button-primary {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 10px;
  padding: 8px 10px;
  text-transform: none;
}
#booking .fc .fc-button-primary:hover,
#booking .fc .fc-button-primary:focus { background: rgba(255,255,255,.08); box-shadow: none; }
#booking .fc .fc-button-primary:disabled { opacity: .6; background: transparent; }
#booking .fc .fc-button-primary.fc-button-active { background: rgba(255,255,255,.08); color: var(--text); border-color: rgba(255,255,255,.25); }
#booking .fc .fc-today-button { background: var(--primary); color: #0b0d12; border-color: var(--primary); }
#booking .fc .fc-today-button:hover,
#booking .fc .fc-today-button:focus,
#booking .fc .fc-today-button.fc-button-active { background: var(--primary-600); border-color: var(--primary-600); color: #0b0d12; }
/* When already on today (disabled), use ghost style with white text */
#booking .fc .fc-today-button:disabled,
#booking .fc .fc-today-button:disabled:hover,
#booking .fc .fc-today-button:disabled:focus {
  background: transparent;
  color: var(--text);
  border-color: rgba(255,255,255,.18);
  opacity: 1;
}

/* Today highlight and selection */
#booking .fc .fc-day-today { background: linear-gradient(180deg, rgba(var(--secondary-rgb), .08), transparent); }
#booking .fc .fc-highlight { background: rgba(58,194,224,.18); }

/* Hover preview on time grid */
#booking .fc .fc-timegrid-col:not(.fc-timegrid-axis) { cursor: pointer; }
#booking .fc .fc-timegrid-body { position: relative; isolation: isolate; }

.fc-slot-hover-overlay {
  position: absolute;
  box-sizing: border-box;
  background: rgba(58, 194, 224, .15);
  border: 1.5px dashed rgba(58, 194, 224, .6);
  border-radius: 6px;
  pointer-events: none;
  z-index: 10;
  opacity: 0;
  transition: opacity .15s ease;
}
.fc-slot-hover-overlay .fc-slot-hover-label {
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: .73rem;
  font-weight: 600;
  color: rgba(58, 194, 224, .95);
  white-space: nowrap;
  line-height: 1;
}

/* Events */
#booking .fc .fc-event {
  background: var(--secondary-18);
  border: 1px solid var(--secondary-50);
  color: var(--text);
  border-radius: 8px;
}
#booking .fc .fc-event .fc-event-main { padding: 2px 6px; }
#booking .fc .fc-event .fc-event-main-frame { display: flex; flex-direction: column; gap: 1px; overflow: hidden; }
#booking .fc .fc-event .fc-event-time { font-size: .75rem; font-weight: 600; }
#booking .fc .fc-event .fc-event-resource { font-size: .7rem; opacity: .85; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#booking .fc .fc-event .fc-event-title { font-size: .8rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Dim calendar when not logged in */
#booking #calendar.dimmed {
  filter: blur(3px);
  pointer-events: none;
}
#booking #calendar.dimmed::after {
  content: 'Logg inn for å booke';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.45);
  color: #fff;
  font-weight: 700;
  letter-spacing: .3px;
  border-radius: var(--radius);
}

/* Resource color swatches in admin modal */
.resource-color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,.2);
  cursor: pointer;
  position: relative;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 2px 4px rgba(0,0,0,.2);
}

.resource-color-swatch:hover {
  transform: scale(1.1);
  border-color: rgba(255,255,255,.4);
  box-shadow: 0 4px 8px rgba(0,0,0,.3);
  z-index: 1;
}

.resource-color-swatch:active {
  transform: scale(0.95);
}

/* JSON Editor */
.json-editor {
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  background: #0d1117;
  border: 2px solid rgba(255,255,255,.12);
  transition: border-color .2s ease, box-shadow .2s ease;
  color: #e6edf3;
}

.json-editor.valid {
  border-color: var(--secondary-50);
  box-shadow: 0 0 0 2px rgba(86,211,100,.15);
}

.json-editor.invalid {
  border-color: #f85149;
  box-shadow: 0 0 0 2px rgba(248,81,73,.15);
}

.json-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 12px;
  background: rgba(255,255,255,.04);
  border-bottom: 1px solid rgba(255,255,255,.08);
  color: #e6edf3;
}

.json-editor-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 500;
}

.json-editor-status .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a9b3c1;
  transition: background .2s ease;
}

.json-editor.valid .json-editor-status .dot {
  background: #56d364;
}

.json-editor.invalid .json-editor-status .dot {
  background: #f85149;
}

.json-editor-status .text {
  color: #a9b3c1;
  transition: color .2s ease;
}

.json-editor.valid .json-editor-status .text {
  color: #56d364;
}

.json-editor.invalid .json-editor-status .text {
  color: #f85149;
}

.json-editor-actions {
  display: flex;
  gap: 6px;
}

.json-editor-btn {
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  color: #e6edf3;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all .15s ease;
  font-family: inherit;
}

.json-editor-btn:hover {
  background: rgba(255,255,255,.1);
  border-color: rgba(255,255,255,.2);
  color: #fff;
}

.json-editor-btn:active {
  transform: scale(0.96);
}

.json-editor-btn.primary {
  background: var(--secondary-18);
  border-color: var(--secondary-50);
  color: #56d364;
}

.json-editor-btn.primary:hover {
  background: rgba(86,211,100,.25);
  color: #7ee787;
}

.json-editor-body {
  position: relative;
  min-height: 200px;
}

.json-editor-highlight {
  position: absolute;
  inset: 0;
  padding: 12px;
  margin: 0;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, 'Liberation Mono', Menlo, Monaco, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #e6edf3;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow: auto;
  pointer-events: none;
}

.json-editor textarea {
  position: relative;
  width: 100%;
  min-height: 200px;
  padding: 12px;
  margin: 0;
  border: none;
  background: transparent;
  color: #e6edf3;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', Consolas, 'Liberation Mono', Menlo, Monaco, monospace;
  font-size: 0.9rem;
  line-height: 1.5;
  resize: vertical;
  outline: none;
  -webkit-text-fill-color: transparent;
  caret-color: #e6edf3;
}

/* Fallback for browsers that don't support -webkit-text-fill-color */
@supports not (-webkit-text-fill-color: transparent) {
  .json-editor textarea {
    color: transparent;
  }
}

/* JSON Syntax Highlighting */
.json-editor-highlight .json-key {
  color: #79c0ff;
}

.json-editor-highlight .json-string {
  color: #a5d6ff;
}

.json-editor-highlight .json-number {
  color: #56d364;
}

.json-editor-highlight .json-boolean {
  color: #ff7b72;
}

.json-editor-highlight .json-null {
  color: #ff7b72;
}

.json-editor-highlight .json-brace {
  color: #e6edf3;
}

.json-editor-highlight .json-bracket {
  color: #e6edf3;
}

.json-editor-highlight .json-colon {
  color: #8b949e;
}

.json-editor-highlight .json-comma {
  color: #8b949e;
}

.json-editor-error {
  display: none;
  padding: 10px 12px;
  background: rgba(248,81,73,.1);
  border-top: 1px solid rgba(248,81,73,.2);
  color: #ffa198;
  font-size: 0.85rem;
  font-family: 'SF Mono', Consolas, monospace;
}

.json-editor.invalid .json-editor-error {
  display: block;
}

.json-editor-error code {
  background: rgba(248,81,73,.2);
  color: #ff7b72;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8rem;
}

/* Hint tooltip for JSON editor */
.json-editor-hint {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #a9b3c1;
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.json-editor-hint::before {
  content: "💡";
  flex-shrink: 0;
}

/* ===========================================
   Arbeidsplassar Section - Horizontal Bands
   =========================================== */

.section-intro {
  color: var(--muted);
  font-size: 1.1rem;
  margin: -0.5rem 0 2rem 0;
  max-width: 60ch;
}

/* Workspace band - horizontal strip */
.workspace-band {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.workspace-band:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.band-header {
  margin-bottom: 1.25rem;
}

.band-header h3 {
  margin: 0 0 0.25rem 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.band-header h3::before {
  content: "";
  width: 4px;
  height: 1.2em;
  background: var(--secondary);
  border-radius: 2px;
}

.band-header p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--muted);
  padding-left: 16px;
}

.band-header-with-toggle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.band-header-with-toggle h3 {
  margin-bottom: 0;
}

@media (max-width: 640px) {
  .band-header-with-toggle {
    flex-direction: column;
    align-items: flex-start;
  }
}

.band-content {
  position: relative;
}

/* Horizontal scroll containers */
.subscription-scroll,
.resource-scroll {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 4px;
  margin: -8px -4px;
}

.subscription-scroll::-webkit-scrollbar,
.resource-scroll::-webkit-scrollbar {
  display: none;
}

/* Subscription cards (no images) */
.sub-card {
  flex: 0 0 280px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  padding: 20px;
  scroll-snap-align: start;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.sub-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
  border-color: rgba(255,255,255,.15);
}

.sub-card.featured {
  border-color: var(--secondary-50);
  box-shadow: 0 0 0 1px var(--secondary-18);
}

.sub-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 8px;
}

.sub-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.sub-card-badge {
  background: var(--secondary-18);
  color: var(--secondary);
  border: 1px solid var(--secondary-50);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
}

.sub-card-desc {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 12px 0;
  line-height: 1.4;
  flex: 1;
}

.sub-card-price {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.sub-card-amount {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

.sub-card-unit {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 500;
}

.sub-card-cta {
  margin-top: auto;
}

/* ===========================================
   Global Customer Type Toggle
   =========================================== */

.section-header {
  margin-bottom: 32px;
}

.section-header-with-toggle {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 32px;
}

.section-header-with-toggle h2 {
  margin-bottom: 8px;
}

.section-header-with-toggle .section-intro {
  margin: 0;
}

.customer-type-toggle {
  display: flex;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 4px;
  gap: 2px;
  flex-shrink: 0;
}

.customer-type-toggle .toggle-btn {
  padding: 10px 20px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.customer-type-toggle .toggle-btn:hover {
  color: var(--text);
  background: rgba(255,255,255,.05);
}

.customer-type-toggle .toggle-btn.active {
  background: var(--primary);
  color: var(--bg);
}

@media (max-width: 640px) {
  .section-header-with-toggle {
    flex-direction: column;
    align-items: stretch;
  }
  
  .customer-type-toggle {
    align-self: flex-start;
  }
}

/* ===========================================
   Subscription & Desk Card CTAs
   =========================================== */

.sub-card-cta .btn,
.desk-card-cta .btn {
  width: 100%;
  text-align: center;
  padding: 12px 16px;
  font-size: 1rem;
  line-height: 1.2;
  box-sizing: border-box;
}

/* Resource cards (with images) */
.res-card {
  flex: 0 0 320px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.res-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
  border-color: rgba(255,255,255,.18);
}

.res-card-image {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: rgba(255,255,255,.03);
}

.res-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}

.res-card:hover .res-card-image img {
  transform: scale(1.05);
}

.res-card-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(86,211,100,.1), rgba(58,194,224,.1));
  color: var(--muted);
  font-size: 3rem;
}

.res-card-type-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  color: var(--text);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
}

.res-card-body {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.res-card-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 6px 0;
}

.res-card-desc {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
  margin: 0 0 12px 0;
  flex: 1;
}

.res-card-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.06);
}

.res-card-capacity {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}

.res-card-capacity svg {
  width: 16px;
  height: 16px;
}

.res-card-cta {
  margin-left: auto;
}

.res-card-cta .btn {
  padding: 8px 16px;
  font-size: 0.9rem;
}

/* Empty state */
.band-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  background: rgba(255,255,255,.02);
  border-radius: var(--radius);
  border: 1px dashed rgba(255,255,255,.1);
}

/* Responsive adjustments */
@media (min-width: 768px) {
  .sub-card {
    flex: 0 0 300px;
  }
  .res-card {
    flex: 0 0 340px;
  }
  .res-card-image {
    height: 200px;
  }
}

@media (min-width: 1024px) {
  .sub-card {
    flex: 0 0 320px;
  }
  .res-card {
    flex: 0 0 360px;
  }
}

/* When content fits, center it */
@media (min-width: 1200px) {
  .subscription-scroll,
  .resource-scroll {
    justify-content: flex-start;
  }
}

/* ===========================================
   Price Comparison Table
   =========================================== */

.price-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 1.5rem;
}
.price-header h2 {
  margin: 0;
  line-height: 1;
}
.price-header .price-toggle {
  margin: 0;
}

.price-toggle {
  display: inline-flex;
  gap: 2px;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 1.5rem;
}

.price-toggle-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.price-toggle-btn:hover {
  color: var(--text);
  background: rgba(255,255,255,.05);
}

.price-toggle-btn.active {
  background: var(--primary);
  color: var(--bg);
}

.price-table-wrap {
  overflow-x: auto;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.price-table th,
.price-table td {
  padding: 14px 18px;
  text-align: center;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

.price-table thead th {
  background: var(--bg-alt);
  font-weight: 700;
  font-size: 1rem;
  color: var(--text);
  border-bottom: 2px solid rgba(255,255,255,.1);
  position: sticky;
  top: 0;
  z-index: 1;
}

.price-table thead th:first-child {
  text-align: left;
}

.price-table thead th.pt-highlight {
  background: rgba(86,211,100,.1);
  color: var(--secondary);
}

.price-table .pt-label {
  text-align: left;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.price-table .pt-section-header td {
  background: rgba(255,255,255,.02);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: left;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.price-table .pt-format-hint {
  font-weight: 400;
  font-size: 0.8em;
  color: var(--muted);
  margin-left: 0.35em;
  text-transform: none;
  letter-spacing: 0;
}

.price-table tbody tr:hover td {
  background: rgba(255,255,255,.02);
}

.price-table .pt-value {
  font-weight: 600;
  color: var(--text);
}

.price-table .pt-value.highlight {
  color: var(--secondary);
}

.price-table .pt-included-units {
  display: block;
  color: #fff;
  font-size: 0.9em;
  font-weight: 400;
  margin-top: 2px;
}

.price-table .pt-value.muted {
  color: var(--muted);
  font-weight: 400;
}

.price-table .pt-condition,
.pt-condition {
  font-size: 0.75em;
  opacity: 0.85;
  margin-left: 1px;
}

.price-table .pt-condition-cell .pt-condition-text {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 400;
}
.has-condition { cursor: help; }

.price-table .pt-check {
  color: var(--secondary);
  font-size: 1.2rem;
}

.price-table .pt-cross {
  color: var(--muted);
  font-size: 1rem;
}

.price-table .pt-sub-name {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 400;
  display: block;
  margin-top: 2px;
}

/* Responsive: stack on mobile */
@media (max-width: 640px) {
  .price-toggle {
    width: 100%;
    justify-content: stretch;
  }
  
  .price-toggle-btn {
    flex: 1;
    padding: 10px 12px;
    font-size: 0.85rem;
  }
  
  .price-table th,
  .price-table td {
    padding: 10px 12px;
    font-size: 0.9rem;
  }
}

/* ===========================================
   Image Picker (Admin)
   =========================================== */

.image-picker {
  background: var(--bg-alt);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 12px;
  max-height: 300px;
  overflow-y: auto;
}

.image-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 8px;
}

.image-picker-item {
  aspect-ratio: 4/3;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.15s ease;
  position: relative;
  background: var(--surface);
}

.image-picker-item:hover {
  border-color: rgba(255,255,255,.3);
  transform: scale(1.02);
}

.image-picker-item.selected {
  border-color: var(--secondary);
  box-shadow: 0 0 0 2px var(--secondary-18);
}

.image-picker-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-picker-item .image-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,.8));
  padding: 20px 6px 6px;
  font-size: 0.7rem;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-picker-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 24px;
  color: var(--muted);
  font-size: 0.9rem;
}

/* ===========================================
   Desk Cards (Kontorplassar section)
   =========================================== */

.desk-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 640px) {
  .desk-cards {
    grid-template-columns: 1fr;
  }
}

.desk-card {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.desk-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,.35);
  border-color: rgba(255,255,255,.15);
}

.desk-card-image {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.desk-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.desk-card:hover .desk-card-image img {
  transform: scale(1.05);
}

.desk-card-body {
  padding: 20px;
}

.desk-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px 0;
}

.desk-card-desc {
  color: var(--muted);
  font-size: 0.95rem;
  margin: 0 0 16px 0;
  line-height: 1.5;
}

/* ===========================================
   Desk Modals
   =========================================== */

.desk-modal-content {
  max-width: 600px;
  width: calc(100vw - 32px);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.desk-modal-content .desk-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(8px);
  color: white;
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.desk-modal-content .desk-modal-close:hover {
  background: rgba(0,0,0,.8);
  transform: scale(1.05);
}

.desk-modal-scroll {
  flex: 1;
  overflow-y: auto;
}

.desk-modal-hero {
  aspect-ratio: 16/9;
  overflow: hidden;
}

.desk-modal-hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.desk-modal-body {
  padding: 24px;
}

.desk-modal-body h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 12px 0;
  color: var(--text);
}

.desk-modal-intro {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0 0 24px 0;
}

.desk-modal-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.desk-feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.desk-feature-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
  width: 32px;
  text-align: center;
}

.desk-feature strong {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
  margin-bottom: 2px;
}

.desk-feature p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.desk-modal-price {
  background: var(--bg-alt);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
}

.desk-price-amount {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
}

.desk-price-unit {
  font-size: 1rem;
  color: var(--muted);
  margin-left: 4px;
}

.desk-price-alt {
  display: block;
  font-size: 0.9rem;
  color: var(--muted);
  margin-top: 4px;
}

.desk-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  background: var(--surface);
}

.desk-modal-cta {
  width: 100%;
  text-align: center;
}

/* ─── Invoice History ─────────────────────────────── */

.inv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}

.inv-header h2 { margin: 0; }

.inv-filters {
  display: flex;
  gap: 6px;
}

.inv-filter {
  background: transparent;
  border: 1px solid rgba(255,255,255,.12);
  color: var(--muted);
  padding: 5px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all .2s;
}

.inv-filter:hover {
  border-color: var(--primary);
  color: var(--text);
}

.inv-filter.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.inv-table-wrap {
  overflow-x: auto;
}

.inv-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.inv-table th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  color: var(--muted);
  font-weight: 600;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.inv-table td {
  padding: 10px 10px;
  border-bottom: 1px solid rgba(255,255,255,.05);
  vertical-align: middle;
}

.inv-table tbody tr:hover {
  background: rgba(255,255,255,.03);
}

.inv-right {
  text-align: right !important;
}

.inv-mono {
  font-family: monospace;
  font-size: 0.82rem;
  letter-spacing: .02em;
}

.inv-type-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 0.76rem;
  font-weight: 600;
  background: rgba(255,255,255,.06);
  color: var(--muted);
}

.inv-type-booking { background: rgba(59,130,246,.15); color: #60a5fa; }
.inv-type-subscription { background: rgba(168,85,247,.15); color: #c084fc; }
.inv-type-subscription_renewal { background: rgba(168,85,247,.1); color: #a78bfa; }

.inv-status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
}

/* ─── Invoice Dashboard ───────────────────────────────────── */

.inv-dashboard {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.inv-dash-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
  min-width: 140px;
  flex: 1;
}
.inv-dash-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(99,102,241,.12);
}
.inv-dash-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.inv-dash-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.inv-dash-count {
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.1;
}
.inv-dash-label {
  font-size: .72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.inv-dash-amount {
  margin-left: auto;
  font-size: .85rem;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
}

/* ─── Expandable Invoice Rows ─────────────────────────────── */

.inv-main-row {
  cursor: pointer;
  transition: background .12s;
}
.inv-main-row:hover {
  background: rgba(255,255,255,.03);
}
.inv-expand-icon {
  display: inline-block;
  font-size: .65rem;
  margin-right: 6px;
  transition: transform .2s;
  color: var(--muted);
}
.inv-expanded .inv-expand-icon {
  transform: rotate(90deg);
}
.inv-desc-cell {
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inv-detail-row td {
  padding: 0 16px 16px !important;
  background: rgba(255,255,255,.02);
  border-top: none !important;
}
.inv-lines-loading,
.inv-lines-empty {
  padding: 12px 0;
  color: var(--muted);
  font-size: .88rem;
  text-align: center;
}
.inv-lines-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .84rem;
}
.inv-lines-table th {
  text-align: left;
  padding: 6px 10px;
  font-weight: 600;
  color: var(--muted);
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .03em;
  border-bottom: 1px solid var(--border);
}
.inv-lines-table td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(255,255,255,.04);
}

/* ─── Product Modal Step Bar ──────────────────────────────── */

#product-modal .pm-step-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}

#product-modal .pm-step-dot {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255,255,255,.3);
  transition: color .2s;
}
#product-modal .pm-step-dot span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.15);
  font-size: .72rem;
  font-weight: 700;
  transition: all .2s;
}
#product-modal .pm-step-dot.active {
  color: var(--text);
}
#product-modal .pm-step-dot.active span {
  background: var(--secondary-18);
  border-color: var(--secondary-50);
  color: var(--secondary);
}
#product-modal .pm-step-dot.done {
  color: var(--secondary);
}
#product-modal .pm-step-dot.done span {
  background: var(--secondary);
  border-color: var(--secondary);
  color: var(--bg);
}

#product-modal .pm-step-line {
  width: 40px;
  height: 1px;
  background: rgba(255,255,255,.12);
  margin: 0 12px;
}

/* ─── Product Modal Step 2: Subscription Confirmation ─────── */

#product-modal .sf-scroll {
  padding: 28px 24px;
}

#product-modal .sf-card {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

#product-modal .sf-title {
  margin: 0 0 6px;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
}

#product-modal .sf-description {
  margin: 0;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--muted);
}

#product-modal .sf-price-box {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 20px;
}

#product-modal .sf-price-main {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

#product-modal .sf-price-amount {
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
}

#product-modal .sf-price-unit {
  font-size: 1rem;
  color: var(--muted);
}

#product-modal .sf-price-divider {
  height: 1px;
  background: rgba(255,255,255,.1);
  margin: 16px 0;
}

#product-modal .sf-benefits {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#product-modal .sf-benefit-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: .95rem;
  line-height: 1.4;
  color: var(--text);
}

#product-modal .sf-check {
  color: var(--secondary);
  font-weight: 700;
  flex-shrink: 0;
}

#product-modal .sf-note {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: .9rem;
  line-height: 1.5;
}
#product-modal .sf-upgrade-note {
  background: rgba(var(--secondary-rgb), .12);
  color: var(--secondary);
  border: 1px solid rgba(var(--secondary-rgb), .25);
}
#product-modal .sf-downgrade-note {
  background: rgba(234,179,8,.12);
  color: #fbbf24;
  border: 1px solid rgba(234,179,8,.25);
}
#product-modal .sf-same-note {
  background: rgba(255,255,255,.04);
  color: var(--muted);
  border: 1px solid rgba(255,255,255,.1);
}

#product-modal .sf-terms {
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 16px;
}
#product-modal .sf-terms h4 {
  font-size: .8rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}
#product-modal .sf-terms ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
#product-modal .sf-terms li {
  font-size: .82rem;
  color: rgba(255,255,255,.45);
  padding: 3px 0;
  line-height: 1.45;
}

#product-modal .sf-message {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: .9rem;
  line-height: 1.4;
}
#product-modal .sf-message-error {
  background: rgba(239,68,68,.12);
  color: #f87171;
  border: 1px solid rgba(239,68,68,.2);
}
#product-modal .sf-message-success {
  background: rgba(var(--secondary-rgb), .12);
  color: var(--secondary);
  border: 1px solid rgba(var(--secondary-rgb), .25);
}

#product-modal .kv-summary {
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
}
#product-modal .kv-summary-row {
  font-size: 1rem;
  color: var(--text);
  line-height: 1.5;
}
#product-modal .kv-summary-row + .kv-summary-row { margin-top: 6px; }

#product-modal .sf-loading {
  color: var(--muted);
  font-size: .95rem;
}

@media (max-width: 680px) {
  #product-modal .sf-scroll { padding: 20px 16px; }
  #product-modal .pm-step-bar { padding: 10px 16px; }
}

/* ─── Vipps Payment ───────────────────────────────────────── */

.vipps-btn {
  background: #ff5b24 !important;
  color: #fff !important;
  border: none !important;
  font-weight: 700;
  letter-spacing: .02em;
  transition: background .18s ease, transform .18s ease;
}
.vipps-btn:hover {
  background: #e64e1a !important;
  transform: translateY(-1px);
}
.vipps-btn:disabled {
  opacity: .6;
  cursor: not-allowed;
  transform: none;
}

.bm-vipps-info {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(255,91,36,.08);
  border: 1px solid rgba(255,91,36,.2);
  border-radius: 8px;
}
.bm-vipps-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .9rem;
  color: #ff5b24;
  font-weight: 600;
}
.bm-vipps-badge svg {
  flex-shrink: 0;
}

/* ─── Price Table CTA Row ─────────────────────────────────── */

.pt-cta-row td {
  padding-top: 16px !important;
  padding-bottom: 8px !important;
  text-align: center;
}
.pt-cta-btn {
  min-width: 80px;
}

/* ─── User Modal Context & Subscriptions ────────────────── */

.user-context {
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.user-context-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
}
.user-ctx-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.user-ctx-label {
  font-size: 0.75em;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.user-ctx-value {
  font-size: 0.95em;
  font-weight: 600;
  color: var(--fg);
}
.user-ctx-value.warn {
  color: #ef4444;
}

.user-sub-card {
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 8px;
  background: rgba(255,255,255,.02);
  transition: border-color .15s;
}
.user-sub-card.active {
  border-color: rgba(34,197,94,.25);
  background: rgba(34,197,94,.04);
}
.user-sub-card.active.stopping {
  border-color: rgba(230,168,23,.25);
  background: rgba(230,168,23,.04);
}
.user-sub-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.user-sub-name {
  font-weight: 600;
  font-size: 0.92em;
}
.user-sub-status {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.82em;
  font-weight: 500;
}
.user-sub-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.user-sub-details {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 6px;
}
.user-sub-meta {
  font-size: 0.8em;
  color: var(--muted);
}
.user-sub-autorenew {
  font-weight: 500;
}
.user-sub-autorenew.on {
  color: #22c55e;
}
.user-sub-autorenew.off {
  color: #e6a817;
}
.user-sub-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.user-sub-stop {
  color: #e6a817 !important;
  border-color: rgba(230,168,23,.25) !important;
}
.user-sub-stop:hover {
  background: rgba(230,168,23,.1) !important;
}
.user-sub-cancel {
  color: #ef4444 !important;
  border-color: rgba(239,68,68,.25) !important;
}
.user-sub-cancel:hover {
  background: rgba(239,68,68,.1) !important;
}

.user-bookings-compact {
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  overflow: hidden;
}
.user-booking-row {
  display: grid;
  grid-template-columns: 70px 100px 1fr 1fr;
  gap: 8px;
  padding: 6px 12px;
  font-size: 0.82em;
  border-bottom: 1px solid rgba(255,255,255,.04);
  align-items: center;
}
.user-booking-row:last-child {
  border-bottom: none;
}
.user-booking-row.past {
  opacity: .55;
}
.user-booking-date {
  font-weight: 600;
  color: var(--fg);
}
.user-booking-time {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.user-booking-resource {
  color: var(--fg);
}
.user-booking-title {
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* User invoices list in user modal */
.user-invoices-compact {
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  overflow: hidden;
}
.user-invoice-row {
  display: grid;
  grid-template-columns: 110px 60px 1fr 80px 90px;
  gap: 8px;
  padding: 7px 12px;
  font-size: 0.82em;
  border-bottom: 1px solid rgba(255,255,255,.04);
  align-items: center;
  cursor: pointer;
  transition: background .15s;
}
.user-invoice-row:last-child { border-bottom: none; }
.user-invoice-row:hover { background: rgba(255,255,255,.04); }
.user-invoice-number { font-weight: 600; color: var(--fg); font-variant-numeric: tabular-nums; }
.user-invoice-date { color: var(--muted); font-variant-numeric: tabular-nums; }
.user-invoice-desc { color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-invoice-amount { text-align: right; font-variant-numeric: tabular-nums; color: var(--fg); font-weight: 500; }
.user-invoice-status { display: flex; align-items: center; gap: 5px; font-size: 0.92em; }

/* Invoice detail modal */
.inv-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.inv-modal-number {
  font-size: 1.1em;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: .3px;
}
.inv-modal-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 0.9em;
}
.inv-modal-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  margin-bottom: 16px;
}
.inv-modal-field { display: flex; flex-direction: column; gap: 2px; }
.inv-modal-label { font-size: 0.75em; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.inv-modal-value { font-size: 0.9em; color: var(--fg); }
.inv-modal-amount { font-weight: 600; font-variant-numeric: tabular-nums; }
.inv-modal-amounts {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  padding: 12px;
  background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 8px;
  margin-bottom: 16px;
}
.inv-modal-edit-fields {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 8px;
}
#invoice-modal .inv-lines-table { margin-top: 0; }
#invoice-modal .modal-content { overflow: auto; }
#invoice-modal { z-index: 9999; }

/* Inline-editable invoice lines */
.inv-lines-editable th.num,
.inv-lines-editable td.num { text-align: right; }
.inv-line-input {
  width: 100%;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--fg);
  padding: 3px 6px;
  font-size: inherit;
  font-family: inherit;
  transition: border-color .15s, background .15s;
  box-sizing: border-box;
}
.inv-line-input:hover { border-color: rgba(255,255,255,.12); }
.inv-line-input:focus {
  outline: none;
  border-color: var(--accent, #6366f1);
  background: rgba(255,255,255,.04);
}
.inv-line-desc { min-width: 140px; }
.inv-line-qty,
.inv-line-unit,
.inv-line-amt { width: 80px; text-align: right; }
.inv-line-vat { font-variant-numeric: tabular-nums; color: var(--muted); font-size: .92em; }
.inv-line-remove {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.2em;
  padding: 2px 6px;
  border-radius: 4px;
  transition: color .15s, background .15s;
  line-height: 1;
}
.inv-line-remove:hover { color: #ef4444; background: rgba(239,68,68,.1); }
.inv-add-line-btn { margin-top: 8px; }
