/* Electric Harbor Command Deck — presentation only; no billing or site-state changes. */
.authenticated {
  color-scheme: dark;
  --navy: #f2f7ff;
  --sea: #18cbef;
  --action: #ff873c;
  --aqua: #1ce0ea;
  --mist: #0a182b;
  --ink: #e8f3ff;
  --muted: #acc0d6;
  --line: #294967;
  --white: #10243b;
  color: #e8f3ff;
  background: #071527;
}
.authenticated .app-header {
  width: 270px;
  background: linear-gradient(180deg, #071426 2%, #0a1f38 72%, #071426 100%);
  border-right: 1px solid #1d3c59;
}
.authenticated { padding-left: 270px; }
.authenticated .header-inner { padding: 1.25rem 1rem 1rem; gap: 1.25rem; }
.authenticated .brand { padding: .35rem .2rem; background: transparent; }
.authenticated .brand-logo { width: min(100%, 224px); height: auto; }
.authenticated #account-nav { gap: .35rem; }
.authenticated #account-nav .nav-link { position: relative; padding: .76rem .85rem; font-size: .94rem; color: #e0edfa; }
.authenticated #account-nav .nav-link[aria-current='page'] { box-shadow: inset 4px 0 #19d5f0; background: linear-gradient(90deg,#104366,#153456); }
.authenticated #account-nav .nav-link:hover { background: #173c5b; }
.authenticated #account-nav .account-name { color: #acc5df; border-top-color: #30516a; }
.authenticated #account-nav .quiet { color: #ebf4fe; }
.authenticated .app-footer { color: #8daec8; }
.authenticated #main { width: 100%; max-width: 1800px; padding: 1.65rem 1.45rem 1.5rem; }
.authenticated #main:not(:has(.command-deck)) { padding-top: 2rem; }
.authenticated h1, .authenticated h2, .authenticated h3, .authenticated .site-card h2 a { color: #f6f9ff; }
.authenticated a { color: #4adbf3; }
.authenticated .muted, .authenticated .intro, .authenticated .hint { color: #a9bfd7; }
.authenticated .panel, .authenticated .design-info { background: #10243b; color: #e9f2fc; border-color: #2a4c6e; box-shadow: none; }
.authenticated .panel { border-radius: 12px; }
.authenticated .button, .authenticated .button:not(.secondary):not(.quiet):not(.danger) { background: #ff873c; color: #101b2c; border: 1px solid #ff873c; font-weight: 750; }
.authenticated .button:hover:not(:disabled):not(.secondary):not(.quiet):not(.danger) { background: #ffab69; border-color: #ffab69; color: #081426; }
.authenticated .button.secondary { background: #10243b; color: #e7f5ff; border: 1px solid #527392; }
.authenticated .button.secondary:hover:not(:disabled) { background: #1e3b59; color: white; }
.authenticated .button.quiet { color: #d5e9fb; background: transparent; border-color: transparent; }
.authenticated .button:disabled { cursor: not-allowed; opacity: .65; }
.authenticated .badge { background: #24415e; color: #b0e4ff; }
.authenticated .badge.ready { background: #105344; color: #92efc9; }
.authenticated .badge.error { background: #593027; color: #ffc5aa; }
.authenticated .notice { color: #d6ecff; background: #17364e; border-color: #416586; }
.authenticated .notice.error { color: #ffd6c5; background: #482d2b; border-color: #96574b; }
.authenticated .notice.success { color: #b6f7d9; background: #164337; border-color: #36856e; }
.authenticated .field label, .authenticated .field-label { color: #ebf4ff; }
.authenticated input:not([type='radio']):not([type='checkbox']) { color: #e9f5ff; background: #0b1a2d; border-color: #52708e; }
.authenticated input:not([type='radio']):not([type='checkbox']):focus { border-color: #1bd9f4; }
.authenticated input:disabled { background: #213347; }
.authenticated .account-tabs a { color: #abc2d8; }
.authenticated .account-tabs a[aria-current='page'] { color: #4bdcf4; border-color: #16cdec; }
.authenticated .design-card, .authenticated .theme-grid .design-card { border-color: #294f6a; }
.authenticated .theme-grid .design-card.is-selected { border-color: #25d7ed; }
.authenticated .theme-grid .design-preview { background: #192b42; }
.authenticated .address-preview { background: #142d47; }
.authenticated .address-preview output { color: #d8eeff; }
.authenticated .design-choice { color: #e8f3ff; }
.authenticated .design-info p { color: #aec2d8; }
.authenticated .billing-status { padding: 1.7rem; }
.authenticated .billing-status > .badge { margin-bottom: .8rem; }
.authenticated .site-facts dt { color: #abc2d8; }
.authenticated .empty-state { background: linear-gradient(125deg,#0c263e,#10283d); }
.authenticated :focus-visible { outline: 3px solid #4de3f7; outline-offset: 3px; }

/* Dashboard artwork uses source-controlled Electric Harbor assets. */
.command-deck { display: grid; gap: 1rem; }
.deck-hero {
  min-height: 176px;
  display: flex; align-items: center;
  padding: 1.05rem clamp(1.15rem, 2.3vw, 2rem);
  border-radius: 18px;
  border: 1px solid #12669a;
  background: linear-gradient(90deg, rgba(3,16,34,.97) 0%,rgba(3,16,34,.93) 33%,rgba(3,16,34,.4) 68%,rgba(3,16,34,.15) 100%), url('/electric-harbor/electric-lighthouse-directing.webp') center right/auto 100% no-repeat, #05172c;
  overflow: hidden;
}
.deck-hero-copy { max-width: 650px; }
.command-deck .deck-eyebrow { font-size: .72rem; letter-spacing: .14em; color: #2cdbf3; font-weight: 800; margin: 0 0 .25rem; }
.command-deck .deck-hero h1 { font-size: clamp(2rem, 3.1vw, 3rem); line-height: 1.05; letter-spacing: -.045em; color: #fff; margin: 0 0 .35rem; }
.command-deck .deck-subtitle { font-size: .99rem; color: #d1e3f4; margin: 0 0 .85rem; }
.command-deck .deck-primary { padding: .55rem 1.2rem; min-height: 2.6rem; }
.deck-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .75rem; }
.deck-stats:has(.deck-stat-attention) { grid-template-columns: repeat(4,minmax(0,1fr)); }
.deck-stat { display: flex; align-items: center; gap: 1rem; min-width: 0; border: 1px solid #1674a2; padding: .85rem 1.1rem; border-radius: 13px; background: #0e233b; }
.deck-stat-ready { border-color: #118d80; }
.deck-stat-setup { border-color: #d08029; }
.deck-stat-attention { border-color: #b95045; }
.deck-stat-icon { flex-shrink: 0; width: 2.1rem; font-size: 2rem; font-weight: 600; color: #1ddcf1; text-align: center; line-height: 1; }
.deck-stat-ready .deck-stat-icon { color: #34e0af; }
.deck-stat-setup .deck-stat-icon { color: #f99a40; }
.deck-stat-attention .deck-stat-icon { color: #fca88d; }
.deck-stat-copy { min-width: 0; display: grid; grid-template-columns: auto 1fr; gap: 0 .65rem; align-items: baseline; }
.deck-stat-value { grid-row: 1 / 3; color: #fff; font-size: clamp(1.7rem,2.3vw,2.2rem); line-height: 1.05; }
.deck-stat-label { color: #f0f7ff; font-size: .91rem; }
.deck-stat-caption { color: #a1bed3; font-size: .74rem; }
.deck-columns { display: grid; grid-template-columns: minmax(0,1fr) minmax(245px,300px); gap: 1rem; align-items: start; }
.deck-sites-section { min-width: 0; }
.deck-section-heading { display: flex; justify-content: space-between; align-items: center; gap: .6rem; min-height: 3rem; margin-bottom: .55rem; }
.command-deck .deck-section-heading h2 { color: #f6fbff; font-size: 1.55rem; margin: 0; }
.deck-view-controls { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.deck-view-button { background: #0d223a; color: #c7e5f4; border: 1px solid #397596; padding: .43rem .65rem; border-radius: 7px; font-size: .82rem; font-weight: 700; }
.deck-view-button[aria-pressed='true'] { background: #124f6c; border-color: #21cce8; color: white; }
.deck-view-all { margin-left: .6rem; text-decoration: none; font-size: .82rem; font-weight: 700; white-space: nowrap; }
.deck-site-list { display: grid; gap: .65rem; }
.deck-site { display: flex; gap: .9rem; align-items: center; flex-wrap: wrap; min-width: 0; border: 1px solid #2f628a; background: #0e233b; border-radius: 13px; padding: .65rem; }
.deck-site:hover { border-color: #398eb6; background: #122b47; }
.deck-preview { flex: 0 0 136px; width: 136px; height: 78px; border: 1px solid #294967; background: #081a31; border-radius: 9px; overflow: hidden; display: grid; place-items: center; }
.deck-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.deck-preview-placeholder { font-size: 2.5rem; color: #20d7ed; }
.deck-site-info { flex: 1 1 130px; min-width: 0; }
.command-deck .deck-site h3 { margin: 0 0 .25rem; font-size: .96rem; color: #f5f9ff; }
.command-deck .deck-site-url { font-size: .74rem; color: #afc7db; margin: 0; overflow-wrap: anywhere; }
.deck-site > .badge { margin-left: auto; white-space: nowrap; }
.deck-site .actions { display: flex; gap: .45rem; margin: 0; }
.deck-site .actions .button { font-size: .77rem; padding: .55rem .7rem; min-height: 2.55rem; white-space: nowrap; }
.deck-site .deck-site-note { flex-basis: 100%; color: #ffbca6; font-size: .78rem; margin: 0; padding-inline: .6rem; }
.deck-site-list.is-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.deck-site-list.is-grid .deck-site { align-items: start; }
.deck-site-list.is-grid .deck-preview { width: 100%; height: auto; aspect-ratio: 16 / 8; flex-basis: 100%; }
.deck-site-list.is-grid .deck-site-info { flex-basis: 100%; }
.deck-site-list.is-grid .deck-site > .badge { margin-left: 0; }
.deck-site-list.is-grid .actions { width: 100%; }
.deck-aside { display: grid; gap: 1rem; padding-top: 3.55rem; }
.deck-side-card { position: relative; padding: 1.15rem; background: #10243c; border: 1px solid #2a6390; border-radius: 13px; overflow: hidden; }
.command-deck .deck-side-card h2 { font-size: 1.13rem; color: #f5faff; margin: 0 0 .65rem; }
.command-deck .deck-side-card h3 { font-size: 1.14rem; color: #eff8ff; margin: 0 0 .6rem; }
.deck-plan-tag { position: absolute; right: 1rem; top: 1rem; background: #24c9dc; color: #071628; border-radius: 7px; font-size: .74rem; font-weight: 800; padding: .2rem .65rem; }
.command-deck .deck-plan-detail, .command-deck .deck-plan-usage, .command-deck .deck-plan-loading { font-size: .9rem; color: #c1d6eb; }
.command-deck .deck-plan-benefits { padding-top: .7rem; border-top: 1px solid #285372; color: #99e5d5; font-size: .84rem; line-height: 1.8; }
.command-deck .deck-upgrade { display: block; width: 100%; margin-bottom: .65rem; }
.command-deck .deck-billing-link { font-size: .85rem; }
.deck-support { min-height: 180px; background: linear-gradient(90deg,#10243c 0%,#10243cdb 55%,#10243c35 100%),url('/electric-harbor/rescue-buoy.webp') right bottom/150px auto no-repeat,#10243c; }
.command-deck .deck-support p { max-width: 175px; font-size: .85rem; color: #b3cee4; }
.command-deck .deck-support-link { color: #39dfee; font-weight: 700; font-size: .88rem; }
.command-deck .managed-hosting-note { margin: .3rem 0 0; font-size: .8rem; color: #89aeca; }

@media (max-width: 1350px) {
  .deck-columns { grid-template-columns: minmax(0,1fr) 250px; }
  .deck-site > .badge { margin-left: 0; }
  .deck-site .actions { flex-basis: 100%; justify-content: flex-end; }
}
@media (max-width: 1100px) {
  .authenticated { padding-left: 226px; }
  .authenticated .app-header { width: 226px; }
  .authenticated #main { padding-inline: 1.1rem; }
  .deck-columns { grid-template-columns: minmax(0,1fr); }
  .deck-aside { grid-template-columns: repeat(2,minmax(0,1fr)); padding-top: 0; }
  .deck-stats:has(.deck-stat-attention) { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 800px) {
  .authenticated { padding-left: 0; }
  .authenticated .app-header { width: 100%; }
  .authenticated .brand-logo { width: 172px; }
  .authenticated #main { padding: 1rem; }
  .deck-hero { min-height: 156px; background-position: right center; }
  .deck-stats { gap: .55rem; }
  .deck-stat { padding: .75rem; gap: .5rem; }
  .deck-stat-copy { display: block; }
  .deck-stat-value, .deck-stat-label, .deck-stat-caption { display: block; }
  .deck-stat-value { font-size: 1.65rem; }
  .deck-stat-icon { font-size: 1.6rem; width: 1.5rem; }
  .deck-aside { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 600px) {
  .deck-hero { min-height: 150px; background-image: linear-gradient(90deg,rgba(4,17,35,.95),rgba(4,17,35,.72)),url('/electric-harbor/electric-lighthouse-directing.webp'); }
  .command-deck .deck-hero h1 { font-size: 2rem; }
  .deck-stats { grid-template-columns: 1fr; }
  .deck-stats:has(.deck-stat-attention) { grid-template-columns: 1fr; }
  .deck-stat-copy { display: grid; grid-template-columns: auto 1fr; }
  .deck-stat-value { grid-row: 1 / 3; }
  .deck-section-heading { flex-wrap: wrap; }
  .deck-site .deck-preview { flex-basis: 95px; width: 95px; height: 65px; }
  .deck-site .actions { justify-content: flex-start; }
  .deck-aside { grid-template-columns: 1fr; }
  .deck-site-list.is-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .command-deck * { scroll-behavior: auto; }
}

/* The white/cyan wordmark must remain readable on signed-out account pages. */
body:not(.authenticated) .app-header { background: #071426; border-bottom-color: #24465f; }
body:not(.authenticated) .app-header .brand-logo { height: auto; width: min(220px, 60vw); }
body:not(.authenticated) .app-header .nav-link { color: #cbebff; }
body:not(.authenticated) .app-header .button.secondary { background: #112a44; color: #f2f7ff; border-color: #567993; }


/* Command Deck responsive refinement v1 (mobile screenshot review). */
/* Keep the real plan/website/status data untouched. */
@media (max-width: 600px) {
  /* Keep the lighthouse visible, but place the text on a reliably dark surface. */
  .authenticated .command-deck .deck-hero {
    background-image:
      linear-gradient(90deg, rgba(3,16,34,.99) 0%, rgba(3,16,34,.93) 53%, rgba(3,16,34,.63) 100%),
      url('/electric-harbor/electric-lighthouse-directing.webp');
  }
  .authenticated .command-deck .deck-hero-copy { max-width: 100%; }
  .authenticated .command-deck .deck-hero h1,
  .authenticated .command-deck .deck-subtitle { text-shadow: 0 1px 3px #041021; }

  /* Four tall stats become two compact rows on normal phone widths. */
  .authenticated .command-deck .deck-stats,
  .authenticated .command-deck .deck-stats:has(.deck-stat-attention) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .authenticated .command-deck .deck-stat {
    gap: .4rem;
    padding: .7rem .55rem;
    min-height: 94px;
    align-items: flex-start;
  }
  .authenticated .command-deck .deck-stat-icon {
    font-size: 1.25rem;
    width: 1.1rem;
    margin-top: .15rem;
  }
  .authenticated .command-deck .deck-stat-copy {
    display: flex;
    flex-direction: column;
    gap: .12rem;
    min-width: 0;
  }
  .authenticated .command-deck .deck-stat-value { font-size: 1.6rem; line-height: 1.03; }
  .authenticated .command-deck .deck-stat-label { font-size: .8rem; line-height: 1.2; }
  .authenticated .command-deck .deck-stat-caption { font-size: .69rem; line-height: 1.25; }

  /* Give Edit, View and Manage evenly sized touch targets on a phone. */
  .authenticated .command-deck .deck-site .actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    flex-basis: 100%;
    gap: .35rem;
  }
  .authenticated .command-deck .deck-site .actions .button {
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 44px;
    padding: .45rem .2rem;
    font-size: .7rem;
    line-height: 1.2;
    white-space: normal;
  }
  .authenticated .command-deck .deck-site .actions:has(> :only-child) {
    grid-template-columns: minmax(0, 1fr);
    max-width: 160px;
  }
  .authenticated .command-deck .deck-site .actions:has(> :nth-child(2):last-child) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 260px;
  }
  /* Grid mode is intentionally a larger image-first card, not tiny three-column links. */
  .authenticated .command-deck .deck-site-list.is-grid .deck-site .actions {
    display: flex;
    flex-wrap: wrap;
    max-width: none;
  }
}
/* Very narrow phones retain readable single-column summary cards. */
@media (max-width: 359px) {
  .authenticated .command-deck .deck-stats,
  .authenticated .command-deck .deck-stats:has(.deck-stat-attention) {
    grid-template-columns: minmax(0, 1fr);
  }
  .authenticated .command-deck .deck-stat {
    min-height: 0;
    align-items: center;
  }
}

/* Command Deck desktop refinement v1: appearance only, no account or website logic. */
@media (min-width: 801px) {
  /* Add matching outline icons to the existing navigation links. */
  .authenticated #account-nav .nav-link {
    display: flex;
    align-items: center;
    gap: .85rem;
    min-height: 3rem;
    font-size: .91rem;
    font-weight: 700;
    letter-spacing: -.01em;
  }
  .authenticated #account-nav .nav-link::before {
    content: '';
    flex: 0 0 21px;
    width: 21px;
    height: 21px;
    background-color: #bed4e7;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
  }
  .authenticated #account-nav .nav-link[aria-current='page']::before {
    background-color: #37def2;
  }
  .authenticated #account-nav a[href='/dashboard']::before { -webkit-mask-image: url('/command-icons/dashboard.svg'); mask-image: url('/command-icons/dashboard.svg'); }
  .authenticated #account-nav a[href='/websites']::before { -webkit-mask-image: url('/command-icons/websites.svg'); mask-image: url('/command-icons/websites.svg'); }
  .authenticated #account-nav a[href='/new-site']::before { -webkit-mask-image: url('/command-icons/create-website.svg'); mask-image: url('/command-icons/create-website.svg'); }
  .authenticated #account-nav a[href='/billing']::before { -webkit-mask-image: url('/command-icons/billing.svg'); mask-image: url('/command-icons/billing.svg'); }
  .authenticated #account-nav a[href='/account']::before { -webkit-mask-image: url('/command-icons/account.svg'); mask-image: url('/command-icons/account.svg'); }
  .authenticated #account-nav a[href='https://getdashharbor.com/contact/']::before { -webkit-mask-image: url('/command-icons/support.svg'); mask-image: url('/command-icons/support.svg'); }

  /* Existing CSS puts account controls at the foot of the navigation. Insert
     a decorative crab and slogan directly above them, without moving DOM links. */
  .authenticated #account-nav::before {
    content: '';
    display: block;
    order: 1;
    flex: 0 0 160px;
    width: 100%;
    margin-top: auto;
    background:
      linear-gradient(0deg, #071426 0%, transparent 24%),
      url('/electric-harbor/maintenance-crab.webp') center bottom / contain no-repeat;
  }
  .authenticated #account-nav::after {
    content: 'Your EmDash website, looked after.';
    display: block;
    order: 2;
    padding: .25rem .8rem 1rem;
    color: #f5f9ff;
    font-size: .96rem;
    font-weight: 800;
    line-height: 1.3;
    letter-spacing: -.02em;
  }
  .authenticated #account-nav .account-name {
    order: 3;
    margin-top: 0;
  }
  .authenticated #account-nav .quiet { order: 4; }
}
@media (min-width: 801px) and (max-height: 810px) {
  /* A shorter screen must never lose navigation links or Sign out to artwork. */
  .authenticated #account-nav::before { flex-basis: 78px; }
  .authenticated #account-nav::after { font-size: .8rem; padding-bottom: .5rem; }
  .authenticated .header-inner { gap: .6rem; padding-top: .8rem; padding-bottom: .8rem; }
  .authenticated #account-nav .nav-link { min-height: 2.45rem; }
}
@media (min-width: 801px) and (max-height: 600px) {
  .authenticated #account-nav::before, .authenticated #account-nav::after { display: none; }
  .authenticated .app-header { overflow-y: auto; }
  .authenticated #account-nav .account-name { margin-top: auto; }
}
@media (max-width: 800px) {
  /* The phone menu stays functional and artwork-free. */
  .authenticated #account-nav::before, .authenticated #account-nav::after { display: none; }
}
@media (min-width: 1101px) {
  /* Light atmospheric glow and cleaner cards without changing any actions. */
  .authenticated .command-deck .deck-hero {
    background-image:
      linear-gradient(90deg, rgba(3,16,34,.98) 0%, rgba(3,16,34,.94) 34%, rgba(3,16,34,.46) 73%, rgba(3,16,34,.08) 100%),
      url('/electric-harbor/electric-lighthouse-directing.webp');
    background-size: cover, auto 110%;
    background-position: center, right center;
    box-shadow: inset 0 1px rgba(78,215,247,.14);
  }
  .authenticated .command-deck .deck-stat {
    background: linear-gradient(150deg, #102943, #0b1d33);
    box-shadow: inset 0 1px rgba(78,215,247,.055);
  }
  .authenticated .command-deck .deck-site {
    padding: .72rem .8rem;
    background: linear-gradient(135deg, #102943, #0d223b);
    box-shadow: inset 0 1px rgba(78,215,247,.045);
  }
  .authenticated .command-deck .deck-site .actions { gap: .35rem; }
  .authenticated .command-deck .deck-site .actions .button {
    min-height: 2.5rem;
    padding: .5rem .55rem;
  }
  .authenticated .command-deck .deck-side-card {
    background-color: #0e223a;
    box-shadow: inset 0 1px rgba(78,215,247,.08);
  }
  .authenticated .command-deck .deck-preview { flex-basis: 122px; width: 122px; height: 76px; }
  /* In the small desktop range leave room for the actual action labels. */
  .authenticated .command-deck .deck-site-info { flex-basis: 100px; }
  .authenticated .command-deck .deck-site .actions { flex-shrink: 1; }
}
/* Command Deck artwork integration v2 — final scene positioning; CSS only. */
/* Edges dissolve into the actual panel surfaces. No new image assets. */

/* Lighthouse: keep the top of the beacon in frame, mask the image into the
   panel from left, and let the water disappear into the bottom background. */
.authenticated .command-deck .deck-hero {
  position: relative;
  isolation: isolate;
  background: #061629;
  overflow: hidden;
}
.authenticated .command-deck .deck-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: url('/electric-harbor/electric-lighthouse-directing.webp') right center / auto 102% no-repeat;
  opacity: .95;
  -webkit-mask-image: linear-gradient(90deg, transparent 32%, rgba(0,0,0,.12) 48%, rgba(0,0,0,.78) 72%, #000 88%);
  mask-image: linear-gradient(90deg, transparent 32%, rgba(0,0,0,.12) 48%, rgba(0,0,0,.78) 72%, #000 88%);
}
.authenticated .command-deck .deck-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(0deg, #061629 0%, rgba(6,22,41,.58) 9%, transparent 30%, transparent 82%, rgba(6,22,41,.15) 100%),
    linear-gradient(90deg, rgba(6,22,41,.97) 0%, rgba(6,22,41,.82) 36%, rgba(6,22,41,.17) 78%, transparent 100%);
}
.authenticated .command-deck .deck-hero-copy {
  position: relative;
  z-index: 1;
}

/* Crab: a soft oval pool of light; no rectangular top or side borders. The
   source artwork remains the original Maintenance Crab from the repository. */
@media (min-width: 801px) {
  .authenticated #account-nav::before {
    background: url('/electric-harbor/maintenance-crab.webp') center 53% / 114% auto no-repeat;
    -webkit-mask-image: radial-gradient(ellipse 61% 57% at 50% 53%, #000 18%, rgba(0,0,0,.82) 45%, rgba(0,0,0,.23) 70%, transparent 97%);
    mask-image: radial-gradient(ellipse 61% 57% at 50% 53%, #000 18%, rgba(0,0,0,.82) 45%, rgba(0,0,0,.23) 70%, transparent 97%);
    opacity: .92;
  }
}

/* Support bot: slightly smaller, lifted into the card and faded at its edges,
   rather than disappearing beneath the card's bottom border. */
.authenticated .command-deck .deck-support {
  position: relative;
  isolation: isolate;
  min-height: 192px;
  background: linear-gradient(123deg, #10243c 0%, #10243c 46%, #102b46 100%);
  overflow: hidden;
}
.authenticated .command-deck .deck-support::before {
  content: '';
  position: absolute;
  inset: 0 0 0 auto;
  width: 72%;
  pointer-events: none;
  z-index: 0;
  background: url('/electric-harbor/rescue-buoy.webp') right 8px bottom 8px / 134px auto no-repeat;
  opacity: .83;
  -webkit-mask-image: radial-gradient(ellipse 68% 73% at 76% 61%, #000 19%, rgba(0,0,0,.75) 48%, transparent 96%);
  mask-image: radial-gradient(ellipse 68% 73% at 76% 61%, #000 19%, rgba(0,0,0,.75) 48%, transparent 96%);
}
.authenticated .command-deck .deck-support > * {
  position: relative;
  z-index: 1;
}

/* Previews are illustrative site/theme images, not the ambient scene. Keep
   their sizes and readable content while softening their frames. */
.authenticated .command-deck .deck-preview {
  position: relative;
  border-color: rgba(104,161,191,.38);
  background: #0a1b2d;
  box-shadow: 0 3px 11px rgba(1,7,18,.15), inset 0 0 0 1px rgba(200,229,255,.035);
}
.authenticated .command-deck .deck-preview img {
  filter: saturate(.92) contrast(.96);
}

/* Mobile: push the lighthouse right out of the title's path, and strengthen
   the dark reading surface. Nothing changes in stats/actions/menu layout. */
@media (max-width: 600px) {
  .authenticated .command-deck .deck-hero::before {
    background-size: auto 103%;
    background-position: calc(100% + 54px) center;
    -webkit-mask-image: linear-gradient(90deg, transparent 12%, rgba(0,0,0,.2) 50%, #000 92%);
    mask-image: linear-gradient(90deg, transparent 12%, rgba(0,0,0,.2) 50%, #000 92%);
    opacity: .68;
  }
  .authenticated .command-deck .deck-hero::after {
    background:
      linear-gradient(0deg, rgba(6,22,41,.89), transparent 22%),
      linear-gradient(90deg, #061629 0%, rgba(6,22,41,.98) 44%, rgba(6,22,41,.82) 70%, rgba(6,22,41,.18) 100%);
  }
  .authenticated .command-deck .deck-support::before {
    background-position: right 8px bottom 9px;
    background-size: 124px auto;
    opacity: .78;
  }
}
/* End Command Deck artwork integration v2. */


/* Command Deck pre-commit safety: red destructive actions. */
/* Keep irreversible deletion visually distinct from ordinary orange CTAs. */
.authenticated .button.danger {
  background: #a62727;
  border-color: #a62727;
  color: #fff;
}
.authenticated .button.danger:hover:not(:disabled) {
  background: #851e1e;
  border-color: #851e1e;
  color: #fff;
}


/* My websites: align the creation action with the page heading. */
.authenticated .websites-heading {
  margin-bottom: 1.25rem;
}
.authenticated .websites-heading h1 {
  margin: 0;
}
@media (max-width: 600px) {
  .authenticated .websites-heading {
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
  }
  .authenticated .websites-heading > .button {
    width: 100%;
  }
}

/* Public Electric Harbor authentication experience */
body:not(.authenticated):has(.auth-layout) {
  color-scheme: dark;
  background: #071527;
  color: #e8f3ff;
}
body:not(.authenticated):has(.auth-layout) .app-header {
  background: #091a2e;
  border-bottom: 1px solid #25435e;
}
body:not(.authenticated):has(.auth-layout) .app-footer {
  color: #a4bbd0;
}
body:not(.authenticated):has(.auth-layout) #account-nav .nav-link {
  color: #62ddec;
}
body:not(.authenticated):has(.auth-layout) #account-nav .button.secondary {
  background: #132d47;
  color: #f2f8ff;
  border-color: #52708e;
}
body:not(.authenticated) .auth-layout {
  max-width: 1120px;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
  margin: 0 auto;
}
body:not(.authenticated) .auth-aside {
  min-width: 0;
  min-height: 510px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 1px solid #1a597a;
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(5,20,39,.96), rgba(5,20,39,.82) 60%, rgba(5,20,39,.38)),
    url('/electric-harbor/electric-lighthouse-directing.webp') center right / cover no-repeat,
    #0b243d;
}
body:not(.authenticated) .auth-aside .eyebrow {
  color: #43dcea;
  font-size: .75rem;
  letter-spacing: .14em;
}
body:not(.authenticated) .auth-aside .accent {
  background: #23dbe4;
  margin-bottom: 2rem;
}
body:not(.authenticated) .auth-aside h2 {
  color: #fff;
  max-width: 11ch;
  font-size: clamp(2.4rem, 4vw, 3.75rem);
  line-height: 1.06;
}
body:not(.authenticated) .auth-aside p:not(.eyebrow) {
  color: #d6e7f7;
  max-width: 25rem;
}
body:not(.authenticated) .auth-card {
  min-width: 0;
  background: #10243b;
  color: #e8f3ff;
  border-color: #315371;
  box-shadow: 0 18px 50px rgba(0,0,0,.23);
}
body:not(.authenticated) .auth-card h1,
body:not(.authenticated) .auth-card h2,
body:not(.authenticated) .auth-card h3 {
  color: #f6faff;
}
body:not(.authenticated) .auth-card .muted,
body:not(.authenticated) .auth-card .hint {
  color: #b5c9dc;
}
body:not(.authenticated) .auth-card .field label {
  color: #eaf5ff;
}
body:not(.authenticated) .auth-card input:not([type='checkbox']) {
  background: #09192c;
  border-color: #56738e;
  color: #f6fbff;
}
body:not(.authenticated) .auth-card input:not([type='checkbox']):focus {
  border-color: #29dbee;
}
body:not(.authenticated) .auth-card .button:not(.secondary) {
  background: #ff873c;
  color: #101b2c;
  border-color: #ff873c;
  font-weight: 750;
}
body:not(.authenticated) .auth-card .button:not(.secondary):hover:not(:disabled) {
  background: #ffad74;
}
body:not(.authenticated) .auth-card .button.secondary {
  background: #183550;
  color: #e7f5ff;
  border-color: #527392;
}
body:not(.authenticated) .auth-card a {
  color: #65dff2;
}
body:not(.authenticated) .auth-card .policy-agreement {
  color: #d8e8f6;
}
body:not(.authenticated) .auth-card .notice {
  background: #17364e;
  border-color: #416586;
  color: #d6ecff;
}
body:not(.authenticated) .auth-card .notice.error {
  background: #482d2b;
  border-color: #96574b;
  color: #ffd6c5;
}
body:not(.authenticated) .auth-card .notice.success {
  background: #164337;
  border-color: #36856e;
  color: #b6f7d9;
}
body:not(.authenticated) .auth-card .verification-details {
  border-color: #315371;
}
body:not(.authenticated) .auth-card .verification-details summary {
  color: #65dff2;
}
@media (max-width: 760px) {
  body:not(.authenticated) .auth-layout {
    max-width: 480px;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
  }
  body:not(.authenticated) .auth-aside {
    min-height: 0;
    padding: 1.5rem;
  }
  body:not(.authenticated) .auth-aside h2 {
    display: block;
    font-size: 2.1rem;
    margin-bottom: .65rem;
  }
  body:not(.authenticated) .auth-aside p:not(.eyebrow) {
    display: block;
    margin-bottom: 0;
  }
  body:not(.authenticated) .auth-aside .accent {
    display: none;
  }
}


/* Public authentication mobile conversion polish */
@media (max-width: 760px) {
  body:not(.authenticated):has(.auth-layout) .header-inner {
    flex-wrap: nowrap;
    align-items: center;
    gap: .5rem;
    padding: .65rem 1rem;
  }
  body:not(.authenticated):has(.auth-layout) .brand {
    flex-shrink: 0;
  }
  body:not(.authenticated):has(.auth-layout) .brand-logo {
    width: min(35vw, 135px);
    height: auto;
  }
  body:not(.authenticated):has(.auth-layout) #account-nav {
    display: flex;
    flex-wrap: nowrap;
    margin-left: auto;
    gap: .4rem;
    font-size: .82rem;
  }
  body:not(.authenticated):has(.auth-layout) #account-nav a {
    white-space: nowrap;
  }
  body:not(.authenticated):has(.auth-layout) #account-nav .button {
    padding: .55rem .65rem;
    min-height: 2.4rem;
    font-size: .8rem;
  }
  body:not(.authenticated) .auth-layout {
    gap: .85rem;
  }
  body:not(.authenticated) .auth-aside {
    min-height: 140px;
    padding: 1rem 1.2rem;
  }
  body:not(.authenticated) .auth-aside .eyebrow {
    font-size: .65rem;
    letter-spacing: .09em;
    margin-bottom: .65rem;
  }
  body:not(.authenticated) .auth-aside h2 {
    display: block;
    font-size: clamp(1.55rem, 6vw, 1.8rem);
    line-height: 1.1;
    max-width: 13ch;
    margin: 0;
  }
  body:not(.authenticated) .auth-aside p:not(.eyebrow) {
    display: none;
  }
}

/* Simplified email verification recovery */
body:not(.authenticated) .auth-card .verification-address {
  margin: 1.2rem 0 .7rem;
  color: #f0f8ff;
  overflow-wrap: anywhere;
}
body:not(.authenticated) .auth-card .verification-help {
  margin-top: 1.3rem;
  padding-top: 1rem;
  border-top: 1px solid #315371;
}
body:not(.authenticated) .auth-card .verification-help .muted {
  margin-bottom: 1rem;
}


/* Billing page: consistent spacing and customer-facing action groups. */
.authenticated .billing-flow {
  display: grid;
  gap: 1rem;
  max-width: 760px;
  margin: 0;
}

.authenticated .billing-flow > h1 {
  margin: 0;
}

.authenticated .billing-flow > .panel {
  margin: 0;
  padding: 1.5rem;
}

.authenticated .billing-flow > .billing-status {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
}

.authenticated .billing-flow > .billing-status > h2 {
  margin: 0;
}

.authenticated .billing-flow > .billing-status > p {
  margin: 0;
}

.authenticated .billing-flow > .billing-status > .badge {
  margin: 0;
}

.authenticated .billing-flow > .billing-status > .button {
  margin: 0;
}

.authenticated .billing-primary-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  width: 100%;
}

.authenticated .billing-primary-actions .button {
  margin: 0;
}

.authenticated .billing-flow > .billing-status > .billing-renewal {
  margin-top: 0.1rem;
}

.authenticated .billing-flow > .billing-status > .billing-management-copy {
  margin: 0.1rem 0 0;
}

.authenticated .billing-flow > .billing-status > .actions {
  margin: 0;
}

.authenticated .billing-quantity-comparison {
  display: grid;
  gap: 0.65rem;
  width: 100%;
  padding: 1.25rem;
}

.authenticated .billing-quantity-comparison > * {
  margin: 0;
}

.authenticated .billing-details > h2,
.authenticated .billing-support > h2 {
  margin: 0 0 0.9rem;
}

.authenticated .billing-details .form-fields {
  max-width: 560px;
  gap: 1rem;
}

.authenticated .billing-details .field {
  gap: 0.4rem;
}

.authenticated .billing-details .form-fields > .button {
  justify-self: start;
  min-width: 12rem;
}

.authenticated .billing-support {
  margin-top: 0;
  display: grid;
  gap: 0.75rem;
}

.authenticated .billing-support > p {
  margin: 0;
  max-width: 58rem;
}

.authenticated .billing-support > .button {
  justify-self: start;
}

.authenticated .billing-flow > .text-link {
  margin: 0.25rem 0 0;
}

@media (max-width: 800px) {
  .authenticated .billing-flow {
    gap: 0.85rem;
  }

  .authenticated .billing-flow > .panel {
    padding: 1.25rem;
  }

  .authenticated .billing-details .form-fields {
    max-width: none;
  }
}

@media (max-width: 480px) {
  .authenticated .billing-flow > .panel {
    padding: 1rem;
  }

  .authenticated .billing-primary-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .authenticated .billing-primary-actions .button,
  .authenticated .billing-details .form-fields > .button,
  .authenticated .billing-support > .button {
    width: 100%;
  }
}
