/* Damozel Hub–inspired admin shell */
@import url("https://fonts.googleapis.com/css2?family=Public+Sans:wght@400;500;600;700&display=swap");

:root {
  --bg: #fafaf7;
  --surface: #ffffff;
  --card: #f4f4ef;
  --ink: #1a1a18;
  --muted: #6b6b62;
  --line: #e2e2da;
  --accent: #4a7c6f;
  --accent-dark: #3d665b;
  --soft: rgba(74, 124, 111, .12);
  --side: #ffffff;
  --danger: #dc2626;
  --radius: 10px;
  --shadow: 0 4px 18px rgba(26, 26, 24, .08);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Public Sans", system-ui, sans-serif;
  color: var(--ink);
  background: var(--bg);
  font-size: 15px;
  line-height: 1.5;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); }

.layout { display: flex; min-height: 100vh; }
.side {
  width: 240px;
  background: var(--side);
  border-right: 1px solid var(--line);
  padding: 22px 14px;
  color: var(--ink);
}
.brand-row { display: flex; gap: 10px; align-items: center; margin: 0 8px 10px; }
.mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; flex: none;
}
.brand { font-size: 17px; font-weight: 700; letter-spacing: .02em; margin: 0; }
.brand span { color: var(--accent); }
.brand-sub { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.site-switch {
  margin: 8px 8px 14px; padding: 12px; border: 1px solid var(--line);
  border-radius: 10px; background: var(--card);
}
.site-switch select { width: 100%; margin-bottom: 8px; }
.site-switch .mini { display: inline-block; margin-right: 10px; font-size: 12px; }
.nav-group {
  margin: 14px 12px 6px; font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); font-weight: 600;
}
.side nav { display: flex; flex-direction: column; gap: 4px; }
.side a {
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-weight: 500;
  font-size: 14px;
}
.side a:hover, .side a.active {
  background: var(--soft);
  color: var(--accent-dark);
}
.side a.out { margin-top: 12px; color: var(--ink); }

.main { flex: 1; min-width: 0; }
.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.top .user { color: var(--muted); font-size: 13px; }
.content { padding: 24px; }

.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.stat .n { font-size: 28px; font-weight: 700; }
.stat .l { color: var(--muted); margin-top: 4px; font-size: 13px; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}
.panel h2 { margin: 0 0 12px; font-size: 17px; font-weight: 600; }

table { width: 100%; border-collapse: collapse; }
th, td {
  text-align: left;
  padding: 12px 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
  font-size: 14px;
}
th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--muted);
  font-weight: 600;
  background: var(--card);
}
.thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 6px; background: #eee; }
.muted { color: var(--muted); font-size: 12px; }

.row-form, .stack-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.stack-form { flex-direction: column; align-items: stretch; max-width: 640px; }
input, button, textarea, select {
  font: inherit;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}
textarea { width: 100%; min-height: 140px; font-family: ui-monospace, Consolas, monospace; }
button {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  cursor: pointer;
  font-weight: 500;
}
button:hover { background: var(--accent-dark); }
a.btn, .btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff !important;
  font-size: 13px;
  font-weight: 500;
}
.linkish { background: transparent; color: var(--danger); border: none; padding: 0; }

.notice {
  background: #ecfdf3;
  border: 1px solid #abefc6;
  color: #067647;
  padding: 10px 12px;
  border-radius: 8px;
  margin-bottom: 12px;
}
.notice.error { background: #fef3f2; border-color: #fecdca; color: var(--danger); }

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    radial-gradient(1200px 500px at 20% -10%, rgba(74,124,111,.18), transparent 60%),
    linear-gradient(180deg, #fafaf7, #f0f0e8);
}
.login-card {
  width: min(400px, 92vw);
  background: #fff;
  padding: 32px 28px;
  border-radius: 14px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.login-card .mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--soft); color: var(--accent-dark);
  display: grid; place-items: center; font-weight: 700; margin-bottom: 8px;
}
.login-card h1 { margin: 0; font-size: 22px; letter-spacing: .02em; }
.login-card p { margin: 0 0 10px; color: var(--muted); font-size: 14px; }
.login-card label { font-size: 13px; font-weight: 500; margin-top: 6px; }
.login-card button { margin-top: 12px; width: 100%; padding: 12px; }
.login-meta { margin-top: 10px; font-size: 12px; color: var(--muted); text-align: center; }

@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .side { width: 100%; border-right: none; border-bottom: 1px solid var(--line); }
  .cards { grid-template-columns: 1fr; }
}
