/* One ambient light, the forest of the mark rising from the top-left corner. */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(0, 92, 74, .38), transparent 62%),
    radial-gradient(700px 420px at 100% 0%, rgba(120, 96, 255, .07), transparent 60%);
}
::selection { background: rgba(41, 240, 180, .28); color: #fff; }
* { scrollbar-width: thin; scrollbar-color: rgba(214, 255, 240, .16) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(214, 255, 240, .14); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-track { background: transparent; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.hidden { display: none !important; }
a { color: var(--accent-2); text-underline-offset: 3px; }
svg.i { width: 18px; height: 18px; flex-shrink: 0; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- buttons ---------- */
.btn {
  border: 1px solid transparent; border-radius: var(--pill);
  padding: 9px 18px; font-size: 13px; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: background .2s var(--ease), border-color .2s var(--ease), color .2s, transform .2s var(--ease);
  color: var(--text); background: var(--panel-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap; min-height: 38px;
}
.btn svg.i { width: 15px; height: 15px; }
.btn:hover { background: var(--raise); }
.btn:active { transform: scale(.97); }
.btn:disabled { cursor: not-allowed; opacity: .45; transform: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text-dim); }
.btn-ghost:hover { color: var(--text); background: var(--panel-2); border-color: rgba(214, 255, 240, .2); }
.btn-ghost.archive-active { color: var(--accent); border-color: rgba(41, 240, 180, .45); background: var(--accent-soft); }
.btn-danger { background: transparent; border-color: rgba(255, 107, 107, .35); color: #ff9a9a; }
.btn-danger:hover { background: rgba(255, 107, 107, .12); }
.btn-sm { padding: 6px 14px; font-size: 12.5px; min-height: 34px; }
.btn-block { width: 100%; }
.icon-btn {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--border-soft); color: var(--text-dim);
  font-size: 20px; cursor: pointer; line-height: 1; padding: 0; transition: .2s var(--ease);
}
.icon-btn:hover { color: var(--text); background: var(--raise); }

input, select, textarea {
  width: 100%; background: var(--bg-2); border: 1px solid var(--border);
  border-radius: 12px; color: var(--text); padding: 10px 13px;
  font-size: 13.5px; font-family: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
  caret-color: var(--accent);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, select:focus, textarea:focus { border-color: rgba(41, 240, 180, .6); box-shadow: 0 0 0 3px rgba(41, 240, 180, .12); }
input[type="checkbox"] { accent-color: var(--accent); width: 16px; height: 16px; }
select option { background: var(--panel-2); }
.input-sm { width: 240px; padding: 8px 14px; font-size: 13px; border-radius: var(--pill); min-height: 34px; }
label { display: block; font-size: 12px; color: var(--text-dim); font-weight: 600; margin: 14px 0 6px; }

.password-wrap { display: flex; gap: 8px; align-items: center; }
.password-wrap input { flex: 1; }
.eye-btn {
  display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0;
  background: var(--panel-2); border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 12px; cursor: pointer;
}
.eye-btn:hover { color: var(--text); }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: 12px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  background: var(--forest) url("../logo.svg") center / cover no-repeat;
  font-size: 0; color: transparent;
  box-shadow: inset 0 0 0 1px rgba(41, 240, 180, .22);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.brand-text span { font-size: 11.5px; color: var(--muted); }

/* ---------- login ---------- */
.login-screen { position: fixed; inset: 0; display: grid; place-items: center; padding: 20px; overflow-y: auto;
  background: radial-gradient(900px 600px at 50% -20%, rgba(0, 92, 74, .55), transparent 65%), var(--bg); }
.login-card { width: 400px; max-width: 100%; background: var(--panel); border: 1px solid var(--border-soft);
  border-radius: 24px; padding: 34px 30px 26px; box-shadow: var(--shadow); }
.login-card .brand { margin-bottom: 22px; }
.login-card .brand-mark { width: 46px; height: 46px; border-radius: 13px; }
.login-sub { color: var(--text-dim); font-size: 14px; margin: 0 0 8px; max-width: 34ch; }
.login-err { color: #ff9a9a; font-size: 12.5px; min-height: 16px; margin: 12px 0 0; text-align: center; }
#login-btn { margin-top: 22px; min-height: 44px; font-size: 14px; }

/* ---------- app shell ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; display: flex; flex-direction: column;
  padding: 22px 14px 18px; position: sticky; top: 0; height: 100vh;
  border-right: 1px solid var(--border-soft); background: rgba(5, 9, 8, .55);
}
.sidebar-brand { padding: 2px 8px 26px; }
.nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-label { font-size: 11px; color: var(--muted); font-weight: 600; padding: 16px 12px 6px; }
.nav-item {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: none;
  background: none; color: var(--text-dim); font-size: 13.5px; font-weight: 600;
  border-radius: 12px; cursor: pointer; font-family: inherit; text-align: left;
  transition: background .2s var(--ease), color .2s;
}
.nav-item .ni { display: grid; place-items: center; width: 20px; }
.nav-item:hover { background: var(--panel-2); color: var(--text); }
.nav-item.active { background: var(--panel-2); color: var(--text); }
.nav-item.active .ni { color: var(--accent); }
.nav-item.active::after { content: ""; position: absolute; right: 12px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(41, 240, 180, .14); }
.nav-more { display: none; }
.sidebar-foot { border-top: 1px solid var(--border-soft); padding: 14px 4px 0; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text); font-weight: 600; min-width: 0; }
.who #admin-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(41, 240, 180, .14); flex-shrink: 0; }

.mobile-top { display: none; }
.main { flex: 1; min-width: 0; padding: 30px 36px 48px; max-width: 1480px; width: 100%; margin: 0 auto; }
.view { animation: view-in .45s var(--ease); }
@keyframes view-in { from { opacity: .001; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; gap: 16px; flex-wrap: wrap; }
.view-head h1 { font-size: 30px; font-weight: 700; margin: 0 0 6px; letter-spacing: -.03em; line-height: 1.1; }
.view-head p { margin: 0; color: var(--text-dim); font-size: 13.5px; max-width: 72ch; }
.head-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
