/* Owner: sync-server/public/index.html. */
:root {
  color-scheme: light dark;
  font-family: Inter, "Segoe UI", "Microsoft YaHei UI", sans-serif;
  font-size: 14px;
  color: #242a28;
  background: #f3f5f3;
  --surface: #fff;
  --line: #dfe4e0;
  --muted: #66716b;
  --accent: #087d59;
  --danger: #aa4038;
}

* { box-sizing: border-box; }
body { min-width: 320px; min-height: 100vh; margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .58; }
.shell { display: grid; min-height: 100vh; grid-template-columns: 232px minmax(0, 1fr); }
.rail { display: flex; flex-direction: column; gap: 24px; padding: 20px 14px; border-right: 1px solid var(--line); background: var(--surface); }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px; font-size: 17px; font-weight: 650; }
.brand-mark { display: grid; width: 32px; aspect-ratio: 1; place-items: center; border-radius: 8px; background: #d9f0e6; color: #087d59; font-weight: 750; }
.nav { display: grid; gap: 3px; }
.nav-label { padding: 0 10px 7px; color: var(--muted); font-size: 12px; }
.nav button { min-height: 38px; padding: 7px 10px; border: 0; border-radius: 4px; background: transparent; color: inherit; text-align: left; }
.nav button[aria-current="page"] { background: #e5f3eb; color: var(--accent); font-weight: 600; }
.rail-footer { margin-top: auto; padding: 10px 8px; color: var(--muted); font-size: 12px; }
.main { min-width: 0; }
.topbar { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 16px; padding: 0 28px; border-bottom: 1px solid var(--line); background: var(--surface); }
.topbar strong { font-size: 14px; font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 12px; color: var(--muted); }
.content { width: min(1040px, 100%); margin: 0 auto; padding: 28px; }
.page-head { display: flex; align-items: start; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
h1 { margin: 0; font-size: 21px; font-weight: 650; }
.subhead { margin: 7px 0 0; color: var(--muted); }
.section { margin-top: 24px; }
.notification-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.section h2 { margin: 0 0 10px; font-size: 15px; font-weight: 620; }
.status-line { min-height: 20px; margin: 12px 0; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-size: 12px; font-weight: 550; }
tbody tr:last-child td { border-bottom: 0; }
td { overflow-wrap: anywhere; }
.empty { padding: 22px 12px; color: var(--muted); text-align: center; }
.button { min-height: 34px; padding: 6px 11px; border: 1px solid #b8c3bc; border-radius: 4px; background: var(--surface); color: inherit; }
.button:hover { background: #f0f4f1; }
.button-primary { border-color: var(--accent); background: var(--accent); color: white; }
.button-danger { color: var(--danger); }
.login { display: grid; min-height: 100vh; place-items: center; padding: 20px; }
.login-panel { width: min(420px, 100%); padding: 28px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.login-panel h1 { margin: 0 0 8px; }
.login-panel p { margin: 0 0 22px; color: var(--muted); }
.login-form { display: grid; gap: 12px; }
.login-form label { display: grid; gap: 6px; color: var(--muted); }
.login-form input { min-height: 40px; padding: 8px 10px; border: 1px solid #b8c3bc; border-radius: 4px; background: var(--surface); color: inherit; }
.login-form button { min-height: 38px; margin-top: 4px; }
.merge-label { display: grid; gap: 8px; margin-top: 12px; color: var(--muted); }
.merge-text { width: 100%; min-height: 220px; resize: vertical; padding: 10px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: inherit; font: 13px/1.5 ui-monospace, Consolas, monospace; }
.merge-select { min-height: 36px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; background: var(--surface); color: inherit; }
.error { color: var(--danger); }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

@media (prefers-color-scheme: dark) {
  :root { color: #e4e9e5; background: #171c19; --surface: #202723; --line: #36413a; --muted: #a3afa7; --accent: #65c59b; --danger: #f08a80; }
  .brand-mark { background: #254838; color: #9be0bd; }
  .nav button[aria-current="page"] { background: #294236; color: #9be0bd; }
  .button:hover { background: #2b342e; }
}
@media (max-width: 720px) {
  .shell { grid-template-columns: 1fr; }
  .rail { gap: 12px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .brand { padding: 2px 4px; }
  .nav { display: flex; gap: 4px; overflow-x: auto; }
  .nav-label, .rail-footer { display: none; }
  .nav button { flex: 0 0 auto; min-height: 34px; white-space: nowrap; }
  .topbar { min-height: 48px; padding: 0 16px; }
  .content { padding: 20px 16px; }
  .page-head { display: block; }
  .page-head .button { margin-top: 14px; }
}
