:root {
  --background: #07111f;
  --surface: #0d1a2c;
  --surface-strong: #122239;
  --surface-soft: #0a1626;
  --mint: #62e6b5;
  --mint-strong: #35dca3;
  --blue: #5aa7ff;
  --text: #f4f8ff;
  --muted: #8ea1bb;
  --border: rgba(255, 255, 255, 0.075);
  --danger: #ff6f83;
  --warning: #ffc66d;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.27);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--background);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; margin: 0; }
body {
  min-width: 320px;
  background:
    radial-gradient(circle at 15% -10%, rgba(58, 116, 179, 0.14), transparent 34rem),
    var(--background);
  overflow-x: hidden;
}
button, input { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.ambient {
  position: fixed;
  width: 30rem;
  height: 30rem;
  border-radius: 50%;
  filter: blur(110px);
  pointer-events: none;
  opacity: 0.08;
}
.ambient-one { top: -15rem; right: -8rem; background: var(--mint); }
.ambient-two { bottom: -18rem; left: 22%; background: var(--blue); }

.login-layout {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.login-card {
  width: min(100%, 460px);
  padding: 34px;
  background: linear-gradient(145deg, rgba(18, 34, 57, 0.97), rgba(10, 22, 38, 0.97));
  border: 1px solid var(--border);
  border-radius: 30px;
  box-shadow: var(--shadow);
}
.login-brand, .sidebar-brand { display: flex; align-items: center; gap: 14px; }
.login-brand h1 { margin: 2px 0 0; font-size: 27px; letter-spacing: -0.04em; }
.brand-mark {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  grid-template-columns: repeat(2, auto);
  gap: 0;
  font-weight: 900;
  font-size: 20px;
  color: #06131e;
  background: linear-gradient(145deg, var(--mint), #76b8ff);
  box-shadow: 0 14px 35px rgba(98, 230, 181, 0.2);
}
.brand-mark span:last-child { transform: translateX(-2px); }
.brand-mark-small { width: 44px; height: 44px; border-radius: 14px; font-size: 14px; }
.eyebrow {
  margin: 0;
  color: var(--mint);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
}
.login-copy { color: var(--muted); line-height: 1.65; margin: 24px 0 26px; font-size: 13px; }
form label { display: block; margin-top: 15px; }
form label span { display: block; color: #bac8db; font-size: 12px; font-weight: 700; margin: 0 0 8px 3px; }
input {
  width: 100%;
  height: 50px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: rgba(4, 12, 23, 0.58);
  color: var(--text);
  padding: 0 15px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
input:focus { border-color: rgba(98, 230, 181, 0.55); box-shadow: 0 0 0 4px rgba(98, 230, 181, 0.08); }
.form-error { min-height: 18px; margin: 10px 0 0; color: var(--danger); font-size: 12px; }
.primary-button, .secondary-button {
  border: 0;
  border-radius: 14px;
  font-weight: 800;
  transition: transform 150ms ease, filter 150ms ease, background 150ms ease;
}
.primary-button {
  width: 100%;
  min-height: 50px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 18px;
  background: linear-gradient(120deg, var(--mint), #6cc5ff);
  color: #071522;
}
.primary-button:hover, .secondary-button:hover { filter: brightness(1.06); transform: translateY(-1px); }
.primary-button:disabled { opacity: 0.6; cursor: wait; }
.security-note { margin-top: 22px; color: var(--muted); font-size: 10.5px; display: flex; gap: 8px; align-items: center; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(98, 230, 181, 0.1); display: inline-block; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 254px minmax(0, 1fr); }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 254px;
  display: flex;
  flex-direction: column;
  padding: 22px 16px 16px;
  background: rgba(8, 19, 33, 0.94);
  border-right: 1px solid var(--border);
  backdrop-filter: blur(22px);
  z-index: 30;
}
.sidebar-brand { padding: 0 7px 22px; }
.sidebar-brand strong { display: block; font-size: 15px; }
.sidebar-brand span { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }
.navigation { flex: 1; overflow-y: auto; padding: 2px 0; }
.nav-label { color: #637791; font-size: 9px; font-weight: 900; letter-spacing: 0.15em; margin: 20px 12px 8px; text-transform: uppercase; }
.nav-item {
  position: relative;
  width: 100%;
  min-height: 44px;
  border: 0;
  border-radius: 13px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  margin: 3px 0;
  color: #a8b8ce;
  background: transparent;
  text-align: left;
  font-size: 12px;
  font-weight: 700;
}
.nav-item img { width: 25px; height: 25px; border-radius: 8px; }
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, 0.035); }
.nav-item.is-active { color: var(--text); background: linear-gradient(90deg, rgba(98, 230, 181, 0.13), rgba(90, 167, 255, 0.06)); }
.nav-item.is-active::before { content: ""; position: absolute; left: 0; width: 3px; height: 22px; border-radius: 0 4px 4px 0; background: var(--mint); }
.nav-child { min-height: 38px; padding-left: 44px; font-size: 11px; }
.nav-child .nav-icon { margin-left: -25px; }
.nav-icon { width: 21px; text-align: center; color: var(--mint); font-size: 16px; }
.nav-badge { margin-left: auto; padding: 3px 7px; border-radius: 999px; color: var(--mint); background: rgba(98, 230, 181, 0.1); font-size: 8px; text-transform: uppercase; }
.nav-item.is-muted { color: #687c96; }
.sidebar-footer { display: grid; grid-template-columns: 35px minmax(0, 1fr) 32px; gap: 10px; align-items: center; padding: 14px 6px 2px; border-top: 1px solid var(--border); }
.operator-avatar { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; color: #071522; background: var(--mint); font-size: 10px; font-weight: 900; }
.operator-copy { min-width: 0; }
.operator-copy strong, .operator-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.operator-copy strong { font-size: 10.5px; }
.operator-copy span { color: var(--muted); font-size: 8.5px; margin-top: 3px; }
.icon-button { width: 34px; height: 34px; border-radius: 11px; border: 1px solid var(--border); background: rgba(255,255,255,.025); color: var(--muted); }
.icon-button:hover { color: var(--text); border-color: rgba(255,255,255,.14); }

.workspace { grid-column: 2; min-width: 0; }
.topbar { min-height: 96px; display: flex; align-items: center; gap: 15px; padding: 20px clamp(20px, 4vw, 52px); border-bottom: 1px solid var(--border); }
.topbar h1 { margin: 4px 0 0; font-size: 23px; letter-spacing: -0.035em; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 13px; }
.live-indicator { color: var(--muted); font-size: 10px; display: flex; gap: 8px; align-items: center; }
.secondary-button { min-height: 38px; padding: 0 15px; border: 1px solid var(--border); color: #dce7f5; background: rgba(255,255,255,.035); font-size: 11px; }
.menu-button { display: none; }
.content { padding: 28px clamp(20px, 4vw, 52px) 52px; max-width: 1560px; width: 100%; margin: 0 auto; }

.hero-panel { padding: 25px 27px; border-radius: 24px; background: linear-gradient(125deg, rgba(98,230,181,.12), rgba(90,167,255,.07) 48%, rgba(13,26,44,.72)); border: 1px solid rgba(98,230,181,.13); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.hero-panel h2 { margin: 4px 0 7px; font-size: 22px; letter-spacing: -.035em; }
.hero-panel p { margin: 0; color: var(--muted); font-size: 11.5px; line-height: 1.55; max-width: 650px; }
.hero-logo { width: 70px; height: 70px; border-radius: 22px; box-shadow: 0 15px 35px rgba(0,0,0,.2); }
.platform-toolbar {
  margin-top: 13px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(13, 26, 44, .72);
}
.platform-toolbar > div:first-child strong,
.platform-toolbar > div:first-child span { display: block; }
.platform-toolbar > div:first-child strong { font-size: 10.5px; }
.platform-toolbar > div:first-child span { margin-top: 4px; color: var(--muted); font-size: 8.5px; }
.platform-switch { display: grid; grid-template-columns: repeat(3, minmax(105px, 1fr)); gap: 7px; }
.platform-option {
  min-height: 45px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  color: #9cafc5;
  background: rgba(255,255,255,.018);
  text-align: left;
  transition: border-color 150ms ease, background 150ms ease, color 150ms ease;
}
.platform-option:hover { color: var(--text); border-color: rgba(255,255,255,.14); }
.platform-option.is-active {
  color: var(--text);
  border-color: rgba(98,230,181,.34);
  background: linear-gradient(120deg, rgba(98,230,181,.13), rgba(90,167,255,.07));
  box-shadow: inset 0 0 0 1px rgba(98,230,181,.04);
}
.platform-option span,
.platform-option small { display: block; }
.platform-option span { font-size: 10px; font-weight: 850; }
.platform-option small { margin-top: 3px; color: #6f829a; font-size: 7.5px; }
.platform-option.is-active small { color: var(--mint); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin: 30px 0 13px; }
.section-heading h2 { margin: 0; font-size: 15px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 10px; }
.timestamp { color: #637791; font-size: 9px; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.metric-card, .panel, .app-card {
  background: linear-gradient(145deg, rgba(18,34,57,.86), rgba(11,24,41,.88));
  border: 1px solid var(--border);
  box-shadow: 0 10px 35px rgba(0,0,0,.09);
}
.metric-card { min-height: 124px; border-radius: 19px; padding: 17px; position: relative; overflow: hidden; }
.metric-card::after { content: ""; position: absolute; right: -22px; top: -25px; width: 75px; height: 75px; border-radius: 50%; background: var(--accent, var(--mint)); opacity: .055; }
.metric-label { color: var(--muted); font-size: 9.5px; font-weight: 700; }
.metric-value { margin-top: 15px; font-size: 26px; font-weight: 850; letter-spacing: -.04em; }
.metric-foot { margin-top: 8px; color: #6f829a; font-size: 8.5px; }
.accent-blue { --accent: var(--blue); }
.accent-warning { --accent: var(--warning); }
.accent-danger { --accent: var(--danger); }

.two-column { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, .8fr); gap: 14px; }
.panel { border-radius: 21px; padding: 20px; min-width: 0; }
.panel-header { display: flex; align-items: start; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.panel-header h3 { margin: 0; font-size: 13px; }
.panel-header p { margin: 5px 0 0; color: var(--muted); font-size: 9.5px; }
.chart { min-height: 255px; width: 100%; overflow: hidden; }
.chart svg { width: 100%; height: 255px; overflow: visible; }
.chart-grid { stroke: rgba(255,255,255,.055); stroke-width: 1; }
.chart-line { fill: none; stroke: url(#lineGradient); stroke-width: 3; stroke-linejoin: round; stroke-linecap: round; }
.chart-area { fill: url(#areaGradient); }
.chart-dot { fill: var(--mint); stroke: #0c1b2d; stroke-width: 3; }
.chart-labels { display: flex; justify-content: space-between; color: #62758d; font-size: 8px; margin-top: 3px; }

.version-list { display: grid; gap: 10px; }
.version-row { padding: 12px; border-radius: 14px; border: 1px solid var(--border); background: rgba(255,255,255,.018); }
.version-top { display: flex; justify-content: space-between; align-items: center; font-size: 10.5px; font-weight: 800; }
.version-top span:last-child { color: var(--mint); }
.progress { width: 100%; height: 5px; margin: 10px 0 7px; border: 0; background: rgba(255,255,255,.055); border-radius: 99px; overflow: hidden; appearance: none; }
.progress::-webkit-progress-bar { background: rgba(255,255,255,.055); border-radius: 99px; }
.progress::-webkit-progress-value { background: linear-gradient(90deg, var(--mint), var(--blue)); border-radius: 99px; }
.progress::-moz-progress-bar { background: linear-gradient(90deg, var(--mint), var(--blue)); border-radius: 99px; }
.version-meta { color: var(--muted); font-size: 8.5px; display: flex; justify-content: space-between; }

.data-table { width: 100%; border-collapse: collapse; }
.data-table th { color: #6d8098; font-size: 8.5px; text-align: left; text-transform: uppercase; letter-spacing: .09em; padding: 11px 12px; border-bottom: 1px solid var(--border); }
.data-table td { padding: 14px 12px; font-size: 10.5px; border-bottom: 1px solid rgba(255,255,255,.045); }
.data-table tr:last-child td { border-bottom: 0; }
.pill { display: inline-flex; padding: 4px 8px; border-radius: 99px; color: var(--mint); background: rgba(98,230,181,.09); font-size: 8.5px; font-weight: 800; }

.app-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.app-card { border-radius: 21px; padding: 19px; }
.app-card-top { display: flex; align-items: center; gap: 12px; }
.app-card img, .app-placeholder { width: 43px; height: 43px; border-radius: 13px; }
.app-placeholder { display: grid; place-items: center; border: 1px dashed rgba(255,255,255,.12); color: #657991; background: rgba(255,255,255,.02); }
.app-card h3 { margin: 0; font-size: 13px; }
.app-card p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.app-status { margin-left: auto; font-size: 8px; color: var(--mint); text-transform: uppercase; }
.app-status.planned { color: #6f829a; }
.app-card footer { margin-top: 18px; padding-top: 13px; border-top: 1px solid var(--border); color: var(--muted); font-size: 9px; }

.management-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.management-card { padding: 20px; min-height: 165px; border: 1px solid var(--border); border-radius: 20px; background: rgba(255,255,255,.018); }
.management-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 12px; color: var(--mint); background: rgba(98,230,181,.09); }
.management-card h3 { margin: 17px 0 7px; font-size: 12px; }
.management-card p { margin: 0; color: var(--muted); font-size: 9.5px; line-height: 1.6; }
.coming-soon { display: inline-block; margin-top: 13px; color: #7890aa; font-size: 8px; text-transform: uppercase; letter-spacing: .1em; }
.empty-state { min-height: 250px; display: grid; place-items: center; text-align: center; color: var(--muted); }
.empty-state h2 { color: var(--text); margin: 12px 0 6px; font-size: 17px; }
.empty-state p { margin: 0; max-width: 430px; font-size: 10px; line-height: 1.6; }
.loading-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.skeleton { height: 124px; border-radius: 19px; background: linear-gradient(100deg, rgba(255,255,255,.025), rgba(255,255,255,.065), rgba(255,255,255,.025)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

.toast { position: fixed; right: 20px; bottom: 20px; z-index: 60; padding: 12px 15px; border-radius: 13px; color: #dce9f7; background: #14243a; border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 10px; }
.sidebar-backdrop { display: none; }

@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .app-grid, .management-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .app-shell { display: block; }
  .workspace { grid-column: auto; }
  .sidebar { transform: translateX(-105%); transition: transform 180ms ease; box-shadow: var(--shadow); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 20; border: 0; background: rgba(0,0,0,.48); }
  .sidebar-backdrop.is-open { display: block; }
  .menu-button { display: inline-grid; place-items: center; }
  .two-column { grid-template-columns: 1fr; }
  .live-indicator { display: none; }
  .platform-toolbar { align-items: stretch; flex-direction: column; }
}
@media (max-width: 560px) {
  .login-card { padding: 25px 20px; border-radius: 24px; }
  .topbar { min-height: 84px; padding: 15px 17px; }
  .topbar h1 { font-size: 20px; }
  .topbar-actions { gap: 7px; }
  .secondary-button { padding: 0 11px; }
  .content { padding: 20px 15px 40px; }
  .metric-grid, .app-grid, .management-grid, .loading-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 110px; }
  .hero-panel { padding: 20px; }
  .hero-logo { display: none; }
  .platform-switch { grid-template-columns: 1fr; }
  .platform-option { min-height: 42px; }
  .panel { padding: 16px; overflow-x: auto; }
}
