:root {
  --ink: #15211f; --muted: #6d7b78; --paper: #f3f1eb; --card: #fbfaf6;
  --line: #deddd5; --accent: #e7683b; --green: #3d7865; --gold: #bc8b3b;
  --blue: #4a7180; --shadow: 0 18px 50px rgba(27, 39, 35, .08);
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif; }
button, input { font: inherit; }
button { color: inherit; }
.hidden { display: none !important; }
.ambient { position: fixed; border-radius: 50%; filter: blur(2px); opacity: .6; pointer-events: none; }
.ambient-one { width: 420px; height: 420px; background: #dce9df; top: -210px; right: 10%; }
.ambient-two { width: 300px; height: 300px; background: #efd9c9; bottom: -180px; left: 30%; }
.login-view { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(440px, 100%); background: rgba(251,250,246,.9); backdrop-filter: blur(18px); padding: 42px; border: 1px solid rgba(255,255,255,.8); border-radius: 28px; box-shadow: var(--shadow); }
.brand-mark { width: 48px; height: 48px; display: grid; place-items: center; border-radius: 15px; background: var(--ink); color: white; font: 700 22px Georgia, serif; }
.brand-mark.small { width: 36px; height: 36px; border-radius: 11px; font-size: 17px; }
.eyebrow { letter-spacing: .16em; font-size: 11px; font-weight: 800; color: var(--accent); margin: 24px 0 8px; }
h1, h2, h3, p { margin-top: 0; }
h1 { font: 500 42px/1.06 Georgia, serif; letter-spacing: -.025em; margin-bottom: 16px; }
h2 { font: 500 38px/1.1 Georgia, serif; margin-bottom: 8px; }
h3 { font-size: 18px; letter-spacing: -.01em; }
.muted { color: var(--muted); line-height: 1.55; }
label { display: grid; gap: 7px; margin: 20px 0; color: #4d5d59; font-size: 13px; font-weight: 700; }
input { border: 1px solid var(--line); border-radius: 12px; background: white; padding: 13px 14px; outline: none; }
input:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(61,120,101,.12); }
.button { border: 0; border-radius: 12px; padding: 14px 18px; cursor: pointer; font-weight: 800; }
.button.primary { width: 100%; background: var(--ink); color: white; margin-top: 8px; }
.error { color: #b74333; min-height: 20px; font-size: 13px; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 230px 1fr; position: relative; z-index: 1; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 30px 20px; background: rgba(246,245,239,.78); backdrop-filter: blur(16px); border-right: 1px solid var(--line); display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px 32px; font: 600 20px Georgia, serif; }
nav { display: grid; gap: 5px; }
.nav-item { border: 0; background: transparent; padding: 12px 14px; border-radius: 11px; text-align: left; cursor: pointer; color: var(--muted); }
.nav-item span { display: inline-block; width: 24px; }
.nav-item:hover, .nav-item.active { background: white; color: var(--ink); }
.sidebar-bottom { margin-top: auto; }
.integration-status { padding: 14px; font-size: 12px; color: var(--muted); line-height: 1.8; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #9ca5a2; margin-right: 6px; }
.dot.on { background: #4aa07d; box-shadow: 0 0 0 4px rgba(74,160,125,.12); }
main { width: min(1220px, 100%); margin: 0 auto; padding: 48px 52px 72px; }
header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; }
header .eyebrow { margin-top: 0; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.icon-button, .avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; }
.icon-button { background: var(--card); border: 1px solid var(--line); cursor: pointer; }
.avatar { background: var(--ink); color: white; font-weight: 800; }
.status-strip { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--card); border: 1px solid var(--line); border-radius: 18px; margin-bottom: 42px; box-shadow: 0 10px 25px rgba(27,39,35,.035); }
.status-strip article { display: flex; align-items: center; gap: 14px; padding: 20px 24px; border-right: 1px solid var(--line); }
.status-strip article:last-child { border: 0; }
.status-strip strong, .status-strip small { display: block; }
.status-strip strong { font-size: 22px; }.status-strip small { color: var(--muted); font-size: 12px; margin-top: 2px; }
.status-icon { font-size: 18px; }.green { color: var(--green); }.gold { color: var(--gold); }.blue { color: var(--blue); }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-bottom: 16px; }
.section-heading h3 { margin: 0; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.filter { border: 1px solid transparent; background: transparent; color: var(--muted); border-radius: 99px; padding: 7px 12px; cursor: pointer; font-size: 12px; }
.filter.active { color: var(--ink); border-color: var(--line); background: var(--card); }
.device-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.device-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px; min-height: 170px; display: flex; flex-direction: column; transition: transform .18s, box-shadow .18s; }
.device-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.device-top { display: flex; justify-content: space-between; align-items: start; }
.device-icon { width: 40px; height: 40px; border-radius: 12px; background: #e7ece7; display: grid; place-items: center; font-size: 19px; }
.provider { text-transform: uppercase; letter-spacing: .09em; color: var(--muted); font-size: 9px; font-weight: 800; }
.device-copy { margin-top: auto; }.device-copy h4 { margin: 0 0 4px; font-size: 16px; }.device-copy p { margin: 0; color: var(--muted); font-size: 12px; }
.switch { position: relative; width: 44px; height: 26px; border: 0; border-radius: 99px; background: #cfd3d0; cursor: pointer; transition: .2s; }
.switch::after { content: ''; position: absolute; width: 20px; height: 20px; border-radius: 50%; background: white; left: 3px; top: 3px; box-shadow: 0 2px 5px #0002; transition: .2s; }
.switch.on { background: var(--green); }.switch.on::after { transform: translateX(18px); }.switch:disabled { opacity: .45; cursor: wait; }
.offline { opacity: .62; }
.empty-state { text-align: center; border: 1px dashed #c9cbc4; border-radius: 18px; padding: 50px 20px; color: var(--muted); }.empty-state span { font-size: 30px; }
.events-heading { margin-top: 44px; }
.event-list { background: var(--card); border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.event { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--line); font-size: 13px; }.event:last-child { border: 0; }.event p { margin: 0; }.event time { color: var(--muted); font-size: 11px; }.event-bullet { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.toast { position: fixed; right: 24px; bottom: 24px; padding: 12px 16px; border-radius: 12px; background: var(--ink); color: white; opacity: 0; transform: translateY(8px); pointer-events: none; transition: .2s; font-size: 13px; }.toast.show { opacity: 1; transform: none; }
@media (max-width: 900px) { .device-grid { grid-template-columns: repeat(2, 1fr); } main { padding: 38px 30px; } }
@media (max-width: 680px) { .app-shell { display: block; }.sidebar { position: static; width: 100%; height: auto; padding: 16px 20px; flex-direction: row; align-items: center; }.brand { padding: 0; }.sidebar nav { margin-left: auto; display: flex; }.sidebar-bottom { margin: 0; }.integration-status, .sidebar .nav-item span { display: none; }.sidebar nav .nav-item:first-child { display: none; } main { padding: 30px 18px 60px; } h2 { font-size: 32px; }.status-strip article { padding: 16px 12px; }.device-grid { grid-template-columns: 1fr; }.section-heading { align-items: flex-start; flex-direction: column; }.filters { justify-content: flex-start; }.login-card { padding: 30px 24px; } .event { grid-template-columns: 8px 1fr; }.event time { grid-column: 2; } }
