:root {
  color-scheme: light;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --line: #dde3ea;
  --text: #1f2430;
  --muted: #6b7280;
  --primary: #f05a5f;
  --primary-dark: #d9434d;
  --primary-soft: #fff0f0;
  --green: #2e7d32;
  --green-soft: #edf7ee;
  --red: #ff3b30;
  --amber: #ed6c02;
  font-family: Montserrat, Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); overflow-x: hidden; }
button, input { font: inherit; }
button { color: inherit; }
.ambient { position: fixed; width: 38rem; height: 38rem; filter: blur(120px); border-radius: 50%; opacity: .08; pointer-events: none; z-index: -1; }
.ambient-one { background: #f05a5f; top: -22rem; right: 3%; }
.ambient-two { background: #ff9a9d; bottom: -28rem; left: -12rem; opacity: .06; }
.topbar { height: 76px; border-bottom: 1px solid #24262b; display: flex; align-items: center; gap: 28px; padding: 0 max(28px, calc((100vw - 1240px) / 2)); background: #090a0c; color: #f5f7fb; position: sticky; top: 0; z-index: 10; box-shadow: 0 4px 18px rgba(9,10,12,.12); }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; margin-right: auto; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: linear-gradient(145deg, #f36b70, #d9434d); color: #fff; font: 800 20px ui-sans-serif, system-ui; box-shadow: 0 8px 24px rgba(240, 90, 95, .24); }
.brand strong, .brand small { display: block; line-height: 1.05; }
.brand strong { font: 800 17px ui-sans-serif, system-ui; letter-spacing: -.02em; }
.brand small { color: #b8c0cc; font-size: 11px; text-transform: uppercase; letter-spacing: .14em; margin-top: 4px; }
.environment { color: #b8c0cc; font-size: 12px; letter-spacing: .04em; padding: 8px 12px; border: 1px solid #31343a; border-radius: 999px; }
.environment span { display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #ff9a9d; box-shadow: 0 0 10px rgba(240,90,95,.8); }
.refresh-button { border: 1px solid #3a3d43; background: #17191d; border-radius: 9px; padding: 9px 14px; cursor: pointer; transition: .2s ease; }
.refresh-button:hover { border-color: var(--primary); background: #24262b; }
.user-name { color: #b8c0cc; font-size: 12px; }
.logout-button { border: 0; background: transparent; color: #b8c0cc; font-size: 12px; cursor: pointer; padding: 8px 0; }
.logout-button:hover { color: var(--text); }
main { max-width: 1240px; margin: 0 auto; padding: 30px 28px 64px; }
.dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.dashboard-heading h1 { font: 700 28px/1.15 ui-sans-serif, system-ui; letter-spacing: -.035em; margin: 3px 0 0; }
.section-kicker { color: var(--primary); font-size: 9px; font-weight: 800; letter-spacing: .18em; }
.compact-status { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 12px; }
.compact-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 7px rgba(46,125,50,.35); }
.compact-status strong { color: var(--text); font-size: 14px; }
.eyebrow { color: var(--primary); font-size: 11px; font-weight: 700; letter-spacing: .22em; margin: 0 0 18px; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.tabs { display: flex; gap: 22px; }
.tab { border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 13px 0; color: var(--muted); cursor: pointer; font-size: 13px; }
.tab.active { color: var(--text); border-color: var(--primary); }
.tab span { margin-left: 5px; color: #667b75; }
.search { display: flex; gap: 8px; align-items: center; color: var(--muted); border: 1px solid var(--line); padding: 8px 12px; border-radius: 9px; margin-bottom: 9px; background: #fff; }
.search input { border: 0; outline: 0; background: transparent; color: var(--text); width: 160px; }
.projects-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.project-card { --accent: #f05a5f; min-height: 320px; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; padding: 22px; background: #fff; position: relative; overflow: hidden; box-shadow: 0 8px 24px rgba(31,36,48,.055); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.project-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .65; }
.project-card:hover { transform: translateY(-3px); border-color: #cfd6df; box-shadow: 0 13px 30px rgba(31,36,48,.09); }
.accent-blue, .accent-violet, .accent-amber, .accent-rose, .accent-cyan, .accent-slate { --accent: #f05a5f; }
.card-head { display: flex; justify-content: space-between; gap: 15px; }
.project-icon { width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); display: grid; place-items: center; font: 800 16px ui-sans-serif, system-ui; }
.summary-pill { height: fit-content; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; border: 1px solid var(--line); border-radius: 999px; padding: 7px 9px; color: var(--muted); }
.summary-pill.online { color: var(--green); border-color: #cfe7d1; background: var(--green-soft); }
.summary-pill.attention { color: var(--amber); border-color: #f2d4bb; background: #fff7ed; }
.project-card h2 { font: 700 19px ui-sans-serif, system-ui; letter-spacing: -.02em; margin: 20px 0 6px; }
.project-description { color: var(--muted); font-size: 12px; min-height: 36px; margin: 0 0 18px; line-height: 1.5; }
.components { border-top: 1px solid var(--line); margin-top: auto; }
.component { display: grid; grid-template-columns: 1fr auto auto; align-items: center; gap: 10px; min-height: 46px; border-bottom: 1px solid var(--line); font-size: 12px; }
.component-name { display: flex; align-items: center; gap: 8px; text-transform: capitalize; }
.state-dot { width: 7px; height: 7px; border-radius: 50%; background: #65746f; }
.state-dot.online { background: var(--green); box-shadow: 0 0 7px rgba(46,125,50,.35); }
.state-dot.degraded, .state-dot.failed { background: var(--amber); }
.component-port { color: #6e837d; font-family: monospace; }
.component-actions { display: flex; gap: 5px; }
.icon-button { border: 0; background: transparent; color: #8fa29d; cursor: pointer; border-radius: 7px; width: 27px; height: 27px; padding: 0; }
.icon-button:hover { color: var(--primary-dark); background: var(--primary-soft); }
.icon-button:disabled { opacity: .28; cursor: not-allowed; }
.card-footer { display: flex; gap: 8px; padding-top: 17px; }
.open-button { flex: 1; text-align: center; text-decoration: none; background: var(--primary); color: #fff; border-radius: 8px; padding: 10px; font-size: 12px; font-weight: 700; box-shadow: 0 4px 12px rgba(240,90,95,.18); }
.open-button.disabled { opacity: .35; pointer-events: none; }
.source-label { align-self: center; color: #597069; font-size: 9px; text-transform: uppercase; letter-spacing: .08em; }
.loading-card { grid-column: 1/-1; display: grid; gap: 12px; padding: 30px; border: 1px solid var(--line); border-radius: 18px; }
.loading-card span { height: 12px; border-radius: 8px; background: linear-gradient(90deg, #edf0f4, #f8f9fb, #edf0f4); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
.loading-card span:nth-child(2) { width: 70%; } .loading-card span:nth-child(3) { width: 45%; }
@keyframes shimmer { to { background-position: -200% 0; } }
.empty { grid-column: 1/-1; color: var(--muted); text-align: center; padding: 70px 20px; }
.logs-dialog { width: min(900px, calc(100% - 32px)); padding: 0; border: 1px solid var(--line); border-radius: 12px; color: var(--text); background: #fff; box-shadow: 0 28px 90px rgba(9,10,12,.28); }
.logs-dialog::backdrop { background: rgba(0, 0, 0, .72); backdrop-filter: blur(5px); }
.dialog-header { display: flex; justify-content: space-between; align-items: center; padding: 20px 22px; border-bottom: 1px solid var(--line); }
.dialog-header small { color: var(--primary); letter-spacing: .12em; font-size: 9px; }
.dialog-header h2 { margin: 4px 0 0; font: 700 17px Manrope; }
.dialog-header button { border: 0; background: transparent; font-size: 25px; color: var(--muted); cursor: pointer; }
.logs-dialog pre { min-height: 330px; max-height: 60vh; overflow: auto; margin: 0; padding: 22px; color: #d7dce5; background: #090a0c; font: 11px/1.65 ui-monospace, SFMono-Regular, Menlo, monospace; white-space: pre-wrap; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 20px); padding: 11px 16px; background: #1f2430; color: #fff; border-radius: 9px; font-size: 12px; font-weight: 600; opacity: 0; pointer-events: none; transition: .25s ease; z-index: 30; box-shadow: 0 8px 24px rgba(31,36,48,.2); }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }
@media (max-width: 900px) { .projects-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .environment, .user-name { display: none; } .topbar { padding: 0 18px; gap: 15px; } main { padding: 24px 18px 60px; } .dashboard-heading { margin-bottom: 14px; } .toolbar { align-items: stretch; flex-direction: column-reverse; border: 0; } .tabs { overflow-x: auto; border-bottom: 1px solid var(--line); } .search { margin: 0; } .search input { width: 100%; } .projects-grid { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
