:root {
  --ink: #172033;
  --muted: #70798b;
  --line: #e5e8ef;
  --surface: #ffffff;
  --canvas: #f5f7fb;
  --navy: #101a31;
  --navy-2: #182540;
  --blue: #3567ee;
  --blue-dark: #2853c8;
  --blue-soft: #edf2ff;
  --teal: #14977e;
  --teal-soft: #e7f7f2;
  --amber: #ba7612;
  --amber-soft: #fff4df;
  --red: #c54a55;
  --red-soft: #feebed;
  --violet: #7b56d8;
  --shadow: 0 14px 40px rgba(26, 38, 66, .08);
  --radius: 18px;
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink); background: var(--canvas); }
button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }
.is-hidden { display: none !important; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 30px 20px 22px; display: flex; flex-direction: column; color: #dce4f6; background: linear-gradient(180deg, var(--navy), #0c1529 100%); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: #fff; text-decoration: none; padding: 0 8px; }
.brand-mark { width: 38px; height: 38px; border-radius: 12px; display: inline-grid; place-items: center; flex: 0 0 auto; color: white; font-size: 21px; font-weight: 800; background: linear-gradient(145deg, #4e78f4, #264fc5); box-shadow: 0 8px 18px rgba(53, 103, 238, .28); }
.brand strong { display: block; font-size: 17px; letter-spacing: .01em; }
.brand small { display: block; margin-top: 2px; color: #8e9bb6; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.nav { margin-top: 52px; display: grid; gap: 7px; }
.nav-item { width: 100%; min-height: 46px; padding: 0 13px; border: 0; border-radius: 12px; display: flex; align-items: center; gap: 12px; color: #9da9c1; background: transparent; cursor: pointer; text-align: left; transition: .18s ease; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.is-active { color: #fff; background: rgba(77, 119, 240, .19); box-shadow: inset 3px 0 #5f87f7; }
.nav-icon { width: 22px; text-align: center; font-size: 18px; }
.nav-count { margin-left: auto; min-width: 23px; height: 23px; padding: 0 6px; border-radius: 8px; display: grid; place-items: center; color: #bcc7dc; background: rgba(255,255,255,.07); font-size: 11px; font-weight: 700; }
.sidebar-foot { margin-top: auto; padding: 18px 10px 0; border-top: 1px solid rgba(255,255,255,.08); display: grid; gap: 9px; color: #7986a0; }
.service-health { display: flex; align-items: center; gap: 9px; color: #b9c4d8; font-size: 13px; }
.health-dot { width: 8px; height: 8px; display: inline-block; border-radius: 50%; background: #38c99e; box-shadow: 0 0 0 4px rgba(56,201,158,.13); }

.main { min-width: 0; padding: 36px clamp(26px, 4vw, 58px) 60px; }
.topbar { min-height: 64px; margin-bottom: 28px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.eyebrow { margin: 0 0 5px; color: #8a93a2; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.eyebrow-light { color: #8394ba; }
h1, h2, h3, p { margin-top: 0; }
.topbar h1 { margin-bottom: 0; font-size: clamp(28px, 3vw, 38px); letter-spacing: -.035em; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.updated { margin-right: 7px; color: #8b94a5; font-size: 12px; white-space: nowrap; }
.button, .icon-button, .text-button { border: 0; cursor: pointer; transition: .16s ease; }
.button { min-height: 43px; padding: 0 17px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; text-decoration: none; font-weight: 720; font-size: 13px; }
.button:hover { transform: translateY(-1px); }
.button:disabled { opacity: .55; cursor: wait; transform: none; }
.button-primary { color: white; background: var(--blue); box-shadow: 0 8px 18px rgba(53,103,238,.2); }
.button-primary:hover { background: var(--blue-dark); }
.button-secondary { color: #3153ae; background: var(--blue-soft); }
.button-ghost { color: #5f6879; background: #eef1f6; }
.button-dark { color: #fff; background: var(--navy-2); }
.button-small { min-height: 36px; padding: 0 13px; font-size: 12px; }
.button-wide { width: 100%; min-height: 49px; }
.icon-button { width: 43px; height: 43px; border-radius: 11px; background: white; box-shadow: 0 3px 14px rgba(27,40,72,.08); font-size: 18px; }
.icon-button:hover { color: var(--blue); }
.text-button { padding: 7px; color: var(--blue); background: transparent; font-weight: 700; }

.session-banner { margin: 0 0 24px; padding: 14px 16px; border: 1px solid #cdd9fb; border-radius: 14px; display: flex; align-items: center; gap: 13px; background: var(--blue-soft); }
.session-banner > div:nth-child(2) { display: grid; gap: 3px; min-width: 0; }
.session-banner strong { font-size: 14px; }
.session-banner span { color: #6a7690; font-size: 12px; }
.session-banner .button { margin-left: auto; }
.session-pulse { width: 11px; height: 11px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 5px rgba(53,103,238,.14); }

.automation-strip { margin: 0 0 24px; min-height: 72px; padding: 13px 15px; border: 1px solid #dce2ee; border-radius: 15px; display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.78); box-shadow: 0 5px 18px rgba(29,41,70,.035); }
.automation-light { width: 12px; height: 12px; margin-left: 2px; border-radius: 50%; flex: 0 0 auto; background: #9aa3b3; box-shadow: 0 0 0 5px rgba(154,163,179,.13); }
.automation-light.is-ready { background: var(--teal); box-shadow: 0 0 0 5px rgba(20,151,126,.13); }
.automation-light.is-running { background: var(--blue); box-shadow: 0 0 0 5px rgba(53,103,238,.14); animation: automation-pulse 1.25s ease-in-out infinite; }
.automation-copy { min-width: 0; display: grid; gap: 4px; }
.automation-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.automation-copy span { color: #7d8696; font-size: 11px; }
.automation-actions { margin-left: auto; display: flex; gap: 8px; flex: 0 0 auto; }
@keyframes automation-pulse { 50% { box-shadow: 0 0 0 9px rgba(53,103,238,.05); } }

.view { display: none; animation: rise .22s ease; }
.view.is-active { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 17px; margin-bottom: 22px; }
.stat-card { position: relative; min-height: 146px; padding: 22px 22px 18px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); display: flex; flex-direction: column; background: var(--surface); box-shadow: 0 6px 22px rgba(24,37,67,.045); }
.stat-card::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--card-accent); }
.stat-card::after { content: ""; position: absolute; width: 90px; height: 90px; right: -30px; top: -34px; border-radius: 50%; background: color-mix(in srgb, var(--card-accent) 8%, white); }
.stat-accent-blue { --card-accent: var(--blue); }
.stat-accent-violet { --card-accent: var(--violet); }
.stat-accent-teal { --card-accent: var(--teal); }
.stat-accent-amber { --card-accent: #d18a20; }
.stat-label { color: #6b7485; font-size: 12px; font-weight: 680; }
.stat-card > strong { margin-top: 12px; font-size: 38px; line-height: 1; letter-spacing: -.04em; }
.stat-note { margin-top: auto; color: #9299a7; font-size: 11px; }
.stat-note b { color: var(--card-accent); }

.content-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 7px 25px rgba(29,41,70,.045); }
.section-heading { padding: 23px 24px 18px; display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.section-heading h2 { margin-bottom: 0; font-size: 20px; letter-spacing: -.025em; }
.section-heading p:not(.eyebrow) { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.standalone-heading { padding: 4px 0 21px; align-items: end; }
.standalone-heading h2 { font-size: 27px; }
.queue-summary { max-width: 46%; padding: 9px 12px; border-radius: 10px; color: #657084; background: #edf1f7; font-size: 11px; line-height: 1.45; text-align: right; }
.profile-list { padding: 0 10px 10px; }
.profile-row { min-height: 78px; padding: 13px 14px; border-top: 1px solid #edf0f4; display: grid; grid-template-columns: minmax(190px, 1.4fr) minmax(150px, .8fr) minmax(120px, .7fr) auto; align-items: center; gap: 18px; }
.profile-identity { min-width: 0; display: flex; align-items: center; gap: 12px; }
.profile-avatar { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; flex: 0 0 auto; color: #fff; background: linear-gradient(145deg, #263958, #14213a); font-weight: 800; }
.profile-identity strong, .profile-meta strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.profile-identity small, .profile-meta small { display: block; margin-top: 4px; color: #8a93a2; font-size: 11px; }
.profile-meta { min-width: 0; }
.row-actions { display: flex; justify-content: end; gap: 7px; }
.status-pill { width: fit-content; min-height: 27px; padding: 0 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; font-size: 10px; font-weight: 820; letter-spacing: .055em; text-transform: uppercase; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-idle { color: #157960; background: var(--teal-soft); }
.status-manual, .status-publishing { color: #315ed4; background: var(--blue-soft); }
.status-auth_required, .status-waiting { color: #a66a0e; background: var(--amber-soft); }
.status-error { color: #ae3c48; background: var(--red-soft); }
.status-paused { color: #6f7888; background: #eef0f4; }
.overview-lower { margin-top: 22px; display: grid; grid-template-columns: 1.25fr .75fr; gap: 22px; }
.compact-card { min-height: 240px; }
.readiness-card { padding-bottom: 15px; }
.readiness-row { margin: 0 20px; padding: 13px 3px; border-top: 1px solid #edf0f4; display: flex; align-items: center; gap: 12px; }
.readiness-row .check { width: 29px; height: 29px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto; color: var(--teal); background: var(--teal-soft); font-size: 12px; font-weight: 800; }
.readiness-row strong, .readiness-row small { display: block; }
.readiness-row strong { font-size: 13px; }
.readiness-row small { margin-top: 3px; color: #9299a6; font-size: 10px; }
.readiness-row.muted .check { color: var(--violet); background: #f1ecff; }

.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.profile-grid > .mini-empty { grid-column: 1 / -1; }
.profile-card { position: relative; padding: 21px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: 0 7px 25px rgba(29,41,70,.045); }
.profile-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.profile-card .profile-identity strong { font-size: 16px; }
.profile-facts { margin: 21px 0 17px; padding: 15px 0; border-top: 1px solid #edf0f4; border-bottom: 1px solid #edf0f4; display: grid; grid-template-columns: repeat(3, 1fr); }
.profile-fact { padding: 0 12px; border-right: 1px solid #edf0f4; }
.profile-fact:first-child { padding-left: 0; }
.profile-fact:last-child { padding-right: 0; border-right: 0; }
.profile-fact strong, .profile-fact small { display: block; }
.profile-fact strong { font-size: 18px; }
.profile-fact small { margin-top: 3px; color: #9299a6; font-size: 10px; }
.profile-network { min-height: 37px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.proxy-chip { max-width: 65%; padding: 6px 9px; border-radius: 8px; overflow: hidden; color: #596577; background: #f1f3f7; text-overflow: ellipsis; white-space: nowrap; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.profile-card-actions { margin-top: 18px; display: flex; gap: 8px; }
.profile-card-actions .button:first-child { flex: 1; }
.profile-card-actions { flex-wrap: wrap; }
.profile-fact .interval-value { font-size: 15px; line-height: 1.5; }
.profile-network { flex-wrap: wrap; }
.profile-network small { font-size: 13px; }
.board-row { margin: 0 0 16px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #f8faff; }
.boards-modal { width: min(780px, calc(100vw - 28px)); }
.boards-help { color: var(--muted); font-size: 14px; line-height: 1.6; }
.board-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.board-enabled { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.boards-modal .field, #profile-form .field { font-size: 14px; }
.boards-modal .field small, #profile-form .field small { font-size: 12px; line-height: 1.5; }
.board-row textarea { font: inherit; }
.batch-list { display: grid; gap: 10px; max-height: 320px; overflow: auto; margin-bottom: 20px; }
.batch-card { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; padding: 14px 18px; border: 1px solid var(--line); border-radius: 14px; background: white; }
.batch-card .text-button { text-align: left; overflow-wrap: anywhere; }
.batch-card > span { flex: 1; color: var(--muted); font-size: 14px; }
.queue-toolbar { display: flex; gap: 12px; justify-content: space-between; align-items: center; margin-bottom: 12px; color: var(--muted); font-size: 14px; }
.error-line { margin-top: 14px; padding: 10px 11px; border-radius: 9px; color: #a93f4a; background: var(--red-soft); font-size: 11px; line-height: 1.45; }

.table-card { min-height: 320px; overflow: hidden; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 15px 18px; border-bottom: 1px solid #edf0f4; text-align: left; font-size: 12px; }
th { color: #8b93a1; background: #fafbfc; font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
td strong, td small { display: block; }
td small { margin-top: 3px; color: #9299a6; }
.task-error { max-width: 420px; color: var(--red); line-height: 1.35; white-space: normal; }
.mode-chip { padding: 5px 8px; border-radius: 7px; display: inline-flex; color: #667084; background: #eef1f6; font-size: 10px; font-weight: 760; white-space: nowrap; }
.mode-dry_run { color: #8d641c; background: var(--amber-soft); }
.mode-publish { color: #315ed4; background: var(--blue-soft); }
.queue-actions { min-width: 120px; display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
.queue-actions .button { white-space: nowrap; }
.empty-state { min-height: 270px; display: grid; place-content: center; justify-items: center; text-align: center; }
.empty-state .empty-icon { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); font-size: 25px; }
.empty-state h3 { margin: 13px 0 5px; }
.empty-state p { margin: 0; color: var(--muted); font-size: 13px; }
.mini-empty { min-height: 145px; padding: 25px; display: grid; place-content: center; justify-items: center; color: #8790a0; text-align: center; font-size: 12px; }
.mini-empty strong { margin-bottom: 6px; color: #536075; font-size: 14px; }
.system-grid { display: grid; gap: 14px; }
.system-card { padding: 19px 21px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 15px; }
.system-card .system-icon { width: 39px; height: 39px; border-radius: 12px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); }
.system-card strong { font-size: 14px; }
.system-card p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }

.modal { width: min(690px, calc(100vw - 28px)); max-height: calc(100vh - 34px); padding: 0; border: 0; border-radius: 20px; color: var(--ink); box-shadow: 0 30px 90px rgba(13,23,45,.28); }
.modal::backdrop { background: rgba(12,21,41,.62); backdrop-filter: blur(4px); }
.modal-head, .modal-foot { padding: 21px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.modal-head { border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 23px; }
.modal-close { width: 35px; height: 35px; border: 0; border-radius: 10px; color: #747e90; background: #f0f2f6; cursor: pointer; font-size: 22px; }
.modal-body { padding: 22px 24px 8px; overflow-y: auto; }
.modal-foot { border-top: 1px solid var(--line); justify-content: flex-end; }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.field { margin-bottom: 17px; display: grid; gap: 7px; color: #4f596c; font-size: 12px; font-weight: 700; }
.field small { color: #99a0ad; font-size: 10px; font-weight: 500; }
.field input, .field select { width: 100%; height: 44px; padding: 0 12px; border: 1px solid #dce1e9; border-radius: 10px; outline: 0; color: var(--ink); background: white; transition: .15s ease; }
.field textarea { width: 100%; padding: 12px; border: 1px solid #dce1e9; border-radius: 10px; outline: 0; resize: vertical; color: var(--ink); background: white; line-height: 1.5; transition: .15s ease; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #7f9df4; box-shadow: 0 0 0 3px rgba(53,103,238,.1); }
.input-suffix { display: flex; align-items: center; }
.input-suffix input { border-radius: 10px 0 0 10px; }
.input-suffix span { height: 44px; padding: 0 13px; border: 1px solid #dce1e9; border-left: 0; border-radius: 0 10px 10px 0; display: grid; place-items: center; color: #8992a1; background: #f7f8fa; font-size: 11px; }
.switch-row { margin: 2px 0 16px; padding: 14px 0; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.switch-row strong, .switch-row small { display: block; }
.switch-row strong { font-size: 13px; }
.switch-row small { margin-top: 4px; color: #8d96a5; font-size: 10px; }
.switch { position: relative; width: 46px; height: 26px; flex: 0 0 auto; }
.switch input { position: absolute; opacity: 0; }
.switch span { position: absolute; inset: 0; border-radius: 20px; background: #cbd1db; cursor: pointer; transition: .18s ease; }
.switch span::after { content: ""; position: absolute; width: 20px; height: 20px; top: 3px; left: 3px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,.15); transition: .18s ease; }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(20px); }
.proxy-fields { padding: 17px; border: 1px solid #dae2f5; border-radius: 13px; background: #f8faff; transition: .18s ease; }
.proxy-fields.is-disabled { opacity: .45; filter: grayscale(.4); pointer-events: none; }
.proxy-row { grid-template-columns: 115px minmax(0, 1fr) 105px; }
.proxy-fields .field { margin-bottom: 13px; }
.proxy-test-row { display: flex; align-items: center; gap: 12px; }
#proxy-test-result { color: #657188; font-size: 11px; }
#proxy-test-result.success { color: var(--teal); }
#proxy-test-result.error { color: var(--red); }

.toast-region { position: fixed; z-index: 100; right: 22px; bottom: 22px; width: min(370px, calc(100vw - 44px)); display: grid; gap: 8px; pointer-events: none; }
.toast { padding: 13px 15px; border-radius: 12px; color: white; background: #23314c; box-shadow: var(--shadow); font-size: 12px; line-height: 1.45; animation: toast-in .18s ease; }
.toast.error { background: #a83f4a; }
.toast.success { background: #167a65; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

.login-body { background: #f5f7fb; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(390px, .9fr) minmax(480px, 1.1fr); }
.login-story { position: relative; min-height: 100vh; padding: 42px clamp(38px, 5vw, 76px); display: flex; flex-direction: column; overflow: hidden; color: #fff; background: radial-gradient(circle at 20% 18%, rgba(75,115,232,.24), transparent 32%), linear-gradient(145deg, #15213a, #0c1529); }
.login-story::after { content: ""; position: absolute; width: 440px; height: 440px; right: -230px; bottom: -180px; border: 1px solid rgba(255,255,255,.08); border-radius: 50%; box-shadow: 0 0 0 80px rgba(255,255,255,.025), 0 0 0 160px rgba(255,255,255,.018); }
.brand-light { padding: 0; }
.story-copy { position: relative; z-index: 1; max-width: 550px; margin: auto 0; }
.story-copy h1 { margin: 14px 0 20px; font-size: clamp(38px, 4.3vw, 62px); line-height: 1.05; letter-spacing: -.045em; }
.story-copy > p:last-child { max-width: 475px; color: #9eabc3; font-size: 15px; line-height: 1.7; }
.story-status { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; color: #aeb9ce; font-size: 12px; }
.login-panel { padding: 35px; display: grid; place-items: center; }
.login-card { width: min(410px, 100%); }
.login-card h2 { margin: 8px 0 8px; font-size: 32px; letter-spacing: -.035em; }
.login-intro { margin-bottom: 29px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.login-card .field { margin-bottom: 17px; }
.login-card .field input { height: 49px; }
.login-help { margin-top: 17px; display: block; color: #9aa2af; text-align: center; font-size: 10px; line-height: 1.5; }
.form-error { margin: -4px 0 15px; padding: 11px 12px; border-radius: 9px; color: #aa3e49; background: var(--red-soft); font-size: 11px; }
.mobile-brand { display: none; }

.desktop-body { height: 100vh; overflow: hidden; background: #0d1528; }
.desktop-toolbar { height: 64px; padding: 0 17px; display: flex; align-items: center; justify-content: space-between; gap: 15px; color: #fff; background: #111b31; }
.desktop-brand { display: flex; align-items: center; gap: 11px; }
.desktop-brand .brand-mark { width: 34px; height: 34px; border-radius: 10px; font-size: 18px; }
.desktop-brand strong, .desktop-brand small { display: block; }
.desktop-brand strong { font-size: 13px; }
.desktop-brand small { margin-top: 2px; color: #8c9ab5; font-size: 10px; }
.desktop-actions { display: flex; gap: 8px; }
.desktop-toolbar .button-ghost { color: #c8d1e1; background: rgba(255,255,255,.08); }
.desktop-stage { position: relative; height: calc(100vh - 64px); display: grid; place-items: center; overflow: hidden; background: #080d19; }
#vnc-screen { width: 100%; height: 100%; overflow: hidden; }
#vnc-screen canvas { margin: auto; }
.desktop-loading { position: absolute; z-index: 2; display: grid; justify-items: center; color: white; }
.desktop-loading strong { margin-top: 14px; font-size: 14px; }
.desktop-loading small { margin-top: 5px; color: #8390a9; font-size: 10px; }
.clipboard-modal { width: min(620px, calc(100vw - 28px)); }
.clipboard-help { margin: 0 0 18px; color: #697487; font-size: 12px; line-height: 1.6; }
.clipboard-help kbd { padding: 2px 6px; border: 1px solid #d7dce5; border-bottom-width: 2px; border-radius: 5px; color: #3d485b; background: #f5f6f8; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.clipboard-actions { flex-wrap: wrap; }
#clipboard-status { min-height: 15px; }
.spinner { width: 32px; height: 32px; border: 3px solid rgba(255,255,255,.18); border-top-color: #6489f5; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (max-width: 1100px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .profile-row { grid-template-columns: minmax(190px, 1fr) minmax(130px, .7fr) auto; }
  .profile-row .profile-meta:nth-child(3) { display: none; }
}
@media (max-width: 850px) {
  .app-shell { grid-template-columns: 76px minmax(0, 1fr); }
  .sidebar { padding: 27px 12px 18px; }
  .brand { padding: 0; justify-content: center; }
  .brand > span:last-child, .nav-item > span:nth-child(2), .nav-count, .sidebar-foot { display: none; }
  .nav-item { padding: 0; justify-content: center; }
  .nav-icon { width: auto; }
  .overview-lower, .profile-grid { grid-template-columns: 1fr; }
  .login-layout { grid-template-columns: 1fr; }
  .login-story { display: none; }
  .login-panel { min-height: 100vh; }
  .mobile-brand { margin-bottom: 45px; display: flex; align-items: center; gap: 10px; }
}
@media (max-width: 650px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 20; left: 0; right: 0; top: auto; bottom: 0; width: auto; height: 62px; padding: 7px 10px; flex-direction: row; }
  .sidebar .brand { display: none; }
  .nav { width: 100%; margin: 0; grid-template-columns: repeat(4, 1fr); gap: 4px; }
  .nav-item { min-height: 48px; }
  .main { padding: 25px 16px 86px; }
  .topbar { align-items: flex-start; }
  .updated, #logout { display: none; }
  .topbar-actions .button { width: 43px; padding: 0; font-size: 0; }
  .topbar-actions .button span { font-size: 18px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-card { min-height: 132px; padding: 19px 16px 15px; }
  .stat-card > strong { font-size: 31px; }
  .section-heading { padding: 20px 17px 15px; }
  .profile-row { grid-template-columns: 1fr auto; gap: 10px; }
  .profile-row .profile-meta { display: none; }
  .row-actions .button-secondary { display: none; }
  .session-banner { align-items: flex-start; flex-wrap: wrap; }
  .session-banner .button { width: 100%; margin: 4px 0 0; }
  .automation-strip { align-items: flex-start; flex-wrap: wrap; }
  .automation-copy { width: calc(100% - 34px); }
  .automation-copy strong { white-space: normal; }
  .automation-actions { width: 100%; margin-left: 0; }
  .automation-actions .button { flex: 1; }
  .queue-summary { display: none; }
  .profile-grid { gap: 12px; }
  .field-row, .proxy-row { grid-template-columns: 1fr; gap: 0; }
  .modal-foot { flex-wrap: wrap; }
  .modal-foot .button { flex: 1; }
  #cancel-modal { display: none; }
  .desktop-toolbar { height: 106px; align-items: flex-start; padding-top: 10px; flex-wrap: wrap; }
  .desktop-actions { width: 100%; }
  .desktop-actions .button { flex: 1; padding-inline: 9px; font-size: 10px; }
  .desktop-stage { height: calc(100vh - 106px); }
  .clipboard-actions .button { flex-basis: 100%; }
}
