/* Lilara dashboard — Figma's structure, Stripe's calm, Cloudflare's clarity,
   and a little Groovisions play in the geometry. */
:root {
  --bg: #FBFBF9;
  --panel: #FFFFFF;
  --rail: #F4F3EF;
  --line: #E7E5DF;
  --line-2: #DAD7CF;
  --ink: #141414;
  --ink-2: #57564F;
  --ink-3: #97948C;
  --accent: #FF5A1F;
  --blue: #2B6BFF;
  --yellow: #FFC21A;
  --green: #12A366;
  --pink: #FF7AB6;
  --hover: rgba(20, 20, 20, .045);
  --focus: 0 0 0 3px rgba(43, 107, 255, .28);
  --radius: 12px;
  --shadow: 0 1px 2px rgba(20, 20, 20, .04), 0 8px 24px -12px rgba(20, 20, 20, .14);
  --rail-w: 248px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 Inter, -apple-system, "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; font-feature-settings: "cv11", "ss01"; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }

/* ── Frame ─────────────────────────────────────────────────────────── */
.app { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px; padding: 14px 12px; background: var(--rail); border-right: 1px solid var(--line); overflow-y: auto; }
.main { min-width: 0; padding: 28px clamp(20px, 3.2vw, 44px) 64px; outline: none; }

/* Brand mark: three shapes that play when you hover. */
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; font: 600 14px/1 "Inter Tight", Inter, sans-serif; letter-spacing: -.01em; }
.mark { position: relative; width: 22px; height: 22px; flex: none; }
.mark i { position: absolute; display: block; transition: transform .45s var(--ease); }
.mark i:nth-child(1) { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); left: 0; top: 0; }
.mark i:nth-child(2) { width: 11px; height: 11px; border-radius: 2px; background: var(--blue); right: 0; bottom: 0; }
.mark i:nth-child(3) { width: 10px; height: 5px; border-radius: 10px 10px 0 0; background: var(--yellow); left: 1px; bottom: 1px; }
.brand:hover .mark i:nth-child(1) { transform: translate(2px, 1px); }
.brand:hover .mark i:nth-child(2) { transform: rotate(45deg) scale(.9); }
.brand:hover .mark i:nth-child(3) { transform: translateY(-2px) rotate(-10deg); }
.mark--big { width: 44px; height: 44px; margin: 0 auto 18px; }
.mark--big i:nth-child(1) { width: 24px; height: 24px; }
.mark--big i:nth-child(2) { width: 22px; height: 22px; border-radius: 4px; }
.mark--big i:nth-child(3) { width: 20px; height: 10px; }

.search { position: relative; margin: 0 2px 10px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search input { width: 100%; height: 32px; padding: 0 34px 0 32px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); font-size: 13px; }
.search input::placeholder { color: var(--ink-3); }
.search kbd { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); font: 500 10.5px/1 Inter, sans-serif; color: var(--ink-3); border: 1px solid var(--line); border-radius: 4px; padding: 3px 5px; background: var(--rail); }

.nav { display: flex; flex-direction: column; gap: 1px; }
.nav-label { display: flex; align-items: center; justify-content: space-between; padding: 14px 10px 6px; font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.nav-item { display: flex; align-items: center; gap: 10px; height: 32px; padding: 0 10px; border-radius: 8px; color: var(--ink-2); font-size: 13.5px; background: none; border: 0; width: 100%; text-align: left; }
.nav-item:hover { background: var(--hover); color: var(--ink); }
.nav-item[aria-current="page"] { background: var(--panel); color: var(--ink); font-weight: 500; box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(20,20,20,.04); }
.nav-item svg { flex: none; color: var(--ink-3); }
.nav-item[aria-current="page"] svg { color: var(--ink); }
.nav-item .count { margin-left: auto; font-size: 12px; color: var(--ink-3); }
.nav-item:disabled { cursor: default; color: var(--ink-3); background: none; }
.space-dot { width: 10px; height: 10px; border-radius: 3px; flex: none; margin: 0 3px; }
.rail-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 1px; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px 10px 2px; font-size: 13px; }
.me .signout { margin-left: auto; border: 0; background: none; color: var(--ink-3); font-size: 12px; padding: 4px; }
.me .signout:hover { color: var(--ink); }

.back { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; margin-bottom: 6px; border-radius: 8px; color: var(--ink-2); font-size: 13px; }
.back:hover { background: var(--hover); color: var(--ink); }
.back svg { transition: transform .25s var(--ease); }
.back:hover svg { transform: translateX(-2px); }
.rail-project { display: flex; align-items: center; gap: 10px; padding: 6px 8px 14px; }
.rail-project .mini { width: 44px; aspect-ratio: 16/10; border-radius: 5px; overflow: hidden; background: #EDEBE6; box-shadow: 0 0 0 1px var(--line); flex: none; }
.rail-project .mini img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.rail-project b { display: block; font: 600 14px/1.2 "Inter Tight", Inter, sans-serif; }
.rail-project span { font-size: 12px; color: var(--ink-3); }

/* ── Avatars and chips ─────────────────────────────────────────────── */
.avatar { display: inline-grid; place-items: center; border-radius: 50%; color: #fff; font-weight: 600; flex: none; line-height: 1; letter-spacing: .02em; }
.avatar.live { box-shadow: 0 0 0 2px var(--panel), 0 0 0 3.5px var(--green); position: relative; }
.avatars { display: inline-flex; align-items: center; }
.avatars .avatar + .avatar { margin-left: -5px; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 12px; font-weight: 500; color: var(--ink-2); background: #F1F0EC; white-space: nowrap; }
.chip svg { color: var(--ink-3); }
.chip--public { background: #E9F6EF; color: #0B7A4B; }
.chip--public svg { color: #0B7A4B; }
.chip--live { background: #E9F6EF; color: #0B7A4B; }
.chip--live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--green); }
.ver { font: 500 12px/1 ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink-2); background: #F1F0EC; border-radius: 5px; padding: 4px 6px; }

/* ── Buttons ───────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--panel); font-size: 13px; font-weight: 500; white-space: nowrap; transition: background .15s, border-color .15s, transform .15s; }
.btn:hover { background: #F7F6F2; }
.btn:active { transform: translateY(1px); }
.btn:disabled { color: var(--ink-3); background: transparent; cursor: default; }
.btn--primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--primary:hover { background: #2A2A2A; }
.btn--visit { background: var(--ink); border-color: var(--ink); color: #fff; font-weight: 600; }
.btn--visit:hover { background: var(--accent); border-color: var(--accent); }
.btn--visit svg { transition: transform .25s var(--ease); }
.btn--visit:hover svg { transform: translate(2px, -2px); }
.btn--big { height: 44px; padding: 0 20px; border-radius: 10px; font-size: 15px; }
.btn--wide { width: 100%; height: 40px; }
.btn--ghost { border-color: transparent; background: transparent; color: var(--ink-2); }
.btn--ghost:hover { background: var(--hover); color: var(--ink); }

/* ── Index ─────────────────────────────────────────────────────────── */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.head h1 { margin: 0; font: 600 26px/1.15 "Inter Tight", Inter, sans-serif; letter-spacing: -.02em; }
.head .sub { margin: 4px 0 0; color: var(--ink-3); font-size: 13px; }
.tools { display: flex; align-items: center; gap: 8px; }
.segmented { display: inline-flex; padding: 2px; border-radius: 9px; background: #EEEDE8; }
.segmented button { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 7px; background: none; color: var(--ink-2); font-size: 13px; }
.segmented button[aria-pressed="true"] { background: var(--panel); color: var(--ink); box-shadow: 0 1px 2px rgba(20,20,20,.08); }
.select { height: 32px; padding: 0 28px 0 10px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2397948C' stroke-width='1.5' fill='none'/%3E%3C/svg%3E") no-repeat right 10px center; appearance: none; font-size: 13px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 22px; }
.card { position: relative; display: flex; flex-direction: column; border-radius: var(--radius); background: var(--panel); box-shadow: 0 0 0 1px var(--line); transition: box-shadow .25s var(--ease), transform .25s var(--ease); }
.card:hover { box-shadow: 0 0 0 1px var(--line-2), var(--shadow); transform: translateY(-2px); }
.card .thumb { display: block; margin: 8px 8px 0; aspect-ratio: 16 / 10; border-radius: 7px; overflow: hidden; background: #EDEBE6; box-shadow: inset 0 0 0 1px rgba(20,20,20,.06); }
.card .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; transition: transform .6s var(--ease); }
.card:hover .thumb img { transform: scale(1.015); }
.card .meta { display: grid; gap: 8px; padding: 12px 12px 12px 14px; }
.card .row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.card .name { flex: 1; min-width: 0; font: 600 15px/1.25 "Inter Tight", Inter, sans-serif; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .name::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); } /* the whole card opens the project */
.card .btn--visit { position: relative; z-index: 1; height: 30px; }
.card .row .avatars { margin-left: auto; position: relative; z-index: 1; }
.card .when { font-size: 12px; color: var(--ink-3); }

.card--new { align-items: center; justify-content: center; min-height: 240px; border: 1.5px dashed var(--line-2); box-shadow: none; background: transparent; color: var(--ink-2); text-align: center; padding: 24px; gap: 14px; }
.card--new:hover { box-shadow: none; transform: none; border-color: var(--ink-3); }
.shapes { position: relative; width: 84px; height: 56px; }
.shapes i { position: absolute; display: block; transition: transform .6s var(--ease); }
.shapes i:nth-child(1) { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); left: 6px; top: 4px; }
.shapes i:nth-child(2) { width: 30px; height: 30px; border-radius: 5px; background: var(--blue); left: 36px; top: 20px; }
.shapes i:nth-child(3) { width: 30px; height: 15px; border-radius: 30px 30px 0 0; background: var(--yellow); left: 22px; top: 41px; }
.shapes i:nth-child(4) { width: 12px; height: 12px; border-radius: 50%; background: var(--pink); left: 64px; top: 6px; }
.card--new:hover .shapes i:nth-child(1) { transform: translate(-4px, -2px); }
.card--new:hover .shapes i:nth-child(2) { transform: rotate(18deg); }
.card--new:hover .shapes i:nth-child(4) { transform: translate(4px, -4px) scale(1.2); }
.card--new b { display: block; font: 600 15px/1.3 "Inter Tight", Inter, sans-serif; color: var(--ink); }
.card--new p { margin: 4px 0 0; font-size: 13px; color: var(--ink-3); max-width: 240px; }

/* List view */
.table-wrap { border-radius: var(--radius); background: var(--panel); box-shadow: 0 0 0 1px var(--line); overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; font-size: 13px; }
.list th { text-align: left; font-weight: 500; font-size: 12px; color: var(--ink-3); padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.list th button { border: 0; background: none; padding: 0; color: inherit; font: inherit; }
.list th button:hover { color: var(--ink); }
.list td { padding: 10px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.list tr:last-child td { border-bottom: 0; }
.list tbody tr { cursor: pointer; transition: background .12s; }
.list tbody tr:hover { background: #FAF9F6; }
.list .proj { display: flex; align-items: center; gap: 12px; }
.list .proj .mini { width: 56px; aspect-ratio: 16/10; border-radius: 5px; overflow: hidden; background: #EDEBE6; box-shadow: 0 0 0 1px var(--line); flex: none; }
.list .proj .mini img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.list .proj b { display: block; font-weight: 600; }
.list .proj span { color: var(--ink-3); font-size: 12px; }
.list td.right, .list th.right { text-align: right; }
@media (max-width: 1100px) { .list .opt { display: none; } }

.empty { padding: 60px 20px; text-align: center; color: var(--ink-3); }

/* ── Project + settings pages ──────────────────────────────────────── */
.page { max-width: 1040px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.page-head h1 { margin: 0; font: 600 30px/1.1 "Inter Tight", Inter, sans-serif; letter-spacing: -.025em; }
.page-head p { margin: 6px 0 0; color: var(--ink-2); max-width: 560px; }
.page-head .addr { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; color: var(--ink-3); }
.page-head .addr:hover { color: var(--ink); }
.section-title { margin: 0 0 4px; font: 600 22px/1.2 "Inter Tight", Inter, sans-serif; letter-spacing: -.02em; }
.section-sub { margin: 0 0 20px; color: var(--ink-3); font-size: 13.5px; }

.overview { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 24px; align-items: start; margin-bottom: 24px; }
.shot { border-radius: var(--radius); background: var(--panel); box-shadow: 0 0 0 1px var(--line); padding: 8px; }
.shot .thumb { aspect-ratio: 16/10; border-radius: 7px; overflow: hidden; background: #EDEBE6; }
.shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; display: block; }
.shot figcaption { padding: 8px 4px 2px; font-size: 12px; color: var(--ink-3); }

.panel { border-radius: var(--radius); background: var(--panel); box-shadow: 0 0 0 1px var(--line); }
.panel + .panel { margin-top: 16px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2 { margin: 0; font: 600 15px/1.2 "Inter Tight", Inter, sans-serif; }
.panel-body { padding: 6px 18px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.stat { padding: 16px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.stat .k { font-size: 12px; color: var(--ink-3); margin-bottom: 6px; display: flex; align-items: center; gap: 6px; }
.stat .v { font: 600 17px/1.25 "Inter Tight", Inter, sans-serif; letter-spacing: -.01em; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stat .d { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.stats-wrap { overflow: hidden; border-radius: var(--radius); background: var(--panel); box-shadow: 0 0 0 1px var(--line); }
.stats-wrap .stats { margin: 0 -1px -1px 0; }

.dl { display: grid; grid-template-columns: 160px minmax(0, 1fr); }
.dl dt, .dl dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.dl dt { color: var(--ink-3); font-size: 13px; }
.dl dd { font-size: 13.5px; }
.dl > :nth-last-child(-n+2) { border-bottom: 0; }
.field { display: grid; gap: 6px; padding: 12px 0; }
.field label { font-size: 12.5px; color: var(--ink-3); }
.field input, .field textarea, .field select { width: 100%; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); font-size: 14px; }
.field textarea { min-height: 72px; resize: vertical; }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 6px 0 14px; }

.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.rows li:last-child { border-bottom: 0; }
.rows .main-text b { display: block; font-weight: 500; }
.rows .main-text span { font-size: 12.5px; color: var(--ink-3); }
.rows .side { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 12.5px; white-space: nowrap; }

.day { margin: 22px 0 8px; font-size: 12px; font-weight: 500; color: var(--ink-3); }
.day:first-child { margin-top: 0; }
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; padding: 10px 0; }
.timeline li::before { content: ""; position: absolute; left: 13px; top: 34px; bottom: -10px; width: 1.5px; background: var(--line); }
.timeline li:last-child::before { display: none; }
.dot-ic { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.timeline .t { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; padding-top: 5px; }
.timeline .txt { padding-top: 4px; }
.timeline .txt span { display: block; font-size: 12.5px; color: var(--ink-3); }

.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; padding: 16px 18px; }
.choice label { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; padding: 14px; border-radius: 10px; box-shadow: 0 0 0 1px var(--line-2); cursor: pointer; }
.choice label.on { box-shadow: 0 0 0 2px var(--ink); }
.choice label.off { cursor: default; opacity: .6; }
.choice input { margin-top: 3px; accent-color: var(--ink); }
.choice b { display: block; font-weight: 600; }
.choice span { font-size: 12.5px; color: var(--ink-3); }

.part-ic { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.running { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #0B7A4B; }
.running::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(18,163,102,.15); }
.switch { position: relative; width: 34px; height: 20px; border-radius: 99px; background: var(--ink); border: 0; padding: 0; opacity: .35; cursor: not-allowed; }
.switch::after { content: ""; position: absolute; right: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; }
.foot-note { margin: 12px 2px 0; font-size: 12.5px; color: var(--ink-3); }

.usage-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 20px; }
.usage-cards .panel { padding: 18px; margin: 0; }
.usage-cards .k { font-size: 12.5px; color: var(--ink-3); }
.usage-cards .v { font: 600 28px/1.1 "Inter Tight", Inter, sans-serif; letter-spacing: -.02em; margin: 8px 0 4px; }
.usage-cards .d { font-size: 12.5px; color: var(--ink-3); }

/* ── Addresses ─────────────────────────────────────────────────────── */
.addr-loading { margin: 0; padding: 16px 18px; color: var(--ink-3); font-size: 13px; }
.addr-list { list-style: none; margin: 0; padding: 0; }
.addr-list > li { padding: 14px 18px; border-bottom: 1px solid var(--line); }
.addr-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.addr-main { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.addr-main a { font-weight: 600; overflow-wrap: anywhere; }
.addr-main a:hover { color: var(--accent); }
.addr-kind { font-size: 12.5px; color: var(--ink-3); }
.addr-side { display: flex; align-items: center; gap: 8px; }
.records { margin-top: 12px; }
.records p { margin: 0 0 10px; font-size: 13px; color: var(--ink-2); }
.records .table-wrap { box-shadow: 0 0 0 1px var(--line); }
.records .list td { white-space: normal; }
.mono { font: 12.5px/1.4 ui-monospace, "SF Mono", Menlo, monospace; }
.records .value { word-break: break-all; min-width: 200px; }
.btn--xs { height: 26px; padding: 0 9px; font-size: 12px; border-radius: 7px; }
.chip--warn { background: #FFF4DB; color: #8A5A00; }
.chip--blue { background: #EAF0FF; color: #1D4FD8; }
.chip--bad { background: #FDECEC; color: #B42318; }
.chip--main { background: var(--ink); color: #fff; }
.addr-add { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; padding: 16px 18px 18px; background: #FBFBF9; border-radius: 0 0 var(--radius) var(--radius); }
.addr-form { display: grid; gap: 8px; align-content: start; }
.addr-form label { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.addr-form input { height: 36px; padding: 0 11px; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); font-size: 14px; min-width: 0; }
.addr-form input:disabled { background: #F4F3EF; color: var(--ink-3); }
.addr-form .btn { justify-self: start; }
.affix { display: flex; align-items: stretch; border: 1px solid var(--line-2); border-radius: 8px; background: var(--panel); overflow: hidden; }
.affix input { border: 0; border-radius: 0; flex: 1; }
.affix span { display: flex; align-items: center; padding: 0 11px; background: #F4F3EF; color: var(--ink-2); font-size: 13.5px; border-left: 1px solid var(--line); }
.affix.is-off { opacity: .65; }
.hint { margin: 0; font-size: 12.5px; color: var(--ink-3); }

/* ── Toast ─────────────────────────────────────────────────────────── */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--ink); color: #fff; font-size: 13px; box-shadow: 0 12px 30px -10px rgba(0,0,0,.35); animation: toast-in .3s var(--ease); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } }

/* ── Sign-in ───────────────────────────────────────────────────────── */
body.signin { display: grid; place-items: center; min-height: 100vh; padding: 24px; background: radial-gradient(600px 300px at 50% 30%, rgba(255, 90, 31, .08), transparent 70%), var(--bg); }
.signin-card { width: min(360px, 100%); display: grid; gap: 12px; padding: 36px 30px 30px; border-radius: 16px; background: var(--panel); box-shadow: 0 0 0 1px var(--line), var(--shadow); text-align: center; }
.signin-card h1 { margin: 0; font: 600 24px/1.2 "Inter Tight", Inter, sans-serif; letter-spacing: -.02em; }
.signin-card p { margin: 0 0 8px; color: var(--ink-3); }
.signin-card input { height: 40px; padding: 0 12px; border: 1px solid var(--line-2); border-radius: 9px; font-size: 14px; }
.signin-error { color: #C2410C !important; font-size: 13px; margin: 0 !important; }

/* ── Small screens: the rail becomes a top bar ─────────────────────── */
@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .rail { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; align-content: flex-start; gap: 6px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .tools { flex-wrap: wrap; }
  .rail .brand { padding: 4px 6px; }
  .rail .search, .rail .nav-label, .rail .rail-foot .me, .rail .rail-project { display: none; }
  .rail .nav { flex-direction: row; flex-wrap: wrap; }
  .rail .nav-item { width: auto; }
  .rail .rail-foot { margin: 0 0 0 auto; padding: 0; border: 0; flex-direction: row; }
  .overview { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; }
  .dl dt { padding-bottom: 0; border-bottom: 0; }
  .main { padding-top: 20px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
