
:root {
  color-scheme: light;
  --bg: #f7f6f3;
  --side: #ffffff;
  --card: #ffffff;
  --line: #e4e0d8;
  --text: #1c1b19;
  --muted: #1c1b19;
  --accent: #1f6b4a;
  --danger: #9d3b32;
  --ok: #1c1b19;
  --bad: #9d3b32;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
}
button, input, textarea, select { font: inherit; color: inherit; }
code, .mono { font-family: ui-monospace, "Cascadia Mono", "Segoe UI Mono", monospace; font-size: 13px; overflow-wrap: anywhere; }
a { color: var(--accent); }
.shell { min-height: 100vh; }
.side {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 220px;
  z-index: 5;
  background: var(--side);
  border-right: 1px solid var(--line);
  padding: 22px 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-x: hidden;
  overflow-y: auto;
}
.mark { font-size: 15px; letter-spacing: 0.14em; color: var(--accent); font-weight: 700; }
.sub { color: var(--text); font-size: 12px; margin-top: 4px; }
nav { display: flex; flex-direction: column; gap: 4px; }
nav a, nav button {
  display: block;
  width: 100%;
  text-align: left;
  text-decoration: none;
  color: var(--text);
  background: transparent;
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
  white-space: nowrap;
}
nav a.on, nav a:hover, nav button:hover { background: #e7f2ec; color: var(--accent); }
nav form { margin: 0; }
main {
  margin-left: 220px;
  width: calc(100% - 220px);
  min-width: 280px;
  padding: 32px 28px 72px;
}
.sheet { max-width: 880px; min-width: 0; }
h1 { font-size: 26px; font-weight: 650; letter-spacing: -0.02em; margin: 0 0 8px; overflow-wrap: anywhere; }
h2 { font-size: 18px; font-weight: 650; margin: 28px 0 10px; overflow-wrap: anywhere; }
.lead { color: var(--text); }
.note {
  color: var(--text); background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--accent); padding: 12px 14px; margin: 0 0 18px; border-radius: 8px;
}
.table-scroll { width: 100%; max-width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; overflow-wrap: anywhere; }
th { font-size: 12px; font-weight: 650; }
th a { color: var(--text); text-decoration: none; }
th a:hover, th a.on { color: var(--accent); }
tr:hover td { background: #f3f1ec; }
input[type=text], input[type=password], textarea, input[type=file], select {
  width: 100%; max-width: 100%; min-width: 0;
  background: #fff; color: var(--text); border: 1px solid #cfcabb; border-radius: 8px; padding: 8px 10px;
}
textarea { min-height: 320px; font-family: ui-monospace, monospace; font-size: 13px; white-space: pre; }
button, .btn {
  background: var(--accent); color: #fff; border: 0; border-radius: 8px;
  padding: 8px 14px; cursor: pointer; text-decoration: none; display: inline-block;
}
button.danger { background: var(--danger); color: #fff; }
button.ghost, a.ghost { background: #fff; color: var(--text); border: 1px solid #cfcabb; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; max-width: 100%; }
.row > input[type=text], .row > input[type=file] { flex: 1 1 12rem; width: auto; max-width: 100%; }
.grow { flex: 1 1 16rem; min-width: 0; }
.flash { padding: 10px 12px; border-radius: 8px; margin: 0 0 14px; border: 1px solid var(--line); background: #fff; }
.flash.ok { border-color: #b7d7c6; }
.flash.bad { border-color: #e4b7b2; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 12px; margin: 16px 0 8px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; min-width: 0; }
.card b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.card span { display: block; font-size: 13px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--danger); margin-right: 6px; }
.dot.run { background: var(--accent); }
form.inline { display: inline; }
.switch { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; max-width: 100%; }
.switch a {
  text-decoration: none; color: var(--text); border: 1px solid var(--line);
  background: var(--card); border-radius: 10px; padding: 10px 12px; max-width: 100%;
  overflow-wrap: anywhere;
}
.switch a.on { border-color: var(--accent); color: var(--accent); }
.crumbs { display: flex; flex-wrap: wrap; gap: 4px 6px; margin: 0 0 16px; max-width: 100%; }
.crumbs a, .crumbs span { overflow-wrap: anywhere; }
.kind {
  display: inline-block; min-width: 4.8rem; text-align: center; font-size: 11px;
  letter-spacing: 0.04em; text-transform: uppercase; border-radius: 999px;
  padding: 2px 8px; border: 1px solid #cfcabb; color: var(--text);
}
.kind.dir { color: var(--accent); border-color: #b7d7c6; }
.kind.link { border-color: #cfcabb; }
.acts { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.empty {
  border: 1px dashed #cfcabb; border-radius: 12px; padding: 22px 16px; margin: 8px 0 16px;
  background: #fff;
}
.empty p { margin: 0 0 4px; }
.toolbar { display: flex; flex-direction: column; gap: 10px; margin: 0 0 16px; max-width: 100%; }
.projects { display: flex; flex-direction: column; gap: 16px; max-width: 720px; margin-top: 16px; }
.project {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px 18px 16px;
  min-width: 0;
}
.project h2 { font-size: 18px; margin: 0 0 4px; }
.project p { margin: 0 0 8px; overflow-wrap: anywhere; }
.project .meta { font-size: 13px; margin-bottom: 10px; }
.project .open { display: inline-block; margin-top: 4px; font-weight: 650; }
.pw {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 360px;
}
.pw h3 { font-size: 15px; font-weight: 650; margin: 0 0 2px; }
.pw label { margin: 4px 0 0; }
.pw button { align-self: flex-start; margin-top: 6px; }
.dns { margin-top: 4px; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login { width: min(420px, 100%); background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; }
.login h1 { font-size: 22px; }
label { display: block; margin: 12px 0 4px; }
.login button { width: 100%; margin-top: 16px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 720px) {
  .side { width: 200px; }
  main { margin-left: 200px; width: calc(100% - 200px); min-width: 240px; padding: 20px 16px 48px; }
  h1 { font-size: 22px; }
  th, td { padding: 8px 8px; }
}
