:root {
  --bg: #f3f5f7;
  --card: #ffffff;
  --text: #2c2925;
  --muted: #7b7f86;
  --line: #e5e7eb;
  --honey: #c58a22;
  --honey-dark: #8a5a13;
  --honey-soft: #fff4d8;
  --green: #2e9b62;
  --green-soft: #e7f7ee;
  --orange: #e68a19;
  --orange-soft: #fff1df;
  --red: #d84949;
  --red-soft: #fdeaea;
  --gray: #8a9099;
  --gray-soft: #eef0f3;
  --radius: 22px;
  --shadow: 0 12px 35px rgba(34, 38, 45, .07);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: var(--text); background: var(--bg); }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
code { background: #f2eee8; border-radius: 7px; padding: 2px 6px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 26px 18px 18px; background: #26221d; color: #f9f5ee; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 10px 26px; }
.brand-mark { width: 46px; height: 46px; display: inline-flex; align-items: center; justify-content: center; border-radius: 15px; color: #3c2b0d; background: linear-gradient(145deg, #ffd46b, #d6941c); font-weight: 900; letter-spacing: -.04em; box-shadow: inset 0 1px rgba(255,255,255,.5); }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 18px; }
.brand small { color: #cabfae; margin-top: 1px; }
.nav { display: grid; gap: 6px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 12px 13px; border-radius: 14px; color: #d7cec0; font-weight: 650; }
.nav a span { width: 25px; height: 25px; display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; background: rgba(255,255,255,.07); }
.nav a:hover, .nav a.active { color: #fff; background: rgba(255, 193, 76, .14); }
.nav a.active span { color: #3c2b0d; background: #f3b83d; }
.nav-submenu { display: grid; gap: 2px; margin: -2px 0 5px 38px; padding-left: 10px; border-left: 1px solid rgba(255,255,255,.14); }
.nav .nav-submenu a { min-height: 30px; padding: 6px 10px; border-radius: 9px; color: #bdb3a5; font-size: 13px; font-weight: 600; line-height: 1.2; }
.nav .nav-submenu a:hover, .nav .nav-submenu a.active { color: #fff; background: rgba(255,193,76,.12); }
.nav .nav-submenu a.active { box-shadow: inset 2px 0 #f3b83d; }
.sidebar-footer { margin-top: auto; padding: 16px 10px 2px; border-top: 1px solid rgba(255,255,255,.1); }
.user-mini { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; min-width: 0; }
.user-mini > span:last-child { min-width: 0; }
.user-mini strong, .user-mini small { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-mini small { color: #b9ae9e; font-size: 12px; }
.avatar { width: 36px; height: 36px; flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 12px; background: #f3b83d; color: #39280d; font-weight: 800; }
.main-content { min-width: 0; padding: 28px 34px 50px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.topbar h1 { margin: 0; font-size: clamp(25px, 3vw, 34px); letter-spacing: -.035em; }
.topbar p { margin: 5px 0 0; color: var(--muted); }
.topbar-badge { display: flex; align-items: center; gap: 8px; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 13px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gray); }
.dot.ok { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.mobile-menu { display: none; border: 0; background: #fff; border-radius: 12px; width: 42px; height: 42px; box-shadow: var(--shadow); }
.stats-grid { display: grid; grid-template-columns: repeat(5, minmax(140px, 1fr)); gap: 14px; margin-bottom: 28px; }
.stat-card { background: var(--card); border: 1px solid rgba(225,228,233,.8); border-radius: 18px; padding: 17px; display: flex; align-items: center; gap: 12px; box-shadow: 0 8px 24px rgba(35, 39, 46, .045); }
.stat-card small, .stat-card strong { display: block; }
.stat-card small { color: var(--muted); font-size: 12px; margin-bottom: 2px; }
.stat-card strong { font-size: 27px; letter-spacing: -.04em; }
.stat-icon, .card-icon { flex: none; display: inline-flex; align-items: center; justify-content: center; border-radius: 14px; font-weight: 900; }
.stat-icon { width: 46px; height: 46px; }
.card-icon { width: 50px; height: 50px; }
.honey { background: var(--honey-soft); color: var(--honey-dark); }
.green { background: var(--green-soft); color: var(--green); }
.red { background: var(--red-soft); color: var(--red); }
.gray { background: var(--gray-soft); color: var(--gray); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin: 27px 0 14px; }
.section-heading h2 { margin: 0; font-size: 21px; }
.section-heading p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.admin-anchor { scroll-margin-top: 22px; }
.hive-grid { display: grid; grid-template-columns: repeat(3, minmax(250px, 1fr)); gap: 17px; }
.hive-card { position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 19px; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease; }
.hive-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--gray); }
.hive-card:hover { transform: translateY(-2px); box-shadow: 0 16px 40px rgba(34, 38, 45, .1); }
.hive-card.state-ok::before { background: var(--green); }
.hive-card.state-warning::before { background: var(--orange); }
.hive-card.state-alarm::before { background: var(--red); }
.hive-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.hive-card h3 { margin: 3px 0 0; font-size: 19px; }
.hive-card small { color: var(--muted); }
.weight-value { margin: 23px 0 18px; font-size: 39px; font-weight: 850; letter-spacing: -.055em; }
.weight-value small { font-size: 15px; font-weight: 700; }
.metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.metric-row span { color: var(--muted); font-size: 11px; }
.metric-row strong { display: block; color: var(--text); margin-top: 4px; font-size: 14px; }
.hive-card footer { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 12px; color: var(--muted); font-size: 12px; }
.status-pill { display: inline-flex; align-items: center; justify-content: center; border-radius: 999px; padding: 5px 9px; font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .04em; background: var(--gray-soft); color: var(--gray); white-space: nowrap; }
.status-pill.ok, .status-pill.info { background: var(--green-soft); color: var(--green); }
.status-pill.warning, .status-pill.new { background: var(--orange-soft); color: var(--orange); }
.status-pill.alarm, .status-pill.critical { background: var(--red-soft); color: var(--red); }
.status-pill.offline, .status-pill.closed { background: var(--gray-soft); color: var(--gray); }
.table-card, .form-card, .chart-card, .content-card, .subscription-hero, .plan-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 28px rgba(34, 38, 45, .05); }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { text-align: left; padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .05em; background: #fbfbfc; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fdfcf9; }
.center { text-align: center; }
.muted { color: var(--muted); }
.grow { flex: 1; min-width: 0; }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(250px, 1fr)); gap: 16px; }
.card-grid.two { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
.content-card { display: flex; gap: 15px; align-items: flex-start; padding: 19px; }
.content-card.vertical { display: flex; flex-direction: column; align-items: flex-start; }
.content-card h3 { margin: 2px 0 6px; }
.content-card p { margin: 4px 0; color: var(--muted); line-height: 1.55; }
.content-card small { color: var(--muted); }
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.toolbar.wrap { flex-wrap: wrap; }
.toolbar-actions { display: flex; gap: 8px; }
.button { border: 0; border-radius: 12px; padding: 10px 14px; font-weight: 750; transition: opacity .15s, transform .15s; display: inline-flex; align-items: center; justify-content: center; gap: 7px; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.button.primary { background: linear-gradient(145deg, #d99c2a, #b67612); color: #fff; box-shadow: 0 8px 18px rgba(183, 118, 18, .22); }
.button.secondary { background: var(--honey-soft); color: var(--honey-dark); }
.button.ghost { background: #f2f3f5; color: #555b64; }
.button.danger { background: var(--red-soft); color: var(--red); }
.button.large { min-height: 48px; }
.button.small { padding: 7px 10px; font-size: 12px; }
.link-button { appearance: none; border: 0; background: none; color: #d5c9b8; padding: 0; }
.text-link { color: var(--honey-dark); font-weight: 700; }
.form-card { padding: 21px; margin-bottom: 18px; }
.form-card h2 { margin: 0 0 14px; }
.form-card p { color: var(--muted); line-height: 1.55; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid label, .stack-form label { display: grid; gap: 7px; color: #5f6268; font-size: 13px; font-weight: 700; }
.form-grid input, .form-grid select, .form-grid textarea, .stack-form input, .stack-form select, .stack-form textarea { width: 100%; border: 1px solid #dfe2e7; border-radius: 12px; background: #fbfcfd; padding: 11px 12px; color: var(--text); outline: none; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus, .stack-form input:focus { border-color: #d29a37; box-shadow: 0 0 0 4px var(--honey-soft); }
.span-2 { grid-column: span 2; }
.form-actions { display: flex; justify-content: flex-end; }
.check-row { display: flex !important; grid-template-columns: auto 1fr !important; align-items: center; gap: 9px !important; }
.check-row input { width: auto; }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 42px 24px; border: 1px dashed #d6d9df; border-radius: var(--radius); background: rgba(255,255,255,.55); }
.empty-state > span { width: 60px; height: 60px; display: inline-flex; align-items: center; justify-content: center; border-radius: 20px; background: var(--honey-soft); color: var(--honey-dark); font-size: 25px; font-weight: 900; }
.empty-state h3 { margin: 14px 0 5px; }
.empty-state p { color: var(--muted); }
.license-banner { margin: -6px 0 22px; padding: 13px 16px; border: 1px solid #f0c98d; border-radius: 14px; background: #fff6e8; color: #855311; }
.hero-measurement { display: flex; justify-content: space-between; gap: 30px; align-items: center; padding: 24px; border-radius: 24px; background: linear-gradient(140deg, #fff, #f7f8fa); border: 1px solid var(--line); box-shadow: var(--shadow); }
.hero-measurement h2 { margin: 12px 0 2px; font-size: 48px; letter-spacing: -.06em; }
.hero-measurement h2 small { color: var(--muted); font-size: 17px; }
.hero-measurement p { margin: 0; color: var(--muted); }
.hero-metrics { display: grid; grid-template-columns: repeat(2, minmax(120px, 1fr)); gap: 12px; }
.hero-metrics span { padding: 13px; min-width: 140px; border-radius: 15px; background: #fff; color: var(--muted); font-size: 12px; border: 1px solid var(--line); }
.hero-metrics strong { display: block; color: var(--text); font-size: 17px; margin-top: 5px; }
.hero-weight-pair { display: flex; align-items: flex-end; gap: 34px; margin-top: 12px; }
.hero-weight-pair > span > small { color: var(--muted); font-size: 12px; font-weight: 750; text-transform: uppercase; letter-spacing: .05em; }
.hero-weight-pair h2 { margin-top: 3px; }
.hero-weight-pair .net h2 { color: #248552; }
.tare-panel { margin: 2px 0 18px; }
.tare-quick-actions { margin-bottom: 16px; }
.tare-history { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 15px 18px; }
.tare-history > strong { display: block; margin-bottom: 7px; }
.tare-history > div { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 0; border-top: 1px solid var(--line); }
.tare-history > div span { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tare-history small { color: var(--muted); }
.range-group { display: inline-flex; gap: 4px; padding: 4px; background: #e9ebee; border-radius: 13px; overflow-x: auto; }
.range-group button { border: 0; background: transparent; color: #686d75; border-radius: 10px; padding: 8px 11px; white-space: nowrap; }
.range-group button.active { background: #fff; color: var(--honey-dark); box-shadow: 0 3px 10px rgba(0,0,0,.08); font-weight: 750; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(280px, 1fr)); gap: 16px; }
.chart-card { padding: 18px 18px 13px; min-width: 0; overflow: hidden; transition: border-color .2s, box-shadow .2s, transform .2s; }
.chart-card:hover { border-color: rgba(var(--chart-rgb), .42); box-shadow: 0 14px 34px rgba(34, 38, 45, .09); transform: translateY(-1px); }
.chart-card-head, .chart-card-head > div { display: flex; align-items: center; justify-content: space-between; gap: 11px; }
.chart-card-head > div > div { display: grid; gap: 2px; }
.chart-card-head small { color: var(--muted); font-size: 12px; font-weight: 700; }
.chart-card-head strong { font-size: 25px; letter-spacing: -.035em; }
.weight-chart-values { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.weight-chart-values strong { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12px; letter-spacing: 0; }
.weight-chart-values b { color: var(--text); font-size: 17px; }
.legend-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto; }
.legend-dot.gross { background: #e7a52e; }
.legend-dot.net { background: #35a86b; }
.chart-tooltip strong + strong { margin-top: 3px; }
.chart-icon { width: 39px; height: 39px; display: inline-flex; align-items: center; justify-content: center; border-radius: 13px; color: var(--chart-color); background: rgba(var(--chart-rgb), .12); font-size: 13px; font-weight: 900; }
.chart-unit { align-self: flex-start; padding: 5px 9px; border-radius: 999px; color: var(--chart-color); background: rgba(var(--chart-rgb), .1); font-size: 11px; font-weight: 800; }
.chart-stage { position: relative; min-height: 250px; margin: 12px -4px 0; }
.chart-card canvas { width: 100%; max-width: 100%; height: 250px; display: block; touch-action: pan-y; cursor: crosshair; }
.chart-tooltip { position: absolute; z-index: 3; min-width: 128px; padding: 9px 11px; pointer-events: none; border: 1px solid rgba(var(--chart-rgb), .25); border-radius: 11px; color: #fff; background: rgba(37, 41, 47, .94); box-shadow: 0 8px 22px rgba(0,0,0,.18); transform: translateY(-2px); }
.chart-tooltip strong, .chart-tooltip small { display: block; white-space: nowrap; }
.chart-tooltip strong { font-size: 13px; }
.chart-tooltip small { margin-top: 3px; color: #cbd0d7; font-size: 10px; }
.chart-loader { position: absolute; inset: 0; display: grid; place-items: center; border-radius: 13px; color: var(--muted); background: rgba(255,255,255,.82); font-size: 12px; backdrop-filter: blur(2px); }
.chart-loader[hidden], .chart-tooltip[hidden] { display: none; }
.chart-summary { display: flex; align-items: center; gap: 14px; padding-top: 11px; border-top: 1px solid var(--line); color: var(--muted); font-size: 10px; }
.chart-summary span:last-child { margin-left: auto; }
.chart-summary strong { color: #59606a; font-size: 11px; }
.chart-live-dot { width: 6px; height: 6px; display: inline-block; margin-right: 5px; border-radius: 50%; background: var(--chart-color); box-shadow: 0 0 0 3px rgba(var(--chart-rgb), .12); }
.chart-card.is-empty .chart-live-dot { background: var(--gray); box-shadow: none; }
.diagnostic-chain { display: flex; align-items: stretch; gap: 8px; overflow-x: auto; padding-bottom: 6px; }
.diagnostic-node { min-width: 145px; flex: 1; padding: 16px; border: 1px solid var(--line); border-radius: 17px; background: #fff; text-align: center; }
.diagnostic-node > span { width: 30px; height: 30px; margin: 0 auto 8px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: var(--gray-soft); color: var(--gray); font-weight: 800; }
.diagnostic-node h3 { margin: 0 0 4px; font-size: 14px; }
.diagnostic-node strong { display: block; font-size: 12px; text-transform: uppercase; }
.diagnostic-node small { display: block; color: var(--muted); margin-top: 6px; font-size: 10px; }
.diagnostic-node.ok { border-color: #bfe6cf; background: #fbfffc; }
.diagnostic-node.ok > span { background: var(--green-soft); color: var(--green); }
.diagnostic-node.error { border-color: #f1b5b5; background: #fffafa; }
.diagnostic-node.error > span { background: var(--red-soft); color: var(--red); }
.chain-arrow { display: flex; align-items: center; color: #adb1b7; font-weight: 900; }
.diagnostic-error { margin-top: 10px; color: var(--red); font-size: 13px; }
.network-overview { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-top: 16px; }
.network-route-card { min-width: 0; }
.network-route { display: flex; align-items: stretch; gap: 8px; overflow-x: auto; padding: 8px 0 2px; }
.network-route > span { min-width: 112px; display: grid; gap: 4px; align-content: center; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #f8f9fa; }
.network-route > span small { color: var(--muted); font-size: 10px; font-weight: 800; }
.network-route > span strong { overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
.network-route > i { align-self: center; color: var(--muted); font-style: normal; font-weight: 900; }
.radio-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.radio-metrics > div { display: grid; gap: 3px; }
.radio-metrics small { color: var(--muted); }
.radio-metrics strong { font-size: 20px; }
.span-all { grid-column: 1 / -1; }
.alarm-list { display: grid; gap: 11px; }
.alarm-card { display: flex; gap: 14px; align-items: flex-start; padding: 16px; background: #fff; border: 1px solid var(--line); border-left: 5px solid var(--orange); border-radius: 17px; }
.alarm-card.severity-critical, .alarm-card.severity-alarm { border-left-color: var(--red); }
.alarm-card.severity-info { border-left-color: var(--green); }
.alarm-symbol { width: 38px; height: 38px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 12px; background: var(--red-soft); color: var(--red); font-weight: 900; }
.alarm-head { display: flex; justify-content: space-between; gap: 10px; }
.alarm-head h3 { margin: 1px 0 5px; }
.alarm-card p { margin: 0 0 7px; color: #555a61; }
.alarm-card small { color: var(--muted); }
.alarm-actions { display: flex; gap: 7px; flex-wrap: wrap; justify-content: flex-end; }
.subscription-hero { padding: 24px; display: grid; grid-template-columns: 2fr repeat(3, 1fr); gap: 20px; align-items: center; background: linear-gradient(135deg, #fff7e3, #fff); }
.subscription-hero small, .subscription-hero strong { display: block; }
.subscription-hero h2 { margin: 4px 0; font-size: 34px; }
.subscription-hero p { margin: 0; color: var(--muted); }
.subscription-hero strong { font-size: 21px; margin-top: 5px; }
.plans-grid { display: grid; grid-template-columns: repeat(4, minmax(190px, 1fr)); gap: 14px; margin-top: 18px; }
.plan-card { padding: 20px; }
.plan-card.current { border: 2px solid #dba23b; background: #fffaf0; }
.plan-card h3 { margin: 5px 0 16px; }
.plan-card > strong { font-size: 31px; }
.plan-card > strong span { color: var(--muted); font-size: 13px; }
.plan-card p { color: var(--muted); line-height: 1.5; min-height: 68px; }
.report-output { white-space: pre-wrap; line-height: 1.6; overflow-wrap: anywhere; }
.auth-body { min-height: 100vh; padding: 24px; display: grid; place-items: center; background: radial-gradient(circle at 20% 20%, #fff4d8, transparent 34%), radial-gradient(circle at 80% 70%, #f6e4ba, transparent 35%), #f5f3ef; }
.auth-card { width: min(430px, 100%); padding: 30px; border: 1px solid rgba(255,255,255,.75); border-radius: 28px; background: rgba(255,255,255,.93); box-shadow: 0 25px 70px rgba(77, 58, 24, .14); backdrop-filter: blur(10px); }
.auth-logo { display: flex; align-items: center; gap: 12px; margin-bottom: 30px; }
.auth-logo strong, .auth-logo small { display: block; }
.auth-logo small { color: var(--muted); }
.auth-card h1 { margin: 0; font-size: 30px; letter-spacing: -.04em; }
.auth-card > p { color: var(--muted); margin-bottom: 22px; }
.stack-form { display: grid; gap: 15px; }
.stack-form.compact { margin-top: 18px; padding-top: 18px; border-top: 1px solid var(--line); }
.auth-link { margin-top: 18px; color: var(--honey-dark); font-weight: 700; }
.form-error { padding: 11px 13px; margin-bottom: 14px; border-radius: 12px; background: var(--red-soft); color: var(--red); }
.toast { position: fixed; z-index: 100; right: 22px; bottom: 22px; max-width: min(430px, calc(100vw - 44px)); padding: 13px 16px; border-radius: 14px; color: #fff; background: #2f3339; box-shadow: 0 15px 35px rgba(0,0,0,.2); }
.toast.error { background: #b93b3b; }

@media (max-width: 1180px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .hive-grid, .card-grid { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
  .plans-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
  .network-overview { grid-template-columns: 1fr; }
  .app-shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: -280px; width: 260px; transition: left .22s ease; box-shadow: 18px 0 40px rgba(0,0,0,.18); }
  .sidebar.open { left: 0; }
  .main-content { padding: 22px 20px 40px; }
  .mobile-menu { display: inline-flex; align-items: center; justify-content: center; }
  .topbar { justify-content: flex-start; }
  .topbar-badge { margin-left: auto; }
  .subscription-hero { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .main-content { padding: 16px 13px 35px; }
  .topbar { align-items: flex-start; }
  .topbar-badge { display: none; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 9px; }
  .stat-card { padding: 13px; }
  .stat-icon { width: 39px; height: 39px; }
  .hive-grid, .card-grid, .card-grid.two, .chart-grid, .plans-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .hero-measurement { align-items: stretch; flex-direction: column; }
  .hero-measurement h2 { font-size: 42px; }
  .hero-weight-pair { gap: 20px; }
  .hero-metrics { grid-template-columns: repeat(2, 1fr); }
  .hero-metrics span { min-width: 0; }
  .subscription-hero { grid-template-columns: 1fr 1fr; }
  .subscription-hero > div:first-child { grid-column: span 2; }
  .alarm-card { flex-wrap: wrap; }
  .alarm-actions { width: 100%; justify-content: flex-start; }
  .metric-row { gap: 3px; }
  .auth-card { padding: 24px 20px; }
  .chart-card { padding: 15px 12px 11px; }
  .chart-stage { margin-left: -5px; margin-right: -5px; }
  .chart-summary { gap: 9px; }
}

.server-metrics-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:18px; }
.server-metric { display:flex; flex-direction:column; gap:14px; min-width:0; }
.server-metric div { display:grid; gap:4px; }
.server-metric strong { font-size:28px; }
.server-metric span { color:var(--muted); font-size:13px; }
.server-metric progress { width:100%; height:9px; border:0; border-radius:999px; overflow:hidden; accent-color:var(--honey); }
.server-metric progress::-webkit-progress-bar { background:#edf0f3; border-radius:999px; }
.server-metric progress::-webkit-progress-value { background:linear-gradient(90deg,#e5a51a,#f3c34f); border-radius:999px; }
.server-services { grid-template-columns:repeat(4,minmax(0,1fr)); margin-bottom:28px; }
.server-services .content-card { min-height:132px; }
@media (max-width:1200px) { .server-metrics-grid,.server-services { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width:700px) { .server-metrics-grid,.server-services { grid-template-columns:1fr; } }
