:root {
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1a3041;
  background: #eaf1f4;
  font-synthesis: none;
  --muted: #617688;
  --line: #d5e2e8;
  --accent: #236e73;
  --surface: #f9fcfc;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; background: radial-gradient(ellipse at 86% 3%, #d0e6e2 0, transparent 35%), radial-gradient(ellipse at 10% 100%, #e1ebf2 0, transparent 44%), #eaf1f4; }
.orb { display: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
summary:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .clickable:focus-visible { outline: 3px solid #208888; outline-offset: 3px; }
svg { width: 22px; height: 22px; display: block; }
.shell { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 26px; min-height: 100vh; padding: 28px; }
.sidebar { position: sticky; top: 28px; height: calc(100vh - 56px); min-height: 420px; padding: 34px 16px 20px; display: flex; flex-direction: column; border: 1px solid #dce7ec; border-radius: 34px; background: rgba(255,255,255,.94); box-shadow: 0 20px 55px #5d849313; }
.nav { display: grid; gap: 10px; }
.nav button { display: flex; align-items: center; gap: 16px; width: 100%; border: 0; background: transparent; color: #596f81; text-align: left; padding: 16px 18px; border-radius: 16px; font-size: 16px; font-weight: 600; transition: background .18s ease, color .18s ease; }
.nav button.active { background: #cae8df; color: #1c6970; }
.nav button:hover { background: #e5f2ef; color: #205c63; }
.nav-icon { display: inline-flex; flex: none; color: #132e3b; }
.account { margin-top: auto; border-top: 1px solid var(--line); padding: 20px 4px 0; display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; }
.account-avatar { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border: 0; border-radius: 13px; background: #d3ebe5; color: #1d696c; font-weight: 700; font-size: 15px; }
.account-info { flex: 1; min-width: 0; }
.account-info strong { display: block; color: #203848; font-size: 13px; overflow-wrap: anywhere; }
.account-info span { display: block; margin-top: 3px; }
.logout { padding: 6px 0; border: 0; color: #527184; background: none; font-size: 12px; }
.logout:hover { color: #11646a; text-decoration: underline; }
.main { min-width: 0; width: 100%; max-width: 1600px; padding: 10px 12px 42px 0; position: relative; }
.topbar { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 48px; }
.brand { display: flex; gap: 13px; align-items: center; font-size: 17px; font-weight: 800; letter-spacing: .025em; color: #1c3445; }
.logo { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: #1a535e; color: white; }
.topbar-note { border: 1px solid #dce8ec; border-radius: 99px; padding: 12px 19px; background: rgba(255,255,255,.8); color: #647b88; font-size: 12px; font-weight: 600; }
.topline { color: #6e8592; letter-spacing: .13em; font-size: 11px; font-weight: 750; }
.heading { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin: 0 0 25px; }
h1 { font-size: 30px; letter-spacing: -.035em; margin: 7px 0 0; }
h2 { font-size: 19px; letter-spacing: -.02em; margin: 0; }
p { color: var(--muted); line-height: 1.55; }
.subtitle { margin: 6px 0 0; font-size: 14px; }
.button, .icon-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid #cfdee5; border-radius: 13px; background: #fff; color: #254051; padding: 11px 16px; font-weight: 600; font-size: 14px; transition: background .18s ease, border-color .18s ease; }
.button svg { width: 17px; height: 17px; }
.button:hover, .icon-button:hover { background: #edf7f5; border-color: #a8d1c9; }
.primary { background: #1c6069; color: #fff; border-color: #1c6069; box-shadow: 0 6px 15px #27697124; }
.primary:hover { background: #277781; border-color: #277781; }
.danger { color: #ac4545; }
.cards { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(290px, 1fr); gap: 24px; margin: 0 0 32px; }
.card, .panel { background: var(--surface); border: 1px solid #d7e4e9; border-radius: 28px; box-shadow: 0 18px 45px #517a8810; }
.card-feature { position: relative; overflow: hidden; min-height: 390px; padding: 38px 40px; color: white; background: linear-gradient(120deg, #194f59, #277674); border: 0; display: flex; flex-direction: column; }
.card-feature::after { content: ""; position: absolute; width: 250px; height: 250px; right: -65px; top: -115px; border: 1px solid #ffffff1c; border-radius: 50%; box-shadow: 0 0 0 45px #ffffff06, 0 0 0 90px #ffffff04; pointer-events: none; }
.card-label { color: #61798a; font-size: 12px; font-weight: 800; letter-spacing: .1em; line-height: 1.5; }
.card-feature .card-label { color: #c2e1df; }
.metric { margin: 25px 0 15px; font-size: clamp(54px, 6vw, 86px); line-height: 1; font-weight: 700; letter-spacing: -.06em; }
.metric small { font-size: .52em; color: #c0e1dd; letter-spacing: -.04em; }
.feature-caption { display: flex; align-items: center; gap: 9px; color: #e0f2ed; font-size: 14px; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #a8e4cb; }
.feature-foot { margin-top: auto; padding-top: 36px; color: #b9d9d7; font-size: 13px; }
.card-stack { display: grid; gap: 18px; }
.card-stat { min-height: 118px; padding: 24px 28px; display: flex; align-items: center; justify-content: space-between; gap: 15px; }
.stat-value { margin-top: 10px; font-size: clamp(23px, 2.2vw, 30px); font-weight: 700; letter-spacing: -.04em; overflow-wrap: anywhere; }
.stat-caption { color: #718593; font-size: 12px; margin-top: 4px; }
.stat-icon, .row-icon { display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 17px; color: #164c54; background: #cce9e1; }
.panel { overflow: hidden; }
.panel-head { padding: 25px 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); }
.panel-subtitle { margin: 5px 0 0; font-size: 13px; }
.list-heading { display: flex; justify-content: space-between; padding: 15px 70px 15px 28px; color: #718795; background: #eff5f6; font-size: 11px; font-weight: 750; letter-spacing: .07em; }
.row { display: flex; gap: 15px; align-items: center; padding: 17px 28px; border-bottom: 1px solid var(--line); }
.row:last-child { border: 0; }
.row.clickable { cursor: pointer; }
.row.clickable:hover { background: #eef7f5; }
.row-icon { width: 42px; height: 42px; border-radius: 13px; }
.row-icon svg { width: 20px; height: 20px; }
.row-main { flex: 1; min-width: 0; }
.row-main strong { display: block; font-size: 14px; overflow-wrap: anywhere; }
.row-main small { display: block; color: var(--muted); margin-top: 5px; line-height: 1.4; overflow-wrap: anywhere; }
.badge { font-size: 12px; border-radius: 9px; padding: 7px 10px; background: #e3f0ed; color: #346f63; white-space: nowrap; }
.badge-error { color: #9a413e; background: #f8e6e4; }
.badge-locked { color: #655a74; background: #eeebf2; }
.empty { padding: 50px 24px; text-align: center; color: var(--muted); }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { background: none; border: 0; color: #206a70; padding: 0; margin-bottom: 18px; font-weight: 600; }
.config { margin: 0; padding: 24px; overflow: auto; max-height: 65vh; white-space: pre; font: 13px/1.6 ui-monospace, monospace; color: #244153; background: #f8fbfb; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login { width: min(440px, 100%); padding: 38px; }
.login .brand { padding: 0 0 42px; }
.login h1 { font-size: 27px; }
.login p { font-size: 14px; }
.form { display: grid; gap: 16px; margin-top: 24px; }
.field { display: grid; gap: 7px; color: #536c7b; font-size: 13px; font-weight: 600; }
.field input, .field select, .field textarea { width: 100%; border: 1px solid #cddde4; border-radius: 11px; background: #fff; color: #203949; padding: 12px; }
.field textarea { min-height: 80px; resize: vertical; }
.field input[type=checkbox] { width: auto; accent-color: #1c6b70; }
.check { display: flex; align-items: center; gap: 10px; }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.dialog-head button { border: 0; background: none; color: #607987; font-size: 26px; }
dialog { width: min(540px, calc(100% - 30px)); max-height: calc(100% - 40px); overflow: auto; border: 1px solid #d8e6e9; border-radius: 26px; background: #f9fcfc; color: #1a3041; padding: 28px; box-shadow: 0 30px 90px #1d3d4b3b; }
dialog::backdrop { background: #203d4c77; backdrop-filter: blur(5px); }
#toast { position: fixed; right: 20px; bottom: 20px; background: #194e58; color: #fff; padding: 13px 18px; border-radius: 13px; display: none; z-index: 10; box-shadow: 0 10px 30px #183e4930; }
#toast.show { display: block; }
@media (max-width: 1000px) { .shell { grid-template-columns: 220px minmax(0, 1fr); gap: 18px; padding: 20px; } .sidebar { top: 20px; height: calc(100vh - 40px); } .cards { grid-template-columns: 1fr 1fr; gap: 16px; } .card-feature { min-height: 360px; padding: 30px; } .card-stat { padding: 20px; } }
@media (max-width: 700px) { .shell { display: flex; flex-direction: column; gap: 16px; padding: 14px; } .sidebar { position: static; min-height: 0; height: auto; padding: 12px; border-radius: 22px; } .nav { display: flex; overflow-x: auto; gap: 4px; } .nav button { white-space: nowrap; padding: 11px 13px; font-size: 14px; } .nav-icon svg { width: 19px; height: 19px; } .account { margin-top: 12px; padding: 12px 4px 0; } .main { padding: 0 0 30px; } .topbar { margin: 8px 4px 28px; } .topbar-note { display: none; } .heading { align-items: flex-start; } .heading .button { padding: 10px 12px; } .cards { grid-template-columns: 1fr; } .card-feature { min-height: 260px; } .card-stack { grid-template-columns: 1fr; gap: 12px; } .card-stat { min-height: 105px; } .row { padding: 15px; gap: 10px; } .badge { white-space: normal; } .panel-head { padding: 20px 16px; } .list-heading { padding-left: 16px; } }
@media (prefers-reduced-transparency: reduce) { .sidebar, .topbar-note { background: #fff; backdrop-filter: none !important; } dialog::backdrop { backdrop-filter: none; } }
@media (prefers-contrast: more) { :root { --muted: #405869; --line: #a8bdc6; } .card, .panel, .sidebar { border-color: #9db4bd; } .nav button.active { color: #104e55; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }

.users-panel { overflow: visible; }
.user-menu { position: relative; flex: none; }
.user-menu summary { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid #cfdee5; border-radius: 12px; background: #fff; color: #254051; font-size: 24px; line-height: 1; cursor: pointer; list-style: none; }
.user-menu summary::-webkit-details-marker { display: none; }
.user-menu summary:hover { background: #edf7f5; }
.user-menu-popup { position: absolute; z-index: 5; right: 0; top: calc(100% + 6px); min-width: 160px; padding: 6px; border: 1px solid #d5e2e8; border-radius: 14px; background: rgba(249,252,252,.97); box-shadow: 0 12px 35px #1d3d4b30; backdrop-filter: blur(12px); }
.user-menu-popup button { display: block; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px; background: transparent; text-align: left; color: #254051; }
.user-menu-popup button:hover { background: #e5f2ef; }
.user-menu-popup button.danger { color: #ac4545; }
@media (prefers-reduced-transparency: reduce) { .user-menu-popup { background: #fff; backdrop-filter: none; } }

.users-table { width: 100%; border-collapse: collapse; table-layout: fixed; text-align: left; font-size: 14px; }
.users-table th { padding: 16px 18px; color: #617688; font-size: 12px; background: #eff5f6; }
.users-table th:first-child { border-top-left-radius: 27px; }
.users-table th:last-child { border-top-right-radius: 27px; width: 72px; }
.users-table td { padding: 18px; border-top: 1px solid var(--line); overflow-wrap: anywhere; vertical-align: middle; }
.users-table td .badge { display: inline-block; margin-top: 7px; }
.users-table .user-actions { text-align: right; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
@media (max-width: 850px) {
  .users-table, .users-table tbody, .users-table tr, .users-table td { display: block; }
  .users-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .users-table tr { position: relative; padding: 14px 18px; border-bottom: 1px solid var(--line); }
  .users-table tr:last-child { border-bottom: 0; }
  .users-table td { padding: 5px 50px 5px 0; border: 0; }
  .users-table td:not(.user-actions)::before { content: attr(data-label); display: block; margin-bottom: 2px; color: var(--muted); font-size: 12px; }
  .users-table .user-actions { position: absolute; top: 14px; right: 18px; padding: 0; }
}

.journal-commit { display: flex; align-items: center; width: 100%; gap: 18px; padding: 18px 24px; border: 0; border-bottom: 1px solid var(--line); background: transparent; text-align: left; color: #203848; }
.journal-commit:last-child { border-bottom: 0; }
.journal-commit:hover { background: #eef7f5; }
.journal-commit > span:first-child { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.journal-commit strong, .journal-commit small { display: block; }
.journal-commit small { margin-top: 5px; color: var(--muted); }
.journal-commit code, .journal-meta code { color: #527184; overflow-wrap: anywhere; }
.journal-meta { margin: 0 0 20px; }
.journal-layout { display: grid; grid-template-columns: minmax(180px, 240px) minmax(0,1fr); }
.journal-files { border-right: 1px solid var(--line); padding: 18px 10px; min-width: 0; }
.journal-files h2 { padding: 0 10px 12px; font-size: 14px; }
.journal-files button { display: flex; align-items: start; gap: 8px; width: 100%; padding: 10px; border: 0; border-radius: 10px; background: transparent; color: #254051; text-align: left; overflow-wrap: anywhere; }
.journal-files button:hover, .journal-files button.active { background: #dcedea; }
.journal-status { font-weight: 700; color: #207367; }
.journal-view { min-width: 0; }
.journal-view h2 { overflow-wrap: anywhere; }
.journal-diff { margin: 0; padding: 14px 0; overflow: auto; max-height: 70vh; font: 13px/1.55 ui-monospace, monospace; color: #244153; background: #f8fbfb; }
.diff-line { display: block; width: max-content; min-width: 100%; padding: 0 20px; white-space: pre; }
.diff-add { background: #def3e5; color: #155f38; }
.diff-remove { background: #fbe4e2; color: #8c3434; }
.diff-hunk { background: #e4f0f5; color: #365e73; }
@media (max-width: 700px) { .journal-layout { grid-template-columns: minmax(0,1fr); } .journal-files { border-right: 0; border-bottom: 1px solid var(--line); } .journal-commit { gap: 8px; padding: 15px; } }

.row[hidden] { display: none; }
.switch-list-tools { display: flex; align-items: center; justify-content: flex-end; gap: 12px; min-width: 0; }
.switch-search { position: relative; display: flex; align-items: center; min-width: 0; }
.switch-search svg { position: absolute; left: 13px; width: 18px; height: 18px; color: #617688; pointer-events: none; }
.switch-search input { width: min(270px, 100%); padding: 10px 12px 10px 40px; border: 1px solid #cddde4; border-radius: 13px; background: #fff; color: #203949; font-size: 14px; }
@media (max-width: 700px) { .switch-list-head { flex-wrap: wrap; } .switch-list-tools { flex: 1 1 100%; } .switch-search { flex: 1; } .switch-search input { width: 100%; } }

.switch-pagination { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 16px 28px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.switch-pagination .button { min-width: 42px; padding: 8px 12px; }
.switch-pagination .button:disabled { opacity: .45; cursor: default; }
.switch-pagination input { width: 66px; padding: 8px; border: 1px solid #cddde4; border-radius: 11px; background: #fff; color: #203949; text-align: center; }
@media (max-width: 700px) { .switch-pagination { padding: 14px 16px; } }
