.toast-stack { position: fixed; right: 16px; bottom: 16px; z-index: 40; display: grid; gap: 8px; width: min(360px, calc(100% - 32px)); }
.toast { padding: 12px 14px; border-radius: 6px; background: var(--ink); color: var(--paper); font-size: 13px; line-height: 1.45; box-shadow: 0 10px 30px #00000022; }
.toast.error { background: #6d4034; color: #fff8f4; }
.skeleton-grid { display: grid; gap: 10px; margin-bottom: 16px; }
.skeleton { display: block; height: 18px; border-radius: 4px; background: linear-gradient(90deg, var(--warm), var(--line), var(--warm)); background-size: 200% 100%; animation: skeleton-shimmer 1.2s ease-in-out infinite; }
.skeleton.short { width: 45%; }
@keyframes skeleton-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .skeleton { animation: none; } }
.app-frame .side-item { transition: background .18s ease, color .18s ease; }
.workspace-page { min-height: 100vh; }
.workspace-page .site-header { width: min(1320px, calc(100% - 48px)); }
.auth-layout { width: min(980px, calc(100% - 40px)); margin: 48px auto 96px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 28px; align-items: stretch; }
.auth-aside { padding: 36px 8px 12px 8px; }
.auth-aside h1, .auth-shell h1 { font: 600 40px/1.08 var(--display); letter-spacing: -.045em; margin: 12px 0 12px; }
.auth-aside p, .auth-shell p { color: var(--muted); font-size: 15px; line-height: 1.6; }
.auth-points { margin: 28px 0 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.auth-points li { padding-left: 16px; border-left: 2px solid var(--green); color: var(--ink); font-size: 14px; line-height: 1.45; }
.auth-shell { padding: 32px 28px 28px; border: 1px solid var(--line); background: var(--white); border-radius: 8px; }
.auth-shell label, .stack-form label { display: block; margin: 16px 0 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.auth-shell input, .stack-form input, .stack-form select, .stack-form textarea { width: 100%; padding: 12px 13px; border: 1px solid var(--line); border-radius: 5px; background: var(--white); color: var(--ink); font: 15px var(--sans); }
.stack-form textarea { min-height: 96px; resize: vertical; }
.auth-shell input:focus-visible, .stack-form input:focus-visible, .stack-form select:focus-visible, .button:focus-visible, .text-link:focus-visible, .side-item:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 2px; }
.auth-shell .button, .stack-form .button { border: 0; cursor: pointer; }
.auth-shell .button { width: 100%; justify-content: center; margin-top: 22px; }
.auth-shell .button[disabled], .stack-form .button[disabled] { opacity: .55; cursor: not-allowed; }
.auth-alt { margin-top: 18px; }
.auth-status { min-height: 22px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.auth-status.is-error { color: #8e594b; }
.auth-status.is-ok { color: var(--green-dark); }
.hint { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.stack-form { max-width: 460px; }
.danger-zone { margin-top: 28px; padding-top: 18px; border-top: 1px solid var(--line); }
.member-row { display: grid; grid-template-columns: 1.4fr .6fr auto; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.role-note { font: 12px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.app-frame { width: min(1320px, calc(100% - 40px)); margin: 24px auto 64px; }
.app-frame .dashboard-shell { min-height: 78vh; }
.app-frame .dashboard-layout { min-height: 70vh; grid-template-columns: 210px 1fr; }
.app-frame .dash-main { padding: 24px 28px 20px; }
.app-frame .side-item { cursor: pointer; border: 0; background: none; width: 100%; text-align: left; }
.app-frame .repo-row { cursor: pointer; }
.banner { margin: 0 0 16px; padding: 12px 14px; border-left: 2px solid var(--green); background: var(--sage-wash); color: var(--ink); font-size: 13px; line-height: 1.5; }
.banner.error { border-color: var(--clay); background: var(--sand-wash); color: var(--ink); }
.empty-state { padding: 28px 8px; color: #7a847a; font-size: 14px; line-height: 1.6; }
.table-row, .issue-row { display: grid; grid-template-columns: 1.4fr .7fr .6fr .6fr; gap: 10px; align-items: center; padding: 12px 0; border-top: 1px solid #f0f0ed; font-size: 13px; }
.issue-row { cursor: pointer; }
.pill { font: 10px var(--mono); letter-spacing: .04em; text-transform: uppercase; color: #748c78; }
.pill.attention, .pill.high { color: #aa7d59; }
pre.diff { white-space: pre-wrap; font: 12px var(--mono); background: var(--white); color: var(--ink); border: 1px solid var(--line); padding: 14px; overflow: auto; max-height: 360px; }
.action-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0; }
.action-row .button { min-width: 0; cursor: pointer; border: 0; }
.log-block { font: 12px var(--mono); white-space: pre-wrap; color: var(--muted); background: var(--warm); padding: 12px; border-radius: 5px; }
html[data-theme="dark"] .auth-status.is-error { color: #e7b2a4; }
html[data-theme="dark"] .auth-status.is-ok { color: #b7d2ba; }
@media (max-width: 860px) {
  .auth-layout { grid-template-columns: 1fr; margin-top: 28px; }
  .auth-aside { padding-top: 8px; }
  .auth-aside h1, .auth-shell h1 { font-size: 32px; }
  .member-row { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app-frame .dashboard-layout { grid-template-columns: 1fr; }
  .app-frame .dash-sidebar { border-right: 0; border-bottom: 1px solid var(--line); }
  .workspace-page .site-header { width: calc(100% - 32px); }
}

/* ---------- Full-screen app layout ---------- */
.app-page { margin: 0; min-height: 100vh; }
.app-page .app-frame { width: 100%; margin: 0; }
.app-page .dashboard-shell { min-height: 100vh; border: 0; border-radius: 0; box-shadow: none; animation: none; display: flex; flex-direction: column; overflow: visible; }
.app-page .dashboard-topbar { position: sticky; top: 0; z-index: 20; height: 60px; padding: 0 24px; min-width: 0; }
.app-page .dashboard-brand { font: 700 17px var(--display); gap: 10px; color: inherit; text-decoration: none; }
.app-page .mini-mark { width: 20px; height: 20px; gap: 2px; }
.app-page .workspace-label { font-size: 11px; padding-left: 14px; margin-left: 6px; }
.app-page .dashboard-controls { display: flex; align-items: center; gap: 14px; }
.app-page .sync { font-size: 13px; }
.app-page .app-theme-toggle { margin-left: 0; }
.app-page .account-menu { margin-left: 0; }
.app-page .dashboard-layout { flex: 1; min-height: 0; min-width: 0; grid-template-columns: 248px 1fr; }
.app-page .dash-sidebar { padding: 20px 14px; position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; }
.app-page .workspace-switch { gap: 10px; padding: 6px 8px 20px; }
.app-page .workspace-icon { width: 34px; height: 34px; border-radius: 8px; font-size: 14px; }
.app-page .workspace-switch b { font-size: 15px; }
.app-page .workspace-switch small { font-size: 13px; display: block; }
.app-page .side-label { font-size: 11px; letter-spacing: .08em; padding: 8px 10px; }
.app-page .side-label-spaced { margin-top: 14px; }
.app-page .side-item { height: 40px; padding: 0 12px; font-size: 15px; border-radius: 8px; gap: 12px; }
.app-page .side-item:hover { background: #eef2ec; }
.app-page .side-glyph { font-size: 15px; width: 18px; }
.app-page .dash-main { padding: 32px 40px 48px; font-size: 15px; line-height: 1.55; outline: none; }
.app-page .dash-main :is(p, li, label, td, th) { font-size: 15px; }
.app-page .dash-kicker { font-size: 12px; letter-spacing: .08em; margin-bottom: 8px; }
.app-page .dash-heading h2 { font-size: 30px; letter-spacing: -.03em; }
.app-page .dash-main h3 { font: 600 18px var(--display); margin: 22px 0 10px; }
.app-page .dash-subtitle { font-size: 15px; margin-top: 8px; }
.app-page .metric { height: auto; min-height: 128px; padding: 18px; border-radius: 10px; }
.app-page .metric-label { font-size: 12px; letter-spacing: .06em; }
.app-page .metric-period { font-size: 12px; }
.app-page .metric-value { font-size: 34px; }
.app-page .health-value { font-size: 22px; }
.app-page .health-foot, .app-page .metric-caption { font-size: 13px; margin-top: 6px; }
.app-page .panel { padding: 18px 18px 10px; border-radius: 10px; }
.app-page .panel-head h3 { font-size: 17px; margin: 0; }
.app-page .panel-head p, .app-page .panel-link, .app-page .activity-all { font-size: 13px; }
.app-page .repo-row { height: auto; min-height: 60px; padding: 10px 0; gap: 12px; }
.app-page .repo-icon { width: 32px; height: 32px; border-radius: 8px; font-size: 15px; }
.app-page .repo-name b { font-size: 15px; display: block; }
.app-page .repo-name small { font-size: 13px; display: block; }
.app-page .repo-health { font-size: 13px; }
.app-page .activity-copy b { font-size: 14px; }
.app-page .activity-copy p, .app-page .activity-item time { font-size: 13px; }
.app-page .table-row, .app-page .issue-row { font-size: 15px; padding: 14px 0; }
.app-page .pill { font-size: 12px; }
.app-page .empty-state { font-size: 15px; color: var(--muted); }
.app-page pre.diff, .app-page .log-block { font-size: 13px; }
.app-page .role-note { font-size: 12px; }
.app-page .hint { font-size: 13px; }
.app-page .dash-main .button { font-size: 14px; padding: 11px 18px; border-radius: 8px; }
.app-page .stack-form { max-width: 520px; }
.app-page .stack-form label { font-size: 14px; }
.app-page .stack-form input, .app-page .stack-form select, .app-page .stack-form textarea { font-size: 15px; border-radius: 8px; }

/* Banners and their actions */
.app-page .banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 14px 18px; margin-bottom: 18px; border: 1px solid #cddbcd; border-left: 3px solid var(--green); border-radius: 10px; font-size: 15px; line-height: 1.5; }
.banner-actions { display: inline-flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
.button-sm {
  display: inline-flex; align-items: center; justify-content: center; height: 36px; padding: 0 16px;
  border-radius: 8px; border: 1px solid #c3d1c3; background: transparent; color: var(--ink);
  font: 600 14px var(--sans); cursor: pointer; white-space: nowrap;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.button-sm:hover { background: #e7efe6; transform: translateY(-1px); }
.button-sm.primary { background: #294632; border-color: #294632; color: #f4f8f3; }
.button-sm.primary:hover { background: #3c6045; }
.button-sm.ghost { border-color: transparent; color: var(--muted); }
.button-sm:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 2px; }
.button-sm[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
html[data-theme="dark"] .app-page .banner { background: #1f2b22; border-color: #314034; border-left-color: #789c7b; }
html[data-theme="dark"] .app-page .banner.error { background: #2d211d; border-color: #4a332b; border-left-color: #d39a68; }
html[data-theme="dark"] .app-page .side-item:hover { background: #243027; }
html[data-theme="dark"] .button-sm { border-color: #3a4c3d; color: #e5ede5; }
html[data-theme="dark"] .button-sm:hover { background: #2b392e; }
html[data-theme="dark"] .button-sm.primary { background: #789c7b; border-color: #789c7b; color: #101710 !important; }
html[data-theme="dark"] .button-sm.primary:hover { background: #95b698; }
html[data-theme="dark"] .button-sm.ghost { border-color: transparent; color: #aab6ab !important; }
html[data-theme="dark"] .app-page { background: #18211a; }
@media (max-width: 860px) {
  .app-page .dashboard-layout { grid-template-columns: 1fr; min-width: 0; }
  .app-page .dashboard-topbar { min-width: 0; padding: 0 16px; }
  .app-page .dash-sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; gap: 4px; border-right: 0; border-bottom: 1px solid var(--line); }
  .app-page .dash-sidebar .side-item { width: auto; }
  .app-page .side-label, .app-page .workspace-switch { width: 100%; }
  .app-page .dash-main { padding: 24px 18px 40px; }
  .app-page .sync, .app-page .workspace-label { display: none; }
  .banner-actions { margin-left: 0; }
}

/* Repository picker */
.picker-card { margin: 0 0 24px; padding: 20px 22px; border: 1px solid var(--line, #2b352d); border-radius: 14px; background: var(--paper, transparent); }
html[data-theme="dark"] .picker-card { background: #161d18; border-color: #2a352c; }
.picker-card h3 { margin: 0 0 4px; font-size: 18px; }
.picker-card p { margin: 0 0 14px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.picker-loading { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 15px; }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: picker-spin .8s linear infinite; }
@keyframes picker-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
.picker-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.picker-count { display: inline-block; min-width: 24px; padding: 1px 8px; margin-left: 6px; border-radius: 999px; background: #263228; color: #b9d3bb; font-size: 13px; text-align: center; vertical-align: middle; }
html[data-theme="light"] .picker-count { background: #e4ede4; color: #2f5233; }
.picker-plan { margin: 0 !important; font-size: 14px !important; }
.picker-search { min-width: 220px; padding: 9px 12px; border: 1px solid #344036; border-radius: 9px; background: transparent; color: inherit; font: inherit; font-size: 14px; }
.picker-list { list-style: none; margin: 0; padding: 0; max-height: 440px; overflow-y: auto; border-top: 1px solid #263028; }
html[data-theme="light"] .picker-list, html[data-theme="light"] .picker-list li { border-color: #e2e7e2; }
.picker-list li { border-bottom: 1px solid #263028; }
.picker-item { display: flex; align-items: center; gap: 14px; padding: 12px 6px; cursor: pointer; border-radius: 8px; }
.picker-item:hover { background: rgba(120, 156, 123, .08); }
.picker-item input { width: 18px; height: 18px; accent-color: #789c7b; flex: none; }
.picker-item.is-locked { opacity: .45; cursor: not-allowed; }
.picker-name { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.picker-name b { font-size: 15px; overflow-wrap: anywhere; }
.picker-name small { color: var(--muted); font-size: 13px; }
.picker-badge { margin-left: auto; padding: 3px 10px; border-radius: 999px; background: #1f2b22; color: #9fc6a2; font-size: 12px; white-space: nowrap; }
html[data-theme="light"] .picker-badge { background: #e4ede4; color: #2f5233; }
.picker-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; }
.picker-meter { margin-right: auto; color: var(--muted); font-size: 14px; }
.picker-error { color: #e0a77a !important; }
.section-title { margin: 8px 0 6px; font-size: 16px; }
