body { overflow-x: hidden; }
.shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100dvh; }
.side { position: sticky; top: 0; height: 100dvh; padding: 20px 14px; border-right: 1px solid var(--line); display: flex; flex-direction: column; gap: 22px; background: var(--ground); }
.brand { display: flex; align-items: center; gap: 10px; font: 800 20px var(--display); letter-spacing: -0.02em; text-decoration: none; color: var(--accent); padding: 0 8px; }
.brand span { color: var(--ink); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav button { display: flex; align-items: center; gap: 12px; padding: 10px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-weight: 500; font-size: 15px; cursor: pointer; text-align: left; }
.nav button svg { width: 18px; height: 18px; fill: currentColor; flex: none; }
.nav button:hover { color: var(--ink); background: var(--surface); }
.nav button.active { color: var(--ink); background: var(--surface-2); }
.nav button.active svg { color: var(--accent); }
.side-note { margin-top: auto; font-size: 13px; color: var(--muted); padding: 0 8px; }

.main { min-width: 0; }
.top { position: sticky; top: 0; z-index: 5; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 28px; border-bottom: 1px solid var(--line); background: rgba(11, 12, 14, .92); backdrop-filter: blur(8px); }
.top-left { display: flex; gap: 12px; align-items: center; min-width: 0; }
select, input[type=text], input[type=email], input[type=password], input[type=number], input[type=search], textarea { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; min-height: 38px; font-size: 15px; max-width: 100%; }
textarea { width: 100%; min-height: 90px; resize: vertical; line-height: 1.5; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 7px 12px; color: var(--muted); cursor: pointer; font-size: 14px; font-weight: 600; }
.seg button.on { background: var(--surface-2); color: var(--ink); }

#view { padding: 28px; max-width: 1440px; outline: none; }
.page-h { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-h h1 { font-size: 30px; }
.page-h p { color: var(--muted); margin-top: 6px; }

.kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 20px; }
.kpi { background: var(--surface); padding: 16px 18px; }
.kpi .l { font-size: 13px; color: var(--muted); }
.kpi .kv { white-space: nowrap; font: 700 24px var(--display); margin-top: 4px; letter-spacing: -0.01em; }
.kpi .s { font-size: 13px; color: var(--muted); margin-top: 2px; }

.grid { display: grid; gap: 20px; }
.g-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; min-width: 0; }
.card h2 { font-size: 18px; margin-bottom: 14px; letter-spacing: -0.01em; }
.card-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-h h2 { margin: 0; }

.chart { width: 100%; height: auto; display: block; }
.chart .axis { fill: var(--muted); font-size: 11px; }
.chart .grid { stroke: var(--line); stroke-dasharray: 2 4; }
.chart .zero { stroke: #3a3f48; }
.chart.equity .line { fill: none; stroke-width: 2; }
.chart.equity.pos .line { stroke: var(--pos); } .chart.equity.pos .area { fill: rgba(63, 214, 139, .1); } .chart.equity.pos .dot { fill: var(--pos); }
.chart.equity.neg .line { stroke: var(--neg); } .chart.equity.neg .area { fill: rgba(255, 98, 98, .1); } .chart.equity.neg .dot { fill: var(--neg); }
.chart.bars rect.pos { fill: var(--pos); } .chart.bars rect.neg { fill: var(--neg); }

/* verdict cards */
.vlist { display: flex; flex-direction: column; gap: 12px; }
.v { border: 1px solid var(--line); border-left: 3px solid var(--muted); border-radius: var(--radius); padding: 16px 18px; background: var(--surface); }
.v.high { border-left-color: var(--neg); } .v.medium { border-left-color: var(--warn); } .v.low { border-left-color: #6f7480; } .v.good { border-left-color: var(--pos); }
.v-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.v h3 { font-size: 17px; letter-spacing: -0.01em; line-height: 1.25; }
.v .cost { font-weight: 700; white-space: nowrap; }
.v p { color: #c9c9c4; margin-top: 8px; font-size: 15px; }
.v .fix { margin-top: 10px; color: var(--ink); font-size: 15px; }
.v .fix b { color: var(--accent); font-weight: 600; }
.v .ev { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 12px; font-size: 14px; }
.v .ev span { color: var(--muted); } .v .ev strong { display: block; color: var(--ink); }
.v .actions { margin-top: 12px; }
.v.compact { padding: 12px 14px; } .v.compact h3 { font-size: 15px; } .v.compact p { font-size: 14px; margin-top: 4px; }

/* tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { padding: 10px 12px; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line); }
th { color: var(--muted); font-weight: 500; background: var(--surface); position: sticky; top: 0; cursor: pointer; user-select: none; }
td.num, th.num { text-align: right; }
tbody tr { cursor: pointer; }
tbody tr:hover td { background: var(--surface); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 4px; font-size: 12px; font-weight: 600; background: var(--surface-2); }
.tag.long { color: var(--pos); } .tag.short { color: var(--neg); }
.flags { color: var(--warn); font-size: 13px; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }

/* calendar */
.cal-head, .cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-head span { font-size: 12px; color: var(--muted); padding: 0 4px 6px; }
.cal-cell { min-height: 74px; border-radius: 8px; border: 1px solid var(--line); background: var(--ground); padding: 6px 8px; display: flex; flex-direction: column; align-items: flex-start; gap: 1px; text-align: left; font-size: 12px; }
.cal-cell.empty { border: 0; background: transparent; }
.cal-cell[data-day] { cursor: pointer; }
.cal-cell.pos { background: rgba(63, 214, 139, calc(var(--a) * .28)); border-color: rgba(63, 214, 139, calc(var(--a) * .6)); }
.cal-cell.neg { background: rgba(255, 98, 98, calc(var(--a) * .28)); border-color: rgba(255, 98, 98, calc(var(--a) * .6)); }
.cal-d { color: var(--muted); } .cal-v { font-weight: 700; font-size: 13px; color: var(--ink); } .cal-n { color: var(--muted); }

/* breakdown table */
.bd { width: 100%; font-size: 14px; }
.bd td { padding: 8px 0; border-bottom: 1px solid var(--line); }
.bd tr { cursor: default; } .bd tr:hover td { background: none; }

/* drawer */
.drawer { position: fixed; inset: 0; z-index: 20; }
.drawer-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.drawer-panel { position: absolute; right: 0; top: 0; bottom: 0; width: min(560px, 100%); background: var(--ground); border-left: 1px solid var(--line); overflow-y: auto; padding: 28px; overscroll-behavior: contain; animation: slide .2s ease-out; }
@keyframes slide { from { transform: translateX(24px); opacity: 0; } }
.drawer-x { position: absolute; right: 16px; top: 16px; width: 40px; height: 40px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 18px 0; }
.facts div { background: var(--surface); padding: 10px 12px; font-size: 13px; color: var(--muted); }
.facts strong { display: block; font-size: 15px; color: var(--ink); }
.factors { list-style: none; padding: 0; margin: 10px 0 0; display: flex; flex-direction: column; gap: 8px; }
.factors li { padding-left: 22px; position: relative; font-size: 15px; }
.factors li::before { content: ''; position: absolute; left: 4px; top: 8px; width: 8px; height: 8px; border-radius: 2px; background: var(--muted); }
.factors li.bad::before { background: var(--neg); } .factors li.warn::before { background: var(--warn); } .factors li.good::before { background: var(--pos); }
.field { display: flex; flex-direction: column; gap: 6px; margin-top: 16px; }
.field label { font-size: 13px; color: var(--muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chips button { border: 1px solid var(--line); background: var(--surface); padding: 6px 12px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.chips button.on { border-color: var(--accent); color: var(--accent); }

/* journal */
.jday { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 24px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.jday-date h3 { font-size: 18px; }
.grade { display: inline-flex; width: 38px; height: 38px; align-items: center; justify-content: center; border-radius: 8px; font: 800 18px var(--display); margin-top: 10px; background: var(--surface-2); }
.grade.A { color: var(--pos); } .grade.B { color: var(--accent); } .grade.C { color: var(--warn); } .grade.D { color: var(--neg); }
.jtext p { margin-bottom: 6px; }
.jtext .focus { margin-top: 10px; color: var(--accent); font-weight: 600; }
.ai-out { margin-top: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; white-space: pre-wrap; }

/* coach */
.chat { display: flex; flex-direction: column; gap: 12px; max-width: 860px; }
.msg { padding: 14px 16px; border-radius: 10px; max-width: 88%; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--surface-2); }
.msg.ai { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); }
.chat-form { display: flex; gap: 10px; margin-top: 16px; max-width: 860px; }
.chat-form input { flex: 1; }
.suggest { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }

/* prop */
.gauge { height: 10px; background: var(--surface-2); border-radius: 5px; overflow: hidden; margin-top: 10px; }
.gauge-fill { height: 100%; border-radius: 5px; }
.gauge.pos .gauge-fill { background: var(--pos); } .gauge.warn .gauge-fill { background: var(--warn); } .gauge.neg .gauge-fill { background: var(--neg); }
.big { font: 700 30px var(--display); letter-spacing: -0.02em; margin-top: 6px; }
.banner { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 20px; font-weight: 500; }
.banner.neg { background: rgba(255, 98, 98, .12); border: 1px solid rgba(255, 98, 98, .4); color: #ffb3b3; }
.banner.pos { background: rgba(63, 214, 139, .1); border: 1px solid rgba(63, 214, 139, .35); color: #b9f5d6; }
.form-row { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 20px; }
.form-row .field { margin: 0; }

/* import */
.drop { border: 2px dashed #3a3f48; border-radius: 14px; padding: 48px 24px; text-align: center; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.drop.over { border-color: var(--accent); background: #161a12; }
.drop h2 { font-size: 24px; }
.drop p { color: var(--muted); margin-top: 8px; }
.sources { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.src { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; background: var(--surface); }
.src h3 { font-size: 16px; }
.src ol { margin: 8px 0 0; padding-left: 18px; color: #c9c9c4; font-size: 14px; }
.src .st { font-size: 13px; color: var(--pos); margin-top: 8px; }
.src .st.soon { color: var(--warn); }
.map-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 16px; margin: 16px 0; }
.map-grid .field { margin: 0; }
.accts { margin-top: 28px; }

.empty-state { text-align: center; padding: 70px 20px; }
.empty-state h1 { font-size: 34px; } .empty-state p { color: var(--muted); margin: 12px auto 24px; max-width: 520px; }
.empty-state .row { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%) translateY(20px); background: var(--ink); color: var(--ground); padding: 10px 16px; border-radius: 8px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 30; }
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

@media (max-width: 1180px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g-main, .g-3 { grid-template-columns: 1fr; } .sources, .map-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; bottom: 0; top: auto; left: 0; right: 0; height: auto; z-index: 10; flex-direction: row; padding: 6px; border-right: 0; border-top: 1px solid var(--line); }
  .brand, .side-note { display: none; }
  .nav { flex-direction: row; width: 100%; justify-content: space-between; overflow-x: auto; }
  .nav button { flex-direction: column; gap: 3px; font-size: 11px; padding: 6px 6px; flex: 1; align-items: center; }
  .main { padding-bottom: 72px; }
  .top { padding: 10px 16px; } #view { padding: 18px 16px; }
  .g-2, .sources, .map-grid { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jday { grid-template-columns: 1fr; gap: 8px; }
  .cal-cell { min-height: 54px; padding: 4px; } .cal-n { display: none; } .cal-v { font-size: 10px; }
  #go-import { display: none; }
  .top-left { flex-wrap: wrap; width: 100%; } .top-left select { flex: 1 1 100%; } .top-right { display: none; }
}

/* auth */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-box { width: 100%; max-width: 400px; }
.auth-brand { padding: 0; margin-bottom: 36px; font-size: 24px; }
.auth h1 { font-size: 34px; }
.auth .muted { margin-top: 8px; }
.auth input { width: 100%; min-height: 46px; }
.auth-submit { width: 100%; margin-top: 18px; min-height: 48px; }
.auth-err { color: var(--neg); min-height: 22px; margin-top: 12px; font-size: 15px; }
.auth-switch, .auth-guest { margin-top: 18px; color: var(--muted); font-size: 15px; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.side-user { margin-top: auto; padding: 0 8px; font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 8px; overflow-wrap: anywhere; }
.side-user .linkish { align-self: flex-start; font-size: 13px; }
.sync { font-size: 12px; }
@media (max-width: 820px) { .side-user { display: none; } }

/* ---------- welcome / onboarding ---------- */
.welcome { min-height: calc(100dvh - 140px); display: flex; flex-direction: column; justify-content: center; max-width: 1100px; margin: 0 auto; padding: 20px 0 40px; }
.w-title { font-size: clamp(36px, 5vw, 64px); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.w-sub { color: var(--muted); font-size: 19px; margin-top: 16px; }
.opts { display: grid; grid-template-columns: 1.25fr 1fr 1fr; gap: 16px; margin-top: 40px; }
.opt { text-align: left; display: flex; flex-direction: column; gap: 10px; padding: 26px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; transition: transform .25s cubic-bezier(.2,.7,.2,1), border-color .2s, background .2s; min-height: 250px; }
.opt:hover { transform: translateY(-4px); border-color: #3a3f48; background: #171a1f; }
.opt.main { border-color: var(--accent); background: #15180f; }
.opt.main:hover { background: #191d10; }
.opt-k { font-size: 13px; color: var(--muted); font-weight: 600; }
.opt.main .opt-k { color: var(--accent); }
.opt strong { font: 700 23px var(--display); letter-spacing: -0.02em; line-height: 1.15; }
.opt > span:not(.opt-k):not(.opt-cta) { color: #c2c2bd; font-size: 15px; }
.opt-cta { margin-top: auto; font-weight: 600; color: var(--ink); }
.opt.main .opt-cta { color: var(--accent); }

/* ---------- connect ---------- */
.connect-steps, #view .card + .card { margin-top: 20px; }
.live-pill { font-size: 13px; font-weight: 600; color: var(--pos); border: 1px solid rgba(63,214,139,.4); border-radius: 6px; padding: 3px 10px; }
.steps { list-style: none; counter-reset: s; padding: 0; margin: 22px 0 0; display: flex; flex-direction: column; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 44px minmax(0,1fr); gap: 14px; padding: 18px 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(s); width: 32px; height: 32px; border-radius: 8px; background: var(--surface-2); display: grid; place-items: center; font: 700 15px var(--display); color: var(--accent); }
.steps strong { font-size: 17px; }
.steps p { color: #c9c9c4; margin-top: 4px; font-size: 15px; }
.steps b { color: var(--ink); font-weight: 600; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px !important; }
.copy { display: flex; gap: 8px; align-items: center; margin-top: 10px; background: var(--ground); border: 1px solid var(--line); border-radius: 8px; padding: 6px 6px 6px 12px; max-width: 640px; }
.copy code { flex: 1; overflow-x: auto; white-space: nowrap; font-size: 14px; }
.copy.key { border-color: var(--accent); }
.warn-t { color: var(--warn) !important; font-size: 14px; }
.accts-live { display: flex; flex-direction: column; gap: 10px; }
.acct-live { display: grid; grid-template-columns: 14px minmax(0,1fr) auto auto; gap: 16px; align-items: center; padding: 14px 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--ground); }
.acct-live strong { display: block; } .acct-live .muted { font-size: 13px; }
.acct-n { text-align: right; } .acct-n .muted { display: block; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: #555; }
.dot.on { background: var(--pos); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(63,214,139,.5); } 50% { box-shadow: 0 0 0 6px rgba(63,214,139,0); } }

/* ---------- motion ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes pop { 0% { transform: scale(0); } 70% { transform: scale(1.4); } 100% { transform: scale(1); } }
#view.enter .page-h, #view.enter .welcome > h1, #view.enter .welcome > p, #view.enter .empty-state { animation: rise .55s cubic-bezier(.2,.7,.2,1) both; }
#view.enter .welcome > p { animation-delay: .08s; }
#view.enter .card, #view.enter .vlist > .v, #view.enter .kpi, #view.enter .src, #view.enter .jday, #view.enter .opt, #view.enter .filters, #view.enter .table-wrap, #view.enter .drop, #view.enter .banner { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 45ms + 60ms); }
#view.enter .kpis { animation: none; }
#view.enter .chart.equity .line { stroke-dasharray: 1; animation: draw 1.6s cubic-bezier(.4,0,.2,1) .2s both; }
#view.enter .chart.equity .area { animation: fade 1s ease .9s both; }
#view.enter .chart.equity .dot { transform-box: fill-box; transform-origin: center; animation: pop .45s ease 1.7s both; }
#view.enter .chart.bars rect { transform-box: fill-box; animation: grow .6s cubic-bezier(.2,.7,.2,1) both; animation-delay: calc(var(--i, 0) * 30ms + 250ms); }
#view.enter .chart.bars rect.pos { transform-origin: bottom; } #view.enter .chart.bars rect.neg { transform-origin: top; }
#view.enter .gauge-fill { animation: gfill 1.1s cubic-bezier(.2,.7,.2,1) .3s both; }
@keyframes gfill { from { width: 0; } }
#view.enter .cal-cell { animation: fade .5s ease both; }
.auth:not([hidden]) .auth-box { animation: rise .6s cubic-bezier(.2,.7,.2,1) both; }
.btn { transition: background .15s, border-color .15s, transform .2s cubic-bezier(.2,.7,.2,1); }
.btn:active { transform: scale(.97); }
.v { transition: transform .2s, border-color .2s; } .v:hover { transform: translateX(3px); }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: .32s; animation-timing-function: cubic-bezier(.2,.7,.2,1); }

@media (max-width: 1180px) { .opts { grid-template-columns: 1fr; } .opt { min-height: 0; } }
@media (max-width: 820px) { .acct-live { grid-template-columns: 14px minmax(0,1fr); } .acct-n { text-align: left; grid-column: 2; } .welcome { min-height: 0; padding-top: 8px; } }
.ex-form { display: grid; grid-template-columns: 240px minmax(0,1fr) minmax(0,1fr) auto; gap: 12px; align-items: end; margin-top: 16px; }
.ex-form .field { margin: 0; } .ex-form input, .ex-form select { width: 100%; }
.ex-err { color: var(--neg); min-height: 20px; margin-top: 10px; font-size: 15px; }
.ex-help { margin-top: 6px; } .ex-help summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 14px; }
.ex-help p { color: #c9c9c4; font-size: 14px; margin-top: 8px; }
#ex-list .acct-live { grid-template-columns: 14px minmax(0,1fr) auto auto auto; margin-bottom: 10px; }
.linkish { font: inherit; }
@media (max-width: 1180px) { .ex-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 820px) { .ex-form { grid-template-columns: 1fr; } #ex-list .acct-live { grid-template-columns: 14px minmax(0,1fr); } }

@media (max-width: 820px) { .top { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(11, 12, 14, .97); } }

.icon-btn { width: 38px; padding: 0; min-height: 38px; }
.acct-live { grid-template-columns: 14px minmax(0,1fr) auto auto auto; }
.acct-ren { align-self: center; }
@media (max-width: 820px) { .acct-ren { grid-column: 2; justify-self: start; } }

.cloud-form { grid-template-columns: 170px minmax(0,1fr) minmax(0,1fr) minmax(0,1fr) auto; }
#cloud-list .acct-live { grid-template-columns: 14px minmax(0,1fr) auto auto auto; }
@media (max-width: 1180px) { .cloud-form { grid-template-columns: 1fr 1fr; } }
@media (max-width: 820px) { .cloud-form { grid-template-columns: 1fr; } #cloud-list .acct-live { grid-template-columns: 14px minmax(0,1fr); } }

.btn.danger:hover { border-color: rgba(255,98,98,.6); color: #ffb3b3; }
.accts-t td { vertical-align: middle; white-space: normal; }
.accts-t td .tag { margin: 2px 0; }

/* cloud account rows: status dot, name, one tidy button group */
#cloud-list .acct-live.cl-row { grid-template-columns: 14px minmax(0,1fr) auto; margin-bottom: 10px; }
.cl-btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.dot.wait { background: #f5b942; box-shadow: 0 0 0 0 rgba(245,185,66,.5); animation: dotwait 1.6s ease-out infinite; }
.dot.bad { background: #ff5a5f; }
@keyframes dotwait { to { box-shadow: 0 0 0 8px rgba(245,185,66,0); } }
.btn.ghost-danger:hover { border-color: #ff5a5f; color: #ff8a8d; }
@media (max-width: 820px) { #cloud-list .acct-live.cl-row { grid-template-columns: 14px minmax(0,1fr); } .cl-btns { grid-column: 1 / -1; justify-content: flex-start; } }
@media (prefers-reduced-motion: reduce) { .dot.wait { animation: none; } }
