@import url('https://fonts.googleapis.com/css2?family=Geist:wght@500;700&display=swap');

/* Art direction: Precision SaaS tool with Apple warmth
   Palette: warm near-white / near-black, single lime accent
   Typography: Geist (display 20px+) + system stack (body/UI)
   Glass: blur only on floating surfaces (dropdown, modals, login card)
           solid glass on all cards and panels
   Density: balanced — generous on marketing, compact on data surfaces */

/* ── Design Tokens ── */
:root {
  /* Backgrounds */
  --lr-bg:          #fafaf9;
  --lr-surface-1:   #ffffff;
  --lr-surface-2:   #f5f5f4;
  --lr-surface-3:   #e7e5e4;

  /* Text — 3 levels */
  --lr-text:        #1c1917;
  --lr-text-muted:  #78716c;
  --lr-text-faint:  #a8a29e;

  /* Brand */
  --lr-lime:        #65a30d;
  --lr-lime-dark:   #4d7c0f;
  --lr-lime-light:  #f7fee7;
  --lr-lime-glow:   rgba(101, 163, 13, 0.18);

  /* Status */
  --lr-status-live:    #16a34a;
  --lr-status-warning: #d97706;
  --lr-status-error:   #dc2626;

  /* Glass */
  --lr-glass-blur:      12px;
  --lr-glass-bg-blur:   rgba(255, 255, 255, 0.72);
  --lr-glass-bg-solid:  rgba(255, 255, 255, 0.92);
  --lr-glass-border:    rgba(255, 255, 255, 0.60);
  --lr-glass-highlight: rgba(255, 255, 255, 0.80);

  /* Radius */
  --lr-radius-sm: 10px;
  --lr-radius-md: 16px;
  --lr-radius-lg: 22px;
  --lr-radius-xl: 32px;

  /* Transitions */
  --lr-transition: 180ms cubic-bezier(0.16, 1, 0.3, 1);

  /* Typography */
  --lr-font-display: 'Geist', 'SF Pro Display', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --lr-font-body:    -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', sans-serif;

  /* Shadows — warm-tinted, not pure black */
  --lr-shadow-sm: 0 1px 3px rgba(120, 80, 40, 0.08), 0 1px 2px rgba(120, 80, 40, 0.05);
  --lr-shadow-md: 0 4px 12px rgba(120, 80, 40, 0.10), 0 2px 6px rgba(120, 80, 40, 0.06);
  --lr-shadow-lg: 0 12px 32px rgba(120, 80, 40, 0.12), 0 4px 12px rgba(120, 80, 40, 0.08);
}

/* ── Dark Mode — separately authored, not auto-inverted ── */
[data-theme="dark"] {
  --lr-bg:          #1c1917;
  --lr-surface-1:   #292524;
  --lr-surface-2:   #3c3836;
  --lr-surface-3:   #4e4845;

  --lr-text:        #fafaf9;
  --lr-text-muted:  #a8a29e;
  --lr-text-faint:  #78716c;

  --lr-lime-glow:   rgba(101, 163, 13, 0.24);

  /* Dark glass — higher opacity to stay visible against dark surfaces */
  --lr-glass-bg-blur:   rgba(28, 25, 23, 0.78);
  --lr-glass-bg-solid:  rgba(28, 25, 23, 0.88);
  --lr-glass-border:    rgba(255, 255, 255, 0.08);
  --lr-glass-highlight: rgba(255, 255, 255, 0.04);

  --lr-shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.30), 0 1px 2px rgba(0, 0, 0, 0.20);
  --lr-shadow-md: 0 4px 12px rgba(0, 0, 0, 0.36), 0 2px 6px rgba(0, 0, 0, 0.22);
  --lr-shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.42), 0 4px 12px rgba(0, 0, 0, 0.28);
}

/* ── Glass Utilities ── */

/* Floating surfaces only: dropdowns, modals, login card */
.glass-blur {
  background: var(--lr-glass-bg-blur);
  backdrop-filter: blur(12px) saturate(1.4);
  -webkit-backdrop-filter: blur(12px) saturate(1.4); /* hardcoded — Safari 18 doesn't resolve var() in -webkit- line */
  border: 1px solid var(--lr-glass-border);
  box-shadow: inset 0 1px 0 var(--lr-glass-highlight), var(--lr-shadow-md);
  will-change: transform;
  transform: translateZ(0);
  isolation: isolate;
}

/* Cards and panels — zero GPU cost */
.glass-solid {
  background: var(--lr-glass-bg-solid);
  border: 1px solid var(--lr-glass-border);
  box-shadow: inset 0 1px 0 var(--lr-glass-highlight), var(--lr-shadow-sm);
}

[data-theme="dark"] .glass-blur {
  background: var(--lr-glass-bg-blur);
  border-color: var(--lr-glass-border);
  box-shadow: inset 0 1px 0 var(--lr-glass-highlight), var(--lr-shadow-lg);
}

[data-theme="dark"] .glass-solid {
  background: var(--lr-glass-bg-solid);
  border-color: var(--lr-glass-border);
  box-shadow: inset 0 1px 0 var(--lr-glass-highlight), var(--lr-shadow-md);
}

/* ── Fallback Guards ── */

@supports not (backdrop-filter: blur(1px)) {
  .glass-blur { background: rgba(255, 255, 255, 0.96); }
  [data-theme="dark"] .glass-blur { background: rgba(28, 25, 23, 0.96); }
}

@media (prefers-reduced-transparency: reduce) {
  .glass-blur {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  [data-theme="dark"] .glass-blur {
    background: rgba(28, 25, 23, 0.96);
  }
}

/* ── Buttons ── */

.btn-primary,
.btn-secondary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.625rem 1.5rem;
  font-family: var(--lr-font-body);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.25;
  border-radius: var(--lr-radius-xl);
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--lr-lime);
  color: #fff;
  border: none;
}
.btn-primary:hover {
  background: var(--lr-lime-dark);
  box-shadow: var(--lr-shadow-md);
}
.btn-primary:active {
  background: var(--lr-lime-dark);
  box-shadow: none;
}

.btn-secondary {
  background: var(--lr-glass-bg-solid);
  color: var(--lr-text);
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-shadow: var(--lr-shadow-sm);
}
.btn-secondary:hover {
  background: rgba(101, 163, 13, 0.06);
  border-color: var(--lr-lime);
}

.btn-ghost {
  background: transparent;
  color: var(--lr-text);
  border: 1px solid rgba(0, 0, 0, 0.12);
}
.btn-ghost:hover {
  background: var(--lr-glass-bg-solid);
  border-color: rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 1px 0 var(--lr-glass-highlight), var(--lr-shadow-sm);
}

[data-theme="dark"] .btn-secondary {
  border-color: rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] .btn-secondary:hover {
  background: rgba(101, 163, 13, 0.10);
  border-color: var(--lr-lime);
}

[data-theme="dark"] .btn-ghost {
  border-color: rgba(255, 255, 255, 0.12);
}
[data-theme="dark"] .btn-ghost:hover {
  background: var(--lr-glass-bg-solid);
  border-color: rgba(255, 255, 255, 0.18);
}

/* ── Form Input ── */

.lr-input {
  display: block;
  width: 100%;
  background: var(--lr-glass-bg-solid);
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: var(--lr-radius-md);
  padding: 0.625rem 0.875rem;
  font-family: var(--lr-font-body);
  font-size: 0.875rem;
  color: var(--lr-text);
  outline: none;
}

.lr-input::placeholder {
  color: var(--lr-text-faint);
}

.lr-input:focus {
  outline: 2px solid var(--lr-lime);
  outline-offset: 0;
  box-shadow: 0 0 0 4px var(--lr-lime-glow);
  border-color: var(--lr-lime);
}

[data-theme="dark"] .lr-input {
  border-color: rgba(255, 255, 255, 0.10);
}

[data-theme="dark"] .lr-input:focus {
  border-color: var(--lr-lime);
}

/* ── Account Dropdown ── */

/* Trigger pill — glass-solid base with pill shape */
.lr-avatar-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  border-radius: var(--lr-radius-xl);
  background: var(--lr-glass-bg-solid);
  border: 1px solid var(--lr-glass-border);
  box-shadow: inset 0 1px 0 var(--lr-glass-highlight), var(--lr-shadow-sm);
  cursor: pointer;
}
.lr-avatar-pill:hover {
  border-color: rgba(101, 163, 13, 0.40);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: inset 0 1px 0 var(--lr-glass-highlight), var(--lr-shadow-md);
}

/* Initials circle — trigger size (36px) */
.lr-avatar-initials {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--lr-lime) 0%, #4ade80 100%);
  color: rgba(0, 0, 0, 0.75);
  font-size: 12px;
  font-weight: 700;
  font-family: var(--lr-font-body);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  user-select: none;
}

/* Large variant — panel header (40px) */
.lr-avatar-lg {
  width: 40px;
  height: 40px;
  font-size: 14px;
}

/* Chevron icon on trigger */
.lr-chevron {
  width: 14px;
  height: 14px;
  color: var(--lr-text-muted);
  flex-shrink: 0;
  transition: transform var(--lr-transition);
  display: block;
}

/* Chevron rotates 180deg when panel is open (:has scoped to wrapper) */
#accountDropdownWrap:has(#accountDropdownMenu:not(.hidden)) .lr-chevron {
  transform: rotate(180deg);
}

/* Dropdown panel — glass-blur floating surface */
/* display:block !important overrides Tailwind's .hidden — animation uses opacity/transform/visibility instead */
.lr-dropdown-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: 240px;
  border-radius: var(--lr-radius-lg);
  z-index: 50;
  overflow: hidden;
  transform-origin: top right;
  /* Collapsed state: invisible, removed from tab order and a11y tree */
  display: block !important;
  opacity: 0;
  visibility: hidden;
  transform: scale(0.95) translateY(-4px);
  pointer-events: none;
  /* visibility delayed until after opacity/transform finish on close */
  transition:
    opacity var(--lr-transition),
    transform var(--lr-transition),
    visibility 0s 180ms;
}
/* Open state: hidden class removed by toggleAccountDropdown() */
.lr-dropdown-panel:not(.hidden) {
  opacity: 1;
  visibility: visible;
  transform: scale(1) translateY(0);
  pointer-events: auto;
  /* visibility applies immediately on open */
  transition:
    opacity var(--lr-transition),
    transform var(--lr-transition),
    visibility 0s 0s;
}
/* Prevent Tailwind's hidden from setting display:none */
.lr-dropdown-panel.hidden {
  display: block !important;
}

/* Panel header */
.lr-dropdown-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 12px;
}
.lr-dropdown-header-text {
  min-width: 0;
  flex: 1;
}
.lr-dropdown-name {
  display: block;
  font-family: var(--lr-font-display);
  font-size: 14px;
  font-weight: 600;
  color: var(--lr-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lr-dropdown-email {
  font-size: 12px;
  color: var(--lr-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 2px 0 0;
}

/* Divider */
.lr-dropdown-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  margin: 2px 0;
}

/* Nav row (links and buttons) */
.lr-dropdown-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  font-family: var(--lr-font-body);
  font-size: 14px;
  font-weight: 400;
  color: var(--lr-text);
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  transition: background var(--lr-transition);
}
.lr-dropdown-row:hover {
  background: rgba(181, 242, 61, 0.08);
}
.lr-dropdown-row:hover .lr-dropdown-icon-wrap {
  background: rgba(101, 163, 13, 0.15);
  border-color: rgba(101, 163, 13, 0.20);
}

/* Icon circle — glass-solid micro surface */
.lr-dropdown-icon-wrap {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--lr-glass-bg-solid);
  border: 1px solid var(--lr-glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background var(--lr-transition), border-color var(--lr-transition);
}

/* Lucide icon inside circle */
.lr-dropdown-icon {
  width: 18px;
  height: 18px;
  color: var(--lr-text-muted);
  flex-shrink: 0;
  display: block;
}

/* Log Out row — error color treatment */
.lr-dropdown-row-danger {
  color: var(--lr-status-error);
}
.lr-dropdown-row-danger .lr-dropdown-icon {
  color: var(--lr-status-error);
}
.lr-dropdown-row-danger:hover {
  background: rgba(220, 38, 38, 0.08);
}
.lr-dropdown-row-danger:hover .lr-dropdown-icon-wrap {
  background: rgba(220, 38, 38, 0.10);
  border-color: rgba(220, 38, 38, 0.16);
}

/* ── Dark mode overrides ── */
[data-theme="dark"] .lr-avatar-pill {
  border-color: var(--lr-glass-border);
}
[data-theme="dark"] .lr-avatar-pill:hover {
  background: rgba(41, 37, 36, 0.98);
  border-color: rgba(101, 163, 13, 0.40);
}
[data-theme="dark"] .lr-dropdown-divider {
  background: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .lr-dropdown-row:hover {
  background: rgba(101, 163, 13, 0.10);
}
[data-theme="dark"] .lr-dropdown-row-danger:hover {
  background: rgba(220, 38, 38, 0.12);
}

/* ── D3 — Dashboard ── */

/* Page background — radial gradient wash over base */
.lr-page-bg {
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%,   rgba(181, 242, 61, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%,  rgba(101, 163, 13, 0.07) 0%, transparent 55%),
    var(--lr-bg);
  min-height: 100vh;
}
[data-theme="dark"] .lr-page-bg {
  background:
    radial-gradient(ellipse 80% 50% at 20% 0%,   rgba(181, 242, 61, 0.07) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 100%,  rgba(101, 163, 13, 0.05) 0%, transparent 55%),
    var(--lr-bg);
}

/* Sticky header — glass-solid base, gains blur on scroll */
.lr-dashboard-header {
  background: var(--lr-glass-bg-solid);
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: inset 0 1px 0 var(--lr-glass-highlight);
  position: sticky;
  top: 0;
  z-index: 40;
  transition: background var(--lr-transition), backdrop-filter var(--lr-transition);
}
.lr-dashboard-header.lr-header-scrolled {
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  backdrop-filter: blur(var(--lr-glass-blur)) saturate(180%);
  background: rgba(245, 245, 247, 0.80) !important;
}
[data-theme="dark"] .lr-dashboard-header {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] .lr-dashboard-header.lr-header-scrolled {
  background: rgba(10, 10, 15, 0.85) !important;
}

/* Card — glass-solid with lg radius */
.lr-dashboard-card {
  background: var(--lr-glass-bg-solid);
  border: 1px solid var(--lr-glass-border);
  box-shadow: inset 0 1px 0 var(--lr-glass-highlight), var(--lr-shadow-sm);
  border-radius: var(--lr-radius-lg);
}
[data-theme="dark"] .lr-dashboard-card {
  background: var(--lr-glass-bg-solid);
  border-color: var(--lr-glass-border);
}

/* Banner — glass-solid with md radius; modifier classes supply the colored ring */
.lr-dashboard-banner {
  background: var(--lr-glass-bg-solid);
  border: 1px solid var(--lr-glass-border);
  box-shadow: inset 0 1px 0 var(--lr-glass-highlight), var(--lr-shadow-sm);
  border-radius: var(--lr-radius-md);
}
[data-theme="dark"] .lr-dashboard-banner {
  background: var(--lr-glass-bg-solid);
  border-color: var(--lr-glass-border);
}

/* Banner color modifiers — override box-shadow with status ring + glow */
.lr-banner-trial {
  box-shadow:
    inset 0 0 0 1px rgba(181, 242, 61, 0.40),
    0 4px 16px rgba(181, 242, 61, 0.08);
}
.lr-banner-expired {
  box-shadow:
    inset 0 0 0 1px rgba(255, 69, 58, 0.30),
    0 4px 16px rgba(255, 69, 58, 0.06);
}
.lr-banner-past-due {
  box-shadow:
    inset 0 0 0 1px rgba(255, 159, 10, 0.30),
    0 4px 16px rgba(255, 159, 10, 0.06);
}

/* Checklist rows — hover tint only; buttons inside are JS-owned */
.lr-checklist-row {
  border-radius: var(--lr-radius-sm);
  transition: background var(--lr-transition);
}
.lr-checklist-row:hover {
  background: rgba(181, 242, 61, 0.05);
}

/* ── D18 — Dashboard Layout ── */
.lr-dashboard-shell {
  width: 100%;
  max-width: 90rem;
  margin: 0 auto;
}

.lr-dashboard-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.lr-dashboard-back {
  display: inline-flex;
  margin-bottom: 0.75rem;
  color: var(--lr-text-muted);
  font-size: 0.875rem;
  font-weight: 500;
  transition: color var(--lr-transition);
}
.lr-dashboard-back:hover {
  color: var(--lr-lime);
}

.lr-dashboard-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  padding: 0.375rem 0.75rem;
  border: 1px solid rgba(181, 242, 61, 0.30);
  border-radius: var(--lr-radius-full, 9999px);
  background: rgba(181, 242, 61, 0.08);
  color: var(--lr-lime-dark);
  font-size: 0.875rem;
  font-weight: 600;
}

.lr-dashboard-title {
  margin: 0;
  font-family: var(--lr-font-display);
  font-size: clamp(2rem, 4vw, 3.25rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--lr-text);
}

.lr-dashboard-subtitle {
  max-width: 52ch;
  margin: 0.75rem 0 0;
  color: var(--lr-text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.lr-dashboard-hero-actions {
  display: flex;
  flex-wrap: wrap;
  flex-shrink: 0;
  gap: 0.75rem;
  padding-top: 0.25rem;
}

.lr-dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 22rem;
  gap: 2rem;
  align-items: start;
}

.lr-dashboard-primary,
.lr-dashboard-aside {
  min-width: 0;
}

.lr-dashboard-aside {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  position: sticky;
  top: 5rem;
}

.lr-site-card {
  overflow: hidden;
}

.lr-site-card-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
}

.lr-site-name {
  margin: 0;
  font-family: var(--lr-font-display);
  font-size: clamp(1.375rem, 2.5vw, 1.75rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--lr-text);
}

.lr-site-paused-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.3125rem 0.625rem;
  border-radius: var(--lr-radius-full, 9999px);
  background: rgba(255, 69, 58, 0.10);
  color: var(--lr-status-error);
  font-size: 0.75rem;
  font-weight: 700;
}
.lr-site-paused-pill::before {
  content: "!";
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 0.875rem;
  height: 0.875rem;
  border: 1px solid currentColor;
  border-radius: 9999px;
  font-size: 0.625rem;
  line-height: 1;
}

.lr-site-card-actions {
  display: flex;
  flex-shrink: 0;
  gap: 0.75rem;
}

.lr-preview-card {
  padding: 1.25rem;
  border-radius: var(--lr-radius-xl);
  background: #1c1917;
  color: #fafaf9;
  box-shadow: var(--lr-shadow-lg);
}

.lr-preview-card-head {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: rgba(250, 250, 249, 0.70);
}

.lr-live-dot {
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 9999px;
  background: var(--lr-lime);
}

.lr-preview-frame-shell {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--lr-radius-lg);
  background: #fafaf9;
}

.lr-preview-frame-shell iframe {
  display: block;
  width: 100%;
  height: 22rem;
  border: 0;
  background: #fafaf9;
}

.lr-preview-empty {
  display: flex;
  height: 22rem;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: rgba(250, 250, 249, 0.40);
  text-align: center;
  font-size: 0.8125rem;
}

.lr-preview-edit {
  width: 100%;
  margin-top: 0.875rem;
}

.lr-quick-actions-title {
  margin: 0 0 0.875rem;
  font-family: var(--lr-font-display);
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--lr-text);
}

.lr-quick-actions-list {
  display: flex;
  flex-direction: column;
}

.lr-quick-action {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
  border-top: 0;
  border-right: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  border-left: 0;
  background: transparent;
  color: var(--lr-text);
  font: inherit;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--lr-transition);
}
.lr-quick-action:last-child {
  border-bottom: 0;
}
.lr-quick-action:hover,
.lr-quick-action:focus-visible {
  color: var(--lr-lime);
  outline: none;
}
.lr-quick-action strong,
.lr-quick-action small {
  display: block;
}
.lr-quick-action strong {
  font-size: 0.875rem;
  font-weight: 600;
}
.lr-quick-action small {
  margin-top: 0.125rem;
  color: var(--lr-text-muted);
  font-size: 0.8125rem;
  font-weight: 400;
}

[data-theme="dark"] .lr-dashboard-eyebrow {
  background: rgba(181, 242, 61, 0.06);
  color: var(--lr-lime);
}
[data-theme="dark"] .lr-quick-action {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

@media (max-width: 900px) {
  .lr-dashboard-layout {
    grid-template-columns: 1fr;
  }
  .lr-dashboard-aside {
    position: static;
  }
}

@media (max-width: 640px) {
  .lr-dashboard-hero {
    flex-direction: column;
    gap: 1.25rem;
  }
  .lr-dashboard-hero-actions {
    width: 100%;
  }
  .lr-dashboard-hero-actions .btn-primary,
  .lr-dashboard-hero-actions .btn-ghost {
    flex: 1;
    justify-content: center;
  }
  .lr-site-card-main {
    flex-direction: column;
    gap: 1rem;
  }
  .lr-site-card-actions {
    width: 100%;
  }
  .lr-site-card-actions .btn-primary,
  .lr-site-card-actions .btn-ghost {
    flex: 1;
    justify-content: center;
  }
  .lr-checklist-row {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start !important;
  }
  .lr-checklist-row button {
    grid-column: 2;
    justify-self: start;
    margin-top: 0.5rem;
  }
  #reviewsForm > .flex {
    flex-direction: column;
  }
  #connectReviewsBtn {
    width: 100%;
  }
  .lr-preview-frame-shell iframe,
  .lr-preview-empty {
    height: 16rem;
  }
}

/* ── D4 — Profile ── */

.lr-form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}
.lr-form-group:last-child {
  margin-bottom: 0;
}

.lr-form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--lr-text-muted);
}

.lr-profile-avatar-wrap {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
  margin-bottom: -28px;
}

.lr-avatar-xl {
  width: 3.5rem;
  height: 3.5rem;
  font-size: 1.25rem;
}

.lr-profile-display-name {
  font-family: var(--lr-font-display);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--lr-text);
  text-align: center;
  padding-top: 1.5rem;
  margin-bottom: 1.5rem;
}

/* ── D5 — Billing ── */

.lr-btn-danger {
  color: var(--lr-status-error);
  border-color: var(--lr-status-error);
}
.lr-btn-danger:hover {
  background: rgba(255, 69, 58, 0.08);
  border-color: var(--lr-status-error);
}

/* ── D6 — Settings ── */

.lr-setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.875rem 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}
.lr-setting-row:last-child {
  border-bottom: none;
}
[data-theme="dark"] .lr-setting-row {
  border-bottom-color: rgba(255, 255, 255, 0.06);
}

/* ── D7 — Login ── */
.lr-login-bg {
  background:
    radial-gradient(ellipse 70% 60% at 15% 20%, rgba(181,242,61,0.12) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 80%, rgba(74,222,128,0.08) 0%, transparent 55%),
    var(--lr-bg);
  display: flex;
  align-items: center;
  justify-content: center;
}

[data-theme="dark"] .lr-login-bg {
  background:
    radial-gradient(ellipse 70% 60% at 15% 20%, rgba(181,242,61,0.07) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 80%, rgba(74,222,128,0.05) 0%, transparent 55%),
    var(--lr-bg);
}

.lr-login-card {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem;
  border-radius: var(--lr-radius-xl);
}

.lr-field-error {
  font-size: 0.875rem;
  color: var(--lr-status-error);
}

/* ── D8 — Editor ── */
.lr-header-border {
  border-bottom: 1px solid rgba(0,0,0,0.06);
}
[data-theme="dark"] .lr-header-border {
  border-bottom-color: rgba(255,255,255,0.06);
}

.lr-editor-header {
  position: sticky;
  top: 0;
  z-index: 50;
  transition: background var(--lr-transition), backdrop-filter var(--lr-transition);
}
.lr-editor-header.lr-header-scrolled {
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  backdrop-filter: blur(var(--lr-glass-blur)) saturate(180%);
  background: rgba(245,245,247,0.80) !important;
}
[data-theme="dark"] .lr-editor-header.lr-header-scrolled {
  background: rgba(10,10,15,0.85) !important;
}

.lr-edit-panel-border {
  border-left: 0;
}
@media (min-width: 1024px) {
  .lr-edit-panel-border {
    border-left: 1px solid rgba(0,0,0,0.06);
  }
  [data-theme="dark"] .lr-edit-panel-border {
    border-left-color: rgba(255,255,255,0.06);
  }
}

.lr-editor-site-name {
  font-family: var(--lr-font-display);
  font-weight: 500;
}

/* ── D9 — Account Pages ── */
.lr-account-header {
  position: sticky;
  top: 0;
  z-index: 50;
}

.lr-page-title {
  font-family: var(--lr-font-display);
  font-weight: 600;
}

/* ── D10 — Build Page ── */
.lr-build-body {
  background: var(--lr-bg);
}

.lr-build-bg {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 60% at 15% 20%, rgba(181,242,61,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 80%, rgba(74,222,128,0.05) 0%, transparent 55%),
    var(--lr-bg);
}
[data-theme="dark"] .lr-build-bg {
  background:
    radial-gradient(ellipse 70% 60% at 15% 20%, rgba(181,242,61,0.04) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 85% 80%, rgba(74,222,128,0.03) 0%, transparent 55%),
    var(--lr-bg);
}

/* ── D11 — Snackbar ── */
#snackbar {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  min-width: 240px;
  max-width: min(480px, calc(100vw - 2rem));
  padding: 0.75rem 1.25rem;
  border-radius: var(--lr-radius-lg);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.4;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--lr-text);
  color: var(--lr-bg);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  transition: opacity var(--lr-transition), transform var(--lr-transition);
  white-space: normal;
  pointer-events: auto;
}
[data-theme="dark"] #snackbar {
  background: var(--lr-surface-3);
  color: var(--lr-text);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
#snackbar.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(0.5rem);
}
#snackbar a {
  margin-left: auto;
  padding-left: 0.75rem;
  color: var(--lr-lime);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
}
#snackbar a:hover {
  opacity: 0.8;
}

/* ── D13 — Interactive States ── */
.btn-primary:focus-visible {
  outline: 2px solid var(--lr-lime);
  outline-offset: 3px;
}
.btn-primary:active {
  opacity: 0.85;
}
.btn-primary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-secondary:focus-visible {
  outline: 2px solid var(--lr-lime);
  outline-offset: 3px;
}
.btn-secondary:active {
  opacity: 0.85;
}
.btn-secondary:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.btn-ghost:focus-visible {
  outline: 2px solid var(--lr-lime);
  outline-offset: 3px;
}
.btn-ghost:active {
  opacity: 0.85;
}
.btn-ghost:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.lr-input:focus-visible {
  outline: 2px solid var(--lr-lime);
  outline-offset: 0;
  border-color: var(--lr-lime);
  box-shadow: 0 0 0 3px var(--lr-lime-glow);
}
.lr-input:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: var(--lr-surface-2);
}
.lr-avatar-pill:focus-visible {
  outline: 2px solid var(--lr-lime);
  outline-offset: 3px;
}
.lr-dropdown-row:focus-visible {
  outline: none;
  background: rgba(181,242,61,0.08);
}
.lr-dropdown-row:active {
  background: rgba(181,242,61,0.14);
}
#snackbar a:focus-visible {
  outline: 2px solid var(--lr-lime);
  outline-offset: 2px;
  border-radius: 2px;
}
#snackbar a:active {
  opacity: 0.65;
}

/* ── D14 — Transitions ── */
.btn-primary,
.btn-secondary,
.btn-ghost {
  transition:
    background var(--lr-transition),
    border-color var(--lr-transition),
    box-shadow var(--lr-transition),
    color var(--lr-transition),
    opacity var(--lr-transition),
    outline-color var(--lr-transition);
}
.lr-input {
  transition:
    border-color var(--lr-transition),
    box-shadow var(--lr-transition),
    background var(--lr-transition),
    opacity var(--lr-transition);
}
.lr-avatar-pill {
  transition:
    border-color var(--lr-transition),
    background var(--lr-transition),
    box-shadow var(--lr-transition),
    outline-color var(--lr-transition);
}
#snackbar a {
  transition:
    opacity var(--lr-transition),
    outline-color var(--lr-transition);
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}

/* ── D15 — Mobile ── */
@media (max-width: 640px) {
  .btn-primary,
  .btn-secondary,
  .btn-ghost,
  .lr-avatar-pill {
    min-height: 44px;
  }
  .lr-login-card {
    padding: 1.5rem;
  }
}
