:root {
  color-scheme: light;
  --bg: #f5f6fa;
  --surface: #fff;
  --surface-alt: #f8f9fc;
  --text: #283344;
  --muted: #748094;
  --line: #e6e9f0;
  --primary: #6756d6;
  --primary-hover: #5745c5;
  --primary-soft: #eeebfc;
  --green: #24805c;
  --green-soft: #e7f5ed;
  --amber: #a46a13;
  --amber-soft: #fff4de;
  --blue: #3274bf;
  --blue-soft: #e8f1fc;
  --red: #c34953;
  --red-soft: #fcebed;
  --shadow: 0 4px 20px #21304b05;
  --float-shadow: 0 16px 48px #1b253c24;
  --scroll-thumb: #c5cada;
  font: 14px/1.6 Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI',
    'Microsoft YaHei', sans-serif;
  color: var(--text);
  background: var(--bg);
}
:root[data-color="dark"] {
  color-scheme: dark;
  --bg: #151921;
  --surface: #1e2430;
  --surface-alt: #252c3a;
  --text: #e2e6f0;
  --muted: #9ca7bb;
  --line: #343c4c;
  --primary: #a496ff;
  --primary-hover: #b4a9ff;
  --primary-soft: #322e4e;
  --green: #80d6b0;
  --green-soft: #213d35;
  --amber: #edc079;
  --amber-soft: #423829;
  --blue: #8ab9f2;
  --blue-soft: #273850;
  --red: #f0979f;
  --red-soft: #462b36;
  --shadow: 0 4px 20px #0000000a;
  --float-shadow: 0 16px 48px #0000004d;
  --scroll-thumb: #505b70;
}
* { box-sizing: border-box; scrollbar-width: thin;
  scrollbar-color: var(--scroll-thumb) transparent; }
*::-webkit-scrollbar { width: 7px; height: 7px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: var(--scroll-thumb);
  border: 2px solid transparent; border-radius: 20px;
  background-clip: padding-box; }
*::-webkit-scrollbar-thumb:hover { background-color: var(--muted); }
*::-webkit-scrollbar-corner { background: transparent; }
body { margin: 0; min-width: 320px; }
body.modal-open { overflow: hidden; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit;
  -webkit-tap-highlight-color: transparent; }
button, input, select, textarea, summary { appearance: none; }
button { cursor: pointer; }
.button { white-space: nowrap; }
button, a, input, textarea, summary { outline: none; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 3px; }
button:disabled { cursor: not-allowed; opacity: .48; }
a { color: var(--primary); text-decoration: none; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 27px; font-weight: 650; letter-spacing: -.7px; }
h2 { font-size: 17px; font-weight: 650; }
h3 { font-size: 14px; font-weight: 650; }
.icon { width: 20px; height: 20px; flex: 0 0 auto; stroke-width: 1.7;
  fill: none; stroke: currentColor; stroke-linecap: round;
  stroke-linejoin: round; vertical-align: middle; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px;
  height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link:focus { position: fixed; top: 8px; left: 8px; z-index: 100;
  background: var(--surface); padding: 12px 20px; border-radius: 8px; }
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner, .nav-inner { max-width: 1280px; margin: auto;
  display: flex; align-items: center; padding: 0 36px; }
.header-inner { min-height: 83px; justify-content: space-between; gap: 20px; }
.brand { display: flex; align-items: center; gap: 12px;
  color: var(--text); font-size: 21px; font-weight: 700; letter-spacing: -.5px; }
.brand small { display: block; color: var(--muted); font-size: 11px;
  font-weight: 500; letter-spacing: .1em; line-height: 1.3; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 12px; background: #6756d6; color: #fff;
  box-shadow: 0 4px 10px #6756d626; }
.brand-mark .icon { width: 25px; height: 25px; }
.header-actions { display: flex; align-items: center; gap: 20px; }
.theme-picker { display: flex; padding: 4px; border-radius: 9px;
  background: var(--surface-alt); border: 1px solid var(--line); gap: 3px; }
.theme-picker button { display: grid; place-items: center; width: 32px;
  height: 30px; border: 0; border-radius: 6px; background: transparent;
  color: var(--muted); }
.theme-picker button[aria-pressed="true"] { color: var(--primary);
  background: var(--surface); box-shadow: 0 1px 5px #141b3012; }
.theme-picker .icon { width: 17px; height: 17px; }
.nav-inner { gap: 28px; min-height: 55px; }
.nav-item { background: transparent; border: 0; color: var(--muted);
  display: flex; align-items: center; gap: 9px; position: relative;
  min-height: 55px; padding: 0 2px; font-weight: 550; }
.nav-item.active { color: var(--primary); }
.nav-item.active::after { content: ''; position: absolute; bottom: -1px;
  height: 3px; border-radius: 3px 3px 0 0; background: var(--primary);
  left: 0; right: 0; }
.nav-caption { margin-left: auto; font-size: 10px; color: var(--muted);
  letter-spacing: .12em; }
main { max-width: 1280px; margin: auto; padding: 32px 36px 20px; }
.eyebrow { font-size: 10px; letter-spacing: .13em; font-weight: 650;
  color: var(--muted); display: block; margin-bottom: 5px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.page-heading { display: flex; align-items: center; justify-content: space-between;
  gap: 24px; margin-bottom: 28px; }
.page-heading p { margin-top: 7px; color: var(--muted); font-size: 13px; }
.sync-actions { display: flex; align-items: center; gap: 15px; flex-shrink: 0; }
.page-heading > div:first-child { min-width: 0; }
.button, .icon-button { border: 1px solid var(--line); background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: 8px; min-height: 40px; padding: 8px 15px; font-weight: 550;
  color: var(--text); transition: background .15s, border-color .15s; }
.button:hover:not(:disabled), .icon-button:hover { background: var(--surface-alt);
  border-color: var(--scroll-thumb); }
.button .icon { width: 17px; height: 17px; }
.button.primary { background: #6756d6; color: #fff; border-color: #6756d6; }
.button.primary:hover:not(:disabled) { background: #5745c5; border-color: #5745c5; }
.button.danger { background: var(--red); color: var(--surface); border-color: var(--red); }
.button.subtle { background: transparent; border-color: transparent; color: var(--muted); }
.icon-button { width: 36px; min-height: 36px; padding: 7px;
  border-color: transparent; background: transparent; color: var(--muted); }
.small-button { min-height: 34px; padding: 5px 10px; font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px; margin-bottom: 34px; }
.stat { background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow); border-radius: 10px; padding: 21px;
  display: flex; align-items: center; gap: 16px; }
.stat-icon { display: grid; place-items: center; width: 46px; height: 46px;
  border-radius: 10px; flex: 0 0 auto; }
.stat-icon .icon { width: 24px; height: 24px; }
.purple { color: var(--primary); background: var(--primary-soft); }
.green { color: var(--green); background: var(--green-soft); }
.blue { color: var(--blue); background: var(--blue-soft); }
.amber { color: var(--amber); background: var(--amber-soft); }
.stat div > span { display: block; color: var(--muted); font-size: 12px; }
.stat strong { font-size: 26px; font-weight: 650; line-height: 1.3; }
.section-heading { display: flex; align-items: center;
  justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.section-heading p { margin-top: 3px; }
.badge { display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 550;
  white-space: nowrap; }
.badge::before { content: ''; width: 5px; height: 5px;
  border-radius: 50%; background: currentColor; }
.badge.neutral { color: var(--muted); background: var(--surface-alt); }
.badge.ready { color: var(--green); background: var(--green-soft); }
.badge.waiting { color: var(--amber); background: var(--amber-soft); }
.badge.error { color: var(--red); background: var(--red-soft); }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px; }
.project-card { border: 1px solid var(--line); background: var(--surface);
  border-radius: 11px; overflow: hidden; box-shadow: var(--shadow);
  transition: border-color .15s, box-shadow .15s; min-width: 0; }
.project-card:hover { border-color: var(--scroll-thumb);
  box-shadow: 0 5px 20px #1b254c08; }
.project-card-head { padding: 22px 21px 16px; display: flex;
  align-items: flex-start; justify-content: space-between; gap: 12px; }
.project-identity { display: flex; align-items: center; gap: 12px; min-width: 0; }
.project-identity h3 { font-size: 15px; }
.project-identity p { color: var(--muted); font-size: 11px; margin-top: 2px; }
.project-logo { display: grid; place-items: center; border-radius: 10px;
  width: 42px; height: 42px; font-size: 15px; font-weight: 700; flex: 0 0 auto; }
.project-logo .icon { width: 23px; height: 23px; }
.project-card-body { padding: 0 21px 20px; }
.endpoint { background: var(--surface-alt); border: 1px solid var(--line);
  padding: 8px 10px; border-radius: 6px; display: flex; align-items: center;
  gap: 7px; min-height: 36px; margin-bottom: 15px; color: var(--muted); }
.endpoint .icon { width: 14px; height: 14px; }
.endpoint code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font: 11px/1.6 ui-monospace, Consolas, monospace; }
.project-facts { margin: 0; display: grid; gap: 10px; font-size: 12px; }
.project-facts div { display: flex; justify-content: space-between; gap: 8px; }
.project-facts dt { color: var(--muted); }
.project-facts dd { margin: 0; display: flex; align-items: center; gap: 5px; }
.status-dot { width: 6px; height: 6px; border-radius: 50%;
  background: var(--scroll-thumb); }
.status-dot.online { background: var(--green); }
.card-footer { border-top: 1px solid var(--line); display: flex;
  justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 21px; background: var(--surface-alt); }
.card-footer span { color: var(--muted); font-size: 10px; }
.card-action { display: inline-flex; align-items: center; gap: 4px; border: 0;
  background: transparent; color: var(--primary); padding: 6px 0; font-size: 12px;
  font-weight: 600; min-height: 32px; }
.card-action .icon { width: 15px; height: 15px; }
.notice { display: flex; align-items: flex-start; gap: 10px; padding: 15px 0;
  margin-top: 9px; font-size: 12px; color: var(--muted); }
.notice .icon { width: 16px; height: 16px; margin-top: 2px; }
.notice.compact { background: var(--surface-alt); padding: 12px;
  border-radius: 8px; margin: 16px 0 24px; }
.panel { background: var(--surface); border: 1px solid var(--line);
  border-radius: 11px; box-shadow: var(--shadow); }
.panel-heading { padding: 22px 24px; display: flex; align-items: center;
  justify-content: space-between; gap: 18px; }
.panel-heading p { margin-top: 3px; }
.filter-field { width: 190px; flex-shrink: 0; }
.table-scroll { overflow: auto; }
table { width: 100%; text-align: left; border-collapse: collapse; font-size: 12px; }
th { color: var(--muted); font-size: 11px; font-weight: 550;
  background: var(--surface-alt); }
th, td { padding: 14px 24px; border-bottom: 1px solid var(--line);
  white-space: nowrap; }
td:first-child { color: var(--muted); }
td .event-code { font-size: 10px; color: var(--muted); display: block; }
tr:last-child td { border-bottom: 0; }
.panel-footer { border-top: 1px solid var(--line); color: var(--muted);
  padding: 14px 24px; font-size: 11px; display: flex; align-items: center; gap: 6px; }
.panel-footer .icon { width: 14px; height: 14px; }
#event-count { margin-left: auto; }
.empty-state { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty-state h3 { color: var(--text); margin: 12px 0 5px; }
.empty-state p { font-size: 12px; overflow-wrap: anywhere; }
.empty-state .button { margin-top: 18px; }
.empty-icon { display: inline-grid; place-items: center; height: 52px;
  width: 52px; background: var(--surface-alt); border-radius: 50%; }
.empty-icon .icon { width: 24px; height: 24px; }
.page-footer { display: flex; justify-content: space-between; gap: 16px;
  color: var(--muted); font-size: 10px; border-top: 1px solid var(--line);
  margin-top: 32px; padding-top: 20px; }
.field { display: flex; flex-direction: column; gap: 8px; font-size: 12px;
  font-weight: 550; margin: 20px 0; }
input:not([type="checkbox"]), textarea, .select-trigger { width: 100%;
  border: 1px solid var(--line); border-radius: 7px; padding: 10px 12px;
  min-height: 42px; background: var(--surface); font-size: 13px;
  color: var(--text); transition: border-color .15s, box-shadow .15s; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .8; }
input:focus, textarea:focus, .select-trigger:focus-visible {
  border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
input[aria-invalid="true"] { border-color: var(--red); }
input::-webkit-outer-spin-button, input::-webkit-inner-spin-button {
  appearance: none; margin: 0; }
input[type="number"] { appearance: textfield; }
input[type="checkbox"] { display: inline-grid; place-items: center;
  width: 18px; height: 18px; margin: 0; border: 1px solid var(--scroll-thumb);
  background: var(--surface); border-radius: 5px; cursor: pointer;
  vertical-align: middle; flex-shrink: 0; }
input[type="checkbox"]:checked { background: #6756d6; border-color: #6756d6; }
input[type="checkbox"]:checked::after { content: ''; display: block;
  width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0;
  transform: translateY(-1px) rotate(45deg); }
.field.checkbox-field { flex-direction: row; align-items: flex-start; }
textarea { min-height: 110px; resize: none;
  font-family: ui-monospace, Consolas, monospace; }
.select-control { position: relative; width: 100%; font-weight: 400; }
.select-trigger { display: flex; align-items: center; justify-content: space-between;
  gap: 8px; text-align: left; cursor: pointer; }
.select-trigger > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.select-trigger .icon { width: 16px; height: 16px; color: var(--muted); }
.select-menu { position: absolute; z-index: 25; top: calc(100% + 6px);
  left: 0; right: 0; min-width: 100%; max-height: 240px; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  padding: 5px; box-shadow: var(--float-shadow); }
.select-menu.above { top: auto; bottom: calc(100% + 6px); }
.select-option { padding: 9px 10px; border-radius: 5px; cursor: pointer;
  font-size: 12px; overflow-wrap: anywhere; }
.select-option[aria-selected="true"] { color: var(--primary);
  background: var(--primary-soft); font-weight: 550; }
.select-option:focus, .select-option:hover { outline: 0;
  background: var(--surface-alt); }
.date-control { position: relative; }
.date-input-wrap { display: flex; position: relative; }
.date-input-wrap input { padding-right: 42px; }
.date-input-wrap .icon-button { position: absolute; right: 3px; top: 3px; }
.calendar { position: absolute; top: calc(100% + 6px); right: 0; z-index: 26;
  width: min(300px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 14px; box-shadow: var(--float-shadow); }
.calendar-head { display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.calendar-grid > span { text-align: center; font-size: 10px; color: var(--muted); }
.calendar-day { background: transparent; border: 0; border-radius: 6px;
  min-height: 32px; padding: 4px; font-size: 12px; }
.calendar-day:hover { background: var(--surface-alt); }
.calendar-day.selected { background: #6756d6; color: #fff; }
.calendar-foot { display: flex; gap: 8px; align-items: center;
  border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }
.calendar-foot input { min-height: 34px; padding: 5px 8px; width: 75px; }
.calendar-foot .button { min-height: 34px; padding: 5px 10px; font-size: 12px; }
.calendar-foot .button:last-child { margin-left: auto; }
.boot, .loading-block { display: flex; align-items: center; justify-content: center;
  gap: 10px; padding: 60px 16px; font-size: 13px; color: var(--muted); }
.spinner { display: inline-block; width: 17px; height: 17px;
  border: 2px solid var(--line); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.overlay { position: fixed; inset: 0; z-index: 40; background: #12182d66;
  backdrop-filter: blur(2px); }
.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: 620px;
  max-width: 100%; z-index: 41; background: var(--surface);
  box-shadow: -10px 0 50px #0000001a; display: flex; flex-direction: column;
  animation: slide .2s ease-out; }
.drawer.wide { width: min(1120px, 95vw); }
@keyframes slide { from { transform: translateX(24px); opacity: .5; }
  to { transform: translateX(0); opacity: 1; } }
.drawer-header { display: flex; justify-content: space-between; align-items: center;
  gap: 14px; padding: 22px 26px; border-bottom: 1px solid var(--line); }
.drawer-header .eyebrow { font-size: 9px; margin: 0 0 2px; }
.drawer-body { padding: 24px 26px; overflow-y: auto; flex: 1; min-height: 0; }
.module-control { display: flex; align-items: center; justify-content: space-between;
  gap: 20px; }
.module-control p { margin-top: 3px; }
.switch { border: 0; padding: 3px; min-width: 42px; height: 24px;
  background: var(--scroll-thumb); border-radius: 20px; display: inline-flex;
  align-items: center; flex-shrink: 0; }
.switch > span { background: #fff; width: 18px; height: 18px; border-radius: 50%;
  box-shadow: 0 1px 3px #0002; transition: transform .18s; }
.switch[aria-checked="true"] { background: #6756d6; }
.switch[aria-checked="true"] > span { transform: translateX(18px); }
.settings-section { border-top: 1px solid var(--line); padding: 22px 0; }
.settings-section h3 { margin-bottom: 14px; }
.settings-section p + .button { margin-top: 16px; }
.form-actions { display: flex; justify-content: flex-end; margin-top: 20px; }
.disclosure { border: 1px solid var(--line); border-radius: 8px; margin-top: 14px; }
.disclosure summary { list-style: none; cursor: pointer; padding: 12px 14px;
  font-size: 12px; display: flex; align-items: center; gap: 8px; }
.disclosure summary::-webkit-details-marker { display: none; }
.disclosure summary .icon { width: 16px; height: 16px; color: var(--muted); }
.disclosure summary .icon:last-child { margin-left: auto; }
.disclosure[open] summary .icon:last-child { transform: rotate(180deg); }
pre { margin: 0; background: var(--surface-alt); border-top: 1px solid var(--line);
  border-radius: 0 0 8px 8px; padding: 16px; max-height: 360px; overflow: auto;
  font: 11px/1.8 ui-monospace, Consolas, monospace; }
iframe { width: 100%; min-height: 72vh; border: 1px solid var(--line);
  border-radius: 8px; background: var(--bg); margin-top: 16px; }
.confirm-overlay { z-index: 60; display: grid; place-items: center; padding: 20px; }
.confirm-dialog { background: var(--surface); border: 1px solid var(--line);
  width: 420px; max-width: 100%; border-radius: 14px; padding: 28px;
  box-shadow: var(--float-shadow); }
.confirm-icon { display: grid; place-items: center; width: 42px; height: 42px;
  background: var(--amber-soft); color: var(--amber); border-radius: 50%;
  margin-bottom: 18px; }
.confirm-dialog p { margin-top: 10px; color: var(--muted); font-size: 13px; }
.dialog-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 26px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  z-index: 80; max-width: min(560px, calc(100vw - 32px)); width: max-content;
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--float-shadow);
  border-radius: 10px; padding: 10px 12px 10px 16px; display: flex;
  align-items: center; gap: 10px; font-size: 13px; }
.toast > span:first-child { color: var(--red); }
.toast.success > span:first-child { color: var(--green); }
.login-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px;
  max-width: 1000px; margin: 55px auto 60px; align-items: center; }
.login-intro { padding: 20px 0; }
.login-intro .eyebrow { color: var(--primary); margin-bottom: 20px; }
.login-intro h1 { font-size: 39px; line-height: 1.5; letter-spacing: -1px; }
.login-intro > p { margin-top: 18px; color: var(--muted); line-height: 1.9; }
.intro-projects { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 32px; }
.intro-projects span { border: 1px solid var(--line); background: var(--surface);
  padding: 4px 10px; border-radius: 6px; font-size: 11px; color: var(--muted); }
.intro-note { display: flex; align-items: center; gap: 8px; margin-top: 42px;
  font-size: 11px; color: var(--muted); }
.intro-note .icon { width: 16px; height: 16px; color: var(--primary); }
.login-card { padding: 36px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); }
.login-card h2 { font-size: 23px; margin-bottom: 6px; }
.login-card > .muted { font-size: 13px; }
.login-emblem { background: var(--primary-soft); color: var(--primary);
  height: 44px; width: 44px; border-radius: 12px; display: grid;
  place-items: center; margin-bottom: 23px; }
.login-card .field:first-of-type { margin-top: 26px; }
.password-field { display: flex; position: relative; }
.password-field input { padding-right: 42px; }
.password-field .icon-button { position: absolute; right: 3px; top: 3px; }
.login-submit { width: 100%; justify-content: space-between; margin-top: 4px; }
.login-note { display: flex; align-items: center; gap: 6px; font-size: 10px;
  color: var(--muted); margin-top: 24px; }
.login-note .icon { width: 14px; height: 14px; }
.form-error { font-size: 12px; color: var(--red); padding: 10px;
  border-radius: 6px; background: var(--red-soft); margin: 12px 0; }
@media(min-width: 1500px) { main { padding-top: 40px; } }
@media(max-width: 1100px) {
  .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 17px; gap: 12px; }
  .stat-icon { width: 38px; height: 38px; }
  .sync-actions { flex-direction: column-reverse; align-items: flex-end; gap: 6px; }
  .login-layout { gap: 36px; margin-top: 35px; }
  .login-intro h1 { font-size: 32px; }
}
@media(max-width: 760px) {
  .header-inner, .nav-inner { padding-left: 20px; padding-right: 20px; }
  main { padding: 24px 20px 20px; }
  .header-inner { min-height: 72px; }
  .header-actions { gap: 10px; }
  .brand { font-size: 18px; gap: 9px; }
  .brand-mark { width: 36px; height: 36px; border-radius: 10px; }
  .brand small { font-size: 9px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 26px; }
  .stat { padding: 17px; }
  .nav-caption, #last-sync { display: none; }
  .page-heading { align-items: flex-start; gap: 12px; }
  .page-heading h1 { font-size: 24px; }
  .page-heading p { font-size: 12px; max-width: 290px; }
  .login-layout { max-width: 430px; grid-template-columns: 1fr; gap: 24px;
    margin: 20px auto 40px; }
  .login-intro { text-align: center; padding: 0; }
  .login-intro h1 { font-size: 27px; }
  .login-intro h1 br { display: none; }
  .login-intro .eyebrow { font-size: 9px; margin-bottom: 10px; }
  .login-intro > p { font-size: 12px; margin-top: 9px; }
  .intro-projects, .intro-note { display: none; }
  .login-card { padding: 28px; }
  .panel-heading { padding: 18px; }
  th, td { padding: 12px 18px; }
  .filter-field { width: 150px; }
  .drawer-header { padding: 18px 20px; }
  .drawer-body { padding: 20px; }
}
@media(max-width: 480px) {
  .header-inner, .nav-inner { padding-left: 16px; padding-right: 16px; }
  main { padding-left: 16px; padding-right: 16px; }
  .brand { font-size: 17px; }
  .brand small { letter-spacing: .04em; }
  .theme-picker { padding: 3px; gap: 0; }
  .theme-picker button { width: 29px; }
  #logout { padding: 6px; min-height: 36px; }
  #logout > span:last-child { display: none; }
  .project-grid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .stat { padding: 13px; gap: 10px; }
  .stat-icon { width: 34px; height: 34px; border-radius: 8px; }
  .stat-icon .icon { width: 20px; height: 20px; }
  .stat strong { font-size: 24px; }
  .stat div > span { font-size: 10px; }
  .section-heading > .badge { display: none; }
  .page-heading .button { padding: 8px 10px; font-size: 12px; }
  .page-heading p { max-width: 210px; }
  .nav-inner { min-height: 49px; }
  .nav-item { min-height: 49px; font-size: 13px; }
  .panel-heading { align-items: flex-start; flex-direction: column; }
  .filter-field { width: 100%; }
  .page-footer span:last-child { display: none; }
  .drawer.wide { width: 100%; }
  .settings-section .section-heading { flex-wrap: wrap; }
  .confirm-dialog { padding: 23px; }
  .toast { bottom: 16px; }
}
@media(prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important;
    transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

[data-tooltip] { position: relative; }
[data-tooltip]::after { content: attr(data-tooltip); position: absolute;
  top: calc(100% + 9px); left: 50%; transform: translateX(-50%);
  background: var(--text); color: var(--surface); padding: 4px 8px;
  font-size: 10px; font-weight: 400; border-radius: 5px; white-space: nowrap;
  box-shadow: var(--shadow); opacity: 0; visibility: hidden;
  pointer-events: none; z-index: 30; }
[data-tooltip]:hover::after, [data-tooltip]:focus-visible::after {
  opacity: 1; visibility: visible; }

.project-logo.original { background: transparent; }
.project-logo img { width: 40px; height: 40px; object-fit: contain;
  border-radius: 9px; display: block; }

@media(max-width: 680px) {
  .project-grid { grid-template-columns: minmax(0, 1fr); }
}
.project-identity h3 { white-space: nowrap; }
