:root {
  color-scheme: dark;
  --bg: #0d1210;
  --card: #151d19;
  --card-2: #1a2420;
  --line: rgba(255,255,255,.08);
  --text: #f4f6f5;
  --muted: #93a19b;
  --green: #77d6a2;
  --amber: #f3c879;
  --danger: #f19a8f;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(circle at 70% 0, #193126 0, transparent 32%), var(--bg); color: var(--text); font-family: Inter, -apple-system, BlinkMacSystemFont, "PingFang SC", sans-serif; }
button, input { font: inherit; }
button { cursor: pointer; }
.shell { width: min(1040px, calc(100% - 40px)); margin: 0 auto; padding: 56px 0 80px; }
.topbar, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.topbar { margin-bottom: 40px; }
.eyebrow { margin: 0 0 10px; color: #7f9189; font-size: 11px; letter-spacing: .22em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(30px, 5vw, 52px); letter-spacing: -.035em; }
h2 { margin-bottom: 0; }
.text-button { border: 0; padding: 10px 0; background: transparent; color: var(--muted); }
.text-button:hover { color: var(--text); }
.hero-card, .control-card, .detail-card { border: 1px solid var(--line); background: rgba(21,29,25,.88); box-shadow: 0 30px 80px rgba(0,0,0,.18); }
.hero-card { position: relative; overflow: hidden; display: grid; grid-template-columns: 120px 1fr auto; align-items: center; gap: 30px; min-height: 220px; padding: 38px; border-radius: 30px; }
.orb { width: 104px; height: 104px; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fffbd5 0, #f2c66e 18%, #d98b45 48%, #3f2b1b 73%); box-shadow: 0 0 70px rgba(243,200,121,.34); }
.status-line { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 14px; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #66716c; }
.status-dot.online { background: var(--green); box-shadow: 0 0 18px rgba(119,214,162,.7); }
.hero-copy h2 { margin: 14px 0 10px; font-size: clamp(25px, 4vw, 40px); }
.hero-copy p { margin-bottom: 0; color: var(--muted); }
.metric { min-width: 130px; padding-left: 28px; border-left: 1px solid var(--line); }
.metric span, .detail-card span { display: block; margin-bottom: 10px; color: var(--muted); font-size: 13px; }
.metric strong { font-size: 17px; }
.control-card { margin-top: 22px; padding: 34px; border-radius: 26px; }
.button-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 28px; }
.control-button { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 94px; border: 1px solid var(--line); border-radius: 20px; color: var(--text); background: var(--card-2); font-weight: 650; }
.control-button:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.17); }
.control-button:disabled { opacity: .45; cursor: wait; transform: none; }
.control-on { color: #fff3c6; background: linear-gradient(145deg, #5a4728, #2b281d); }
.control-off { color: #c9d1ce; }
.control-replay { color: #bce7cf; background: linear-gradient(145deg, #234536, #192a23); }
.button-icon { font-size: 24px; }
.detail-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 22px; }
.detail-card { min-height: 110px; padding: 24px; border-radius: 20px; }
.detail-card strong { overflow-wrap: anywhere; }
.login-overlay { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; padding: 20px; background: rgba(6,10,8,.88); backdrop-filter: blur(18px); }
.login-overlay.hidden { display: none; }
.login-card { width: min(430px, 100%); padding: 38px; border: 1px solid var(--line); border-radius: 26px; background: #151d19; }
.login-card > p:not(.eyebrow):not(.error-text) { color: var(--muted); line-height: 1.6; }
.login-card label { display: block; margin: 26px 0 9px; color: var(--muted); font-size: 13px; }
.login-card input { width: 100%; height: 48px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; outline: none; color: var(--text); background: #0f1512; }
.login-card input:focus { border-color: var(--green); }
.login-card button { width: 100%; height: 50px; margin-top: 14px; border: 0; border-radius: 12px; background: var(--green); color: #112018; font-weight: 750; }
.error-text { min-height: 20px; margin: 12px 0 0; color: var(--danger); font-size: 13px; }
.toast { position: fixed; left: 50%; bottom: 30px; z-index: 20; padding: 12px 18px; border: 1px solid var(--line); border-radius: 99px; background: #202b26; color: var(--text); opacity: 0; transform: translate(-50%, 18px); pointer-events: none; transition: .2s ease; }
.toast.visible { opacity: 1; transform: translate(-50%, 0); }
@media (max-width: 720px) {
  .shell { width: min(100% - 24px, 1040px); padding-top: 30px; }
  .hero-card { grid-template-columns: 72px 1fr; padding: 25px; }
  .orb { width: 68px; height: 68px; }
  .metric { grid-column: 1 / -1; padding: 18px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .button-grid { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: repeat(2, 1fr); }
}
