:root {
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #e5e7eb;
  background: #15171a;
  font-synthesis: none;
  --bg: #15171a;
  --panel: #1c1f23;
  --border: #34383f;
  --muted: #a0a6b0;
  --accent: #a9c8ff;
  --danger: #f5a6a6;
}
* { box-sizing: border-box; }
body { margin: 0; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea { outline-offset: 4px; }
a { color: var(--accent); }
button { cursor: pointer; }
button:disabled { opacity: .5; cursor: wait; }
.hidden { display: none !important; }
.shell { display: grid; grid-template-columns: 235px 1fr; min-height: 100vh; }
aside { position: sticky; top: 0; height: 100vh; background: #191c20; border-right: 1px solid var(--border); padding: 26px 16px; display: flex; flex-direction: column; }
.brand { color: inherit; font-size: 21px; font-weight: 600; text-decoration: none; padding: 0 10px; }
nav { display: grid; gap: 4px; margin-top: 28px; }
.nav { border: 0; background: none; color: var(--muted); display: flex; align-items: center; gap: 10px; text-align: left; padding: 11px 10px; text-decoration: none; border-radius: 5px; font-size: 13px; }
.nav > span { font-size: 17px; line-height: 1; }
.nav.active { background: #2b3442; color: #d8e6ff; }
.nav b, .nav small { margin-left: auto; font-size: 11px; }
.nav b { font-weight: 400; }
.nav:hover { background: #2a2e35; color: #fff; }
.sidebar-bottom { margin-top: auto; padding-top: 24px; }
.server-label { font-size: 12px; display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.status-dot { display: inline-block; flex-shrink: 0; width: 6px; height: 6px; background: #94bd9b; border-radius: 50%; }
.small { font-size: 12px; line-height: 1.6; }
.muted { color: var(--muted); line-height: 1.6; }
.user { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--border); margin-top: 22px; padding-top: 18px; }
.user strong { display: block; font-size: 11px; font-weight: 500; }
.user span { display: block; font-size: 11px; color: var(--muted); margin-top: 5px; overflow-wrap: anywhere; }
.user button { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 20px; }
main { min-width: 0; padding: 0 32px 32px; max-width: 1500px; width: 100%; margin: 0 auto; }
header { height: 64px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.breadcrumb { font-size: 12px; color: var(--muted); }
.breadcrumb span { padding: 0 10px; }
.breadcrumb b { font-weight: 400; color: #ddd; }
.domain-chip { font-size: 12px; text-decoration: none; color: var(--muted); }
.domain-chip .status-dot { margin-right: 6px; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 28px 0 24px; }
h1 { font-size: 28px; font-weight: 600; margin: 0; line-height: 1.3; }
h2 { font-size: 18px; font-weight: 600; margin: 0 0 18px; }
h3 { font-size: 15px; font-weight: 600; }
.button { border: 1px solid #474d57; border-radius: 5px; color: #e5e7eb; background: #292e35; padding: 9px 13px; display: inline-flex; gap: 7px; align-items: center; justify-content: center; text-decoration: none; font-size: 13px; font-weight: 500; white-space: nowrap; }
.button.primary { background: #a9c8ff; border-color: #a9c8ff; color: #142438; }
.button:hover { filter: brightness(1.12); }
.button.subtle { background: transparent; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 22px; }
.stat { padding: 15px 18px; background: var(--panel); border: 1px solid var(--border); border-radius: 6px; }
.stat > span { display: block; color: var(--muted); font-size: 12px; }
.stat strong { font-size: 23px; display: block; margin: 10px 0 6px; font-weight: 500; }
.stat small { color: var(--muted); font-size: 11px; }
.meter { height: 3px; background: #343b46; border-radius: 3px; margin-top: 13px; }
.meter i { display: block; background: #8ea9d1; height: 100%; border-radius: 3px; min-width: 2px; }
.banner { display: flex; gap: 12px; align-items: center; border: 1px solid #6c6041; background: #302c23; padding: 14px 16px; border-radius: 6px; margin-bottom: 22px; }
.banner > span { display: none; }
.banner strong { font-size: 13px; }
.banner p { font-size: 12px; color: var(--muted); margin: 5px 0 0; }
.banner button { margin-left: auto; }
.list-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 24px 0 16px; }
.tabs { display: flex; gap: 3px; }
.tab { background: none; border: 0; color: var(--muted); padding: 8px 11px; border-radius: 5px; font-size: 12px; }
.tab.active { background: #303640; color: #eee; }
input, select, textarea { border: 1px solid #474d57; background: #181b20; color: #e9ebef; border-radius: 5px; padding: 10px 11px; min-width: 0; width: 100%; }
input::placeholder, textarea::placeholder { color: #868e9a; }
input[type=search] { width: 235px; font-size: 12px; }
textarea { resize: vertical; }
label { display: block; font-size: 12px; color: #bec5d0; margin-bottom: 18px; }
label input, label textarea, label select { margin-top: 7px; font-size: 13px; }
.empty { border: 1px dashed #474d57; border-radius: 6px; min-height: 210px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 24px; }
.empty h2 { margin-bottom: 6px; }
.empty p { font-size: 13px; color: var(--muted); line-height: 1.6; margin-bottom: 20px; }
.pub-row { display: grid; grid-template-columns: 32px minmax(100px, 1fr) 125px 75px auto; align-items: center; gap: 12px; padding: 14px 12px; border-bottom: 1px solid var(--border); }
.pub-row > div:nth-child(2) { min-width: 0; }
.type-icon { width: 30px; height: 32px; display: grid; place-items: center; color: var(--muted); font-size: 21px; }
.pub-title { font-size: 14px; font-weight: 500; display: block; margin-bottom: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-path { font: 11px ui-monospace, Consolas, monospace; color: var(--muted); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
.pub-path:hover { color: var(--accent); }
.badge { font-size: 11px; color: #bdc5d0; display: inline-flex; align-items: center; background: #2b313a; padding: 5px 7px; border-radius: 4px; width: fit-content; }
.badge.public { color: #b6d6ba; background: #25352a; }
.badge.password { color: #ddc598; background: #383022; }
.badge.accounts { color: #bdd4f6; background: #293646; }
.badge.off { color: #e1aaaa; background: #382828; }
.pub-size { font-size: 11px; color: var(--muted); }
.row-actions { display: flex; gap: 1px; flex-wrap: wrap; }
.icon-button { background: none; border: 0; color: #afb9c7; padding: 6px 8px; font-size: 18px; border-radius: 4px; }
.icon-button:hover { background: #303640; color: white; }
.danger { color: var(--danger); }
.settings-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.settings-card { background: var(--panel); border: 1px solid var(--border); border-radius: 6px; padding: 22px; margin-bottom: 24px; }
.settings-card > p { font-size: 13px; }
.settings-card h2 { margin-bottom: 14px; }
.instructions { font-size: 12px; color: #b1bac7; padding-left: 20px; line-height: 1.8; }
.instructions li { margin-bottom: 8px; }
.copy-field { display: flex; gap: 8px; }
.copy-field input { font-size: 11px; }
.copy-field button { margin-top: 7px; font-size: 11px; }
.divider { height: 1px; background: var(--border); margin: 24px 0; }
.command { background: #15171a; padding: 12px 15px; display: block; border-radius: 4px; font-size: 13px; }
.audit-row { padding: 11px 0; border-bottom: 1px solid var(--border); font-size: 12px; display: flex; gap: 20px; justify-content: space-between; overflow-wrap: anywhere; }
.audit-row small { color: var(--muted); }
dialog { color: #e5e7eb; background: #1c1f23; border: 1px solid #4b515c; border-radius: 7px; width: min(650px, calc(100vw - 24px)); max-height: 90vh; padding: 24px; }
dialog::backdrop { background: #0009; }
.dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 15px; margin-bottom: 22px; }
.dialog-head h2 { margin: 4px 0 0; font-size: 21px; }
.dialog-head .icon-button { font-size: 25px; padding: 0 5px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dropzone { border: 1px dashed #566171; border-radius: 6px; background: #22272e; text-align: center; position: relative; padding: 20px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer; overflow: hidden; margin-bottom: 10px; }
.dropzone.dragover { background: #2e3b50; border-color: var(--accent); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload-icon { font-size: 24px; color: var(--accent); }
.dropzone strong { font-size: 13px; color: #ddd; font-weight: 500; }
.dropzone > span:last-of-type { font-size: 11px; color: var(--muted); }
.upload-options { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 20px; }
.folder-button { position: relative; overflow: hidden; font-size: 12px; color: var(--accent); margin: 0; cursor: pointer; }
.folder-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dialog-foot { display: flex; justify-content: flex-end; align-items: center; gap: 10px; border-top: 1px solid var(--border); padding-top: 18px; margin-top: 18px; }
.dialog-foot > span { margin-right: auto; max-width: 230px; font-size: 11px; }
.progress { margin-top: 15px; height: 22px; position: relative; background: #29313e; border-radius: 4px; overflow: hidden; font-size: 11px; text-align: center; }
.progress i { position: absolute; inset: 0 auto 0 0; background: #4c6487; width: 0; }
.progress span { position: relative; line-height: 22px; }
.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 999; background: #d8e6ff; color: #18273b; padding: 13px 20px; border-radius: 5px; font-size: 13px; max-width: 90vw; }
.toast.error { background: #edb9b9; color: #3a1818; }
.wide-dialog { width: min(1000px, calc(100vw - 24px)); }
#editor { height: 58vh; resize: none; font: 13px/1.7 ui-monospace, Consolas, monospace; tab-size: 2; }
.file-row { display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); padding: 10px 0; gap: 15px; }
.file-row code { font-size: 12px; word-break: break-all; }
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(100%, 300px); text-align: center; }
.login-card h1 { font-size: 24px; margin-bottom: 24px; }
.login-card .button { width: 100%; }
.login-card > p { color: var(--muted); margin: 16px 0 0; }
.login-card > p:empty { display: none; }
#local-login { margin-top: 12px; }
@media (max-width: 1100px) {
  .shell { grid-template-columns: 205px 1fr; }
  main { padding: 0 22px 24px; }
  .pub-row { grid-template-columns: 30px minmax(90px, 1fr) 115px; }
  .pub-size { display: none; }
  .row-actions { grid-column: 2 / 4; }
  .settings-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  aside { position: relative; height: auto; padding: 16px; border-right: 0; border-bottom: 1px solid var(--border); }
  .brand { padding: 0; font-size: 20px; }
  nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; margin-top: 14px; }
  .nav { font-size: 12px; padding: 8px; gap: 6px; white-space: nowrap; }
  .nav span { font-size: 16px; }
  .nav b, .nav small { display: none; }
  .sidebar-bottom { padding: 0; margin: 0; }
  .sidebar-bottom > .server-label, .sidebar-bottom > .muted, .user strong { display: none; }
  .user { border: 0; margin: 10px 0 0; padding: 0; }
  .user span { margin: 0; }
  main { padding: 0 16px 24px; }
  header { height: 50px; }
  .breadcrumb, .domain-chip { font-size: 11px; }
  .breadcrumb span { padding: 0 5px; }
  .page-heading { margin: 22px 0 18px; gap: 10px; }
  h1 { font-size: 25px; }
  .page-heading .button { font-size: 12px; padding: 9px 10px; }
  .stats { gap: 7px; }
  .stat { padding: 12px 10px; }
  .stat > span { font-size: 10px; }
  .stat strong { font-size: 20px; }
  .stat small { font-size: 10px; }
  .banner { padding: 12px; gap: 10px; }
  .banner .button { padding: 8px; font-size: 11px; }
  .list-toolbar { align-items: stretch; flex-direction: column; gap: 12px; }
  .tabs { justify-content: space-between; }
  .list-toolbar input { width: 100%; }
  .pub-row { grid-template-columns: 26px minmax(80px, 1fr); padding: 12px 0; gap: 8px; }
  .pub-row .badge { grid-column: 2; }
  .pub-row .row-actions { grid-column: 2; }
  .row-actions button { padding: 8px 10px; }
  .pub-title { font-size: 13px; }
  .pub-path { font-size: 10px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  dialog { padding: 20px; }
  .dialog-foot { flex-wrap: wrap; }
  .dialog-foot > span { max-width: 100%; width: 100%; }
  .settings-card { padding: 18px; }
  .copy-field { flex-direction: column; gap: 0; }
}
