/* Growbotiq Business — web dashboard. Tokens follow the iOS app:
   pure black, white at 6 % for surfaces, 12 % hairlines, white primary,
   green #20C20E only as a signal. */
:root {
  color-scheme: dark;
  --bg: #000;
  --s1: rgba(255,255,255,0.045);
  --s2: rgba(255,255,255,0.07);
  --s3: rgba(255,255,255,0.11);
  --line: rgba(255,255,255,0.10);
  --line-2: rgba(255,255,255,0.18);
  --text: #fff;
  --t2: rgba(255,255,255,0.62);
  --t3: rgba(255,255,255,0.42);
  --t4: rgba(255,255,255,0.28);
  --green: #20C20E;
  --amber: #FFAB38;
  --red: #FF6B5E;
  --blue: #40ADFF;
  --violet: #AD7AFF;
  --r-s: 10px; --r: 14px; --r-l: 20px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--text); max-width: 100%; overflow-x: hidden; }
body { font-family: var(--font); font-size: 14.5px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
b { font-weight: 650; }
.hidden { display: none !important; }
.muted { color: var(--t3); }
.small { font-size: 12.5px; }
.danger { color: var(--red); }
.cap { text-transform: capitalize; }
.ic { width: 18px; height: 18px; display: inline-block; vertical-align: -4px; flex: none; }
.ic.big { width: 36px; height: 36px; opacity: 0.4; }

/* ---------- Auth (BusinessSignInView) ---------- */
.auth-wrap {
  min-height: 100vh; width: 100%; display: flex; align-items: flex-start; justify-content: center; padding: 72px 24px 20px; overflow-x: hidden;
  background: #000 radial-gradient(420px 420px at 50% 0%, rgba(255,255,255,0.07), transparent 70%);
}
.signin { width: 100%; max-width: 440px; min-width: 0; display: flex; flex-direction: column; }
.signin h1 { font-size: 30px; font-weight: 600; margin: 0 0 8px; letter-spacing: -0.2px; }
.signin .subtitle { font-size: 15px; color: var(--t2); margin: 0 0 28px; line-height: 1.45; }
.field { display: block; margin-bottom: 18px; }
.field span { display: block; font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.6); margin-bottom: 8px; }
.field input {
  width: 100%; max-width: 100%; min-width: 0; height: 54px; padding: 0 16px; border-radius: 12px; font-size: 16px; color: #fff;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); outline: none; transition: border-color .15s;
}
.field input::placeholder { color: rgba(255,255,255,0.28); }
.field input:focus { border-color: rgba(255,255,255,0.55); }
.secure { position: relative; }
.secure input { padding-right: 64px; }
.reveal { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: transparent; border: 0; color: rgba(255,255,255,0.45); font-size: 13px; font-weight: 500; padding: 8px; cursor: pointer; }
.row-between { display: flex; justify-content: space-between; align-items: center; margin: -8px 0 18px; }
.row-between .link-btn { margin: 0; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; color: rgba(255,255,255,0.7); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: #fff; margin: 0; }
.link-btn { align-self: flex-end; background: none; border: 0; padding: 0; margin: -8px 0 18px; color: rgba(255,255,255,0.7); font-size: 13.5px; font-weight: 500; cursor: pointer; }
.message { font-size: 13.5px; padding: 11px 14px; border-radius: 10px; margin-bottom: 18px; line-height: 1.4; }
.message.error { color: #ff786b; background: rgba(255,0,0,0.10); }
.message.notice { color: #21C20D; background: rgba(0,255,0,0.10); }
.primary { width: 100%; height: 54px; border-radius: 12px; border: 0; background: #fff; color: #000; font-size: 16px; font-weight: 600; cursor: pointer; margin-top: 4px; position: relative; }
.primary:active { opacity: 0.82; }
.primary:disabled { cursor: default; }
.primary.working span { visibility: hidden; }
.primary.working::after { content: ""; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px; border: 2px solid rgba(0,0,0,0.25); border-top-color: #000; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.ghost { width: 100%; height: 48px; margin-top: 12px; border-radius: 12px; background: transparent; border: 1px solid var(--line-2); color: #fff; cursor: pointer; font-size: 15px; }
.ghost.small { height: 40px; font-size: 13.5px; color: var(--t2); margin-top: 8px; }
.ghost:hover { background: var(--s1); }
.foot { margin-top: 68px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.wordmark { width: 84px; opacity: 0.9; }
.support { font-size: 12px; font-weight: 500; color: rgba(255,255,255,0.4); }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { border-right: 1px solid var(--line); padding: 22px 14px 18px; display: flex; flex-direction: column; gap: 14px; position: sticky; top: 0; height: 100vh; }
.side-brand { display: flex; align-items: center; gap: 6px; padding: 0 8px 4px; min-width: 0; }
.side-logo { width: 82px; display: block; flex: none; }
.side-x { color: var(--t4); font-size: 12px; font-weight: 500; flex: none; }
.side-co { font-size: 12.5px; font-weight: 600; letter-spacing: 0; color: var(--t2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.company { padding: 10px 12px; border-radius: var(--r); background: var(--s1); border: 1px solid var(--line); }
.co-name { font-size: 15px; font-weight: 650; letter-spacing: -0.1px; }
.co-meta { font-size: 12px; color: var(--t3); margin-top: 2px; }
.company-pick { width: 100%; padding: 9px 12px; border-radius: var(--r-s); background: var(--s2); color: #fff; border: 1px solid var(--line); appearance: none; font-size: 13.5px; }
.nav { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; color: var(--t2); font-weight: 550; font-size: 14.5px; transition: background .12s; }
.nav a:hover { background: var(--s1); color: #fff; }
.nav a.active { background: var(--s2); color: #fff; }
.nav-ic { width: 20px; height: 20px; display: inline-flex; }
.nav-ic .ic { width: 20px; height: 20px; }
.nav .count { margin-left: auto; font-size: 11.5px; font-weight: 650; color: var(--t2); background: var(--s3); padding: 1px 8px; border-radius: 999px; min-width: 22px; text-align: center; }
.nav .count:empty { display: none; }
.side .spacer { flex: 1; }
.me { display: flex; align-items: center; gap: 10px; padding: 6px 8px; }
.me-text { min-width: 0; }
.me-text strong { display: block; font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me-text span { display: block; font-size: 12px; color: var(--t3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { padding: 26px 32px 64px; min-width: 0; }
.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.topbar h1 { font-size: 26px; font-weight: 700; margin: 0; letter-spacing: -0.4px; }
.topbar .sub { color: var(--t3); font-size: 13px; margin-top: 2px; }
.actions { display: flex; gap: 10px; align-items: center; }
.live { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--t3); }
.live i { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(32,194,14,0.18); }
.live.paused i { background: var(--t4); box-shadow: none; }
.ring { width: 36px; height: 36px; border-radius: 50%; border: 0; background: transparent; color: var(--t2); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.ring:hover { color: #fff; background: var(--s1); }
.ring:disabled { opacity: 0.5; }
.ring .ic { width: 18px; height: 18px; }
.ring.spin .ic { animation: spin 1s linear infinite; }
h2.section { font-size: 12.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--t3); font-weight: 650; margin: 28px 0 12px; }
h2.section:first-child { margin-top: 0; }
.loading { color: var(--t3); padding: 60px; text-align: center; }

/* ---------- Tags ---------- */
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: var(--s3); color: #fff; white-space: nowrap; line-height: 1.3; }
.tag b { font-weight: 750; opacity: 0.85; }
.tag.stage-flower { background: rgba(255,171,56,0.16); color: #FFC46B; }
.tag.stage-veg { background: rgba(32,194,14,0.16); color: #4FE23D; }
.tag.stage-mother { background: rgba(64,173,255,0.16); color: #7CC6FF; }
.tag.stage-seedling { background: rgba(173,122,255,0.16); color: #C9A8FF; }
.tag.stage-dry { background: rgba(255,107,94,0.16); color: #FF9A90; }
.tag.stage-other { background: var(--s3); color: var(--t2); }
.tag.done { background: rgba(32,194,14,0.16); color: #4FE23D; }
.tag.overdue { background: rgba(255,107,94,0.18); color: #FF9A90; }
.tag.today { background: rgba(255,171,56,0.16); color: #FFC46B; }
.tag.role { text-transform: capitalize; background: var(--s2); color: var(--t2); border: 1px solid var(--line); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--green); margin-right: 7px; vertical-align: 1px; }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px 18px 14px; min-width: 0; }
.kpi-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12.5px; color: var(--t3); font-weight: 550; white-space: nowrap; overflow: hidden; }
.kpi-head span { overflow: hidden; text-overflow: ellipsis; }
.kpi-head .ic { opacity: 0.45; }
.kpi-value { font-size: 30px; font-weight: 700; letter-spacing: -0.8px; margin-top: 8px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: 16px; color: var(--t3); font-weight: 600; letter-spacing: 0; }
.kpi-foot { font-size: 12px; color: var(--t3); margin-top: 6px; }
.kpi.danger .kpi-value { color: var(--red); }
.kpi.danger { border-color: rgba(255,107,94,0.35); }
.kpi.up .kpi-value { color: #4FE23D; }

/* ---------- Attention ---------- */
.attention { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.att { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r); background: var(--s1); border: 1px solid var(--line); }
.att-ic { width: 36px; height: 36px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--tint) 14%, transparent); color: var(--tint); flex: none; }
.att-t { font-size: 13.5px; }
.att-s { font-size: 12px; color: var(--t3); }

/* ---------- Rooms (Farm cards) ---------- */
.rooms { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 14px; }
.room { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-l); padding: 18px 18px 14px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.room-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.room h3 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -0.2px; }
.room-meta { font-size: 12.5px; color: var(--t3); margin-top: 2px; }
.room-tags { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.readings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.reading { background: var(--s2); border-radius: 12px; padding: 10px 9px 9px; min-width: 0; }
.reading.none { opacity: 0.55; }
.reading.old .r-t { color: var(--amber); }
.r-k { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--t3); font-weight: 600; letter-spacing: 0.2px; overflow: hidden; white-space: nowrap; }
.r-k .ic { width: 14px; height: 14px; opacity: 0.7; }
.r-v { font-size: 19px; font-weight: 700; margin-top: 4px; letter-spacing: -0.4px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; }
.r-v small { font-size: 11.5px; color: var(--t3); font-weight: 500; margin-left: 2px; letter-spacing: 0; }
.r-v em { font-style: normal; color: var(--t4); font-weight: 400; margin: 0 1px; }
.r-v .pair { font-size: 17px; letter-spacing: -0.4px; }
.r-v .pair + small { margin-left: 1px; font-size: 10.5px; }
.r-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.r-t { font-size: 11px; color: var(--t4); margin-top: 1px; }
.plist { display: flex; flex-direction: column; }
.prow { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); }
.prow:first-child { border-top: 0; padding-top: 0; }
.prow-n { font-weight: 600; font-size: 14px; }
.prow-s { font-size: 12px; color: var(--t3); }
.more { font-size: 12.5px; color: var(--t2); padding-top: 8px; border-top: 1px solid var(--line); }
.room-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; color: var(--t2); border-top: 1px solid var(--line); padding-top: 12px; margin-top: auto; }
.room-foot .ic { width: 15px; height: 15px; vertical-align: -3px; opacity: 0.7; }

/* ---------- Toolbar / filters ---------- */
.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; flex-wrap: wrap; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pills button { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: transparent; border: 1px solid var(--line-2); color: var(--t2); cursor: pointer; font-size: 13px; font-weight: 600; }
.pills button b { font-weight: 700; opacity: 0.7; }
.pills button:hover { background: var(--s1); color: #fff; }
.pills button.on { background: #fff; color: #000; border-color: #fff; }
.pills button.on b { opacity: 0.6; }
.pills button.warn:not(.on) { color: #FF9A90; border-color: rgba(255,107,94,0.4); }
.search { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 12px; border-radius: 12px; background: var(--s2); border: 1px solid var(--line); min-width: 280px; }
.search .ic { width: 16px; height: 16px; opacity: 0.5; }
.search input { background: none; border: 0; outline: none; flex: 1; font-size: 14px; color: #fff; }
.search input::placeholder { color: var(--t4); }

/* ---------- Tables ---------- */
.tablewrap { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-l); overflow: auto; }
table { width: 100%; border-collapse: collapse; }
thead th { position: sticky; top: 0; background: #0d0d0d; text-align: left; font-size: 11.5px; color: var(--t3); text-transform: uppercase; letter-spacing: 0.6px; font-weight: 650; padding: 13px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--s1); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-main { font-weight: 600; }
.cell-sub { font-size: 12px; color: var(--t3); }

/* ---------- Agenda (HubX) ---------- */
.day { margin-bottom: 18px; }
.day-h { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; font-weight: 650; color: var(--t2); padding: 0 4px 8px; }
.task { display: grid; grid-template-columns: 44px minmax(0, 1fr) 180px 110px; gap: 14px; align-items: center; padding: 12px 14px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 6px; }
.task.overdue { border-color: rgba(255,107,94,0.35); }
.task-ic { width: 44px; height: 44px; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--tint) 12%, transparent); color: var(--tint); border: 0.75px solid color-mix(in srgb, var(--tint) 20%, transparent); }
.task-ic .ic { width: 22px; height: 22px; }
.task-t { font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.task.done .task-t { color: var(--t3); text-decoration: line-through; text-decoration-color: rgba(255,255,255,0.35); }
.task.done .task-ic { opacity: 0.6; }
.rep .ic { width: 13px; height: 13px; opacity: 0.5; }
.task-s { font-size: 12.5px; color: var(--t3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-s i { font-style: normal; color: var(--t2); }
.task-who { display: flex; align-items: center; gap: 8px; font-size: 13px; min-width: 0; }
.task-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-who .avatar { width: 26px; height: 26px; font-size: 10.5px; }
.task-time { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; font-size: 12.5px; color: var(--t2); font-variant-numeric: tabular-nums; }

/* ---------- Activity ---------- */
.act { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 12px; border-radius: var(--r-s); }
.act:hover { background: var(--s1); }
.act-t { font-size: 14px; }
.act-t b { font-weight: 650; }
.act-s { margin-top: 3px; }
.act-s:empty { display: none; }
.act-time { font-size: 12px; color: var(--t3); font-variant-numeric: tabular-nums; }

/* ---------- Team ---------- */
.members { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.member { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px; }
.member.online { border-color: rgba(32,194,14,0.3); }
.member-head { display: flex; align-items: center; gap: 12px; }
.member-id { min-width: 0; flex: 1; }
.member-id .cell-main { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-rows { margin-top: 14px; display: flex; flex-direction: column; gap: 0; }
.member-rows > div { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 13px; }
.member-rows > div > span:last-child { text-align: right; }

/* ---------- Avatar / empty ---------- */
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--s3); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12.5px; color: #fff; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--t3); padding: 48px 20px; text-align: center; border: 1px dashed var(--line-2); border-radius: var(--r-l); }
.empty .t { font-size: 15px; font-weight: 600; color: var(--t2); margin-top: 6px; }
.empty .h { font-size: 13px; max-width: 360px; }
.banner { background: rgba(255,171,56,0.10); border: 1px solid rgba(255,171,56,0.3); color: #FFC46B; padding: 12px 16px; border-radius: 12px; margin-bottom: 18px; font-size: 13.5px; }
.banner.error { background: rgba(255,107,94,0.10); border-color: rgba(255,107,94,0.3); color: #FF9A90; }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .task { grid-template-columns: 44px minmax(0, 1fr) 110px; } .task-who { display: none; } }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 16px 14px; }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 4px; }
  .nav a { padding: 8px 10px; font-size: 13.5px; }
  .side .spacer, .me { display: none; }
  .ghost.small { width: auto; align-self: flex-end; padding: 0 14px; }
  .main { padding: 18px 16px 50px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rooms { grid-template-columns: 1fr; }
  .readings { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .search { min-width: 0; width: 100%; }
}

/* ---------- Links inside content ---------- */
.link { cursor: pointer; }
a.prow.link:hover, a.room-head:hover h3 { color: #fff; }
a.room-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.chev { width: 14px; height: 14px; opacity: 0.35; margin-left: 6px; transform: rotate(-90deg); vertical-align: -2px; }
.room h3 .chev { vertical-align: -1px; }
.dlink { color: var(--t2); text-decoration: underline; text-decoration-color: rgba(255,255,255,0.2); text-underline-offset: 3px; }
.dlink:hover { color: #fff; }
a.att:hover { background: var(--s2); }
tr.link:hover td { background: var(--s2); }
.nowrap { white-space: nowrap; }

/* ---------- Drawer ---------- */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(2px); z-index: 40; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100vw); background: #0a0a0a; border-left: 1px solid var(--line-2); z-index: 41; display: flex; flex-direction: column; box-shadow: -24px 0 60px rgba(0,0,0,0.6); animation: slide .18s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.drawer-close { position: absolute; top: 18px; right: 18px; z-index: 2; }
.drawer-body { overflow-y: auto; padding: 26px 28px 60px; }
body.drawer-open { overflow: hidden; }
.dhead { padding-right: 56px; margin-bottom: 8px; }
.dkind { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--t3); font-weight: 600; letter-spacing: 0.3px; text-transform: uppercase; }
.dkind .ic { width: 15px; height: 15px; opacity: 0.7; }
.dkind a { text-transform: none; letter-spacing: 0; font-weight: 600; }
.dhead h2 { font-size: 26px; font-weight: 700; margin: 6px 0 8px; letter-spacing: -0.4px; }
.dtags { display: flex; flex-wrap: wrap; gap: 6px; }
.dsummary { color: var(--t2); font-size: 13.5px; margin-top: 10px; }
.dsec { margin-top: 24px; }
.dsec h4 { display: flex; justify-content: space-between; align-items: baseline; font-size: 12px; letter-spacing: 1.1px; text-transform: uppercase; color: var(--t3); font-weight: 650; margin: 0 0 10px; }
.dsec h4 span { font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--t3); font-weight: 500; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.facts > div { background: #0f0f0f; padding: 10px 14px; min-width: 0; }
.facts > div.wide { grid-column: 1 / -1; }
.facts dt { font-size: 11.5px; color: var(--t3); font-weight: 550; }
.facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 500; word-break: break-word; }
.subcard { background: var(--s1); border-radius: var(--r); padding: 4px; margin-bottom: 8px; }
.subcard .facts { border: 0; }
.climates { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.climate { background: var(--s2); border-radius: 12px; padding: 11px 12px 9px; }
.climate .r-v { font-size: 22px; }
.climate .r-t.old { color: var(--amber); }
.spark { width: 100%; height: 32px; display: block; margin: 4px 0 2px; }
.tablewrap.flat { background: transparent; border-radius: var(--r); max-height: 420px; }
.tablewrap.flat thead th { background: #0a0a0a; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.photos.small { grid-template-columns: repeat(auto-fill, 64px); margin-top: 6px; }
.photo, .thumb { aspect-ratio: 1; border-radius: 12px; background: var(--s2); overflow: hidden; display: flex; align-items: center; justify-content: center; color: var(--t4); cursor: zoom-in; }
.photo img, .thumb img { width: 100%; height: 100%; object-fit: cover; }
.photo.none, .thumb.none { cursor: default; }
.scan { display: grid; grid-template-columns: 72px 1fr; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.scan:first-child { border-top: 0; padding-top: 0; }
.thumb { width: 72px; height: 72px; aspect-ratio: auto; }
.scan-t { font-size: 13.5px; font-weight: 600; }
.tri { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--s3); margin: 8px 0 6px; }
.tri i { display: block; height: 100%; }
.scan-s { display: flex; gap: 14px; font-size: 12px; color: var(--t2); }
.scan-s b { font-size: 9px; vertical-align: 1px; }
.timeline { position: relative; }
.tl { display: grid; grid-template-columns: 96px 14px 1fr; gap: 10px; align-items: start; padding: 6px 0; }
.tl-when { font-size: 12.5px; color: var(--t2); text-align: right; line-height: 1.3; }
.tl-when span { display: block; color: var(--t4); font-size: 11.5px; }
.tl-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--t3); margin: 6px auto 0; box-shadow: 0 0 0 3px #0a0a0a, 0 0 0 4px var(--line); }
.tl-t { font-size: 14px; font-weight: 600; }
.tl-s { font-size: 13px; color: var(--t2); white-space: pre-wrap; }
.mini-tasks { display: flex; flex-direction: column; gap: 6px; }
.mini-task { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; background: var(--s1); border-radius: 12px; }
.mini-task.done .mt-t { color: var(--t3); text-decoration: line-through; }
.task-ic.small { width: 34px; height: 34px; border-radius: 10px; }
.task-ic.small .ic { width: 18px; height: 18px; }
.mt-t { font-size: 14px; font-weight: 600; }
.mt-s { font-size: 12px; color: var(--t3); }
.mini-act > div { display: grid; grid-template-columns: 120px 1fr; gap: 10px; font-size: 13px; padding: 6px 0; border-top: 1px solid var(--line); }
.mini-act > div:first-child { border-top: 0; }
@media (max-width: 600px) { .facts { grid-template-columns: 1fr; } .drawer-body { padding: 22px 18px 60px; } .tl { grid-template-columns: 80px 14px 1fr; } }

/* ---------- Shelf / energy / extras ---------- */
.doses { margin-top: 12px; border-top: 1px solid var(--line); }
.doses > div { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
.doses > div:last-child { border-bottom: 0; }
.energy { display: grid; grid-template-columns: 240px 1fr; gap: 12px; align-items: stretch; }
.bars { display: flex; align-items: stretch; gap: 8px; background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-l); padding: 16px 18px 10px; height: 150px; }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.bar i { display: block; width: 100%; max-width: 36px; background: rgba(255,255,255,0.35); border-radius: 6px 6px 2px 2px; }
.bar:last-child i { background: #fff; }
.bar span { font-size: 10.5px; color: var(--t3); }
.r-target { font-size: 11px; color: var(--t3); margin-top: 4px; }
.r-target.off { color: var(--amber); }
.climate.off { border: 1px solid rgba(255,171,56,0.35); }
.scan-d { font-size: 11.5px; color: var(--t3); margin-top: 6px; }
.tl-lab { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--t2); margin-top: 4px; }
.tl-lab i { font-style: normal; color: var(--t3); }
.subtitle-sm { font-size: 11.5px; color: var(--t3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.6px; margin: 10px 10px 6px; }
.avatar[data-storage] { cursor: zoom-in; }
@media (max-width: 900px) { .energy { grid-template-columns: 1fr; } }

/* ---------- MFA / security ---------- */
.link-btn.center { align-self: center; margin: 14px 0 0; }
.nav .count.warn { background: rgba(255,171,56,0.2); color: #FFC46B; }
.sec-card { background: var(--s1); border: 1px solid var(--line); border-radius: var(--r-l); padding: 20px; max-width: 560px; }
.sec-state { display: flex; align-items: center; gap: 14px; }
.sec-state .ic { width: 28px; height: 28px; flex: none; opacity: 0.8; }
.sec-state.on .ic { color: #4FE23D; opacity: 1; }
.sec-state h3 { margin: 0; font-size: 20px; font-weight: 650; }
.sec-state p { margin: 2px 0 0; color: var(--t2); font-size: 14px; }
.sec-card .field { margin-top: 18px; }
.sec-card .primary { max-width: 320px; }
.sec-card .ghost { max-width: 320px; }
.sec-help { font-size: 12.5px; color: var(--t3); margin-top: 14px; line-height: 1.5; }
.sec-factor { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); margin-top: 14px; }
.sec-factor .danger-btn { background: none; border: 0; color: #FF9A90; font-weight: 600; cursor: pointer; font-size: 14px; }
.qr { background: #fff; border-radius: 16px; padding: 14px; width: 232px; height: 232px; margin: 18px 0 10px; }
.qr svg { width: 100%; height: 100%; display: block; }
.secret-key { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; letter-spacing: 1px; word-break: break-all; background: var(--s2); padding: 10px 12px; border-radius: 10px; margin-top: 6px; user-select: all; }
.sec-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- Boot ---------- */
.boot { position: fixed; inset: 0; background: #000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; z-index: 50; }
.boot-logo { width: 120px; opacity: 0.95; }
.boot-bar { width: 120px; height: 2px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; }
.boot-bar i { display: block; width: 40%; height: 100%; background: #fff; border-radius: 2px; animation: slidebar 1.1s ease-in-out infinite; }
@keyframes slidebar { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }
.boot-text { font-size: 12.5px; color: var(--t3); min-height: 16px; }
#app.appear .main { animation: fadeup .22s ease-out; }
@keyframes fadeup { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
