:root {
  color-scheme: light;
  --ink: #17382f;
  --muted: #6f817a;
  --soft: #92a29c;
  --line: #dfe7e1;
  --paper: #f4f6f1;
  --card: #ffffff;
  --deep: #123f32;
  --green: #236e4d;
  --green-2: #3f9068;
  --lime: #c7e665;
  --amber: #d09237;
  --red: #c8604b;
  --shadow: 0 18px 54px rgba(24, 59, 47, .08);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); }
body { min-width: 320px; min-height: 100vh; margin: 0; color: var(--ink); background: var(--paper); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
.skip-link { position: fixed; z-index: 200; top: -60px; left: 16px; padding: 10px 15px; color: white; background: var(--deep); border-radius: 9px; }
.skip-link:focus { top: 14px; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; z-index: 40; inset: 0 auto 0 0; width: 244px; display: flex; flex-direction: column; padding: 24px 17px 20px; color: #edf5ef; background: var(--deep); border-right: 1px solid rgba(255,255,255,.06); }
.sidebar::before { position: absolute; inset: 0; content: ""; pointer-events: none; background: radial-gradient(circle at 20% 2%, rgba(199,230,101,.14), transparent 29%), linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px); background-size: auto, 100% 30px; }
.brand { position: relative; display: flex; align-items: center; gap: 12px; padding: 0 8px 28px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 13px; background: var(--lime); box-shadow: 0 10px 26px rgba(0,0,0,.17); }
.brand-mark svg { width: 32px; fill: var(--deep); }
.brand-mark .vein { fill: none; stroke: #faffee; stroke-width: 3.2; stroke-linecap: round; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 18px; letter-spacing: .11em; }
.brand small { margin-top: 3px; color: #9bb3aa; font-size: 9px; letter-spacing: .16em; }
.nav-caption { position: relative; margin: 14px 13px 8px; color: #6f9185; font-size: 9px; font-weight: 800; letter-spacing: .16em; }
.nav-list { position: relative; display: grid; gap: 5px; }
.nav-list a { display: flex; align-items: center; gap: 12px; min-height: 43px; padding: 10px 13px; color: #a9c0b7; border-radius: 11px; font-size: 13px; transition: background .2s ease, color .2s ease, transform .2s ease; }
.nav-list a > span { width: 22px; height: 22px; display: grid; place-items: center; flex: 0 0 auto; font-size: 15px; font-weight: 700; }
.nav-list a:hover, .nav-list a:focus-visible { color: white; background: rgba(255,255,255,.065); outline: none; }
.nav-list a.active { color: #143c31; background: var(--lime); box-shadow: 0 9px 24px rgba(4,26,20,.19); font-weight: 750; }
.sidebar-foot { position: relative; margin-top: auto; padding: 17px 12px 0; border-top: 1px solid rgba(255,255,255,.1); }
.edge-state { display: flex; align-items: center; gap: 11px; }
.edge-state > i { width: 8px; height: 8px; flex: 0 0 auto; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(199,230,101,.11); }
.edge-state > i.offline { background: #8aa097; box-shadow: 0 0 0 5px rgba(138,160,151,.1); }
.edge-state strong, .edge-state small { display: block; }
.edge-state strong { font-size: 11px; }
.edge-state small { margin-top: 4px; color: #8fa99f; font-size: 9px; }
.sidebar-foot p { margin: 14px 0 0; color: #759187; font-size: 9px; line-height: 1.7; }

.page-shell { min-height: 100vh; margin-left: 244px; }
.topbar { position: sticky; z-index: 30; top: 0; height: 68px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; background: rgba(244,246,241,.9); border-bottom: 1px solid rgba(210,220,212,.9); backdrop-filter: blur(16px); }
.topbar-left, .top-actions, .breadcrumb { display: flex; align-items: center; }
.menu-button { display: none; }
.breadcrumb { gap: 9px; font-size: 12px; }
.breadcrumb span { color: var(--muted); }
.breadcrumb b { color: #b1bdb7; font-weight: 400; }
.unit-switcher { display: flex; align-items: center; gap: 7px; margin-left: 18px; padding-left: 18px; border-left: 1px solid var(--line); }
.unit-switcher span { color: var(--soft); font-size: 9px; font-weight: 750; }
.unit-switcher select { max-width: 190px; padding: 7px 28px 7px 9px; color: var(--ink); background: white; border: 1px solid var(--line); border-radius: 8px; font-size: 10px; }
.top-actions { gap: 11px; }
.mode-chip, .section-note, .count-chip, .advice-chip, .safe-chip, .lock-chip { display: inline-flex; align-items: center; border-radius: 999px; white-space: nowrap; }
.mode-chip { padding: 6px 10px; color: #8b6423; background: #f9edcf; font-size: 10px; font-weight: 750; }
.mode-chip.live { color: var(--green); background: #e2f1e7; }
.updated-at { color: var(--muted); font-size: 10px; }
.refresh-button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; color: var(--green); background: white; cursor: pointer; font-size: 18px; }
.refresh-button:hover { border-color: #83aa94; }
.refresh-button.spinning { animation: spin .8s linear infinite; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; color: #f7faef; background: var(--green); border: 0; border-radius: 50%; cursor: pointer; font-size: 11px; font-weight: 700; }
.avatar:hover, .avatar:focus-visible { background: var(--deep); outline: 3px solid rgba(35,110,77,.14); }

main { max-width: 1480px; min-height: calc(100vh - 116px); margin: 0 auto; padding: 35px 38px 50px; outline: none; }
footer { display: flex; justify-content: space-between; padding: 0 38px 26px; color: #86958f; font-size: 9px; }
.page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: 26px; }
.page-intro h1 { margin: 0; font-size: clamp(28px, 3vw, 42px); font-weight: 650; letter-spacing: -.045em; }
.page-intro > div > p:last-child { max-width: 780px; margin: 10px 0 0; color: var(--muted); font-size: 12px; line-height: 1.7; }
.eyebrow { margin: 0 0 7px; color: var(--green-2); font-size: 9px; font-weight: 850; letter-spacing: .18em; }
.primary-button, .secondary-button, .success-button, .text-button { min-height: 37px; padding: 8px 15px; border-radius: 10px; cursor: pointer; font-size: 11px; font-weight: 700; }
.primary-button { color: white; background: var(--green); border: 1px solid var(--green); box-shadow: 0 8px 20px rgba(35,110,77,.15); }
.primary-button:hover { background: #195c40; }
.secondary-button { color: var(--green); background: white; border: 1px solid #cbd9d0; }
.secondary-button:hover { border-color: var(--green-2); }
.success-button { color: var(--green); background: #e5f3e8; border: 1px solid #c9e2d0; }
.text-button { color: var(--muted); background: transparent; border: 0; }
.text-button:disabled { opacity: .4; cursor: not-allowed; }
.text-link { color: var(--green); font-size: 10px; font-weight: 700; }

.overview-hero { position: relative; overflow: hidden; min-height: 244px; display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, .6fr); gap: 50px; align-items: stretch; padding: 35px 40px; color: #eff8f1; background: linear-gradient(125deg, #174d3c, #113c31); border-radius: 21px; box-shadow: var(--shadow); }
.overview-hero::before { position: absolute; width: 520px; height: 520px; right: -125px; top: -350px; content: ""; border: 1px solid rgba(255,255,255,.1); border-radius: 50%; box-shadow: 0 0 0 72px rgba(255,255,255,.023), 0 0 0 150px rgba(199,230,101,.025); }
.overview-hero::after { position: absolute; inset: 0; content: ""; pointer-events: none; background: linear-gradient(115deg, transparent 50%, rgba(199,230,101,.08)); }
.overview-hero > * { position: relative; z-index: 1; }
.hero-copy { align-self: end; }
.hero-kicker { display: flex; align-items: center; gap: 8px; color: #cbdcd4; font-size: 10px; }
.hero-kicker i { width: 7px; height: 7px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 5px rgba(199,230,101,.1); }
.hero-copy h2 { margin: 21px 0 0; font-size: clamp(30px, 4vw, 50px); font-weight: 580; line-height: 1.09; letter-spacing: -.045em; }
.hero-copy h2 em { color: var(--lime); font-style: normal; }
.hero-copy > p { margin: 16px 0 0; color: #a9c1b7; font-size: 11px; }
.hero-live { display: flex; flex-direction: column; justify-content: space-between; padding: 5px 0 3px 29px; border-left: 1px solid rgba(255,255,255,.15); }
.live-value small, .live-value strong, .live-value span { display: block; }
.live-value small { color: #91ada1; font-size: 9px; }
.live-value strong { margin-top: 7px; font-size: 22px; }
.live-value span { margin-top: 4px; color: #91ada1; font-size: 9px; }
.hero-live dl { display: grid; gap: 11px; margin: 25px 0 0; }
.hero-live dl div { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; }
.hero-live dt { color: #91ada1; font-size: 9px; }
.hero-live dd { margin: 0; font-size: 11px; font-weight: 750; }

.section-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 29px 0 13px; }
.panel .section-title:first-child { margin-top: 0; }
.section-title h2 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.section-note { padding: 5px 9px; color: var(--muted); background: #e9eee9; font-size: 8px; }
.panel { padding: 22px 23px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }

.metric-grid { display: grid; gap: 11px; }
.metric-grid.six, .climate-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.soil-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); }
.metric-card { min-width: 0; min-height: 184px; padding: 17px 15px 14px; background: white; border: 1px solid var(--line); border-radius: 15px; transition: transform .2s ease, box-shadow .2s ease; }
.metric-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.metric-card-top, .metric-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.metric-icon { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; color: var(--metric-color); background: var(--metric-bg); border-radius: 10px; font-size: 10px; font-weight: 850; }
.accent-orange { --metric-color: #c7683c; --metric-bg: #faece5; }
.accent-cyan { --metric-color: #297a80; --metric-bg: #e4f1f1; }
.accent-slate { --metric-color: #5d716a; --metric-bg: #e9efec; }
.accent-green { --metric-color: #27734f; --metric-bg: #e4f2e8; }
.accent-blue { --metric-color: #4b6f9f; --metric-bg: #e8eef7; }
.accent-gold { --metric-color: #a87923; --metric-bg: #f8efd8; }
.accent-violet { --metric-color: #775f98; --metric-bg: #eee8f5; }
.status-label { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; white-space: nowrap; }
.status-label i { width: 6px; height: 6px; border-radius: 50%; background: var(--green-2); }
.metric-card.warn .status-label { color: #93631f; }
.metric-card.warn .status-label i { background: var(--amber); }
.metric-card.offline .status-label i { background: #9eaaa5; }
.metric-reading { display: flex; align-items: baseline; gap: 5px; margin-top: 18px; }
.metric-reading strong { overflow: hidden; font-size: 26px; font-weight: 650; letter-spacing: -.045em; text-overflow: ellipsis; }
.metric-reading span { color: var(--muted); font-size: 9px; }
.metric-card h3 { margin: 7px 0 3px; font-size: 11px; }
.metric-card > p { min-height: 27px; margin: 0; color: #8a9993; font-size: 8px; line-height: 1.5; }
.metric-foot { margin-top: 12px; padding-top: 10px; border-top: 1px solid #edf1ed; }
.metric-foot span { overflow: hidden; color: var(--muted); font-size: 7px; white-space: nowrap; text-overflow: ellipsis; }
.metric-foot button { padding: 3px 0; color: var(--green); background: transparent; border: 0; cursor: pointer; font-size: 8px; font-weight: 700; }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(300px, .65fr); gap: 14px; margin-top: 14px; }
.route-card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.route-card { min-height: 90px; display: grid; grid-template-columns: 38px 1fr auto; gap: 11px; align-items: center; padding: 14px; background: #f6f8f4; border: 1px solid #edf1ec; border-radius: 12px; }
.route-card > span { width: 38px; height: 38px; display: grid; place-items: center; color: var(--green); background: #e4f1e7; border-radius: 11px; font-size: 18px; }
.route-card.soil > span { color: #8a6d31; background: #f5eddd; }
.route-card.devices > span { color: #5a6883; background: #e9edf4; }
.route-card strong, .route-card small { display: block; }
.route-card strong { font-size: 11px; }
.route-card small { margin-top: 5px; color: var(--muted); font-size: 8px; }
.route-card b { color: #a4b1ab; font-weight: 400; }
.route-card:hover { border-color: #cadacf; background: white; }
.healthy-empty { min-height: 130px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.healthy-empty > span { width: 37px; height: 37px; display: grid; place-items: center; color: var(--green); background: #e4f2e8; border-radius: 50%; }
.healthy-empty strong { margin-top: 12px; font-size: 11px; }
.healthy-empty small { margin-top: 5px; color: var(--muted); font-size: 8px; }

/* Admin console */
.admin-body { background: #eef2ec; }
.admin-shell { min-height: 100vh; }
.admin-rail { position: fixed; inset: 0 auto 0 0; width: 260px; display: flex; flex-direction: column; padding: 24px 18px; color: #edf5ef; background: var(--deep); }
.admin-rail .brand { padding-left: 9px; }
.admin-nav { display: grid; gap: 6px; }
.admin-nav a { min-height: 46px; display: flex; align-items: center; gap: 12px; padding: 0 14px; color: #a9c0b7; border-radius: 11px; font-size: 13px; }
.admin-nav a span { width: 22px; text-align: center; font-size: 16px; }
.admin-nav a.active, .admin-nav a:hover { color: #143c31; background: var(--lime); font-weight: 750; }
.admin-rail-foot { margin-top: auto; display: grid; padding: 18px 12px 0; border-top: 1px solid rgba(255,255,255,.1); }
.admin-rail-foot strong { font-size: 12px; }
.admin-rail-foot small { margin-top: 5px; color: #89a399; font-size: 9px; }
.admin-rail-foot button { margin-top: 14px; padding: 9px; color: #b8ccc4; background: transparent; border: 1px solid rgba(255,255,255,.14); border-radius: 9px; cursor: pointer; }
.admin-main { max-width: 1500px; min-height: 100vh; margin-left: 260px; padding: 36px 42px 60px; }
.admin-topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 30px; }
.admin-topbar p, .admin-section-head p, .admin-dialog > p { margin: 0 0 7px; color: var(--green-2); font-size: 9px; font-weight: 850; letter-spacing: .18em; }
.admin-topbar h1 { margin: 0; font-size: 38px; letter-spacing: -.045em; }
.admin-topbar > a { color: var(--green); font-size: 11px; font-weight: 750; }
.admin-loading, .admin-denied { min-height: 440px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; text-align: center; }
.admin-loading[hidden], .admin-denied[hidden], #admin-content[hidden] { display: none; }
.admin-loading strong { font-size: 13px; }
.admin-loading small, .admin-denied p { color: var(--muted); font-size: 10px; }
.admin-denied strong { font-size: 24px; }
.admin-denied a { padding: 10px 16px; color: white; background: var(--green); border-radius: 9px; font-size: 11px; }
.admin-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.admin-stat-grid article { min-height: 132px; display: flex; flex-direction: column; padding: 20px; background: white; border: 1px solid var(--line); border-radius: 16px; }
.admin-stat-grid span { color: var(--muted); font-size: 10px; }
.admin-stat-grid strong { margin-top: 12px; font-size: 28px; letter-spacing: -.04em; }
.admin-stat-grid small { margin-top: auto; color: #94a29c; font-size: 8px; }
.admin-section { margin-top: 18px; padding: 24px; background: white; border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); scroll-margin-top: 20px; }
.admin-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 21px; }
.admin-section-head h2 { margin: 0; font-size: 21px; }
.admin-section-head span { display: block; margin-top: 7px; color: var(--muted); font-size: 9px; }
.admin-section-head > .primary-button { flex: 0 0 auto; white-space: nowrap; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th { padding: 12px 13px; color: #869790; background: #f5f7f3; font-size: 8px; text-align: left; letter-spacing: .08em; }
.admin-table td { height: 69px; padding: 12px 13px; border-bottom: 1px solid #edf1ed; font-size: 10px; }
.admin-table td:first-child strong, .admin-table td:first-child small { display: block; }
.admin-table td:first-child strong { font-size: 11px; }
.admin-table td:first-child small { margin-top: 5px; color: var(--muted); font-size: 8px; }
.admin-table select, .admin-field select { min-height: 36px; padding: 0 28px 0 10px; color: var(--ink); background: white; border: 1px solid #cad9d0; border-radius: 9px; font-size: 10px; }
.role-badge, .status-badge, .status-toggle { display: inline-flex; padding: 6px 9px; border: 0; border-radius: 999px; font-size: 8px; font-weight: 750; }
.role-badge.admin { color: #5f5321; background: #f3ebbe; }
.status-badge.active, .status-toggle.active { color: #26704e; background: #e3f2e7; }
.status-toggle.disabled { color: #955546; background: #f7e6e1; }
.status-toggle { cursor: pointer; }
.last-login, .protected-label { color: var(--muted); font-size: 9px; }
.registration-settings { display: grid; gap: 18px; }
.switch-field { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px; background: #f5f8f4; border-radius: 12px; }
.switch-field strong, .switch-field small { display: block; }
.switch-field strong { font-size: 11px; }
.switch-field small { margin-top: 5px; color: var(--muted); font-size: 8px; }
.switch-field input { position: absolute; opacity: 0; }
.switch-field i { position: relative; width: 42px; height: 24px; flex: 0 0 auto; background: #bdc9c3; border-radius: 999px; transition: .2s; }
.switch-field i::after { position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; content: ''; background: white; border-radius: 50%; box-shadow: 0 2px 7px rgba(0,0,0,.18); transition: .2s; }
.switch-field input:checked + i { background: var(--green); }
.switch-field input:checked + i::after { transform: translateX(18px); }
.admin-field { display: grid; gap: 7px; }
.admin-field > span { color: #405f54; font-size: 9px; font-weight: 750; }
.admin-field > input, .admin-field > select, .invite-input input { width: 100%; min-height: 43px; padding: 0 13px; border: 1px solid #cad9d0; border-radius: 10px; outline: none; }
.admin-field > input:focus, .invite-input input:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(63,144,104,.1); }
.invite-input { display: flex; gap: 8px; }
.invite-input button, .registration-link button { flex: 0 0 auto; padding: 0 13px; color: var(--green); background: white; border: 1px solid #c9d8cf; border-radius: 9px; cursor: pointer; font-size: 9px; font-weight: 750; }
.registration-link { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: var(--muted); background: #f5f7f3; border-radius: 11px; font-size: 9px; }
.registration-link code { overflow: hidden; color: var(--ink); text-overflow: ellipsis; white-space: nowrap; }
.registration-link button { min-height: 32px; margin-left: auto; }
.admin-form-error { min-height: 16px; margin: 0; color: var(--red); font-size: 9px; }
.registration-settings > .primary-button { justify-self: start; }
.admin-dialog { width: min(480px, calc(100% - 28px)); padding: 30px; color: var(--ink); border: 0; border-radius: 18px; box-shadow: 0 30px 90px rgba(17,55,43,.24); }
.admin-dialog::backdrop { background: rgba(7,27,20,.58); backdrop-filter: blur(4px); }
.admin-dialog h2 { margin: 0 0 8px; font-size: 25px; }
.admin-dialog > span { display: block; margin-bottom: 18px; color: var(--muted); font-size: 9px; }
.admin-dialog > form:not(.dialog-close-form) { display: grid; gap: 14px; margin-top: 20px; }
.dialog-close-form { position: absolute; right: 18px; top: 16px; }
.dialog-close-form button { width: 32px; height: 32px; color: var(--muted); background: transparent; border: 0; cursor: pointer; font-size: 22px; }

@media (max-width: 900px) {
  .admin-rail { position: static; width: auto; height: auto; padding: 16px 18px; flex-direction: row; align-items: center; }
  .admin-rail .brand { padding: 0; }
  .admin-rail .nav-caption, .admin-nav, .admin-rail-foot small { display: none; }
  .admin-rail-foot { margin: 0 0 0 auto; padding: 0; border: 0; display: flex; align-items: center; gap: 10px; }
  .admin-rail-foot button { margin: 0; }
  .admin-main { margin: 0; padding: 28px 20px 50px; }
  .admin-stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .admin-main { padding: 23px 12px 40px; }
  .admin-topbar { align-items: flex-start; }
  .admin-topbar h1 { font-size: 29px; }
  .admin-topbar > a { padding-top: 5px; }
  .admin-stat-grid { gap: 8px; }
  .admin-stat-grid article { min-height: 112px; padding: 15px; }
  .admin-section { padding: 17px 14px; }
  .admin-section-head { align-items: flex-start; }
  .admin-table-wrap { overflow: visible; }
  .admin-table thead { display: none; }
  .admin-table, .admin-table tbody, .admin-table tr, .admin-table td { display: block; width: 100%; }
  .admin-table tr { margin-bottom: 10px; padding: 13px; background: #f7f9f6; border: 1px solid #e7ede8; border-radius: 12px; }
  .admin-table td { min-height: 38px; height: auto; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 8px 0; border-bottom: 1px solid #e7ede8; }
  .admin-table td:last-child { border: 0; }
  .admin-table td::before { content: attr(data-label); color: var(--muted); font-size: 8px; }
  .invite-input { flex-wrap: wrap; }
  .invite-input input { flex-basis: 100%; }
  .invite-input button { min-height: 36px; flex: 1; }
  .registration-link { align-items: flex-start; flex-wrap: wrap; }
  .registration-link code { width: 100%; }
  .registration-link button { margin: 0; min-height: 36px; }
}

.camera-section { margin-top: 14px; }
.camera-panel { overflow: hidden; padding: 0; }
.camera-heading { min-height: 84px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 19px 22px; border-bottom: 1px solid var(--line); }
.camera-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.025em; }
.camera-heading > div:first-child > p:last-child { margin: 5px 0 0; color: var(--muted); font-size: 8px; }
.camera-tabs { display: flex; gap: 4px; padding: 4px; background: #edf2ed; border-radius: 11px; }
.camera-tabs button { min-width: 82px; padding: 8px 13px; color: var(--muted); background: transparent; border: 0; border-radius: 8px; cursor: pointer; font-size: 9px; font-weight: 700; }
.camera-tabs button.active { color: white; background: var(--green); box-shadow: 0 6px 16px rgba(35,110,77,.18); }
.camera-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(270px, .55fr); min-height: 390px; }
.camera-stage { position: relative; min-width: 0; min-height: 390px; display: grid; place-items: center; overflow: hidden; background: #0b1814; }
.camera-stage::before { position: absolute; inset: 0; content: ""; pointer-events: none; background: radial-gradient(circle at 50% 30%, rgba(72,130,102,.16), transparent 48%), linear-gradient(rgba(255,255,255,.024) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px); background-size: auto, 34px 34px, 34px 34px; }
.camera-stage video { position: relative; z-index: 1; width: 100%; height: 100%; min-height: 390px; display: block; object-fit: contain; background: #050b09; }
.camera-empty { position: relative; z-index: 1; width: min(410px, calc(100% - 36px)); min-height: 215px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; color: #d9e6df; border: 1px solid rgba(255,255,255,.1); border-radius: 17px; background: rgba(14,36,28,.72); text-align: center; }
.camera-empty > span:not(.loading-orbit), .camera-start > span { width: 54px; height: 54px; display: grid; place-items: center; margin-bottom: 16px; color: var(--lime); background: rgba(199,230,101,.1); border: 1px solid rgba(199,230,101,.13); border-radius: 50%; font-size: 22px; }
.camera-empty strong { font-size: 14px; }
.camera-empty p { max-width: 330px; margin: 8px 0 0; color: #8ea89c; font-size: 9px; line-height: 1.65; }
.camera-empty button { margin-top: 16px; color: white; background: transparent; border-color: rgba(255,255,255,.24); }
.camera-loading .loading-orbit { margin: 0 0 19px; border-color: rgba(255,255,255,.15); border-top-color: var(--lime); }
.camera-error > span { color: #f3b39e !important; background: rgba(200,96,75,.15) !important; border-color: rgba(200,96,75,.2) !important; }
.camera-start { position: relative; z-index: 1; width: min(420px, calc(100% - 36px)); min-height: 220px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px; color: #dce8e2; background: rgba(14,36,28,.66); border: 1px solid rgba(255,255,255,.11); border-radius: 17px; cursor: pointer; }
.camera-start:hover { border-color: rgba(199,230,101,.35); background: rgba(18,52,40,.85); }
.camera-start:disabled { opacity: .55; cursor: wait; }
.camera-start strong { font-size: 15px; }
.camera-start small { margin-top: 7px; color: #8ca599; font-size: 9px; }
.camera-live-badge { position: absolute; z-index: 3; top: 16px; left: 16px; display: flex; align-items: center; gap: 6px; padding: 6px 9px; color: white; background: rgba(9,28,21,.75); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; backdrop-filter: blur(8px); font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.camera-live-badge i { width: 6px; height: 6px; border-radius: 50%; background: #f06c56; box-shadow: 0 0 0 4px rgba(240,108,86,.16); }
.snapshot-frame { position: relative; z-index: 1; width: 100%; height: 100%; min-height: 390px; }
.snapshot-frame img { width: 100%; height: 100%; min-height: 390px; display: block; object-fit: contain; }
.snapshot-frame > span { position: absolute; right: 14px; bottom: 14px; padding: 7px 10px; color: white; background: rgba(8,25,19,.76); border-radius: 8px; font-size: 8px; }
.camera-meta { display: flex; flex-direction: column; padding: 27px 25px; background: #fbfcfa; border-left: 1px solid var(--line); }
.camera-model { align-self: flex-start; padding: 5px 8px; color: var(--green); background: #e5f2e8; border-radius: 7px; font-size: 7px; font-weight: 750; }
.camera-meta h3 { margin: 17px 0 0; font-size: 20px; }
.camera-meta > p { margin: 8px 0 0; color: var(--muted); font-size: 9px; line-height: 1.7; }
.camera-meta ul { display: grid; gap: 11px; margin: 22px 0; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); list-style: none; }
.camera-meta li { display: flex; align-items: center; gap: 9px; color: #536a60; font-size: 8px; }
.camera-meta li i { width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: var(--green-2); box-shadow: 0 0 0 4px rgba(63,144,104,.08); }
.camera-warning { display: grid; gap: 5px; margin-bottom: 16px; padding: 12px; color: #805b22; background: #faf0d9; border: 1px solid #efdfbd; border-radius: 10px; }
.camera-warning b { font-size: 9px; }
.camera-warning span { font-size: 8px; line-height: 1.55; }
.camera-stop { min-height: 37px; margin-top: auto; color: #8b4437; background: #faebe7; border: 1px solid #efd1c8; border-radius: 10px; cursor: pointer; font-size: 9px; font-weight: 700; }
.camera-stop:hover { background: #f6ded7; }

.content-stack { display: grid; gap: 14px; margin-top: 14px; }
.trend-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.trend-head h2 { margin: 0; font-size: 18px; }
.segmented { max-width: 62%; display: flex; overflow-x: auto; padding: 3px; background: #edf2ed; border-radius: 10px; }
.segmented button { padding: 6px 10px; color: var(--muted); background: transparent; border: 0; border-radius: 8px; cursor: pointer; font-size: 8px; white-space: nowrap; }
.segmented button.active { color: var(--green); background: white; box-shadow: 0 2px 8px rgba(34,75,59,.08); font-weight: 750; }
.trend-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 17px 0 0; overflow: hidden; background: var(--line); border: 1px solid var(--line); border-radius: 11px; }
.trend-summary > div { padding: 12px 14px; background: #f8faf7; }
.trend-summary small, .trend-summary strong { display: block; }
.trend-summary small { color: var(--muted); font-size: 8px; }
.trend-summary strong { margin-top: 5px; font-size: 13px; }
.trend-summary em { color: var(--muted); font-size: 8px; font-style: normal; font-weight: 400; }
.chart-wrap { height: 235px; margin-top: 9px; }
#trend-chart { width: 100%; height: 100%; display: block; }
.chart-axis { display: flex; justify-content: space-between; padding: 0 12px; color: #96a49f; font-size: 7px; }
.data-table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 9px; }
.data-table th { padding: 10px 9px; color: var(--muted); background: #f4f7f3; text-align: left; font-size: 8px; font-weight: 650; }
.data-table th:first-child { border-radius: 8px 0 0 8px; }
.data-table th:last-child { border-radius: 0 8px 8px 0; }
.data-table td { padding: 12px 9px; border-bottom: 1px solid #edf1ed; white-space: nowrap; }
.data-table td:first-child { min-width: 165px; white-space: normal; }
.data-table td:first-child strong, .data-table td:first-child small { display: block; }
.data-table td:first-child strong { font-size: 10px; }
.data-table td:first-child small { margin-top: 4px; color: var(--muted); font-size: 7px; }
.table-status { display: inline-flex; align-items: center; gap: 5px; }
.table-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--green-2); }
.table-status.warn i { background: var(--amber); }
.table-status.offline i { background: #9da9a4; }
.table-action { padding: 5px 8px; color: var(--green); background: white; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; font-size: 8px; }
.soil-summary-strip { display: grid; grid-template-columns: 180px 180px 1fr; gap: 1px; overflow: hidden; margin-bottom: 12px; color: white; background: rgba(255,255,255,.1); border-radius: 15px; }
.soil-summary-strip > div, .soil-summary-strip > p { margin: 0; padding: 18px 20px; background: #214c3e; }
.soil-summary-strip small, .soil-summary-strip strong, .soil-summary-strip span { display: block; }
.soil-summary-strip small { color: #9eb6ac; font-size: 8px; }
.soil-summary-strip strong { margin-top: 6px; font-size: 20px; }
.soil-summary-strip span { margin-top: 4px; color: #b9ccc4; font-size: 8px; }
.soil-summary-strip p { color: #aec1b9; font-size: 9px; line-height: 1.65; }
.soil-summary-strip b { display: block; margin-bottom: 3px; color: var(--lime); }

.topology-panel .section-title { margin-bottom: 22px; }
.topology { position: relative; min-height: 190px; display: grid; grid-template-columns: 190px minmax(90px, 1fr) 210px minmax(100px, 1fr) 220px; grid-template-rows: 1fr 1fr; align-items: center; }
.topology-node { position: relative; z-index: 2; min-height: 74px; display: flex; flex-direction: column; justify-content: center; padding: 13px 16px; background: #f5f8f4; border: 1px solid var(--line); border-radius: 13px; }
.topology-node span { color: var(--green-2); font-size: 7px; font-weight: 850; letter-spacing: .15em; }
.topology-node strong { margin-top: 4px; font-size: 11px; }
.topology-node small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.sensor-node { grid-column: 1; grid-row: 1; }
.sensor-node.second { grid-row: 2; }
.gateway-node { grid-column: 3; grid-row: 1 / 3; color: white; background: var(--deep); border-color: var(--deep); }
.gateway-node span, .gateway-node small { color: #9bb4aa; }
.cloud-node { grid-column: 5; grid-row: 1 / 3; }
.topology-line { position: relative; grid-column: 2; grid-row: 1 / 3; height: 100%; }
.topology-line i { position: absolute; top: 25%; bottom: 25%; left: 0; right: 0; border-top: 1px solid #9eb8ab; border-bottom: 1px solid #9eb8ab; }
.topology-line i::after { position: absolute; top: 50%; right: -1px; width: 7px; height: 7px; content: ""; transform: translateY(-50%) rotate(45deg); border-top: 1px solid #78998a; border-right: 1px solid #78998a; }
.topology-line small { position: absolute; top: 50%; left: 50%; z-index: 2; transform: translate(-50%, -50%); padding: 5px 8px; color: var(--muted); background: var(--card); font-size: 7px; line-height: 1.5; text-align: center; }
.topology-line.cloud { grid-column: 4; }
.topology-line.cloud i { top: 50%; bottom: auto; border-bottom: 0; }
.hardware-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.hardware-card { padding: 18px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.hardware-head { display: flex; align-items: center; justify-content: space-between; }
.hardware-kind { width: 35px; height: 35px; display: grid; place-items: center; color: var(--green); background: #e4f1e7; border-radius: 10px; font-size: 9px; font-weight: 850; }
.device-status { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 8px; }
.device-status i { width: 6px; height: 6px; border-radius: 50%; background: var(--green-2); }
.device-status.offline i { background: #9eaaa5; }
.hardware-card h3 { margin: 15px 0 4px; font-size: 13px; }
.hardware-card > p { margin: 0; color: var(--muted); font-size: 9px; }
.hardware-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 15px; margin: 16px 0 0; }
.hardware-card dl div { min-width: 0; }
.hardware-card dt { color: var(--muted); font-size: 7px; }
.hardware-card dd { overflow: hidden; margin: 4px 0 0; font-size: 9px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.hardware-note { margin-top: 14px; padding: 9px 10px; color: #6e8179; background: #f4f7f3; border-radius: 8px; font-size: 8px; line-height: 1.55; }
.lock-chip { padding: 6px 10px; color: #8d6526; background: #f9edcf; font-size: 8px; font-weight: 750; }
.actuator-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.actuator-card { display: grid; grid-template-columns: 39px 1fr auto; gap: 11px; align-items: center; padding: 14px; background: white; border: 1px solid var(--line); border-radius: 12px; }
.actuator-card > span { width: 39px; height: 39px; display: grid; place-items: center; color: #70807a; background: #edf1ed; border-radius: 10px; }
.actuator-card strong, .actuator-card small { display: block; }
.actuator-card strong { font-size: 10px; }
.actuator-card small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.actuator-card button { padding: 6px 9px; color: #99a49f; background: #f4f6f3; border: 1px solid #e5eae6; border-radius: 8px; font-size: 8px; }
.safety-callout { margin: 11px 0 0; padding: 12px 14px; color: #6b7e76; background: #edf2ec; border-radius: 10px; font-size: 8px; line-height: 1.65; }
.safety-callout b { margin-right: 8px; color: var(--ink); }

.event-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.event-stats > div { display: grid; grid-template-columns: 38px 1fr auto; gap: 11px; align-items: center; padding: 16px 17px; background: white; border: 1px solid var(--line); border-radius: 13px; }
.stat-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; font-size: 10px; font-weight: 800; }
.stat-icon.warning { color: #9b6720; background: #faedd0; }
.stat-icon.good { color: var(--green); background: #e4f2e8; }
.stat-icon.neutral { color: #65766f; background: #edf1ee; }
.event-stats small { color: var(--muted); font-size: 8px; }
.event-stats strong { font-size: 20px; }
.events-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); gap: 14px; }
.count-chip { padding: 5px 9px; color: #8c6424; background: #f9edcf; font-size: 8px; font-weight: 750; }
.alert-list { display: grid; margin-top: 4px; }
.alert-row { display: grid; grid-template-columns: 31px 1fr; gap: 12px; padding: 13px 0; border-bottom: 1px solid #edf1ed; }
.alert-row:last-child { border-bottom: 0; }
.alert-mark { width: 31px; height: 31px; display: grid; place-items: center; color: #9a671f; background: #f9edcf; border-radius: 9px; font-size: 11px; font-weight: 850; }
.alert-row.resolved .alert-mark { color: var(--green); background: #e5f2e8; }
.alert-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.alert-title strong { font-size: 10px; }
.alert-title small { color: var(--muted); font-size: 7px; }
.alert-row p { margin: 5px 0 0; color: var(--muted); font-size: 8px; line-height: 1.55; }
.alert-row time { display: block; margin-top: 6px; color: #9da9a4; font-size: 7px; }
.advice-chip { padding: 5px 9px; color: var(--green); background: #e4f2e8; font-size: 8px; font-weight: 750; }
.advice-list article { display: grid; grid-template-columns: 30px 1fr; gap: 11px; padding: 13px 0; border-bottom: 1px solid #edf1ed; }
.advice-list article > span { color: #b1c0b8; font-size: 16px; font-weight: 300; }
.advice-list small { color: var(--green-2); font-size: 7px; font-weight: 750; }
.advice-list h3 { margin: 4px 0 0; font-size: 11px; }
.advice-list p { margin: 5px 0 0; color: var(--muted); font-size: 8px; line-height: 1.6; }
.advice-disclaimer { margin: 13px 0 0; padding: 11px 12px; color: #806426; background: #faf2df; border-radius: 9px; font-size: 8px; line-height: 1.55; }

.diagnosis-hero { display: grid; grid-template-columns: 88px 1fr; gap: 24px; align-items: center; padding: 27px 30px; color: white; background: linear-gradient(120deg, #174d3c, #123f32); border-radius: 18px; }
.diagnosis-hero.warning, .diagnosis-hero.critical { background: linear-gradient(120deg, #774c24, #443924); }
.diagnosis-status { display: grid; place-items: center; min-height: 82px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.14); border-radius: 16px; text-align: center; }
.diagnosis-status span { display: block; color: var(--lime); font-size: 24px; font-weight: 800; }
.diagnosis-status small { display: block; margin-top: 3px; color: #d6e1dc; font-size: 8px; }
.diagnosis-hero h2 { margin: 0; font-size: clamp(19px, 2.4vw, 29px); line-height: 1.35; }
.diagnosis-hero > div:last-child > p:last-child { margin: 9px 0 0; color: #b4c8bf; font-size: 9px; }
.finding-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.finding-card { padding: 20px; background: white; border: 1px solid var(--line); border-top: 3px solid var(--green-2); border-radius: 15px; }
.finding-card.warning, .finding-card.critical { border-top-color: var(--amber); }
.finding-head { display: flex; align-items: center; gap: 12px; }
.finding-head > span { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; color: var(--green); background: #e5f2e8; border-radius: 11px; font-size: 11px; font-weight: 850; }
.finding-card.warning .finding-head > span, .finding-card.critical .finding-head > span { color: #96611c; background: #faedd0; }
.finding-head small { color: var(--muted); font-size: 7px; }
.finding-head h3 { margin: 3px 0 0; font-size: 13px; }
.finding-impact { margin: 15px 0; color: #536b61; font-size: 9px; line-height: 1.7; }
.finding-block { margin-top: 11px; padding: 11px 12px; background: #f6f8f5; border-radius: 9px; }
.finding-block > b { display: block; margin-bottom: 7px; color: var(--green); font-size: 8px; }
.finding-block p { margin: 5px 0; color: var(--muted); font-size: 8px; line-height: 1.55; }
.finding-block p strong, .finding-block p small { display: block; }
.finding-block p strong { color: var(--ink); font-size: 8px; }
.finding-block p small { margin-top: 3px; }
.finding-recheck { display: grid; grid-template-columns: auto 1fr; gap: 8px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #edf1ed; font-size: 8px; line-height: 1.55; }
.finding-recheck b { color: var(--green); }
.finding-recheck span { color: var(--muted); }
.advisor-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 14px; margin-top: 16px; align-items: start; }
.question-intro { margin: -3px 0 14px; color: var(--muted); font-size: 9px; line-height: 1.65; }
.quick-questions { display: flex; flex-wrap: wrap; gap: 7px; }
.quick-questions button { padding: 7px 10px; color: var(--green); background: #edf5ef; border: 1px solid #d6e6da; border-radius: 999px; cursor: pointer; font-size: 8px; }
.advisor-conversation { display: grid; gap: 10px; margin: 16px 0; }
.advisor-conversation > article { padding: 14px; background: #f6f8f5; border-radius: 11px; }
.advisor-conversation small { color: var(--green-2); font-size: 7px; font-weight: 750; }
.advisor-conversation p { margin: 5px 0 0; font-size: 9px; line-height: 1.7; }
.advisor-answer { margin-top: 11px; padding-top: 11px; border-top: 1px solid #dfe7e1; }
.advisor-answer p { color: #4d655b; }
.advisor-empty { display: flex; align-items: center; gap: 10px; min-height: 72px; padding: 13px; color: var(--muted); background: #f7f9f6; border: 1px dashed #d6e0d8; border-radius: 11px; }
.advisor-empty span { color: var(--green); font-size: 18px; }
.advisor-empty p { margin: 0; font-size: 8px; }
.advisor-form { display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: end; }
.advisor-form textarea { width: 100%; min-height: 78px; resize: vertical; padding: 11px 12px; color: var(--ink); background: #fbfcfa; border: 1px solid #d8e2da; border-radius: 10px; outline: none; font: inherit; font-size: 10px; line-height: 1.55; }
.advisor-form textarea:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(63,144,104,.1); }
.advisor-form button:disabled { opacity: .55; cursor: wait; }
.advisor-side { display: grid; gap: 14px; }
.advisor-side h3 { margin: 13px 0 0; font-size: 13px; }
.advisor-side p { margin: 8px 0 13px; color: var(--muted); font-size: 8px; line-height: 1.7; }
.advisor-side code { display: block; overflow-x: auto; margin-top: 7px; padding: 8px 9px; color: #315e4c; background: #eef4ef; border-radius: 7px; font-size: 7px; white-space: nowrap; }
.advisor-side-icon { width: 44px; height: 44px; display: grid; place-items: center; color: var(--green); background: #e5f2e8; border-radius: 12px; font-size: 9px; font-weight: 850; }
.advisor-side-icon.shield { color: #95641e; background: #faedd0; }
.safety-panel ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.safety-panel li { color: #5f746b; font-size: 8px; }
.safety-panel li::before { margin-right: 7px; color: var(--green); content: "✓"; }

.settings-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 14px; align-items: start; }
.settings-main, .settings-side { display: grid; gap: 14px; }
.settings-card .section-title { margin-bottom: 19px; }
.safe-chip { padding: 5px 9px; color: var(--green); background: #e4f2e8; font-size: 8px; font-weight: 750; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-grid label, .modal-field { display: grid; gap: 7px; }
.form-grid label > span, .modal-field > span { color: #51675e; font-size: 9px; font-weight: 700; }
.form-grid input, .modal-field input { width: 100%; height: 39px; padding: 0 11px; color: var(--ink); background: #f9fbf8; border: 1px solid #d9e3dc; border-radius: 9px; outline: none; font-size: 10px; }
.form-grid input:focus, .modal-field input:focus { border-color: var(--green-2); box-shadow: 0 0 0 3px rgba(63,144,104,.1); }
.form-grid label small { color: var(--muted); font-size: 7px; }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 20px; padding-top: 14px; border-top: 1px solid #edf1ed; }
.form-actions > span { color: var(--muted); font-size: 8px; }
.threshold-list { display: grid; }
.threshold-list > div { display: grid; grid-template-columns: minmax(190px, 1fr) 190px 60px; gap: 12px; align-items: center; padding: 11px 2px; border-bottom: 1px solid #edf1ed; font-size: 9px; }
.threshold-list > div:last-child { border-bottom: 0; }
.threshold-name b, .threshold-name small { display: block; }
.threshold-name b { font-size: 9px; }
.threshold-name small { margin-top: 3px; color: var(--muted); font-size: 7px; }
.threshold-list button { padding: 5px 8px; color: var(--green); background: white; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; font-size: 8px; }
.security-card { text-align: center; }
.security-icon { width: 48px; height: 48px; display: grid; place-items: center; margin: 0 auto; background: #e5f2e8; border-radius: 14px; font-size: 21px; }
.security-card h3 { margin: 13px 0 0; font-size: 13px; }
.security-card > p { margin: 8px 0 0; color: var(--muted); font-size: 8px; line-height: 1.65; }
.security-card ul { display: grid; gap: 7px; margin: 16px 0; padding: 13px; background: #f6f8f5; border-radius: 10px; list-style: none; text-align: left; }
.security-card li { font-size: 8px; }
.security-card li::before { display: inline-block; width: 18px; }
.security-card li.ok::before { color: var(--green); content: "✓"; }
.security-card li.locked::before { color: #9a6b25; content: "🔒"; }
.audit-list { display: grid; }
.audit-list > div { display: grid; grid-template-columns: 7px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid #edf1ed; }
.audit-list > div:last-child { border-bottom: 0; }
.audit-list i { width: 7px; height: 7px; margin-top: 3px; border-radius: 50%; background: var(--green-2); box-shadow: 0 0 0 4px rgba(63,144,104,.08); }
.audit-list strong, .audit-list small, .audit-list time { display: block; }
.audit-list strong { font-size: 8px; }
.audit-list small { overflow: hidden; margin-top: 3px; color: var(--muted); font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.audit-list time { margin-top: 4px; color: #9aa7a2; font-size: 7px; }
.empty-copy { color: var(--muted); font-size: 8px; text-align: center; }

.modal-backdrop { position: fixed; z-index: 100; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(12,37,29,.42); backdrop-filter: blur(5px); }
.modal-backdrop[hidden] { display: none; }
.modal { position: relative; width: min(500px, 100%); padding: 27px; background: white; border: 1px solid rgba(255,255,255,.6); border-radius: 18px; box-shadow: 0 24px 80px rgba(10,36,27,.28); }
.modal-close { position: absolute; top: 15px; right: 15px; width: 31px; height: 31px; color: var(--muted); background: #f1f4f1; border: 0; border-radius: 9px; cursor: pointer; font-size: 18px; }
.modal h2 { margin: 0; padding-right: 35px; font-size: 20px; letter-spacing: -.025em; }
.modal-copy { margin: 10px 0 20px; color: var(--muted); font-size: 9px; line-height: 1.65; }
.modal-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.form-error { min-height: 14px; margin: 8px 0 0; color: var(--red); font-size: 8px; }

.loading-page, .error-page { min-height: 60vh; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.loading-orbit { width: 38px; height: 38px; margin-bottom: 15px; border: 2px solid #dce7df; border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
.loading-page strong { font-size: 12px; }
.loading-page small { margin-top: 5px; color: var(--muted); font-size: 8px; }
.error-page > span { width: 45px; height: 45px; display: grid; place-items: center; color: #9e4d3d; background: #f8e7e2; border-radius: 50%; font-weight: 850; }
.error-page h1 { margin: 15px 0 0; font-size: 20px; }
.error-page p { margin: 8px 0 18px; color: var(--muted); font-size: 10px; }
.toast { position: fixed; z-index: 150; left: 50%; bottom: 24px; max-width: calc(100vw - 34px); transform: translate(-50%, 20px); padding: 11px 16px; color: white; background: #173f33; border-radius: 10px; box-shadow: 0 14px 38px rgba(16,51,39,.25); opacity: 0; pointer-events: none; transition: .22s ease; font-size: 10px; }
.toast.visible { transform: translate(-50%, 0); opacity: 1; }
.toast.error { background: #994b3b; }

.login-body { color: #17382f; background: #f3f5ef; }
.login-layout { width: 100%; max-width: none; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(420px, .8fr); margin: 0; padding: 0; }
.login-story { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: clamp(30px, 5vw, 68px); color: white; background: linear-gradient(138deg, #0d382c, #174f3d 68%, #1a5b45); }
.login-story::before { position: absolute; width: 760px; height: 760px; right: -400px; top: -480px; content: ""; border: 1px solid rgba(255,255,255,.11); border-radius: 50%; box-shadow: 0 0 0 100px rgba(255,255,255,.018), 0 0 0 210px rgba(199,230,101,.018); }
.login-story::after { position: absolute; inset: 0; content: ""; pointer-events: none; background: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.014) 1px, transparent 1px); background-size: 42px 42px; mask-image: linear-gradient(to bottom, rgba(0,0,0,.7), transparent 80%); }
.login-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; align-self: flex-start; }
.login-brand .brand-mark { width: 47px; height: 47px; }
.login-brand strong, .login-brand small { display: block; }
.login-brand strong { font-size: 20px; letter-spacing: .12em; }
.login-brand small { margin-top: 4px; color: #9db8ad; font-size: 9px; letter-spacing: .17em; }
.login-story-copy { position: relative; z-index: 1; max-width: 760px; margin: auto 0; padding: 70px 0; }
.login-eyebrow { margin: 0 0 18px; color: var(--lime); font-size: 10px; font-weight: 850; letter-spacing: .2em; }
.login-story h1 { margin: 0; font-size: clamp(38px, 5.2vw, 72px); font-weight: 560; line-height: 1.08; letter-spacing: -.055em; }
.login-story h1 em { color: var(--lime); font-style: normal; }
.login-story-copy > p:last-child { max-width: 610px; margin: 25px 0 0; color: #abc1b8; font-size: 12px; line-height: 1.9; }
.login-trust-row { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 13px 25px; color: #9fb9af; font-size: 9px; }
.login-trust-row span { display: flex; align-items: center; gap: 8px; }
.login-trust-row i { width: 6px; height: 6px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 0 4px rgba(199,230,101,.09); }
.login-panel-wrap { display: grid; place-items: center; padding: clamp(24px, 5vw, 72px); }
.login-panel { width: min(430px, 100%); padding: 36px; background: white; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 70px rgba(23,56,47,.1); }
.login-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 44px; color: var(--muted); font-size: 9px; font-weight: 750; }
.login-panel-head i { width: 34px; height: 34px; display: grid; place-items: center; color: var(--green); background: #e6f1e8; border-radius: 10px; font-style: normal; }
.login-panel h2 { margin: 0; font-size: 29px; letter-spacing: -.045em; }
.login-copy { margin: 11px 0 25px; color: var(--muted); font-size: 10px; line-height: 1.75; }
.login-field { display: grid; gap: 8px; margin-top: 16px; }
.login-field > span:first-child { color: #405a50; font-size: 9px; font-weight: 750; }
.login-field input { width: 100%; height: 47px; padding: 0 13px; color: var(--ink); background: #f8faf7; border: 1px solid #d8e2da; border-radius: 11px; outline: none; font-size: 12px; }
.login-field input:focus { border-color: var(--green-2); box-shadow: 0 0 0 4px rgba(63,144,104,.1); }
.password-wrap { position: relative; display: block; }
.password-wrap input { padding-right: 61px; }
.password-wrap button { position: absolute; top: 50%; right: 7px; transform: translateY(-50%); padding: 7px 9px; color: var(--green); background: transparent; border: 0; cursor: pointer; font-size: 8px; }
.login-error { min-height: 18px; margin: 10px 0 0; color: var(--red); font-size: 9px; line-height: 1.5; }
.login-submit { width: 100%; height: 49px; display: flex; align-items: center; justify-content: space-between; margin-top: 6px; padding: 0 17px; color: white; background: var(--green); border: 0; border-radius: 11px; box-shadow: 0 12px 28px rgba(35,110,77,.2); cursor: pointer; font-size: 11px; font-weight: 750; }
.login-submit:hover { background: #195e41; }
.login-submit:disabled { opacity: .6; cursor: wait; }
.login-submit b { font-size: 17px; font-weight: 400; }
.login-security-note { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 18px 0 0; color: #8c9b95; font-size: 8px; line-height: 1.5; text-align: center; }
.login-security-note span { color: var(--green); font-size: 9px; }
.login-panel-head a { color: var(--green); font-size: 9px; font-weight: 750; }
.login-back-home { display: block; margin-top: 17px; color: var(--muted); font-size: 9px; text-align: center; }
.register-layout .login-story { background: linear-gradient(138deg, #0b3328, #18513d 68%, #235e46); }
.register-panel { width: min(500px, 100%); }
.register-panel .login-panel-head { margin-bottom: 28px; }
.register-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.landing-body { color: #17382f; background: #f4f7f1; }
.landing-nav { position: sticky; z-index: 20; top: 0; width: 100%; height: 78px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 30px; padding: 0 max(24px, calc((100vw - 1220px) / 2)); background: rgba(244,247,241,.88); border-bottom: 1px solid rgba(22,75,57,.1); backdrop-filter: blur(16px); }
.public-brand { display: flex; align-items: center; gap: 11px; justify-self: start; }
.public-brand .brand-mark { width: 42px; height: 42px; }
.public-brand strong, .public-brand small { display: block; }
.public-brand strong { font-size: 18px; letter-spacing: .14em; }
.public-brand small { margin-top: 3px; color: #71877f; font-size: 8px; letter-spacing: .16em; }
.landing-nav nav { display: flex; gap: 28px; color: #536c63; font-size: 10px; font-weight: 700; }
.landing-auth { display: flex; align-items: center; justify-self: end; gap: 8px; }
.landing-auth a { min-height: 38px; display: inline-flex; align-items: center; padding: 0 17px; border-radius: 10px; font-size: 10px; font-weight: 800; }
.auth-login { color: var(--green); border: 1px solid #bfd0c5; }
.auth-register { color: white; background: var(--green); }
.landing-main { width: 100%; padding: 0; }
.landing-hero { min-height: 690px; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(430px, .95fr); align-items: center; gap: clamp(50px, 7vw, 110px); padding: 90px max(30px, calc((100vw - 1220px) / 2)); color: white; background: radial-gradient(circle at 85% 20%, rgba(199,230,101,.12), transparent 32%), linear-gradient(135deg, #0c3328, #15503b 68%, #1c6146); }
.landing-hero-copy { max-width: 720px; }
.landing-kicker, .section-heading > p, .landing-final > p { margin: 0 0 18px; color: var(--lime); font-size: 10px; font-weight: 850; letter-spacing: .19em; }
.landing-hero h1 { margin: 0; font-size: clamp(45px, 5.7vw, 78px); font-weight: 560; line-height: 1.06; letter-spacing: -.06em; }
.landing-hero h1 em { color: var(--lime); font-style: normal; }
.landing-hero-copy > p:nth-of-type(2) { max-width: 670px; margin: 28px 0 0; color: #b6cbc2; font-size: 14px; line-height: 1.85; }
.landing-cta { display: flex; align-items: center; gap: 20px; margin-top: 35px; }
.landing-cta a:first-child { min-width: 184px; height: 50px; display: flex; align-items: center; justify-content: space-between; padding: 0 18px; color: #153d30; background: var(--lime); border-radius: 11px; font-size: 11px; font-weight: 850; }
.landing-cta a:last-child { color: white; font-size: 10px; font-weight: 750; }
.landing-proof { display: flex; flex-wrap: wrap; gap: 12px 25px; margin-top: 48px; color: #9eb9ae; font-size: 9px; }
.landing-proof span::before { width: 5px; height: 5px; display: inline-block; margin-right: 8px; content: ""; vertical-align: 1px; background: var(--lime); border-radius: 50%; }
.landing-console { padding: 25px; color: var(--ink); background: #f7faf5; border: 1px solid rgba(255,255,255,.35); border-radius: 25px; box-shadow: 0 35px 90px rgba(0,25,17,.28); }
.console-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; color: #60766d; font-size: 9px; font-weight: 750; }
.console-head i { padding: 6px 9px; color: #277753; background: #e1f1e4; border-radius: 999px; font-style: normal; }
.console-score { padding: 22px; color: white; background: linear-gradient(135deg, #1b6348, #123f31); border-radius: 17px; }
.console-score small, .console-score strong, .console-score span { display: block; }
.console-score small { color: #a9c6b9; font-size: 8px; }
.console-score strong { margin: 6px 0; font-size: 29px; }
.console-score span { color: #c5d8cf; font-size: 9px; }
.console-metrics { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 12px 0; }
.console-metrics > div { padding: 15px; background: white; border: 1px solid #dfe8e0; border-radius: 13px; }
.console-metrics span, .console-metrics b { display: block; }
.console-metrics span { color: #75877f; font-size: 8px; }
.console-metrics b { margin-top: 7px; font-size: 22px; }
.console-metrics small { margin-left: 4px; color: #7c8f87; font-size: 8px; font-weight: 600; }
.console-action { display: grid; grid-template-columns: 33px 1fr; gap: 12px; align-items: start; padding: 15px; background: #edf3ea; border-radius: 13px; }
.console-action > i { width: 33px; height: 33px; display: grid; place-items: center; color: var(--green); background: white; border-radius: 9px; font-size: 9px; font-style: normal; font-weight: 850; }
.console-action p { margin: 0; }
.console-action strong, .console-action span { display: block; }
.console-action strong { font-size: 9px; }
.console-action span { margin-top: 5px; color: #667a71; font-size: 8px; line-height: 1.6; }
.landing-section { width: min(1220px, calc(100% - 48px)); margin: 0 auto; padding: 105px 0; }
.section-heading { max-width: 720px; }
.section-heading > p { color: var(--green-2); }
.section-heading h2 { margin: 0; font-size: clamp(31px, 4vw, 52px); letter-spacing: -.05em; }
.section-heading > span { display: block; margin-top: 17px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.capability-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 45px; }
.capability-grid article { min-height: 245px; padding: 28px; background: white; border: 1px solid #dfe8df; border-radius: 18px; }
.capability-grid i { color: var(--green-2); font-size: 9px; font-style: normal; font-weight: 850; }
.capability-grid h3 { margin: 55px 0 10px; font-size: 20px; }
.capability-grid p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.8; }
.workflow-section { border-top: 1px solid #dbe5dc; }
.workflow-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin: 45px 0 0; padding: 0; list-style: none; }
.workflow-list li { display: grid; grid-template-columns: 38px 1fr; gap: 15px; }
.workflow-list b { color: #8ca096; font-size: 9px; }
.workflow-list strong, .workflow-list span { display: block; }
.workflow-list strong { font-size: 15px; }
.workflow-list span { margin-top: 8px; color: var(--muted); font-size: 10px; line-height: 1.75; }
.landing-final { width: min(1220px, calc(100% - 48px)); margin: 0 auto 70px; padding: 65px; color: white; background: #103d30; border-radius: 25px; text-align: center; }
.landing-final h2 { margin: 0; font-size: clamp(30px, 4vw, 50px); letter-spacing: -.045em; }
.landing-final > span { display: block; margin-top: 14px; color: #adc2b9; font-size: 11px; }
.landing-final > div { display: flex; justify-content: center; gap: 10px; margin-top: 30px; }
.landing-final a { padding: 12px 17px; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; font-size: 10px; font-weight: 800; }
.landing-final a:first-child { color: #183d31; background: var(--lime); border-color: var(--lime); }
.landing-footer { width: min(1220px, calc(100% - 48px)); display: flex; justify-content: space-between; margin: 0 auto; padding: 0 0 35px; color: #7a8c84; font-size: 9px; }

.snapshot-overview-card { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 28px; padding: 28px 30px; }
.snapshot-overview-card h2, .capture-card h2, .field-photo-form h2, .api-key-form h2 { margin: 0; font-size: 22px; }
.snapshot-overview-card p, .capture-card > p, .field-photo-form > p, .integration-status p { margin: 8px 0 0; color: var(--muted); font-size: 10px; line-height: 1.7; }
.snapshot-policy { display: flex; gap: 8px; }
.snapshot-policy span { min-width: 86px; padding: 11px; background: #eff4ed; border-radius: 11px; color: var(--muted); font-size: 8px; text-align: center; }
.snapshot-policy b { display: block; margin-bottom: 3px; color: var(--green); font-size: 15px; }
.portfolio-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.organization-card { padding: 25px; }
.organization-head { display: flex; justify-content: space-between; align-items: center; }
.organization-head span { padding: 5px 8px; color: var(--green); background: #e5f1e8; border-radius: 99px; font-size: 9px; font-weight: 750; }
.organization-head small { color: var(--muted); font-size: 9px; }
.organization-card h2 { margin: 22px 0 7px; font-size: 23px; }
.organization-card > p { min-height: 32px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.unit-card-list { display: grid; gap: 8px; margin-top: 20px; }
.unit-card { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 13px 14px; text-align: left; background: #f7f9f5; border: 1px solid var(--line); border-radius: 11px; cursor: pointer; }
.unit-card:hover, .unit-card.active { border-color: #75a58a; background: #edf5ef; }
.unit-card b, .unit-card small { display: block; }
.unit-card b { font-size: 11px; }
.unit-card small, .unit-card em { margin-top: 4px; color: var(--muted); font-size: 8px; font-style: normal; }
.portfolio-admin-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 14px; margin-top: 25px; }
.assignment-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.assignment-card { display: grid; gap: 16px; }
.assignment-card > div > span { color: var(--green-2); font-size: 8px; font-weight: 850; }
.assignment-card h3 { margin: 5px 0; }
.assignment-card p { margin: 0; color: var(--muted); font-size: 9px; }
.assignment-card label, .field-photo-form label, .api-key-form label { display: grid; gap: 6px; color: var(--muted); font-size: 9px; font-weight: 700; }
.assignment-card select, .field-photo-form input, .field-photo-form textarea, .api-key-form input { width: 100%; padding: 10px 11px; color: var(--ink); background: #fafcf9; border: 1px solid var(--line); border-radius: 9px; outline: none; }
.permission-note { color: var(--muted); font-size: 11px; }
.ownership-flow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.ownership-flow article { min-height: 112px; display: grid; grid-template-columns: 42px 1fr; align-content: center; gap: 5px 12px; padding: 20px; color: white; background: var(--deep); border-radius: 16px; }
.ownership-flow b { grid-row: span 2; color: var(--lime); font-size: 24px; }
.ownership-flow strong { font-size: 13px; }
.ownership-flow span { color: #a9c0b7; font-size: 9px; }
.permission-matrix { display: grid; grid-template-columns: .7fr 1.3fr; gap: 28px; margin-bottom: 18px; }
.permission-matrix h2 { margin: 6px 0 8px; }
.permission-matrix p { margin: 0; color: var(--muted); font-size: 9px; line-height: 1.7; }
.permission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.permission-grid span { display: grid; gap: 4px; padding: 12px; color: var(--muted); background: #f3f7f2; border-radius: 10px; font-size: 8px; }
.permission-grid b { color: var(--ink); font-size: 9px; }
.read-only-label { color: var(--soft); font-size: 8px; }
.profile-summary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.profile-summary span { display: grid; gap: 5px; padding: 13px; background: #f3f7f2; border-radius: 10px; }
.profile-summary small { color: var(--muted); font-size: 8px; }
.profile-summary b { color: var(--ink); font-size: 10px; }
.portfolio-admin-grid.single { grid-template-columns: 1fr; }
.form-explainer { margin: -3px 0 15px; color: var(--muted); font-size: 9px; line-height: 1.7; }
.share-result { display: grid; align-content: center; gap: 11px; background: #eff8e7; }
.share-result h2 { margin: 0; }
.share-result code { padding: 11px; overflow-wrap: anywhere; color: var(--green); background: white; border: 1px dashed #9abd8f; border-radius: 9px; font-size: 9px; }
.member-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.member-card { display: grid; gap: 13px; }
.member-card small, .member-card span { color: var(--muted); font-size: 8px; }
.member-card h3 { margin: 5px 0 2px; }
.member-card label { display: grid; gap: 6px; color: var(--muted); font-size: 8px; }
.member-card select { min-height: 38px; padding: 0 10px; border: 1px solid var(--line); border-radius: 9px; }
.accept-invite { display: flex; align-items: center; justify-content: space-between; gap: 30px; margin-top: 24px; }
.accept-invite h2 { margin: 4px 0; }
.accept-invite p { margin: 0; color: var(--muted); font-size: 9px; }
.accept-invite form { min-width: min(480px, 50%); display: flex; gap: 8px; }
.accept-invite input { flex: 1; min-width: 0; padding: 0 12px; border: 1px solid var(--line); border-radius: 9px; }
.access-explainer { margin-top: 20px; }
.access-explainer h2 { margin-top: 0; }
.access-explainer p { margin-bottom: 0; color: var(--muted); }

.weather-summary { display: flex; align-items: center; justify-content: space-between; gap: 26px; margin-bottom: 28px; background: linear-gradient(120deg, #f7fbf2, #eef7ea); }
.weather-summary h2 { margin: 5px 0; font-size: 24px; }
.weather-summary p, .weather-summary span { color: var(--muted); font-size: 9px; }
.weather-summary small { display: block; margin-top: 8px; color: #44705e; font-size: 9px; }
.weather-summary > div:last-child { display: flex; align-items: center; gap: 16px; }
.weather-summary.missing { border-style: dashed; }
.weather-kicker { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.weather-kicker .eyebrow { margin: 0; }
.weather-provider-chip { display: inline-flex; align-items: center; min-height: 25px; padding: 0 10px; color: #175a40 !important; background: #dff1dd; border: 1px solid rgba(39,108,75,.12); border-radius: 99px; font-size: 8px !important; font-weight: 750; letter-spacing: .04em; white-space: nowrap; }
.weather-provider-chip.degraded { color: #875625 !important; background: #fff0d9; border-color: #ecd0a3; }
.weather-provider-warning { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; padding: 12px 15px; color: #80531f; background: #fff5e6; border: 1px solid #eed6ae; border-radius: 12px; }
.weather-provider-warning span { display: grid; place-items: center; width: 24px; height: 24px; color: white; background: #b8782e; border-radius: 50%; font-weight: 800; }
.weather-provider-warning p { margin: 0; font-size: 9px; }
.weather-current { display: grid; grid-template-columns: .9fr 1.1fr; gap: 30px; align-items: center; color: white; background: radial-gradient(circle at 15% 10%, rgba(164,216,125,.16), transparent 33%), linear-gradient(130deg, #0f4637, #1d6349); }
.weather-current h2 { margin: 6px 0 0; font-size: 25px; }
.weather-current strong { display: block; margin-top: 13px; font-size: 58px; letter-spacing: -.06em; }
.weather-current strong em { font-size: 16px; font-style: normal; }
.weather-current p { color: #bcd3ca; font-size: 9px; }
.weather-current > div > small { display: block; margin-top: 12px; color: #d4e7de; font-size: 9px; line-height: 1.65; }
.weather-current .weather-provider-chip { color: #dff4e8 !important; background: rgba(223,241,221,.1); border-color: rgba(223,241,221,.18); }
.weather-current dl { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.weather-current dl div { padding: 14px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; }
.weather-current dt { color: #a9c6ba; font-size: 8px; }
.weather-current dd { margin: 6px 0 0; font-weight: 750; }
.nowcast-panel { display: grid; grid-template-columns: .9fr 1.15fr; gap: 24px; margin-top: 14px; overflow: hidden; background: linear-gradient(135deg, #f9fcf7, #eef7ec); }
.nowcast-copy h2 { margin: 14px 0 8px; font-size: 21px; line-height: 1.4; }
.nowcast-copy p { margin: 0; color: #2d5e4b; font-size: 10px; font-weight: 700; }
.nowcast-copy > small { display: block; margin-top: 12px; color: var(--muted); font-size: 8px; line-height: 1.65; }
.nowcast-intervals { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; }
.nowcast-intervals article { display: grid; align-content: center; gap: 8px; min-height: 116px; padding: 12px; background: white; border: 1px solid #dbe7de; border-radius: 12px; }
.nowcast-intervals article > span, .nowcast-intervals small { color: var(--muted); font-size: 8px; }
.nowcast-intervals strong { color: var(--green); font-size: 24px; }
.nowcast-intervals strong em { font-size: 10px; font-style: normal; }
.rain-trend { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(8, 1fr); align-items: end; gap: 7px; height: 92px; padding: 15px 18px 9px; background: #e8f2e7; border-radius: 12px; }
.rain-trend span { display: grid; grid-template-rows: 54px auto; align-items: end; justify-items: center; gap: 5px; height: 100%; }
.rain-trend i { display: block; width: min(100%, 28px); min-height: 3px; background: linear-gradient(#76bbd0, #3489a9); border-radius: 5px 5px 2px 2px; }
.rain-trend small { color: var(--muted); font-size: 7px; }
.nowcast-unavailable { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 14px; background: #f7f9f6; border-style: dashed; }
.nowcast-unavailable h2 { margin: 5px 0; font-size: 18px; }
.nowcast-unavailable p { margin: 0; color: var(--muted); font-size: 9px; }
.nowcast-unavailable > span { padding: 7px 10px; color: var(--muted); background: white; border: 1px solid var(--line); border-radius: 99px; font-size: 8px; }
.weather-alerts { display: flex; align-items: center; gap: 15px; margin-top: 24px; }
.weather-alerts.clear { background: #f6faf4; }
.weather-alert-icon { display: grid; place-items: center; width: 42px; height: 42px; color: var(--green); background: #dff1dc; border-radius: 50%; font-weight: 800; }
.weather-alerts h2 { margin: 4px 0; font-size: 16px; }
.weather-alerts p { margin: 0; color: var(--muted); font-size: 9px; }
.weather-alert-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.weather-alert-card { border-color: #ebc99b; background: linear-gradient(140deg, #fffaf2, #fff); }
.weather-alert-card > div, .weather-alert-card footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.weather-alert-card > div > span { padding: 5px 8px; color: #8a551e; background: #f8e4c6; border-radius: 99px; font-size: 8px; font-weight: 750; }
.weather-alert-card small, .weather-alert-card footer { color: var(--muted); font-size: 8px; }
.weather-alert-card h3 { margin: 16px 0 9px; font-size: 15px; line-height: 1.45; }
.weather-alert-card p { display: -webkit-box; margin: 0 0 16px; overflow: hidden; color: #6c6256; font-size: 9px; line-height: 1.7; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.section-note.warning { color: #8a551e; background: #f8e4c6; }
.weather-day-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.weather-day-card h3 { margin: 10px 0 18px; font-size: 21px; }
.weather-day-card h3 i { color: #91a49b; font-size: 13px; font-style: normal; }
.weather-day-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.weather-day-card dl div { padding: 9px; background: #f5f8f4; border-radius: 9px; }
.weather-day-card dt { color: var(--muted); font-size: 7px; }
.weather-day-card dd { margin: 5px 0 0; font-size: 9px; font-weight: 720; }
.weather-hourly > div:last-child { display: grid; grid-template-columns: repeat(12, minmax(74px, 1fr)); gap: 6px; overflow-x: auto; }
.weather-hourly span { display: grid; gap: 7px; padding: 12px 8px; text-align: center; background: #f5f8f4; border-radius: 10px; }
.weather-hourly time, .weather-hourly small { color: var(--muted); font-size: 8px; }
.weather-location-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.weather-source h2, .location-form h2 { margin: 6px 0 11px; }
.weather-source > p, .location-form > p { color: var(--muted); font-size: 9px; line-height: 1.7; }
.weather-source dl { display: grid; gap: 8px; margin: 16px 0; }
.weather-source dl div { display: flex; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--line); font-size: 9px; }
.weather-source small { display: block; margin-top: 8px; color: var(--muted); font-size: 8px; }
/* Weather intelligence v2 */
.weather-hero { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: 34px; align-items: center; min-height: 330px; margin-bottom: 18px; padding: 38px; overflow: hidden; color: #fff; border: 1px solid rgba(255,255,255,.12); border-radius: 22px; box-shadow: 0 22px 46px rgba(21,68,51,.16); isolation: isolate; }
.weather-hero::before { content: ''; position: absolute; inset: 0; z-index: -2; background: linear-gradient(125deg, #0c4e3d 0%, #17644b 55%, #5a814f 120%); }
.weather-hero::after { content: ''; position: absolute; z-index: -1; width: 420px; height: 420px; top: -240px; right: -110px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.02); animation: weather-breathe 8s ease-in-out infinite; }
.weather-hero.sunny::before { background: linear-gradient(125deg, #164d3a 0%, #2d7250 56%, #b08a3d 135%); }
.weather-hero.rain::before, .weather-hero.storm::before { background: linear-gradient(125deg, #0d3540 0%, #1e4e55 58%, #405f5b 120%); }
.weather-hero.snow::before { background: linear-gradient(125deg, #285b60 0%, #5c8885 100%); }
.weather-hero.haze::before { background: linear-gradient(125deg, #3f594d 0%, #7b8068 100%); }
.weather-hero-main { min-width: 0; }
.weather-condition { display: flex; align-items: center; gap: 22px; margin: 28px 0 18px; }
.weather-condition > i { display: grid; place-items: center; width: 112px; color: #e4f7ab; font-size: 86px; filter: drop-shadow(0 16px 16px rgba(0,0,0,.14)); animation: weather-float 4.8s ease-in-out infinite; }
.weather-condition h2 { margin: 0 0 2px; color: #d9ede4; font-size: 15px; font-weight: 650; }
.weather-condition strong { display: block; font-size: clamp(52px, 6vw, 82px); line-height: .98; letter-spacing: -.07em; }
.weather-condition strong em { margin-left: 5px; font-size: 18px; font-style: normal; font-weight: 650; letter-spacing: 0; vertical-align: top; }
.weather-hero-main > p { color: rgba(235,247,241,.72); font-size: 10px; }
.weather-hero-main > small { display: block; max-width: 610px; margin-top: 13px; color: #edf8f2; font-size: 10px; line-height: 1.75; }
.weather-hero .weather-provider-chip { color: #ecf7f1 !important; background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.18); }
.weather-hero dl { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0; }
.weather-hero dl div { min-height: 76px; padding: 16px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.12); border-radius: 14px; backdrop-filter: blur(8px); }
.weather-hero dt { color: rgba(235,247,241,.64); font-size: 8px; }
.weather-hero dd { margin: 8px 0 0; color: #fff; font-size: 13px; font-weight: 760; }
.weather-hourly { margin-top: 18px; }
.weather-hourly > div:last-child { padding: 4px 0 7px; scrollbar-width: thin; }
.weather-hourly span { min-width: 82px; border: 1px solid transparent; transition: transform .2s ease, border-color .2s ease, background .2s ease; }
.weather-hourly span:hover { transform: translateY(-3px); background: #eff6ed; border-color: #d8e6d7; }
.weather-hourly span > i { color: #287758; font-size: 26px; }
.weather-range-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.weather-range-head .section-heading { flex: 1; }
.weather-range { flex: 0 0 auto; }
.weather-day-grid.long { grid-template-columns: repeat(5, 1fr); }
.weather-day-card { overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.weather-day-card:hover { transform: translateY(-3px); box-shadow: 0 15px 28px rgba(25,73,54,.09); }
.weather-day-card > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.weather-day-card > div:first-child > i { color: #327d5e; font-size: 30px; }
.weather-day-card > p { min-height: 30px; margin: -9px 0 14px; color: var(--muted); font-size: 8px; }
.weather-day-card footer { display: flex; justify-content: space-between; gap: 8px; margin-top: 14px; padding-top: 10px; color: var(--muted); border-top: 1px solid var(--line); font-size: 7px; }
.weather-intel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.air-card { display: grid; grid-template-columns: .9fr 1.1fr; gap: 26px; align-items: center; }
.air-card > div:first-child > p { color: var(--muted); font-size: 8px; line-height: 1.7; }
.aqi-gauge { position: relative; display: grid; place-items: center; width: 184px; height: 184px; margin: 12px auto; border-radius: 50%; background: conic-gradient(from 198deg, #6abf79 0 26%, #d6ca56 26% 46%, #de9150 46% 64%, #cc6d5f 64% 82%, #6abf79 82% 100%); }
.aqi-gauge::before { content: ''; position: absolute; inset: 15px; background: #fff; border-radius: 50%; }
.aqi-gauge::after { content: ''; position: absolute; width: 3px; height: 76px; bottom: 50%; left: calc(50% - 1.5px); background: #163f33; border-radius: 99px; transform: rotate(var(--aqi-angle)); transform-origin: bottom center; transition: transform .8s cubic-bezier(.2,.8,.2,1); }
.aqi-gauge span { position: relative; z-index: 2; display: grid; text-align: center; }
.aqi-gauge small, .aqi-gauge em { color: var(--muted); font-size: 8px; font-style: normal; }
.aqi-gauge strong { font-size: 34px; line-height: 1.1; }
.pollutant-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pollutant-grid span { padding: 13px; background: #f3f7f2; border-radius: 11px; }
.pollutant-grid small, .pollutant-grid em { display: block; color: var(--muted); font-size: 7px; font-style: normal; }
.pollutant-grid b { display: inline-block; margin: 6px 4px 2px 0; font-size: 15px; }
.weather-impact-list { display: grid; gap: 10px; margin: 16px 0 18px; }
.weather-impact-list > div { display: flex; gap: 11px; padding: 13px; background: #f5f8f4; border-radius: 12px; }
.weather-impact-list i { flex: 0 0 8px; height: 8px; margin-top: 4px; background: #5eaa72; border-radius: 50%; box-shadow: 0 0 0 5px rgba(94,170,114,.11); }
.weather-impact-list .warning i { background: #d68245; box-shadow: 0 0 0 5px rgba(214,130,69,.12); }
.weather-impact-list .watch i { background: #bfab50; box-shadow: 0 0 0 5px rgba(191,171,80,.12); }
.weather-impact-list b, .weather-impact-list small { display: block; }
.weather-impact-list b { margin-bottom: 5px; font-size: 9px; }
.weather-impact-list small { color: var(--muted); font-size: 8px; line-height: 1.65; }
.weather-index-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.weather-index-grid article > span { display: inline-flex; padding: 5px 9px; color: #247054; background: #e4f2e2; border-radius: 99px; font-size: 8px; font-weight: 720; }
.weather-index-grid h3 { margin: 13px 0 7px; }
.weather-index-grid p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.65; }
.location-search { display: flex; gap: 8px; margin: 16px 0 12px; }
.location-search input { flex: 1; min-width: 0; }
.location-results { display: grid; gap: 7px; max-height: 260px; margin: 0 0 16px; padding: 10px; overflow-y: auto; background: #f3f7f2; border: 1px solid var(--line); border-radius: 12px; }
.location-results > button { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px; color: var(--ink); text-align: left; background: #fff; border: 1px solid transparent; border-radius: 9px; cursor: pointer; transition: border-color .2s ease, transform .2s ease; }
.location-results > button:hover { transform: translateY(-1px); border-color: #9cc8ad; }
.location-results b, .location-results small { display: block; }
.location-results b { font-size: 9px; }
.location-results small, .location-results em, .location-results > p { color: var(--muted); font-size: 7px; font-style: normal; line-height: 1.55; }
.location-results > small { padding: 3px 4px; line-height: 1.65; }
.location-form > form:not(.location-search) { padding-top: 4px; }
@keyframes weather-float { 0%,100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
@keyframes weather-breathe { 0%,100% { transform: scale(1); opacity: .72; } 50% { transform: scale(1.07); opacity: 1; } }
.provider-health { display: inline-flex; align-items: center; gap: 6px; color: #2c7456; font-size: 8px; font-weight: 700; }
.provider-health i { width: 7px; height: 7px; background: #5ab57a; border-radius: 50%; box-shadow: 0 0 0 3px rgba(90,181,122,.12); }
.provider-health.degraded { color: #946126; }
.provider-health.degraded i { background: #cf8b36; box-shadow: 0 0 0 3px rgba(207,139,54,.12); }
.location-form .form-grid { margin-bottom: 14px; }
.location-hint { min-height: 30px; margin-bottom: 0 !important; }

.device-inventory-form { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 18px; background: #f6f8f5; border-radius: 14px; }
.device-inventory-form .device-notes { grid-column: span 2; }
.device-inventory-form > button { align-self: end; }
.claim-code-result { display: flex; align-items: center; gap: 12px; margin-top: 14px; padding: 14px; color: #234d3e; background: #edf7e3; border-radius: 12px; }
.claim-code-result[hidden] { display: none; }
.claim-code-result code { flex: 1; overflow-wrap: anywhere; }
.claim-code-result button, .admin-device-list button { padding: 9px 12px; color: var(--green); background: white; border: 1px solid #c9d8cf; border-radius: 9px; cursor: pointer; }
.admin-device-list { display: grid; gap: 8px; margin-top: 16px; }
.admin-device-list article { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 13px; border: 1px solid var(--line); border-radius: 11px; }
.admin-device-list article div { display: grid; gap: 4px; }
.admin-device-list small, .admin-device-list span { color: var(--muted); font-size: 8px; }
.snapshot-control-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px; }
.capture-card, .field-photo-form { padding: 28px; }
.capture-actions { display: flex; gap: 9px; margin-top: 24px; }
.archive-policy { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.archive-policy span { padding: 6px 9px; color: var(--green); background: #eaf3eb; border-radius: 99px; font-size: 8px; font-weight: 700; }
.field-photo-form { display: grid; gap: 13px; }
.file-picker { padding: 11px; border: 1px dashed #a9bbb0; border-radius: 10px; }
.file-picker input { padding: 5px 0 0; border: 0; background: transparent; font-size: 9px; }
.media-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.media-card { overflow: hidden; padding: 0; }
.media-image { position: relative; aspect-ratio: 16 / 10; background: #dfe8e1; }
.media-image img { width: 100%; height: 100%; object-fit: cover; }
.media-image > span { position: absolute; top: 10px; left: 10px; padding: 5px 8px; color: white; background: rgba(14,55,43,.76); border-radius: 99px; font-size: 8px; font-weight: 800; }
.media-body { padding: 17px; }
.media-body > small { color: var(--soft); font-size: 8px; }
.media-body h3 { margin: 8px 0 5px; font-size: 15px; }
.media-body > p { min-height: 30px; margin: 0; color: var(--muted); font-size: 9px; line-height: 1.6; }
.media-analysis { margin: 12px 0; padding: 11px; background: #f0f5ed; border-radius: 9px; }
.media-analysis b, .media-analysis small { color: var(--green); font-size: 8px; }
.media-analysis p { margin: 6px 0; color: var(--ink); font-size: 9px; line-height: 1.6; }
.empty-media { text-align: center; }
.empty-media > span { color: var(--green); font-size: 28px; }
.integration-status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.integration-status { display: flex; gap: 15px; align-items: flex-start; }
.status-lamp { width: 10px; height: 10px; margin-top: 5px; flex: 0 0 auto; background: #aab6b0; border-radius: 50%; box-shadow: 0 0 0 5px rgba(130,150,140,.12); }
.status-lamp.online { background: #45a271; box-shadow: 0 0 0 5px rgba(69,162,113,.12); }
.integration-status small { color: var(--soft); font-size: 8px; }
.integration-status h2 { margin: 4px 0 0; font-size: 20px; }
.integration-layout { display: grid; grid-template-columns: 1.35fr .65fr; gap: 14px; margin-top: 14px; }
.endpoint-list { display: grid; gap: 8px; }
.endpoint-list > div { display: grid; grid-template-columns: 48px minmax(180px, .8fr) 1fr; gap: 10px; align-items: center; padding: 11px; background: #f7f9f5; border-radius: 9px; }
.endpoint-list code, .api-client-card code { font-size: 9px; }
.endpoint-list p { margin: 0; color: var(--muted); font-size: 9px; }
.method { padding: 5px; color: var(--green); background: #def0e3; border-radius: 6px; font-size: 8px; font-weight: 850; text-align: center; }
.method.post { color: #8a6425; background: #f8edcf; }
.code-sample { margin-top: 16px; padding: 15px; color: #dcece2; background: var(--deep); border-radius: 11px; overflow: auto; }
.code-sample small { color: #95b0a5; font-size: 8px; }
.code-sample pre { margin: 10px 0 0; font-size: 9px; line-height: 1.7; }
.integration-side { display: grid; align-content: start; gap: 12px; }
.api-key-form { display: grid; gap: 15px; }
.one-time-token { border-color: #d4b668; background: #fff9e9; }
.one-time-token b { color: #865f1e; font-size: 9px; }
.one-time-token code { display: block; overflow-wrap: anywhere; margin: 10px 0; padding: 10px; background: white; border-radius: 8px; font-size: 9px; }
.api-client-list { display: grid; gap: 9px; }
.api-client-card { display: flex; align-items: center; justify-content: space-between; }
.api-client-card > div { display: grid; grid-template-columns: 14px auto 1fr; align-items: center; gap: 7px 10px; }
.api-client-card .status-lamp { grid-row: 1 / 3; }
.api-client-card h3 { margin: 0; font-size: 12px; }
.api-client-card small { grid-column: 2 / -1; color: var(--muted); font-size: 8px; }
.text-button.danger { color: var(--red); }
.revoked-chip { color: var(--muted); font-size: 9px; }

@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1280px) {
  .metric-grid.six, .climate-grid { grid-template-columns: repeat(3, 1fr); }
  .soil-grid { grid-template-columns: repeat(4, 1fr); }
  .topology { grid-template-columns: 160px minmax(70px, 1fr) 180px minmax(80px, 1fr) 190px; }
}

@media (max-width: 1040px) {
  .overview-grid, .events-layout, .settings-layout, .advisor-layout, .integration-layout, .snapshot-control-grid { grid-template-columns: 1fr; }
  .settings-side { grid-template-columns: 1fr 1fr; }
  .event-stats { grid-template-columns: 1fr 1fr; }
  .topology { overflow-x: auto; grid-template-columns: 150px 90px 180px 110px 190px; }
  .hardware-grid, .actuator-grid { grid-template-columns: 1fr; }
  .soil-grid { grid-template-columns: repeat(3, 1fr); }
  .login-layout { grid-template-columns: minmax(0, .9fr) minmax(400px, 1.1fr); }
  .login-story h1 { font-size: clamp(34px, 5vw, 52px); }
  .landing-hero { grid-template-columns: 1fr; }
  .landing-console { width: min(620px, 100%); }
  .media-grid, .assignment-grid { grid-template-columns: repeat(2, 1fr); }
  .nowcast-panel { grid-template-columns: 1fr; }
  .nowcast-intervals { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 820px) {
  .sidebar { transform: translateX(-103%); transition: transform .24s ease; box-shadow: 18px 0 50px rgba(10,38,29,.24); }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open::after { position: fixed; z-index: 35; inset: 0; content: ""; background: rgba(13,43,34,.36); }
  .page-shell { margin-left: 0; }
  .topbar { height: 60px; padding: 0 18px; }
  .menu-button { width: 34px; height: 34px; display: grid; place-items: center; margin-right: 10px; color: var(--green); background: white; border: 1px solid var(--line); border-radius: 9px; }
  .updated-at, .avatar { display: none; }
  main { padding: 24px 18px 38px; }
  footer { padding: 0 18px 22px; }
  .page-intro { align-items: flex-start; }
  .overview-hero { grid-template-columns: 1fr; gap: 24px; padding: 28px; }
  .hero-live { padding: 18px 0 0; border-top: 1px solid rgba(255,255,255,.15); border-left: 0; }
  .metric-grid.six, .climate-grid, .soil-grid { grid-template-columns: repeat(2, 1fr); }
  .route-card-grid { grid-template-columns: 1fr; }
  .soil-summary-strip { grid-template-columns: 1fr 1fr; }
  .soil-summary-strip p { grid-column: 1 / -1; }
  .trend-head { display: grid; }
  .segmented { max-width: 100%; }
  .trend-summary { grid-template-columns: 1fr 1fr; }
  .settings-side { grid-template-columns: 1fr; }
  .finding-grid { grid-template-columns: 1fr; }
  .camera-layout { grid-template-columns: 1fr; }
  .camera-meta { border-top: 1px solid var(--line); border-left: 0; }
  .camera-stage, .camera-stage video, .snapshot-frame, .snapshot-frame img { min-height: 330px; }
  .unit-switcher span { display: none; }
  .unit-switcher { margin-left: 10px; padding-left: 10px; }
  .snapshot-overview-card { grid-template-columns: 1fr; }
  .portfolio-grid, .portfolio-admin-grid { grid-template-columns: 1fr; }
  .login-layout { display: block; }
  .login-story { min-height: 335px; padding: 28px; }
  .login-story-copy { margin: 54px 0 46px; padding: 0; }
  .login-story h1 { font-size: clamp(35px, 8vw, 50px); }
  .login-story-copy > p:last-child { margin-top: 18px; }
  .login-trust-row { margin-top: auto; }
  .login-panel-wrap { padding: 28px 18px 48px; }
  .login-panel { margin-top: -32px; position: relative; z-index: 3; }
  .landing-nav { grid-template-columns: 1fr auto; padding: 0 18px; }
  .landing-nav nav { display: none; }
  .landing-hero { min-height: auto; padding: 75px 24px; }
  .capability-grid, .workflow-list { grid-template-columns: 1fr; }
  .capability-grid article { min-height: 190px; }
  .capability-grid h3 { margin-top: 35px; }
  .landing-final { padding: 48px 24px; }
}

@media (max-width: 540px) {
  .breadcrumb span, .breadcrumb b { display: none; }
  .top-actions { gap: 7px; }
  .unit-switcher { position: absolute; top: 61px; left: 0; width: 100%; margin: 0; padding: 7px 18px; background: rgba(244,246,241,.96); border: 0; border-bottom: 1px solid var(--line); }
  .unit-switcher select { width: 100%; max-width: none; }
  main { padding-top: 62px; }
  .mode-chip { padding: 5px 7px; font-size: 8px; }
  .page-intro { display: grid; gap: 15px; }
  .page-intro > button, .page-intro > a { justify-self: start; }
  .overview-hero { padding: 23px; }
  .hero-copy h2 { font-size: 29px; }
  .metric-grid.six, .climate-grid, .soil-grid { gap: 8px; }
  .metric-card { min-height: 175px; padding: 14px 12px; }
  .metric-reading strong { font-size: 23px; }
  .metric-foot span { max-width: 90px; }
  .panel { padding: 18px 15px; }
  .event-stats { grid-template-columns: 1fr 1fr; gap: 8px; }
  .event-stats > div { grid-template-columns: 34px 1fr; padding: 12px; }
  .event-stats strong { grid-column: 2; font-size: 17px; }
  .form-grid, .form-grid.two, .modal-form-grid { grid-template-columns: 1fr; }
  .diagnosis-hero { grid-template-columns: 1fr; }
  .diagnosis-status { min-height: 64px; }
  .advisor-form { grid-template-columns: 1fr; }
  .form-actions { align-items: flex-end; }
  .form-actions > span { max-width: 130px; }
  .threshold-list > div { grid-template-columns: 1fr auto; }
  .threshold-list > div > span:nth-child(2) { grid-column: 1; }
  .threshold-list button { grid-column: 2; grid-row: 1 / 3; }
  .soil-summary-strip { grid-template-columns: 1fr 1fr; }
  footer { display: grid; gap: 5px; }
  .camera-heading { align-items: flex-start; padding: 17px 15px; }
  .camera-tabs button { min-width: 63px; padding: 7px 9px; }
  .camera-stage, .camera-stage video, .snapshot-frame, .snapshot-frame img { min-height: 245px; }
  .camera-empty, .camera-start { width: calc(100% - 24px); min-height: 190px; padding: 18px; }
  .camera-meta { padding: 20px 17px; }
  .camera-meta ul { margin: 17px 0; }
  .snapshot-policy, .capture-actions { align-items: stretch; flex-direction: column; }
  .media-grid, .assignment-grid, .integration-status-grid { grid-template-columns: 1fr; }
  .endpoint-list > div { grid-template-columns: 45px 1fr; }
  .endpoint-list p { grid-column: 1 / -1; }
  .unit-card { align-items: flex-start; flex-direction: column; }
  .login-story { min-height: 370px; padding: 24px 20px; }
  .login-story h1 { font-size: 36px; }
  .login-story-copy > p:last-child { font-size: 10px; line-height: 1.75; }
  .login-trust-row span:nth-child(2) { display: none; }
  .login-panel-wrap { padding: 18px 12px 34px; }
  .login-panel { padding: 28px 21px; border-radius: 18px; }
  .login-panel-head { margin-bottom: 31px; }
  .login-panel h2 { font-size: 26px; }
  .register-grid { grid-template-columns: 1fr; gap: 0; }
  .landing-nav { height: 68px; }
  .public-brand .brand-mark { width: 36px; height: 36px; }
  .public-brand small, .auth-login { display: none !important; }
  .landing-auth a { min-height: 36px; padding: 0 13px; }
  .landing-hero { padding: 65px 18px 55px; }
  .landing-hero h1 { font-size: 42px; }
  .landing-hero-copy > p:nth-of-type(2) { font-size: 12px; }
  .landing-cta { align-items: flex-start; flex-direction: column; }
  .landing-console { padding: 15px; border-radius: 18px; }
  .console-metrics { grid-template-columns: 1fr 1fr; }
  .landing-section { width: calc(100% - 36px); padding: 72px 0; }
  .landing-final { width: calc(100% - 36px); margin-bottom: 45px; }
  .landing-final > div { align-items: stretch; flex-direction: column; }
  .landing-footer { width: calc(100% - 36px); display: grid; gap: 7px; }
}

@media (max-width: 760px) {
  .ownership-flow, .permission-matrix, .permission-grid, .profile-summary, .member-grid, .weather-day-grid, .weather-location-grid, .weather-current, .weather-alert-grid { grid-template-columns: 1fr; }
  .weather-summary, .weather-summary > div:last-child, .accept-invite, .claim-code-result { align-items: stretch; flex-direction: column; }
  .accept-invite form { min-width: 0; flex-direction: column; }
  .accept-invite input { min-height: 42px; }
  .weather-current strong { font-size: 46px; }
  .weather-current dl { grid-template-columns: 1fr 1fr; }
  .nowcast-intervals { grid-template-columns: 1fr 1fr; }
  .nowcast-intervals article { min-height: 96px; }
  .rain-trend { padding-inline: 9px; }
  .weather-kicker { align-items: flex-start; flex-direction: column; }
  .weather-alerts { align-items: flex-start; }
  .weather-hourly > div:last-child { grid-template-columns: repeat(24, 74px); }
  .weather-hero { grid-template-columns: 1fr; min-height: 0; padding: 24px 20px; border-radius: 17px; }
  .weather-condition { gap: 12px; margin: 20px 0 14px; }
  .weather-condition > i { width: 72px; font-size: 58px; }
  .weather-condition strong { font-size: 56px; }
  .weather-hero dl { grid-template-columns: repeat(2, 1fr); }
  .weather-day-grid.long { display: flex; gap: 10px; overflow-x: auto; }
  .weather-day-grid.long .weather-day-card { flex: 0 0 235px; }
  .weather-range-head { align-items: flex-start; flex-direction: column; }
  .weather-intel-grid, .air-card, .weather-index-grid { grid-template-columns: 1fr; }
  .aqi-gauge { width: 158px; height: 158px; }
  .location-search { flex-direction: column; }
  .location-results > button { align-items: flex-start; flex-direction: column; }
  .device-inventory-form { grid-template-columns: 1fr; }
  .device-inventory-form .device-notes { grid-column: auto; }
  .admin-device-list article { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
