@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;700&display=swap');

:root {
  --bg: #030712;
  --bg2: #090d16;
  --panel: rgba(17, 24, 39, 0.55);
  --panel2: rgba(31, 41, 55, 0.45);
  --line: rgba(255, 255, 255, 0.08);
  --line-glow: rgba(99, 102, 241, 0.3);
  --txt: #f9fafb;
  --muted: #94a3b8;
  --muted2: #475569;
  
  --brand: #6366f1;
  --brand2: #06b6d4;
  --brand-glow: rgba(99, 102, 241, 0.4);
  --solar-glow: rgba(245, 158, 11, 0.35);
  
  --ok: #10b981;
  --warn: #f59e0b;
  --bad: #ef4444;
  
  --grad: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
  --grad-solar: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
  --grad-power: linear-gradient(135deg, #10b981 0%, #06b6d4 100%);
  --grad-motion: linear-gradient(135deg, #ef4444 0%, #f59e0b 100%);
  --grad-ai: linear-gradient(135deg, #8b5cf6 0%, #06b6d4 100%);
  
  --radius: 20px;
  --shadow: 0 14px 40px rgba(0, 0, 0, 0.6);
  --glass-blur: blur(28px);
  --trans: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(99, 102, 241, 0.12), transparent 40%),
    radial-gradient(circle at 90% 10%, rgba(6, 182, 212, 0.12), transparent 35%),
    radial-gradient(circle at 50% 80%, rgba(245, 158, 11, 0.06), transparent 50%);
  color: var(--txt);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.hidden { display: none !important; }
.muted { color: var(--muted); }
.sec-title { font-size: 12px; font-weight: 800; margin: 26px 0 14px; color: var(--muted); text-transform: uppercase; letter-spacing: 1.8px; }

/* Buttons */
.btn { 
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: none; cursor: pointer;
  font-weight: 600; font-size: 14px; padding: 11px 18px; border-radius: 14px; color: #fff; transition: var(--trans); font-family: inherit;
}
.btn.primary { background: var(--grad); box-shadow: 0 6px 20px var(--brand-glow); }
.btn.primary.glow { box-shadow: 0 0 25px var(--brand-glow); }
.btn.primary:hover { filter: brightness(1.15); transform: translateY(-2px); box-shadow: 0 10px 28px var(--brand-glow); }
.btn.primary:active { transform: translateY(0); }

.btn.ghost { background: var(--panel2); color: var(--txt); border: 1px solid var(--line); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.2); transform: translateY(-1px); }

.btn.danger { background: rgba(239, 68, 68, 0.15); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.3); }
.btn.danger:hover { background: rgba(239, 68, 68, 0.25); border-color: rgba(239, 68, 68, 0.5); }

.btn.block { width: 100%; }
.btn.mini { font-size: 12px; padding: 7px 12px; border-radius: 10px; }

/* Segmented Toggles */
.seg-toggle { display: inline-flex; background: rgba(0,0,0,0.35); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; }
.seg-toggle button { background: none; border: none; color: var(--muted); font-weight: 600; font-size: 13px; padding: 6px 14px; border-radius: 9px; cursor: pointer; transition: var(--trans); }
.seg-toggle button:hover { color: var(--txt); }
.seg-toggle button.active { background: var(--grad); color: #fff; box-shadow: 0 2px 10px var(--brand-glow); }
.seg-toggle.mini-toggle button { font-size: 11px; padding: 4px 10px; }

/* Forms */
label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); }
input, select { 
  background: rgba(0, 0, 0, 0.35); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  color: var(--txt); font-size: 14px; outline: none; font-family: inherit; transition: var(--trans);
}
input:focus, select:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.2); background: rgba(0, 0, 0, 0.5); }

.check-row { display: flex; flex-direction: row; align-items: center; gap: 10px; font-size: 14px; color: var(--txt); cursor: pointer; }
.check-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--brand); cursor: pointer; }

/* Switch */
.switch-row { display: flex !important; flex-direction: row !important; align-items: center; gap: 12px; color: var(--txt) !important; margin: 0; }
.switch { position: relative; width: 46px; height: 24px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .sl { position: absolute; inset: 0; background: rgba(255,255,255,0.08); border: 1px solid var(--line); border-radius: 20px; cursor: pointer; transition: var(--trans); }
.switch .sl:before { content: ""; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; background: var(--muted); border-radius: 50%; transition: var(--trans); }
.switch input:checked + .sl { background: var(--grad); border-color: transparent; }
.switch input:checked + .sl:before { transform: translateX(22px); background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.3); }

/* Login */
.login-screen { position: fixed; inset: 0; display: grid; place-items: center; z-index: 100; }
.login-bg { position: absolute; inset: 0; z-index: -1; background: var(--bg); background-image: radial-gradient(circle at center, rgba(99, 102, 241, 0.18) 0%, transparent 60%); }
.login-card { 
  width: min(420px, 92vw); background: rgba(15, 23, 42, 0.75); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--line); border-radius: 28px; padding: 40px; text-align: center; box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 14px; animation: pop 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.login-logo-smart { position: relative; width: 76px; height: 76px; border-radius: 24px; background: var(--grad); color: #fff; display: grid; place-items: center; margin: 0 auto 10px; box-shadow: 0 12px 30px var(--brand-glow); }
.smart-glow-ring { position: absolute; inset: -4px; border-radius: 28px; border: 2px solid rgba(6, 182, 212, 0.4); animation: pulse-ring 2.5s infinite; }
@keyframes pulse-ring { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.08); opacity: 0.3; } }
.badge-smart { font-size: 11px; font-weight: 800; background: rgba(6, 182, 212, 0.15); color: var(--brand2); padding: 3px 8px; border-radius: 8px; border: 1px solid rgba(6, 182, 212, 0.3); vertical-align: middle; }

/* Layout */
#app { display: grid; grid-template-columns: 270px 1fr; height: 100vh; }
.sidebar { 
  background: rgba(15, 23, 42, 0.6); border-right: 1px solid var(--line); backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
  padding: 24px 18px; display: flex; flex-direction: column; gap: 28px; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-logo-smart { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 8px 24px var(--brand-glow); }
.brand-text h1 { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; }
.brand-text h1 span { color: var(--brand2); }
.brand-text p { font-size: 11px; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; }

.nav { display: flex; flex-direction: column; gap: 6px; }
.nav-item { 
  display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: 14px; color: var(--muted);
  cursor: pointer; font-weight: 600; font-size: 14px; text-decoration: none; transition: var(--trans); border: 1px solid transparent;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.04); color: var(--txt); }
.nav-item.active { background: rgba(99, 102, 241, 0.14); color: #fff; border-color: rgba(99, 102, 241, 0.3); box-shadow: inset 0 0 20px rgba(99, 102, 241, 0.08); }
.nav-item.active svg { color: var(--brand2); filter: drop-shadow(0 0 8px var(--brand-glow)); }

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 14px; }
.smart-telemetry-badge { background: rgba(0,0,0,0.3); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.st-row { display: flex; justify-content: space-between; font-size: 12px; padding: 5px 0; color: var(--muted); font-weight: 500; }
.st-row b { color: var(--txt); font-weight: 700; font-family: monospace; }
.st-row b.ok { color: var(--ok); text-shadow: 0 0 10px rgba(16, 185, 129, 0.4); }

.main { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }
.topbar { 
  height: 72px; padding: 0 28px; display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--line); background: rgba(15, 23, 42, 0.4); backdrop-filter: var(--glass-blur);
}
.topbar h2 { font-size: 20px; font-weight: 800; letter-spacing: -0.3px; }
.topbar p { font-size: 13px; }
.topbar-actions { display: flex; align-items: center; gap: 12px; }

.content { flex: 1; overflow-y: auto; padding: 28px; }

/* Smart Hero Grid */
.smart-hero-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 20px; }

.smart-device-card { 
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px;
  display: flex; flex-direction: column; justify-content: space-between; backdrop-filter: var(--glass-blur);
  transition: var(--trans); position: relative; overflow: hidden;
}
.smart-device-card:hover { border-color: var(--line-glow); box-shadow: var(--shadow); }
.smart-device-card.active { border-color: rgba(16, 185, 129, 0.5); box-shadow: 0 0 30px rgba(16, 185, 129, 0.2); }
.smart-device-card.solar-card { background: linear-gradient(135deg, rgba(17, 24, 39, 0.7) 0%, rgba(30, 27, 75, 0.4) 100%); }

.sd-head { display: flex; align-items: center; justify-content: space-between; }
.sd-icon-wrap { width: 52px; height: 52px; border-radius: 16px; background: rgba(99, 102, 241, 0.15); color: var(--brand); display: grid; place-items: center; }
.sd-icon-wrap.solar { background: rgba(245, 158, 11, 0.15); color: var(--warn); }
.bt-pill { font-size: 11px; font-weight: 700; background: rgba(16, 185, 129, 0.15); color: var(--ok); padding: 2px 8px; border-radius: 6px; border: 1px solid rgba(16, 185, 129, 0.3); }
.bt-pill.cyan { background: rgba(6, 182, 212, 0.15); color: var(--brand2); border-color: rgba(6, 182, 212, 0.3); }

.sd-body { margin-top: 20px; display: flex; flex-direction: column; gap: 16px; }
.sd-status-display { display: flex; justify-content: space-between; align-items: flex-end; }
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; font-weight: 700; letter-spacing: 1px; }
.stat-val { font-size: 24px; font-weight: 800; }
.sd-mode-tag { font-size: 12px; color: var(--muted); font-family: monospace; }
.sd-quick-actions { display: flex; gap: 8px; }

/* Energy Flow Visualizer */
.energy-flow-row { display: flex; justify-content: space-between; align-items: center; background: rgba(0,0,0,0.3); border-radius: 16px; padding: 14px; }
.flow-node { display: flex; flex-direction: column; align-items: center; text-align: center; }
.fn-icon { font-size: 22px; margin-bottom: 2px; }
.flow-node b { font-size: 15px; font-weight: 800; font-family: 'JetBrains Mono', monospace; }
.flow-node small { font-size: 11px; color: var(--muted); font-weight: 600; }
.flow-arrow { color: var(--brand2); font-weight: 800; font-size: 16px; animation: flow-pulse 1.5s infinite; }
@keyframes flow-pulse { 0%, 100% { opacity: 0.4; transform: translateX(0); } 50% { opacity: 1; transform: translateX(3px); } }

.battery-bar-wrap { height: 8px; background: rgba(255,255,255,0.08); border-radius: 6px; overflow: hidden; }
.battery-bar-fill { height: 100%; background: var(--grad-power); border-radius: 6px; transition: width 0.6s ease; }

/* Smart Scenes */
.scenes-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.scene-card { 
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px; backdrop-filter: var(--glass-blur); transition: var(--trans);
}
.scene-card:hover { border-color: var(--line-glow); transform: translateY(-2px); }
.sc-icon { font-size: 28px; }
.scene-card b { font-size: 14px; }
.scene-card p { font-size: 12px; margin-top: 2px; }

/* Solar Hero Panel */
.solar-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.solar-kpi-card { 
  background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 20px;
  display: flex; flex-direction: column; gap: 8px; backdrop-filter: var(--glass-blur);
}
.sk-label { font-size: 12px; color: var(--muted); font-weight: 700; text-transform: uppercase; }
.sk-val-row { display: flex; align-items: baseline; gap: 6px; }
.sk-val-row b { font-size: 32px; font-weight: 800; font-family: 'JetBrains Mono', monospace; }
.sk-val-row span { font-size: 16px; color: var(--brand2); font-weight: 700; }

/* Camera Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }
.card { 
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column; backdrop-filter: var(--glass-blur); transition: var(--trans);
}
.card:hover { border-color: rgba(99, 102, 241, 0.3); transform: translateY(-3px); box-shadow: var(--shadow); }
.card.motion-active { border-color: rgba(239, 68, 68, 0.6); box-shadow: 0 0 25px rgba(239, 68, 68, 0.25); }

.card-head { padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.card-head h4 { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.vendor-tag { font-size: 10px; text-transform: uppercase; font-weight: 700; padding: 2px 7px; border-radius: 6px; background: rgba(255,255,255,0.08); color: var(--muted); }
.vendor-tag.hikvision { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.25); }
.vendor-tag.ok { background: rgba(16, 185, 129, 0.15); color: var(--ok); border: 1px solid rgba(16, 185, 129, 0.3); }

.card-thumb { position: relative; height: 190px; background: #000; display: grid; place-items: center; overflow: hidden; cursor: pointer; }
.card-thumb img, .card-thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, transparent 60%); display: flex; align-items: flex-end; padding: 14px; justify-content: space-between; }
.motion-badge { 
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 20px;
  background: var(--grad-motion); color: #fff; font-size: 11px; font-weight: 700;
  box-shadow: 0 0 15px rgba(239, 68, 68, 0.6); animation: pulse-motion 1.5s infinite;
}
.ai-badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 12px;
  background: var(--grad-ai); color: #fff; font-size: 10px; font-weight: 700;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.5);
}
@keyframes pulse-motion { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.05); opacity: 0.85; } }

.card-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; }
.info-row { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); padding: 4px 0; }
.info-row b { color: var(--txt); font-family: monospace; }
.info-row b.ok { color: var(--ok); }
.card-foot { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }

/* Wall layout */
.wall { display: grid; gap: 16px; height: calc(100vh - 128px); }
.wall.layout-1 { grid-template-columns: 1fr; }
.wall.layout-4 { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(2, 1fr); }
.wall.layout-9 { grid-template-columns: repeat(3, 1fr); grid-template-rows: repeat(3, 1fr); }
.wall.layout-16 { grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, 1fr); }
.wall-cell { position: relative; background: #000; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); }
.wall-cell video { width: 100%; height: 100%; object-fit: contain; }
.cell-overlay { position: absolute; top: 12px; left: 12px; right: 12px; display: flex; justify-content: space-between; align-items: center; z-index: 5; pointer-events: none; }
.cell-overlay > * { pointer-events: auto; }
.cell-title { background: rgba(0,0,0,0.6); backdrop-filter: blur(8px); padding: 4px 10px; border-radius: 8px; font-size: 12px; font-weight: 700; }

/* Modals */
.modal-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.75); backdrop-filter: blur(12px); display: grid; place-items: center; z-index: 150; padding: 20px; }
.modal { width: min(580px, 95vw); max-height: 90vh; background: rgba(15, 23, 42, 0.95); border: 1px solid var(--line); border-radius: 24px; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow); }
.modal-head { padding: 20px 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 18px; font-weight: 800; }
.modal-body { padding: 24px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { padding: 18px 24px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.icon-btn { background: none; border: none; font-size: 24px; color: var(--muted); cursor: pointer; transition: var(--trans); }
.icon-btn:hover { color: var(--txt); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* Radar & Discovery */
.discover-scan-state { text-align: center; padding: 30px 10px; }
.radar-box { 
  position: relative; width: 130px; height: 130px; border-radius: 50%; border: 2px solid rgba(6, 182, 212, 0.3);
  margin: 0 auto 20px; overflow: hidden; display: grid; place-items: center; background: radial-gradient(circle, rgba(6, 182, 212, 0.1) 0%, transparent 70%);
}
.radar-sweep { 
  position: absolute; inset: 0; background: conic-gradient(from 0deg, rgba(6, 182, 212, 0.45) 0deg, transparent 60deg);
  border-radius: 50%; animation: radarRotate 2s linear infinite;
}
@keyframes radarRotate { 100% { transform: rotate(360deg); } }

.discover-result-head { display: flex; justify-content: space-between; align-items: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.discover-list { display: flex; flex-direction: column; gap: 12px; }
.discover-item { 
  background: var(--panel2); border: 1px solid var(--line); border-radius: 16px; padding: 16px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}

/* Lightbox Player */
.lightbox { position: fixed; inset: 0; background: #000; z-index: 200; display: flex; flex-direction: column; }
.lb-stage { flex: 1; position: relative; display: flex; flex-direction: column; overflow: hidden; }
.lb-video-wrap { flex: 1; display: grid; place-items: center; overflow: hidden; position: relative; }
.lb-video-wrap video { max-width: 100%; max-height: 100%; object-fit: contain; transition: transform 0.2s ease; }
.lb-loader { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; background: #000; z-index: 5; color: var(--muted); font-size: 14px; }
.lb-close { position: absolute; top: 20px; right: 24px; z-index: 10; font-size: 32px; color: #fff; }
.lb-bar { height: 60px; background: rgba(15, 23, 42, 0.85); backdrop-filter: blur(12px); border-top: 1px solid var(--line); padding: 0 24px; display: flex; justify-content: space-between; align-items: center; }
.lb-info { display: flex; align-items: center; gap: 14px; }
.lb-title { font-weight: 700; font-size: 15px; }
.lb-controls { display: flex; gap: 8px; }

/* Panels & Settings */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; backdrop-filter: var(--glass-blur); }
.settings-layout { display: flex; flex-direction: column; gap: 20px; }
.settings-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 12px; overflow-x: auto; }
.settings-tabs button { background: none; border: none; color: var(--muted); font-weight: 600; font-size: 14px; padding: 8px 16px; border-radius: 10px; cursor: pointer; transition: var(--trans); white-space: nowrap; }
.settings-tabs button:hover { color: var(--txt); background: rgba(255,255,255,0.04); }
.settings-tabs button.active { color: #fff; background: rgba(99, 102, 241, 0.15); border: 1px solid rgba(99, 102, 241, 0.3); }
.settings-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 16px; }
.settings-kpis > div { background: rgba(0,0,0,0.25); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.settings-kpis span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.settings-kpis b { font-size: 15px; font-weight: 700; }

.settings-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.settings-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }

.tuya-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.tuya-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.tuya-state { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 16px 0; background: rgba(0,0,0,0.25); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.tuya-state b { display: block; font-size: 16px; font-weight: 700; margin-top: 4px; }
.tuya-actions { display: flex; gap: 10px; }

.schedule-head-actions { display: flex; align-items: center; gap: 14px; }
.schedule-list { display: flex; flex-direction: column; gap: 14px; }
.schedule-card { background: rgba(0,0,0,0.25); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.schedule-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.schedule-card-head b { font-size: 14px; }
.schedule-row-actions { display: flex; align-items: center; gap: 14px; }
.schedule-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.day-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.day-grid label { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,0.05); border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--muted); transition: var(--trans); flex-direction: row; }
.day-grid label:has(input:checked) { background: var(--grad); border-color: transparent; color: #fff; }
.day-grid input { width: 14px; height: 14px; accent-color: var(--brand); }

.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-grid .wide { grid-column: 1 / -1; }
.panel-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; border-top: 1px solid var(--line); padding-top: 16px; }

/* Toasts */
#toasts { position: fixed; bottom: 24px; right: 24px; z-index: 300; display: flex; flex-direction: column; gap: 10px; }
.toast { background: rgba(15, 23, 42, 0.95); border: 1px solid var(--line); border-radius: 14px; padding: 14px 20px; color: #fff; font-size: 14px; font-weight: 600; box-shadow: var(--shadow); backdrop-filter: var(--glass-blur); transition: var(--trans); }
.toast.err { border-color: rgba(239, 68, 68, 0.4); background: rgba(30, 10, 15, 0.95); }
.toast.ok { border-color: rgba(16, 185, 129, 0.4); background: rgba(10, 30, 20, 0.95); }
