/* Shared interface palette: decorative glass, readable content, semantic status colors. */
:root {
  --ui-text: #183343;
  --ui-muted: #415a6a;
  --ui-accent: #245e78;
  --ui-panel: linear-gradient(145deg, rgba(248,253,255,.76), rgba(231,242,253,.56));
  --ui-control: linear-gradient(145deg, rgba(255,255,255,.72), rgba(219,239,251,.42));
  --ui-rim: rgba(255,255,255,.72);
  --ui-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 8px 24px -16px rgba(20,51,73,.35);
  --ui-positive: #126346;
  --ui-negative: #a12644;
  --ui-warning: #855114;
}
html[data-theme="dark"] {
  --ui-text: #eef7ff;
  --ui-muted: #bbd0e0;
  --ui-accent: #a1ddec;
  --ui-panel: linear-gradient(145deg, rgba(33,62,79,.76), rgba(22,33,56,.72));
  --ui-control: linear-gradient(145deg, rgba(133,188,214,.22), rgba(58,78,116,.26));
  --ui-rim: rgba(212,240,255,.28);
  --ui-shadow: inset 0 1px 0 rgba(237,250,255,.22), 0 10px 28px -18px rgba(0,0,0,.6);
  --ui-positive: #9ae8c4;
  --ui-negative: #ffb6c5;
  --ui-warning: #f5d398;
}
html body .site-header {
  position: sticky; top: 12px; z-index: 50; margin: 12px 16px 0;
  background: var(--ui-panel) !important; border: 1px solid var(--ui-rim) !important;
  border-radius: 28px; box-shadow: var(--ui-shadow);
  backdrop-filter: blur(24px) saturate(135%); -webkit-backdrop-filter: blur(24px) saturate(135%);
}
.site-header > div { gap: 24px; padding: 12px 18px; }
.site-brand { flex-shrink: 0; }
.brand-mark {
  display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex-shrink: 0;
  border-radius: 16px; border: 1px solid var(--ui-rim); background: var(--ui-control);
  color: var(--ui-accent); box-shadow: var(--ui-shadow); font-size: 23px;
}
.brand-name { display: block; font-size: 18px; font-weight: 750; letter-spacing: -.65px; line-height: 1.25; color: var(--ui-text); }
.brand-name > span { margin-left: 3px; font-weight: 500; color: var(--ui-muted); }
.brand-caption { font-size: 11px; line-height: 1.6; color: var(--ui-muted); }
html body #clock { color: var(--ui-muted) !important; font-family: inherit; font-size: 11px; letter-spacing: 0; white-space: nowrap; }
#header-status { min-width: 0; }
#header-status-text { line-height: 1.45; }
#header-dot-ping, #byd-dot-ping { display: none; }
html body .site-hero { background: none !important; border: 0 !important; }
html body .hero-gradient-text { background-image: linear-gradient(110deg, var(--ui-text), var(--ui-accent)); animation: none; }
html body .site-hero :is(h1, p) { color: var(--ui-text) !important; }
html body .site-hero p { color: var(--ui-muted) !important; }
.service-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; padding: 0 24px 20px; position: relative; z-index: 10; }
.service-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 999px;
  background: var(--ui-control); border: 1px solid var(--ui-rim); box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  color: var(--ui-muted); font-size: 12px; font-weight: 500; white-space: nowrap;
}
.service-chip .marquee-dot { margin: 0; box-shadow: none; }
html body .tab-btn { text-transform: none; letter-spacing: 0; font-weight: 550; }
html body .tab-btn iconify-icon { color: var(--ui-accent) !important; }
html body :is(.btn-primary, .liquid-btn)[class] {
  min-height: 44px; border-radius: 999px; font-family: inherit; font-weight: 600;
  font-size: 12px; text-transform: none; letter-spacing: .01em; text-shadow: none;
}
html body .btn-primary[class]:not(.optical-host), html body .liquid-btn[class]:not(.optical-host) {
  background: var(--ui-control) !important; color: var(--ui-text) !important;
  border: 1px solid var(--ui-rim) !important; box-shadow: var(--ui-shadow) !important;
  backdrop-filter: blur(18px) saturate(135%); -webkit-backdrop-filter: blur(18px) saturate(135%);
}
html body .btn-primary[class]::before, html body .btn-primary[class]::after { display: none; }
html body .btn-primary[class] iconify-icon { color: var(--ui-accent) !important; }
html body .liquid-input[class] { background: var(--ui-panel) !important; color: var(--ui-text) !important; border: 1px solid var(--ui-rim) !important; box-shadow: var(--ui-shadow); }
html body .liquid-input::placeholder { color: var(--ui-muted); }
html body .icon-ring[class] { background: var(--ui-control) !important; border: 1px solid var(--ui-rim) !important; border-radius: 18px; box-shadow: var(--ui-shadow); }
html body .service-card h3 { color: var(--ui-text) !important; font-weight: 600; }
html body .service-card:hover h3 { transform: none; }
html body .font-mono.uppercase { font-family: inherit; text-transform: none; letter-spacing: .025em; }
html body .title-accent::after { display: none; }
html body .title-accent { padding-bottom: 0; }
html body .tab-content > div:first-child .font-mono { color: var(--ui-accent) !important; }
html body :is(#byd-online-badge, .service-card [id^="badge-"], .docker-badge-running, .docker-badge-stopped, .badge-neutral)[class] {
  background: var(--ui-control) !important; border: 1px solid var(--ui-rim) !important;
  border-radius: 999px; box-shadow: inset 0 1px 0 rgba(255,255,255,.12); text-transform: none; letter-spacing: 0; font-weight: 600;
}
html body #byd-online-badge { min-height: 40px; padding: 9px 14px; }
html body #byd-status-label { text-transform: none; font-size: 12px; letter-spacing: 0; }
html body #byd-online-time { color: var(--ui-muted) !important; font-family: inherit; border-color: var(--ui-rim); }
html body :is(.service-card [id^="badge-"], #byd-status-label)[class*="text-emerald"], html body .docker-badge-running { color: var(--ui-positive) !important; }
html body :is(.service-card [id^="badge-"], #byd-status-label)[class*="text-red"], html body .docker-badge-stopped { color: var(--ui-negative) !important; }
html body .service-card [id^="badge-"][class*="text-amber"] { color: var(--ui-warning) !important; }
html body .badge-neutral[class] { color: var(--ui-muted) !important; }
html body .summary-bar.bg-stone-900.text-white {
  background: var(--ui-panel) !important; color: var(--ui-text) !important; border: 1px solid var(--ui-rim) !important;
  border-radius: 28px; box-shadow: var(--ui-shadow); backdrop-filter: blur(18px) !important; -webkit-backdrop-filter: blur(18px) !important;
}
html body .summary-bar :is(.text-white, #resumo-total) { color: var(--ui-text) !important; }
html body .summary-bar :is(.text-stone-300, .text-stone-400, .text-stone-500, .text-stone-600) { color: var(--ui-muted) !important; }
html body .summary-bar :is(.text-emerald-400, .text-emerald-500) { color: var(--ui-positive) !important; }
html body .summary-bar :is(.text-red-400, .text-red-500, .text-red-600) { color: var(--ui-negative) !important; }
html body .summary-bar :is(.text-amber-400, .text-amber-500) { color: var(--ui-warning) !important; }
html body .site-footer {
  position: relative; z-index: 10; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  margin: 28px 16px 16px; padding: 28px; border-radius: 28px;
  background: var(--ui-panel) !important; border: 1px solid var(--ui-rim) !important; box-shadow: var(--ui-shadow);
  backdrop-filter: blur(22px) saturate(135%); -webkit-backdrop-filter: blur(22px) saturate(135%);
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-brand p { margin-top: 4px; font-size: 12px; color: var(--ui-muted); }
.footer-details { display: flex; flex-direction: column; gap: 6px; text-align: right; font-size: 12px; color: var(--ui-muted); }
@media (hover: hover) {
  html body :is(.btn-primary, .liquid-btn)[class]:hover { filter: brightness(1.08); box-shadow: var(--ui-shadow), 0 0 0 1px var(--ui-rim) !important; }
}
@media (max-width: 1023px) { #header-status { display: none; } }
@media (max-width: 639px) {
  html body .site-header { margin: 8px 8px 0; top: 8px; border-radius: 24px; }
  .site-header > div { padding: 10px; gap: 8px; }
  .site-header > div > .flex:last-child { gap: 8px; }
  .site-brand { gap: 8px; }
  .brand-name { font-size: 16px; }
  .service-strip { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding: 0 20px 16px; scrollbar-width: thin; }
  html body .site-footer { margin: 20px 10px 10px; padding: 22px; flex-direction: column; align-items: flex-start; gap: 20px; }
  .footer-details { text-align: left; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  :root { --ui-panel: #e9f1f6; --ui-control: #e9f1f6; --ui-rim: #718999; }
  html[data-theme="dark"] { --ui-panel: #192a3c; --ui-control: #192a3c; --ui-rim: #9cb5c6; }
  html body :is(.site-header, .site-footer, .summary-bar, .btn-primary, .liquid-btn)[class] { backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
}

html body .ui-kicker { color: var(--ui-accent) !important; }
html body .site-hero .font-mono, html[data-theme="dark"] body .site-hero .font-mono { color: var(--ui-muted) !important; }
html body .site-hero .bg-stone-900 { background: var(--ui-accent) !important; }

/* Both choices use light text; the dark choice has a neutral black material. */
html[data-appearance="dark"] {
  --ui-text: #f2f2f2; --ui-muted: #bfbfbf; --ui-accent: #e0e0e0;
  --ui-panel: linear-gradient(145deg, rgba(27,27,27,.88), rgba(12,12,12,.84));
  --ui-control: linear-gradient(145deg, rgba(150,150,150,.16), rgba(65,65,65,.18));
  --ui-rim: rgba(235,235,235,.23);
  --ui-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 10px 28px -18px rgba(0,0,0,.8);
  --night-base: #080808; --night-text: #f2f2f2; --night-secondary: #cecece; --night-muted: #b7b7b7;
  --glass-fill: linear-gradient(145deg, rgba(29,29,29,.76), rgba(12,12,12,.74));
  --glass-border: rgba(220,220,220,.20);
  --glass-shadow: inset 0 1px 0 rgba(255,255,255,.13), 0 10px 28px -16px rgba(0,0,0,.65);
  --control-glass: var(--ui-control); --glass-focus: #dedede;
}
html[data-appearance="dark"] body,
html[data-appearance="dark"] .shell-in { background: #080808 !important; }
html[data-appearance="dark"] body :is(.flashlight-card, .meuip-card, .tab-content > div:first-child, .byd-hero) {
  background: var(--glass-fill) !important; border-color: var(--glass-border) !important; box-shadow: var(--glass-shadow) !important;
}
html[data-appearance="dark"] .bento-glow { display: none; }
html[data-appearance="dark"] .tab-glass-pill { background: linear-gradient(150deg, rgba(235,235,235,.18), rgba(180,180,180,.08)); }
html[data-appearance="dark"] #tab-nav-scroll .tab-btn { color: #c8c8c8; }
html[data-appearance="dark"] #tab-nav-scroll .tab-btn.active { color: #fff; }
html[data-appearance="dark"] :is(.ambient-bg, .aurora) { display: none; }
html body #theme-toggle.optical-host { width: auto; min-width: 100px; padding: 0 14px; gap: 7px; color: var(--ui-text) !important; }
#theme-label { font-size: 12px; font-weight: 600; }
html body #theme-toggle iconify-icon { color: var(--ui-accent) !important; }
html body #theme-toggle:hover iconify-icon { transform: none; }
html body :is(.btn-primary, .liquid-btn)[class] { min-width: 44px; }
/* IP addresses and DNS values retain a predictable surface in either theme. */
html[data-theme="dark"] body :is(#meuip-ip-card, #meuip-dns, #meuip-lookup-result) {
  background: var(--ui-panel) !important; border: 1px solid var(--ui-rim) !important;
  box-shadow: var(--ui-shadow) !important; backdrop-filter: blur(12px) !important; -webkit-backdrop-filter: blur(12px) !important;
}
html[data-theme="dark"] body #meuip-ip-main { color: var(--ui-text) !important; text-shadow: none; -webkit-text-fill-color: var(--ui-text); }
html[data-theme="dark"] body #meuip-ip-main.text-stone-400 { color: var(--ui-muted) !important; -webkit-text-fill-color: var(--ui-muted); }
html[data-theme="dark"] body :is(#meuip-dns, #meuip-lookup-result, #meuip-ua, #meuip-lang, #meuip-proto) { color: var(--ui-text) !important; }
html[data-theme="dark"] body :is(#meuip-btn-v4, #meuip-btn-v6).btn-primary {
  background: var(--ui-panel) !important; border-color: var(--ui-accent) !important; color: var(--ui-text) !important;
  box-shadow: var(--ui-shadow), inset 0 -2px 0 var(--ui-accent) !important;
}
@media (max-width: 420px) {
  html body #theme-toggle.optical-host { min-width: 84px; padding: 0 9px; }
  .site-header .brand-mark { width: 34px; height: 38px; border-radius: 13px; }
  .site-header .brand-name { font-size: 14px; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  html[data-appearance="dark"] { --ui-panel: #171717; --ui-control: #242424; --ui-rim: #989898; --glass-fill: #171717; }
}
html[data-appearance="dark"] body .hero-gradient-text { background-image: linear-gradient(110deg, #f2f2f2, #bfbfbf) !important; }
