/* Application shell. Layout and palette follow Campojoyma's shared UI. */
:root {
  --page: #f1f5f9;
  --primary: hsl(214 84% 56%);
  --primary-hover: hsl(214 84% 48%);
  --focus: hsl(214 84% 56% / 0.18);
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --muted: #64748b;
}

body, body.is-launcher-visible { display: block; padding: 0; background: var(--page); }
[hidden] { display: none !important; }
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
button, input, select, textarea { font-family: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button:disabled { cursor: not-allowed; }
.launcher { --sidebar-width: 256px; position: relative; display: flex; width: 100%; min-height: 100dvh; border: 0; border-radius: 0; box-shadow: none; background: var(--page); overflow: visible; }
.launcher.is-locked { display: none; }
.launcher.is-idle { opacity: 0.6; }
/* Same shell utilities as Campojoyma's AppSidebar. Menu labels belong to this app. */
.app-sidebar { position: sticky; z-index: auto; top: 0; width: var(--sidebar-width); height: 100vh; flex: 0 0 auto; display: flex; flex-direction: column; overflow: hidden; background: #fff; color: #000; border-right: 1px solid hsl(214 32% 91%); font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; }
.sidebar-brand { position: relative; height: 77px; flex: 0 0 77px; border-bottom: 1px solid hsl(214 32% 91%); }
.sidebar-brand a { position: relative; display: block; height: 100%; width: 100%; }
.sidebar-logo-full { display: block; width: auto; }
/* The supplied white wordmark needs dark ink on Campojoyma's white surface. */
.sidebar-logo-ink { filter: brightness(0); clip-path: inset(49.5% 0 24% 45.5%); }
.sidebar-logo-compact { display: block; }
.sidebar-navigation { flex: 1; min-height: 0; padding: 16px 12px; overflow-y: auto; overflow-x: hidden; }
.sidebar-link, .sidebar-link.mode-button { position: relative; display: flex; align-items: center; justify-content: flex-start; gap: 8px; width: 100%; min-width: 0; min-height: 0; padding: 8px; margin: 0; border: 1px solid transparent; border-radius: 6px; background: transparent; box-shadow: none; color: hsl(215 16% 47%); font-size: 14px; font-weight: 400; line-height: 20px; text-decoration: none; text-align: left; cursor: pointer; backdrop-filter: none; outline: none; }
.sidebar-link.mode-button::before { content: none; }
.sidebar-link + .sidebar-link { margin-top: 4px; }
.sidebar-link > svg { width: 16px; height: 16px; stroke-width: 2; flex: 0 0 auto; }
.sidebar-link:hover { background: #eff6ff; color: #1d4ed8; transform: scale(1.02); box-shadow: 0 1px 2px 0 rgb(0 0 0 / .05); }
.sidebar-link:focus-visible { outline: 2px solid hsl(214 84% 56%); outline-offset: 2px; }
.sidebar-link[aria-current="page"], .sidebar-link.mode-button.is-active { background: linear-gradient(90deg, #2b75ff, #4895ff); color: #fff; font-weight: 600; box-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1); }
.nav-label { min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.sidebar-bottom { margin-top: auto; padding: 12px; }
.sidebar-support-links { display: none; }
#sidebar-close { position: absolute; right: 12px; top: 50%; z-index: 10; width: 24px; height: 24px; padding: 4px; transform: translateY(-50%); color: hsl(215 16% 47%); }
#sidebar-close .icon { width: 16px; height: 16px; stroke-width: 2; }
#sidebar-close:hover { background: #eff6ff; color: #1d4ed8; }
@media (min-width: 1024px) { .sidebar-support-links { display: block; } }

/* Copied verbatim from Campojoyma/src/components/app-sidebar.css. */
.app-sidebar {
  --sidebar-duration: 240ms;
  --sidebar-easing: cubic-bezier(0.4, 0, 0.2, 1);
  transition: width var(--sidebar-duration) var(--sidebar-easing),
    transform var(--sidebar-duration) var(--sidebar-easing);
}

.app-sidebar .app-sidebar-sections {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: gap var(--sidebar-duration) var(--sidebar-easing);
}

.app-sidebar .app-sidebar-section-heading,
.app-sidebar .app-sidebar-group-heading {
  overflow: hidden;
  white-space: nowrap;
  transition: height var(--sidebar-duration) var(--sidebar-easing),
    opacity var(--sidebar-duration) var(--sidebar-easing);
}

.app-sidebar .app-sidebar-section-heading {
  height: 1.75rem;
}

.app-sidebar .app-sidebar-group-heading {
  height: 2.5rem;
}

.app-sidebar .app-sidebar-row {
  height: 2.25rem;
  transition: padding-left var(--sidebar-duration) var(--sidebar-easing),
    gap var(--sidebar-duration) var(--sidebar-easing),
    background-color 150ms, color 150ms, box-shadow 150ms, transform 150ms;
}

.app-sidebar .app-sidebar-subnav .app-sidebar-row {
  height: 2rem;
}

.app-sidebar .app-sidebar-label,
.app-sidebar .app-sidebar-chevron {
  transition: opacity var(--sidebar-duration) var(--sidebar-easing),
    transform var(--sidebar-duration) var(--sidebar-easing);
}

.app-sidebar .app-sidebar-subnav {
  margin-left: 1rem;
  padding-left: 0.75rem;
  border-left-width: 1px;
  transition: margin-left var(--sidebar-duration) var(--sidebar-easing),
    padding-left var(--sidebar-duration) var(--sidebar-easing),
    border-left-width var(--sidebar-duration) var(--sidebar-easing);
}

.app-sidebar .app-sidebar-collapsible {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows var(--sidebar-duration) var(--sidebar-easing),
    opacity var(--sidebar-duration) var(--sidebar-easing);
}

.app-sidebar .app-sidebar-brand-full,
.app-sidebar .app-sidebar-brand-compact {
  position: absolute;
  object-fit: contain;
  transition: opacity var(--sidebar-duration) var(--sidebar-easing);
}

.app-sidebar .app-sidebar-brand-full {
  left: 0.75rem;
  height: 100%;
  max-width: 150px;
  object-position: left;
}

.app-sidebar .app-sidebar-brand-compact {
  left: calc((5rem - 1px - 2.5rem) / 2);
  top: 50%;
  width: 2.5rem;
  height: 2.5rem;
  transform: translateY(-50%);
  opacity: 0;
}

.app-sidebar[data-collapsed="true"] .app-sidebar-sections {
  gap: 0.75rem;
}

.app-sidebar[data-collapsed="true"] .app-sidebar-section-heading,
.app-sidebar[data-collapsed="true"] .app-sidebar-group-heading {
  height: 0;
  opacity: 0;
  pointer-events: none;
}

.app-sidebar[data-collapsed="true"] .app-sidebar-row {
  /* Centre the 16px icon inside the 80px rail, allowing for its borders and gutters. */
  padding-left: calc((5rem - 1px - 1.5rem - 2px - 1rem) / 2);
  gap: 0;
}

.app-sidebar[data-collapsed="true"] .app-sidebar-label,
.app-sidebar[data-collapsed="true"] .app-sidebar-chevron,
.app-sidebar[data-collapsed="true"] .app-sidebar-brand-full {
  opacity: 0;
  pointer-events: none;
}

.app-sidebar[data-collapsed="true"] .app-sidebar-subnav {
  margin-left: 0;
  padding-left: 0;
  border-left-width: 0;
}

.app-sidebar .app-sidebar-collapsible[data-open="false"] {
  grid-template-rows: 0fr;
  opacity: 0;
  pointer-events: none;
}

.app-sidebar[data-collapsed="true"] .app-sidebar-brand-compact {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .app-sidebar,
  .app-sidebar * {
    transition: none !important;
  }
}

/* End of shared Campojoyma rules. */
.app-content { min-width: 0; min-height: 100dvh; margin-left: 0; flex: 1; display: flex; flex-direction: column; }
.app-topbar { position: relative; z-index: 40; height: 77px; flex: 0 0 77px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 24px; border-bottom: 1px solid var(--border); background: rgb(255 255 255 / 95%); backdrop-filter: blur(8px); }
.topbar-leading, .topbar-actions { display: flex; align-items: center; min-width: 0; }
.topbar-leading { gap: 16px; }
.topbar-actions { gap: 12px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; padding: 8px; width: 34px; height: 34px; flex: 0 0 auto; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #64748b; cursor: pointer; }
.icon-button:hover { background: #f1f5f9; color: var(--text); }
.icon-button:disabled { opacity: .35; }
/* Account controls and menu mirror Campojoyma/src/components/app-layout.tsx. */
.header-control { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; padding: 8px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; color: hsl(215 16% 47%); font-size: 14px; font-weight: 500; cursor: pointer; }
.header-control:hover { background: hsl(214 32% 91%); color: #000; }
.header-control .icon { width: 16px; height: 16px; stroke-width: 2; pointer-events: none; }
.theme-toggle { padding-left: 12px; padding-right: 12px; border-radius: 6px; }
.theme-moon, .dark .theme-sun { display: none; }
.dark .theme-moon { display: block; }
.account-menu { position: relative; z-index: 50; }
.account-dropdown { position: absolute; top: calc(100% + 8px); right: 0; z-index: 70; width: 224px; padding: 4px; border: 1px solid hsl(214 32% 91%); border-radius: 12px; background: #fff; color: #000; box-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1); font-family: ui-sans-serif, system-ui, sans-serif; }
.account-menu-heading { padding: 8px 12px; }
.account-menu-heading p { margin: 0; color: hsl(215 16% 47%); font-size: 12px; font-weight: 500; line-height: 16px; }
.account-email { max-width: 220px; padding: 8px 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; line-height: 20px; }
.account-menu-divider { height: 1px; margin: 4px 0; background: hsl(214 32% 91%); }
.account-dropdown button, .account-dropdown .logout-button { display: flex; align-items: center; justify-content: flex-start; gap: 0; width: 100%; padding: 8px 12px; border: 0; border-radius: 8px; background: transparent; box-shadow: none; color: #000; font-size: 14px; font-weight: 400; line-height: 20px; text-align: left; cursor: pointer; transition: background-color 150ms, color 150ms; }
.account-dropdown button .icon { width: 16px; height: 16px; margin-right: 8px; stroke-width: 2; }
.account-dropdown .logout-button { color: #e11d48; }
.account-dropdown button:hover { background: hsl(210 40% 96% / .7); }
.account-dropdown button:focus-visible { outline: 0; background: hsl(210 40% 96% / .7); }
@supports (backdrop-filter: blur(8px)) { .app-topbar { background: rgb(255 255 255 / 60%); } }
.app-main { width: 100%; max-width: 1400px; min-width: 0; flex: 1; margin: 0 auto; padding: 30px 30px 26px; }
.page-hero { display: flex; align-items: center; flex-wrap: wrap; gap: 22px; margin-bottom: 26px; padding: 24px 28px 20px; border-radius: 8px; background: linear-gradient(135deg, hsl(214 84% 56%), hsl(214 84% 56% / .82)); box-shadow: 0 18px 38px hsl(214 44% 26% / .18); color: white; }
.hero-copy { flex: 1; min-width: 0; }
.hero-eyebrow { margin: 0; color: rgb(255 255 255 / 75%); font-size: 11px; font-weight: 600; letter-spacing: .045em; text-transform: uppercase; }
.page-hero h1 { margin: 9px 0 0; color: #fff; font-size: 29px; font-weight: 600; line-height: 1.1; letter-spacing: -.025em; }
.page-hero #page-description { margin: 10px 0 0; max-width: 64ch; font-size: 13px; line-height: 1.55; color: rgb(255 255 255 / 90%); }
.hero-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 38px; padding: 9px 14px; border: 1px solid rgb(255 255 255 / 70%); border-radius: 6px; background: #fff; box-shadow: 0 2px 3px rgb(15 23 42 / 5%); color: #2563eb; font-size: 12px; font-weight: 600; cursor: pointer; }
.hero-button:hover { background: #eff6ff; }
.hero-button .icon { width: 15px; height: 15px; }
.hero-summary { flex-basis: 100%; display: flex; gap: 22px; padding-top: 16px; margin-top: -2px; border-top: 1px solid rgb(255 255 255 / 20%); font-size: 11px; color: rgb(255 255 255 / 83%); }
.hero-summary strong { color: white; font-weight: 600; margin-right: 3px; }
.app-view { min-width: 0; }
.list-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.search-field { position: relative; flex: 1 1 240px; min-width: 0; }
.search-field > .icon { position: absolute; top: 12px; left: 13px; width: 16px; height: 16px; color: #94a3b8; }
.launcher .search-field input { height: 40px; padding: 9px 12px 9px 39px; font-size: 12px; }
.toolbar-filters { display: flex; align-items: center; gap: 9px; flex-wrap: nowrap; max-width: 100%; }
.launcher .toolbar-filters select { width: auto; max-width: 200px; }
#list-refresh.is-loading .icon { animation: spin .8s linear infinite; }
.launcher select { height: 40px; min-height: 0; padding: 8px 30px 8px 11px; border: 1px solid var(--border); border-radius: 6px; background-color: #fff; color: #475569; font-size: 12px; font-weight: 400; }
.primary-button, .secondary-button, .access-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 39px; padding: 9px 15px; border: 1px solid transparent; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; line-height: 1.4; }
.primary-button { background: var(--primary); color: white; box-shadow: 0 2px 4px hsl(214 84% 56% / .14); }
.primary-button:hover { background: var(--primary-hover); }
.secondary-button, .access-button { background: white; border-color: var(--border); color: #475569; }
.secondary-button:hover, .access-button:hover { background: #f8fafc; }
.secondary-button .icon { width: 15px; height: 15px; }
.text-button, .text-button.mode-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 30px; padding: 5px 0; border: 0; border-radius: 4px; background: transparent; color: #2563eb; font-size: 11px; font-weight: 500; text-decoration: none; cursor: pointer; box-shadow: none; white-space: nowrap; }
.text-button .icon { width: 14px; height: 14px; }
.panel, .result { background: white; border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 1px 2px rgb(15 23 42 / 3%); overflow: visible; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 23px; border-bottom: 1px solid var(--border); }
.panel-heading h2 { display: flex; align-items: center; gap: 9px; margin: 0; color: #1e293b; font-size: 14px; font-weight: 600; letter-spacing: -.015em; }
.panel-heading p { margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 23px; min-height: 21px; padding: 2px 7px; border-radius: 5px; background: #eff6ff; color: #3b82f6; font-size: 10px; font-weight: 600; }
.table-scroll { overflow-x: auto; }
.projects-table { width: 100%; border-collapse: collapse; font-size: 12px; text-align: left; white-space: nowrap; }
.projects-table th { height: 40px; padding: 10px 23px; background: #f8fafc; border-bottom: 1px solid var(--border); color: #7b8799; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .045em; }
.projects-table td { height: 77px; padding: 14px 23px; border-bottom: 1px solid #edf1f6; color: #475569; }
.projects-table tbody tr:last-child td { border-bottom: 0; }
.projects-table tbody tr:hover { background: #fafcff; }
.projects-table .actions-column { text-align: right; }
.project-cell { display: flex; align-items: center; gap: 12px; }
.project-initial { display: grid; place-items: center; width: 35px; height: 37px; flex: 0 0 auto; border: 1px solid #dbeafe; border-radius: 7px; background: #eff6ff; color: #3b82f6; font-size: 11px; font-weight: 600; }
.project-cell-copy { display: grid; gap: 5px; min-width: 0; }
.project-name { padding: 0; border: 0; background: transparent; color: #1e293b; font-size: 12px; font-weight: 600; text-align: left; cursor: pointer; }
.project-name:hover { color: #2563eb; }
.project-domain { max-width: 300px; overflow: hidden; text-overflow: ellipsis; font-size: 10px; color: #94a3b8; }
.server-cell { display: flex; align-items: center; gap: 7px; font-size: 11px; }
.server-cell .icon { width: 14px; height: 14px; color: #94a3b8; }
.health-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 8px; border: 1px solid #e2e8f0; border-radius: 5px; background: #f8fafc; color: #64748b; font-size: 10px; font-weight: 500; }
.health-pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: #94a3b8; }
.health-pill[data-state="current"] { border-color: #dcfce7; background: #f0fdf4; color: #15803d; }
.health-pill[data-state="current"]::before { background: #22c55e; }
.health-pill[data-state="outdated"] { border-color: #fef3c7; background: #fffbeb; color: #b45309; }
.health-pill[data-state="outdated"]::before { background: #f59e0b; }
.row-actions { display: flex; justify-content: flex-end; align-items: center; gap: 9px; }
.row-update { display: inline-flex; align-items: center; gap: 6px; min-height: 29px; padding: 5px 9px; border: 1px solid #dbeafe; border-radius: 5px; background: white; color: #2563eb; font-size: 10px; font-weight: 500; cursor: pointer; }
.row-update:hover { background: #eff6ff; }
.row-update .icon, .row-actions .icon-button .icon { width: 13px; height: 13px; }
.row-actions .icon-button { width: 28px; height: 28px; border-color: var(--border); }
.list-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 13px 23px; border-top: 1px solid var(--border); color: #94a3b8; font-size: 10px; }
.pagination { display: flex; gap: 9px; align-items: center; color: #64748b; }
.pagination .icon-button { width: 26px; height: 26px; border-color: var(--border); }
.pagination .icon { width: 12px; height: 12px; }
#next-page .icon { transform: rotate(180deg); }
.empty-state { height: 160px !important; text-align: center; white-space: normal; color: var(--muted) !important; }
.back-link { display: inline-flex; gap: 7px; align-items: center; margin: -2px 0 17px; padding: 0; background: none; border: 0; color: #64748b; font-size: 11px; cursor: pointer; }
.back-link .icon { width: 13px; height: 13px; }
.workspace.operation-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, .9fr); align-items: start; gap: 22px; min-height: 0; }
.operation-panel { min-width: 0; }
.panel-icon { display: grid; place-items: center; width: 33px; height: 33px; flex: 0 0 auto; border-radius: 7px; color: #3b82f6; background: #eff6ff; }
.form-area { padding: 24px; min-width: 0; }
.launcher form { gap: 22px; }
.launcher .fields { gap: 20px; }
.launcher .update-fields { grid-template-columns: minmax(0, 1fr); }
.launcher label { color: #475569; font-size: 11px; font-weight: 500; }
.launcher input, .launcher textarea { width: 100%; min-width: 0; height: 42px; min-height: 0; padding: 11px 12px; border: 1px solid var(--border); border-radius: 6px; background: #fff; box-shadow: none; font-size: 12px; color: #334155; }
.launcher input:focus, .launcher textarea:focus { border-color: #93c5fd; outline: 3px solid var(--focus); }
.launcher input::placeholder, .launcher textarea::placeholder { color: #94a3b8; }
.launcher .file-input { height: auto; padding: 10px; font-size: 11px; }
.launcher textarea { min-height: 170px; resize: vertical; line-height: 1.7; font-family: ui-monospace, monospace; }
.launcher .server-trigger { min-height: 62px; padding: 10px 12px; border-color: var(--border); border-radius: 6px; }
.launcher .server-trigger.has-selection { border-color: #bfdbfe; background: #f8fbff; }
.launcher .server-trigger.has-selection .server-trigger-icon { background: #dbeafe; color: #3b82f6; }
.launcher .server-trigger-icon { width: 32px; height: 32px; }
.launcher .server-trigger-icon svg { width: 18px; height: 18px; }
.launcher .server-trigger-name, .launcher .server-option-name { font-size: 12px; font-weight: 500; }
.launcher .server-trigger-host, .launcher .server-option-host { font-size: 10px; font-weight: 400; }
.launcher .combobox-option { font-size: 12px; }
.launcher .combobox input { padding-right: 36px; }
.launcher .action-row { display: flex; justify-content: flex-end; padding-top: 4px; }
.launcher .action-row .primary-button { width: 100%; }
.result { display: flex; flex-direction: column; min-width: 0; min-height: 380px; border: 1px solid var(--border); background: white; }
.result-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; min-height: 77px; border-bottom: 1px solid var(--border); background: white; border-radius: 8px 8px 0 0; }
.result-eyebrow { display: block; color: #94a3b8; font-size: 9px; text-transform: uppercase; letter-spacing: .1em; }
.result-title { display: block; margin: 5px 0 0; font-size: 13px; color: #334155; font-weight: 600; }
.result .status-label { display: inline-flex; gap: 6px; font-size: 10px; font-weight: 500; }
.result .status-dot { width: 5px; height: 5px; }
.status-output { flex: 1; min-height: 280px; max-height: 60vh; padding: 22px; background: #fcfdff; color: #475569; font-size: 11px; line-height: 1.85; }
.result-footer { display: flex; align-items: center; gap: 6px; padding: 12px 18px; border-top: 1px solid var(--border); color: #94a3b8; font-size: 9px; line-height: 1.5; }
.result-footer > .icon { width: 13px; height: 13px; }
.result-footer .text-button { margin-left: auto; font-size: 10px; }
.server-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; padding: 23px; }
.server-card { min-width: 0; padding: 22px; border: 1px solid var(--border); border-radius: 7px; }
.server-card-top { display: flex; align-items: center; gap: 12px; }
.server-card h3 { margin: 0 0 6px; color: #334155; font-size: 13px; font-weight: 600; }
.server-card code { color: #94a3b8; font-size: 11px; }
.server-card-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; padding-top: 14px; border-top: 1px solid #f1f5f9; color: #64748b; font-size: 11px; }
.settings-view { max-width: 1000px; }
.access-help { color: var(--muted); font-size: 12px; font-weight: 400; line-height: 1.8; }
.appearance-body { padding: 24px; display: grid; gap: 22px; }
.landscape-preview { height: 300px; display: flex; align-items: end; padding: 22px; border-radius: 7px; background: linear-gradient(0deg, rgb(15 23 42 / 45%), transparent 50%), var(--background-primary) center / cover; }
body.is-background-alt .landscape-preview { background-image: linear-gradient(0deg, rgb(15 23 42 / 45%), transparent 50%), var(--background-secondary); }
.landscape-preview span { color: white; font-size: 21px; font-weight: 600; letter-spacing: -.03em; }
body.is-launcher-visible .background-picker { position: static; display: grid; grid-template-columns: 55px minmax(0, 1fr); max-width: none; padding: 0; gap: 14px; border: 0; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; color: var(--text); }
.background-picker-label { color: #475569; font-size: 11px; font-weight: 500; }
.background-select, .background-region-select { width: 100%; }
.mobile-only { display: none; }
.sidebar-backdrop { position: fixed; z-index: 40; inset: 0; border: 0; background: rgb(0 0 0 / 50%); }
.sidebar-collapsed { --sidebar-width: 80px; }
#sidebar-toggle { width: 40px; height: 36px; padding: 8px 12px; border: 0; border-radius: 8px; }
#sidebar-toggle .icon { width: 16px; height: 16px; stroke-width: 2; }
.gate-form { max-width: 560px; width: 100%; justify-self: center; padding: 54px; }
.gate-form .primary-button { min-height: 45px; font-size: 14px; }
.gate-form .access-button { font-size: 13px; }
.gate-form .eyebrow { color: var(--primary); }
.gate-form input { border-color: var(--border); border-radius: 6px; }
.gate-message { font-size: 12px; font-weight: 400; line-height: 1.7; }
.simple-hero { padding: 24px 28px; }
.simple-hero h1 { margin-top: 0; }
#show-all-services { margin-bottom: 14px; }
.selection-meta { margin: -3px 0 0; min-height: 18px; color: #64748b; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.service-option-copy { display: grid; gap: 5px; min-width: 0; }
.service-option-copy small { color: #94a3b8; font-size: 10px; }
.launcher .project-refresh-button { width: auto; height: 26px; display: inline-flex; gap: 5px; color: #2563eb; font-size: 10px; white-space: nowrap; }
.launcher .project-refresh-button svg { width: 13px; height: 13px; }
.launcher .project-link { width: 26px; height: 26px; }
.launcher .operation-panel .action-row .primary-button { min-height: 44px; font-size: 14px; }
.operation-progress { display: none; height: 3px; overflow: hidden; background: #dbeafe; }
.result.loading .operation-progress { display: block; }
.operation-progress::before { content: ""; display: block; height: 100%; width: 35%; background: #3b82f6; animation: operation-progress 1.3s ease-in-out infinite; }
.result.warning .status-label { color: #b45309; }
.result.warning .status-dot { background: #f59e0b; }
.result.loading .status-label { padding: 6px 9px; border-radius: 5px; background: #eff6ff; color: #2563eb; }
#result { scroll-margin-top: 86px; }
@keyframes operation-progress { from { transform: translateX(-110%); } to { transform: translateX(390%); } }

@media (max-width: 1100px) {
  .app-main { padding: 25px 23px; }
  .projects-table th, .projects-table td { padding-left: 18px; padding-right: 18px; }
  .project-domain { max-width: 210px; }
  .workspace.operation-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 767px) {
  .launcher, .launcher.sidebar-collapsed { --sidebar-width: 0px; }
  .app-sidebar { position: fixed; z-index: 50; inset: 0 auto 0 0; width: 288px; transform: translateX(-100%); }
  .sidebar-open .app-sidebar { transform: translateX(0); }
  .mobile-only { display: inline-flex; }
  .app-topbar { padding: 0 16px; }
  .app-main { padding: 20px 16px; }
  .page-hero { padding: 23px 21px 18px; gap: 18px; margin-bottom: 21px; }
  .page-hero h1 { font-size: 25px; }
  .page-hero #page-description { font-size: 12px; }
  .hero-button { min-height: 34px; padding: 7px 10px; font-size: 11px; }
  .hero-summary { padding-top: 13px; gap: 18px; }
  .list-toolbar { gap: 11px; }
  .search-field { flex-basis: 100%; }
  .toolbar-filters { width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 7px; }
  .launcher .toolbar-filters select { width: 100%; padding-left: 8px; font-size: 10px; }
  .toolbar-filters .secondary-button { padding: 9px 10px; }
  .toolbar-filters .secondary-button span { display: none; }
  .panel-heading { padding: 18px; flex-wrap: wrap; gap: 9px; }
  .panel-heading h2 { font-size: 13px; }
  .panel-heading p { font-size: 10px; }
  .projects-table thead { display: none; }
  .projects-table, .projects-table tbody { display: block; white-space: normal; }
  .projects-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 12px; padding: 19px 18px; border-bottom: 1px solid var(--border); }
  .projects-table tr:last-child { border: 0; }
  .projects-table td { height: auto; padding: 0; border: 0; }
  .projects-table td:first-child { grid-column: 1 / -1; margin-bottom: 16px; }
  .projects-table td:nth-child(2) { align-self: center; }
  .projects-table td:nth-child(3) { align-self: center; justify-self: end; }
  .projects-table td:last-child { grid-column: 1 / -1; margin-top: 16px; }
  .projects-table .empty-state { grid-column: 1 / -1; display: grid; place-items: center; height: 120px !important; margin: 0 !important; }
  .project-name { font-size: 13px; }
  .project-domain { max-width: 235px; font-size: 11px; }
  .row-update { font-size: 11px; min-height: 32px; padding: 6px 10px; }
  .row-actions { padding-top: 13px; border-top: 1px solid #f1f5f9; justify-content: space-between; }
  .row-actions .icon-button { width: 32px; height: 32px; }
  .list-footer { padding: 12px 16px; font-size: 9px; }
  .pagination { gap: 5px; }
  .form-area { padding: 20px; }
  .launcher .fields { grid-template-columns: minmax(0, 1fr); }
  .launcher .action-row .primary-button { min-height: 42px; }
  .server-list { grid-template-columns: minmax(0, 1fr); padding: 18px; gap: 14px; }
  .appearance-body { padding: 18px; }
  .landscape-preview { height: 230px; }
  .gate-form { padding: 38px 25px; }
}
@media (prefers-reduced-motion: reduce) {
  .app-sidebar, .app-content, .sidebar-link { transition: none; }
}

/* Campojoyma theme tokens, applied to the existing launcher surfaces. */
.dark .launcher { --page: hsl(217 33% 17%); --surface: hsl(222 84% 5%); --surface-soft: hsl(217 33% 17%); --border: hsl(217 33% 17%); --border-strong: hsl(215 20% 35%); --text: hsl(0 0% 98%); --muted: hsl(215 20% 65%); }
.dark .launcher :is(.app-sidebar, .panel, .result, .result-header, .account-dropdown, .combobox-menu, input, textarea, select) { background: var(--surface); color: var(--text); border-color: var(--border); }
.dark .app-topbar { background: hsl(222 84% 5% / .6); border-color: var(--border); }
.dark .sidebar-brand { border-color: var(--border); }
.dark .sidebar-logo-ink { visibility: hidden; }
.dark .sidebar-link { color: var(--muted); }
.dark .sidebar-link:hover { background: rgb(30 58 138 / .2); color: #93c5fd; }
.dark .sidebar-link[aria-current="page"], .dark .sidebar-link.mode-button.is-active { color: #fff; }
.dark .launcher :is(.header-control, #sidebar-close, .selection-meta, .panel-heading p, .account-menu-heading p) { color: var(--muted); }
.dark .launcher :is(.header-control:hover, .account-dropdown button:hover, .account-dropdown button:focus-visible) { background: hsl(217 33% 17% / .7); color: var(--text); }
.dark .launcher :is(.panel-heading h2, .result-title, .server-card h3, .account-dropdown button) { color: var(--text); }
.dark .launcher :is(.status-output) { background: var(--surface); color: var(--muted); }
.dark .launcher :is(.account-menu-divider, .server-card-bottom) { border-color: var(--border); }
.dark .account-menu-divider { background: var(--border); }
.dark .account-dropdown .logout-button { color: #e11d48; }
.dark .combobox-option:hover, .dark .combobox-option.is-active { background: var(--surface-soft); color: var(--text); }
.dark .launcher .info-panel { background: hsl(214 84% 56% / .12); border-color: var(--border-strong); }

.account-passkey { display: flex; align-items: center; justify-content: space-between; gap: 4px; padding: 0 4px 0 12px; color: #15803d; font-size: 12px; line-height: 20px; }
.account-passkey > span { display: flex; align-items: center; gap: 8px; min-width: 0; }
.account-passkey > span .icon { width: 16px; height: 16px; stroke-width: 2; }
.account-dropdown #delete-passkey-button { flex: 0 0 28px; justify-content: center; width: 28px; height: 32px; padding: 6px; color: #64748b; }
.account-dropdown #delete-passkey-button .icon { margin: 0; }
.account-dropdown #delete-passkey-button:hover { background: #fff1f2; color: #e11d48; }
.account-access-message { margin: 0; padding: 8px 12px; color: var(--muted); font-size: 12px; line-height: 1.5; }
.account-access-message.is-error { color: #b42318; }
.dark .account-passkey { color: #86efac; }
.dark .account-access-message.is-error { color: #fca5a5; }

.dark .launcher label, .dark .launcher .status-label { color: var(--muted); }
.dark .launcher .panel-icon { background: hsl(214 84% 56% / .15); color: #93c5fd; }
.dark .launcher .account-dropdown .logout-button { color: #e11d48; }
.dark .launcher .result.loading .status-label { background: hsl(214 84% 56% / .2); color: #93c5fd; }
.dark .launcher .result.ok .status-label { color: #34d399; }
.dark .launcher .result.warning .status-label { color: #fbbf24; }

/* Keep both service names and server labels readable in the dark dropdown. */
.dark .launcher .combobox-option { color: var(--text); }
.dark .launcher .project-option-name { color: inherit; }
.dark .launcher .service-option-copy small { color: #cbd5e1; }
.dark .launcher .combobox-option.is-empty { color: var(--muted); }
