.shell.dashboard-active { width: min(100% - 2rem, 1280px); padding: 1.2rem 0 3rem; }
.shell.dashboard-active > .brand { display: none; }
.dashboard { border: 3px solid #69bed0; background: var(--glass); box-shadow: 10px 10px 0 #071018; padding: clamp(1rem, 3vw, 2rem); }
.dashboard-bar { display: flex; align-items: center; gap: 2rem; border-bottom: 2px solid #31546a; padding-bottom: .8rem; }
.dashboard-logo { color: #a9eaf7; text-decoration: none; font-size: 2.6rem; line-height: 1; }
.dashboard-logo span { color: white; }
.dashboard-bar nav { display: flex; gap: .2rem; }
.dashboard-bar nav a { color: #bdd5dc; text-decoration: none; font-size: 1.3rem; padding: .25rem .7rem; }
.dashboard-bar nav a.active, .dashboard-bar nav a:hover { color: #071b29; background: #a9eaf7; }
.dashboard-account { margin-left: auto; display: flex; align-items: center; gap: 1rem; color: #bdd5dc; font-size: 1.2rem; }
.dashboard-account button { border: 0; background: transparent; color: #a9eaf7; text-decoration: underline; font-size: 1.2rem; }
.dashboard-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.7rem 0 1.3rem; }
.dashboard-heading .setup-eyebrow { text-align: left; }
.dashboard-heading h1 { font-size: clamp(2.6rem, 5vw, 4.7rem); }
.dashboard-heading p:last-child { color: #bdd5dc; font-size: 1.4rem; margin: .5rem 0 0; }
.dashboard-heading img { width: 100px; height: 100px; image-rendering: pixelated; transform-origin: 50% 100%; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(300px, 1fr); gap: 1rem; align-items: start; }
.dashboard-main { display: grid; gap: 1rem; }
.dash-panel { min-width: 0; border: 2px solid #47778a; background: var(--glass-inner); padding: 1.25rem; box-shadow: 5px 5px 0 #071724; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.section-heading .setup-eyebrow { text-align: left; font-size: 1.05rem; margin-bottom: .1rem; }
.section-heading h2 { font-size: 2.3rem; font-weight: 400; line-height: 1; margin: 0; }
.section-heading a { color: #a9eaf7; font-size: 1.2rem; }
.live-sensors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .7rem; }
.live-card { min-width: 0; border: 2px solid color-mix(in srgb, var(--sensor-color) 40%, #31546a); background: var(--glass-card); padding: .8rem; box-shadow: 4px 4px 0 #071724; }
.live-card-top { display: flex; align-items: center; gap: .55rem; }
.live-card-title { min-width: 0; }
.live-card-title h3 { font-size: 1.45rem; font-weight: 400; margin: 0; line-height: 1; overflow-wrap: anywhere; }
.live-card-title span { color: var(--sensor-color); font-size: 1rem; letter-spacing: .05em; }
.mode-pill { margin-left: auto; border: 1px solid #69bed0; color: #a9eaf7; padding: .1rem .3rem; font-size: .9rem; white-space: nowrap; }
.mode-pill.simulated { border-color: #eecb96; color: #eecb96; }
.live-metric { color: #9db8c2; font-size: 1.05rem; margin: .65rem 0 0; }
.live-value { font-size: 2rem; line-height: 1; margin: .15rem 0; color: var(--sensor-color); overflow-wrap: anywhere; }
.live-foot { color: #9db8c2; font-size: 1rem; margin: .45rem 0 0; }
.dashboard-empty { color: #bdd5dc; font-size: 1.25rem; }
.dashboard-empty a { color: #a9eaf7; }
.alert-summary { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .35rem; margin: 0; }
.alert-chip, .alert-status { border: 1px solid currentColor; padding: 0 .4rem; font-size: 1rem; letter-spacing: .06em; white-space: nowrap; }
:is(.alert-chip, .alert-status).watching { color: #a9eaf7; }
:is(.alert-chip, .alert-status).triggered { color: #f1d198; }
:is(.alert-chip, .alert-status).paused { color: #8ea6b0; }
.alert-list { display: grid; gap: 1.1rem; margin-bottom: 1rem; }
.alert-group h3 { margin: 0 0 .45rem; color: #9db8c2; font-size: 1.05rem; font-weight: 400; letter-spacing: .12em; }
.alert-items { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.alert-item { display: flex; gap: .7rem; align-items: flex-start; min-width: 0; border: 2px solid #31546a; background: var(--glass-card); padding: .65rem .75rem; color: #f4f9fa; }
.alert-item.event { border-color: #5f5640; }
.alert-item.event.fresh { border-color: #f1d198; box-shadow: 4px 4px 0 #3b3426; }
.alert-item.rule.triggered { border-color: #f1d198; }
.alert-item.rule.paused { border-style: dashed; }
.alert-item.rule.paused .alert-body { opacity: .75; }
.alert-body { flex: 1; min-width: 0; }
.alert-item-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: .1rem .6rem; }
.alert-item-head strong { min-width: 0; font-size: 1.35rem; font-weight: 400; line-height: 1; overflow-wrap: anywhere; }
.alert-item-head time, .alert-item-head .alert-status { margin-left: auto; }
.alert-item-head time { color: #9db8c2; font-size: 1.05rem; white-space: nowrap; }
.alert-new { color: #0b1722; background: #f1d198; padding: 0 .3rem; font-size: .95rem; letter-spacing: .06em; }
.alert-line { margin: .25rem 0 0; color: #c6dce2; font-size: 1.22rem; line-height: 1.1; }
.alert-value { color: var(--sensor-color); }
.alert-meta { display: flex; flex-wrap: wrap; gap: .1rem .9rem; margin: .3rem 0 0; color: #9db8c2; font-size: 1.05rem; }
.alert-meta .over { color: #f1d198; }
.alert-actions { display: flex; gap: .4rem; margin-top: .55rem; }
.alert-actions button { padding: .1rem .5rem; font-size: 1.05rem; }
.alert-delete { border: 2px solid #a85e5e; color: #ffc6b7; background: transparent; }
.alert-delete:hover { background: #4e2932; }
.alert-more { margin-top: .45rem; padding: 0; border: 0; background: none; color: #a9eaf7; font-size: 1.1rem; text-decoration: underline; }
.quick-alert { border-top: 1px solid #31546a; padding-top: .8rem; }
.quick-alert > label { font-size: 1.3rem; }
.quick-alert-fields { display: grid; grid-template-columns: 1.2fr 1.3fr .8fr .7fr .6fr auto; gap: .4rem; }
.quick-alert-fields input, .quick-alert-fields select { min-width: 0; width: 100%; border: 2px solid #47778a; background: #071b29; color: white; padding: .35rem; font-size: 1.15rem; }
.quick-alert-fields .primary { padding: .3rem .7rem; font-size: 1.2rem; white-space: nowrap; }
.quick-alert-notify { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .6rem; margin-top: .5rem; }
.quick-alert-notify label { margin: 0; color: #bdd5dc; font-size: 1.15rem; }
.quick-alert-notify select, .quick-alert-notify input { min-width: 0; border: 2px solid #47778a; background: #071b29; color: white; padding: .35rem; font-size: 1.15rem; }
.quick-alert-notify input { flex: 1 1 14rem; width: auto; }
.alert-meta .notify { color: #a9eaf7; }
.alert-meta .notify.failed { color: #ffb9af; }
.form-message { min-height: 1.2em; color: #a9eaf7; font-size: 1.1rem; margin: .35rem 0 0; }
.chat-panel { display: flex; flex-direction: column; min-height: 620px; }
.chat-avatar { width: 64px; height: 64px; flex: none; overflow: visible; filter: drop-shadow(3px 4px 0 #071724); transform-origin: 50% 90%; animation: agent-bob 3s steps(3, end) infinite; }
.chat-avatar .tentacle-left, .chat-avatar .tentacle-right, .chat-avatar .fizz-eyes { transform-box: fill-box; transform-origin: center; }
.fizz-thinking .chat-avatar, .fizz-thinking .dashboard-heading img { animation: fizz-dance 1.1s steps(1, end) infinite; }
.fizz-thinking .chat-avatar .tentacle-left { animation: tentacle-kick .22s steps(2, end) infinite alternate; }
.fizz-thinking .chat-avatar .tentacle-right { animation: tentacle-kick .22s steps(2, end) infinite alternate-reverse; }
.fizz-thinking .chat-avatar .fizz-eyes { animation: fizz-squint 1.1s steps(1, end) infinite; }
@keyframes fizz-dance {
  0%, 100% { transform: translate(0, 0) rotate(0deg) scale(1, 1); }
  12.5% { transform: translate(-4px, -7px) rotate(-10deg); }
  25% { transform: translate(0, 0) scale(1.08, .9); }
  37.5% { transform: translate(4px, -7px) rotate(10deg); }
  50% { transform: translate(0, 0) scale(1.08, .9); }
  62.5% { transform: translate(0, -11px) scale(.94, 1.08); }
  75% { transform: translate(0, 0) scale(1.12, .86); }
  87.5% { transform: translate(-2px, -3px) rotate(-5deg); }
}
@keyframes tentacle-kick { from { transform: translateY(-1px); } to { transform: translateY(5px); } }
@keyframes fizz-squint { 0%, 100% { transform: none; } 62.5% { transform: scaleY(.35); } 75% { transform: none; } }
.chat-messages { min-height: 300px; flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 1rem; padding: .5rem 0 1rem; }
.chat-message { max-width: 92%; border: 2px solid #31546a; background: var(--glass-card); padding: .75rem; }
.chat-message.user { align-self: flex-end; border-color: #69bed0; }
.chat-message span { color: #a9eaf7; font-size: 1rem; letter-spacing: .08em; }
.chat-message p { font-size: 1.3rem; line-height: 1.1; margin: .3rem 0 0; white-space: pre-wrap; }
.chat-message.thinking { border-color: #69bed0; }
.chat-message.thinking p { color: #a9eaf7; }
.thinking-dots span { animation: dot-blink 1.2s steps(1, end) infinite; }
.thinking-dots span:nth-child(2) { animation-delay: .2s; }
.thinking-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes dot-blink { 0%, 100% { opacity: .2; } 30%, 70% { opacity: 1; } }
.chat-compose { display: flex; gap: .4rem; }
.chat-compose input { min-width: 0; font-size: 1.3rem; padding: .45rem .6rem; }
.chat-compose button { font-size: 1.6rem; padding: .3rem .8rem; }
.chat-voice { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin-top: .75rem; }
.chat-voice button { flex: none; padding: .35rem .7rem; font-size: 1.25rem; }
.chat-voice button.recording { color: #0b1722; background: #a9eaf7; }
.chat-voice-status { flex: 1; min-width: 180px; margin: 0; color: #a9eaf7; font-size: 1.05rem; }
.chat-voice audio { width: 100%; height: 40px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 950px) { .dashboard-grid { grid-template-columns: 1fr; } .chat-panel { min-height: 460px; position: static; } }
@media (max-width: 640px) { .dashboard-bar { flex-wrap: wrap; gap: .7rem; } .dashboard-account { width: 100%; justify-content: space-between; } .dashboard-heading img { width: 70px; height: 70px; } .live-sensors { grid-template-columns: 1fr; } .quick-alert-fields { grid-template-columns: 1fr 1fr; } .quick-alert-fields input:first-of-type { grid-column: 1 / -1; } .quick-alert-fields .primary { grid-column: 1 / -1; } }
@media (max-width: 640px) { .alerts-panel .section-heading { flex-wrap: wrap; } .alert-summary { justify-content: flex-start; } .alert-item-head time, .alert-item-head .alert-status { margin-left: 0; } }
@media (prefers-reduced-motion: reduce) { .chat-avatar, .fizz-thinking .chat-avatar, .fizz-thinking .dashboard-heading img, .fizz-thinking .chat-avatar .tentacle-left, .fizz-thinking .chat-avatar .tentacle-right, .fizz-thinking .chat-avatar .fizz-eyes, .thinking-dots span { animation: none; } }
