/* t-server — small, mobile-first, dark. */
:root {
  --bg: #0b0b0c;
  --surface: #161618;
  --surface-2: #1f1f22;
  --border: #2c2c30;
  --text: #ececee;
  --muted: #9a9aa2;
  --accent: #c98a4b; /* squirrel fur */
  --accent-text: #120c06;
  --danger: #e5604f;
  --ok: #5fbf7f;
  --radius: 14px;
  --gutter: 16px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.15rem; margin-top: 1.6em; }
p { margin: 0 0 1em; }
img { max-width: 100%; height: auto; }

/* Header */
.site-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px var(--gutter);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 650; }
.brand img { width: 32px; height: 32px; border-radius: 50%; background: #000; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 14px; font-size: .95rem; }
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.nav form { margin: 0; }

/* Layout */
main { width: 100%; max-width: 920px; margin: 0 auto; padding: 24px var(--gutter) 48px; flex: 1; }
.site-footer { text-align: center; color: var(--muted); font-size: .85rem; padding: 16px var(--gutter) 24px; }
.site-footer a { color: var(--muted); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px;
  border: 1px solid var(--border); border-radius: 999px;
  background: var(--surface-2); color: var(--text);
  font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--muted); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-danger { border-color: var(--danger); color: var(--danger); background: transparent; }
.btn-link { background: none; border: 0; padding: 0; min-height: 0; color: var(--muted); font-weight: 400; }
.btn-link:hover { color: var(--text); }

/* Sign-in */
.signin { max-width: 380px; margin: 4vh auto 0; text-align: center; }
.signin img { width: min(280px, 70vw); aspect-ratio: 1; display: block; margin: 0 auto 8px; }
.signin h1 { font-size: 2rem; margin-bottom: .25em; }
.signin p { color: var(--muted); }
.signin form { margin: 24px 0 12px; }
.signin .btn { width: 100%; }
.signin .fine { font-size: .85rem; }

/* App tiles */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 0; list-style: none; margin: 16px 0 0; }
.tile {
  display: flex; flex-direction: column; gap: 6px; height: 100%;
  padding: 16px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text); text-decoration: none;
}
.tile:hover { border-color: var(--accent); }
.tile-icon { font-size: 1.8rem; line-height: 1; }
.tile-name { font-weight: 650; }
.tile-desc { color: var(--muted); font-size: .9rem; }
.empty { padding: 24px; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--muted); text-align: center; }

/* Cards, tables, forms */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-top: 12px; }
.profile { display: flex; align-items: center; gap: 14px; }
.profile img { width: 56px; height: 56px; border-radius: 50%; }
.muted { color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { color: var(--muted); font-weight: 500; }
td.wrap { word-break: break-word; }
input[type="text"] {
  width: 100%; max-width: 260px; min-height: 44px; padding: 0 12px;
  background: var(--bg); color: var(--text); border: 1px solid var(--border); border-radius: 10px; font: inherit;
}
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.notice { border-color: var(--danger); }
.notice p { margin-bottom: 12px; }

/* Messages */
.messages { list-style: none; padding: 0; margin: 0 0 16px; }
.messages li { padding: 10px 14px; border-radius: 10px; background: var(--surface-2); border-left: 3px solid var(--accent); margin-bottom: 8px; }
.messages li.error { border-left-color: var(--danger); }
.messages li.success { border-left-color: var(--ok); }

/* Prose pages */
.prose { max-width: 680px; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }

@media (max-width: 480px) {
  .brand span { display: none; }
  .nav { gap: 12px; }
}
