:root {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1d2924;
  background:
    radial-gradient(circle at 50% -10%, rgba(194, 146, 75, .14), transparent 35rem),
    #f4f1e8;
  line-height: 1.45;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; }
a { color: #2f5145; }
button, input, select { font: inherit; }
.topbar {
  min-height: 66px;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(47,81,69,.15);
  background: rgba(255,255,255,.80);
  backdrop-filter: blur(12px);
}
.topbar nav { display:flex; gap:18px; align-items:center; }
.brand { font-weight: 750; letter-spacing: .01em; }
.brand-link { color: inherit; text-decoration: none; display:flex; align-items:center; gap:10px; }
.brand-mini { width: 28px; height: 34px; object-fit: contain; flex: 0 0 auto; }
.shell {
  width: min(760px, calc(100% - 28px));
  margin: 38px auto 70px;
}
.narrow { width: min(480px, calc(100% - 28px)); }
.hero {
  display: flex;
  gap: 22px;
  align-items: center;
  justify-content: center;
  margin: 8px 0 30px;
  text-align: left;
}
.hero h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.15rem, 6vw, 3.7rem);
  font-weight: 600;
  letter-spacing: .045em;
}
.hero p { margin:.35rem 0 0; font-size:1.05rem; color:#53645d; }
.hero-logo {
  width: 84px;
  height: 112px;
  object-fit: contain;
  filter: drop-shadow(0 9px 14px rgba(33,31,27,.18));
}
.card {
  background: rgba(255,255,255,.91);
  border: 1px solid rgba(47,81,69,.13);
  border-radius: 22px;
  padding: 24px;
  margin: 18px 0;
  box-shadow: 0 14px 40px rgba(30,50,42,.07);
}
.card h1, .card h2 { margin-top:0; }
.auth-card { padding-top: 16px; }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #eef1ed;
  border-radius: 14px;
  padding: 5px;
  margin-bottom: 22px;
}
.auth-tab {
  border: 0;
  border-radius: 10px;
  padding: 11px 12px;
  background: transparent;
  color: #5a6862;
  font-weight: 700;
  cursor: pointer;
}
.auth-tab.active {
  background: #fff;
  color: #203f35;
  box-shadow: 0 3px 12px rgba(32,63,53,.08);
}
.tab-icon { margin-right: 6px; font-size: .72em; }
.auth-panel { min-height: 260px; }
.stack { display:grid; gap:14px; }
label span { display:block; margin-bottom:6px; font-weight:650; }
input, select {
  width:100%;
  padding:13px 14px;
  border-radius:12px;
  border:1px solid #b9c4be;
  background:white;
}
input:focus, select:focus {
  outline: 3px solid rgba(47,81,69,.12);
  border-color: #56776b;
}
.field-help {
  display:block;
  margin-top:7px;
  color:#687871;
  line-height:1.35;
}
button {
  border:0;
  border-radius:12px;
  padding:12px 16px;
  font-weight:700;
  cursor:pointer;
}
button:disabled { opacity:.55; cursor:default; }
.primary { background:#213e35; color:white; }
.primary:hover { background:#183129; }
.secondary { background:#e6ece8; color:#244238; }
.danger { background:#f6e0df; color:#8b2d29; }
.linklike { background:transparent; color:#2f5145; padding:4px; }
.wide { width:100%; }
.hidden { display:none !important; }
.error {
  padding:12px 14px;
  border-radius:12px;
  background:#fff0ef;
  color:#852c29;
  margin-bottom:16px;
}
.error-text { color:#852c29; }
.hint, .muted { color:#677770; font-size:.92rem; }
.status { min-height:1.4em; }
.code-label { text-align:center; color:#66766f; margin-top:20px; }
.activation-code {
  font-variant-numeric: tabular-nums;
  font-size: clamp(2.2rem, 10vw, 4.2rem);
  font-weight:800;
  letter-spacing:.16em;
  text-align:center;
  padding:14px 0;
}
.activation-code.small {
  text-align:left;
  font-size:1.5rem;
  letter-spacing:.1em;
  padding:0 0 5px;
}
.install-card {
  border-color: rgba(174,126,59,.26);
  background: linear-gradient(135deg, rgba(255,251,242,.97), rgba(249,244,231,.97));
}
.install-row { display:flex; align-items:center; gap:16px; margin-bottom:16px; }
.install-copy h2 { margin:0 0 4px; font-size:1.15rem; }
.install-copy p { margin:0; color:#5f6c66; }
.install-icon { width:64px; height:64px; border-radius:16px; }
.install-dialog {
  border: 0;
  border-radius: 22px;
  padding: 0;
  width: min(420px, calc(100% - 32px));
  box-shadow: 0 24px 80px rgba(0,0,0,.28);
}
.install-dialog::backdrop { background: rgba(20,28,25,.54); }
.dialog-body { padding: 26px; text-align:center; }
.dialog-icon { width:84px; height:84px; border-radius:20px; margin-bottom:8px; }
.admin-brand { display:flex; align-items:center; gap:10px; }
.admin-grid { width:min(1050px,calc(100% - 28px)); }
.admin-item {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:14px 0;
  border-top:1px solid #e0e6e2;
}
.inline-form { display:flex; gap:8px; align-items:center; flex:1; max-width:520px; }
.table-wrap { overflow:auto; }
table { border-collapse:collapse; width:100%; }
th, td { text-align:left; padding:10px; border-bottom:1px solid #e0e6e2; }
code { font-size:.9em; }

@media (max-width: 650px) {
  .topbar { padding:0 14px; }
  .topbar nav { gap:12px; font-size:.92rem; }
  .shell { margin:22px auto 48px; }
  .hero { align-items:center; justify-content:flex-start; gap:16px; }
  .hero-logo { width:66px; height:90px; }
  .hero h1 { font-size:2.25rem; }
  .hero p { font-size:.96rem; }
  .card { padding:18px; border-radius:18px; }
  .auth-tabs { margin-bottom:18px; }
  .auth-tab { padding:10px 7px; font-size:.9rem; }
  .admin-item, .inline-form { align-items:stretch; flex-direction:column; }
}
