/* =====================================================================
   Neuridion Community — the forum, in the site's own design.

   Written from scratch on 18.08.2026. The stylesheet this replaced
   belonged to a different product that happened to share the name, and
   nothing of it survives: no purple, no orange, no web font, no CDN.

   The design tokens come from ../assets/site.css, which layout.php
   loads first. Everything below is the forum's own furniture, built out
   of those same tokens — so the community and the product site are one
   design rather than two that resemble each other.
   ===================================================================== */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body { min-height: 100vh; display: flex; flex-direction: column; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { max-width: 1120px; margin: 0 auto; padding: 0 28px; }

/* ── The bar at the top ───────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 40;
  backdrop-filter: saturate(180%) blur(18px);
  background: color-mix(in srgb, var(--paper) 78%, transparent);
  border-bottom: 1px solid var(--line); }
.header-glow, .header-curve, .header-spacer { display: none; }

.nav-inner { max-width: 1120px; margin: 0 auto; padding: 0 28px; height: 62px;
  display: flex; align-items: center; gap: 13px; }

.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo img { width: 30px; height: 30px; border-radius: 7px; }
.nav-logo-text { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); }
.nav-logo-sub { font-size: 12px; color: var(--dim); border: 1px solid var(--line);
  padding: 2px 9px; border-radius: 999px; }

.nav-links { display: flex; gap: 20px; margin-left: 26px; font-size: 14.5px; color: var(--dim); }
.nav-links a { position: relative; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: -5px;
  height: 2px; background: var(--accent); border-radius: 2px; transition: right .25s ease; }
.nav-links a:hover { color: var(--ink); } .nav-links a:hover::after { right: 0; }

.nav-actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }

.nav-notif { position: relative; color: var(--dim); display: flex; align-items: center;
  padding: 7px; border-radius: 9px; transition: background .15s ease, color .15s ease; }
.nav-notif:hover { background: var(--soft); color: var(--ink); }
.notif-badge { position: absolute; top: -1px; right: -3px; min-width: 17px; height: 17px;
  padding: 0 4px; border-radius: 999px; background: var(--rose); color: #fff;
  font-size: 10.5px; font-weight: 700; display: grid; place-items: center;
  border: 2px solid var(--paper); }

.nav-user-menu { position: relative; }
.nav-user-menu > .avatar { cursor: pointer; }
.user-dropdown { position: absolute; right: 0; top: calc(100% + 10px); min-width: 190px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 13px;
  box-shadow: var(--shadow); padding: 6px; opacity: 0; visibility: hidden;
  transform: translateY(-6px); transition: opacity .17s ease, transform .17s ease, visibility .17s;
  z-index: 50; }
.nav-user-menu:hover .user-dropdown, .nav-user-menu:focus-within .user-dropdown {
  opacity: 1; visibility: visible; transform: none; }
.user-dropdown a { display: block; padding: 9px 13px; border-radius: 9px;
  font-size: 14.5px; color: var(--dim); transition: background .13s ease, color .13s ease; }
.user-dropdown a:hover { background: var(--soft); color: var(--ink); }
.user-dropdown hr { border: 0; border-top: 1px solid var(--line); margin: 5px 8px; }

.mobile-menu-btn { display: none; background: none; border: 0; cursor: pointer;
  flex-direction: column; gap: 4px; padding: 8px; }
.mobile-menu-btn span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); }
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-logo-sub { display: none; }
}

/* ── The band under the bar, on the front page ────────────────────── */
.hero { position: relative; overflow: hidden; padding: 56px 0 52px; text-align: center;
  border-bottom: 1px solid var(--line); background: var(--soft); }
.hero::before { content: ""; position: absolute; inset: -60% -20% auto -20%; height: 200%;
  pointer-events: none; filter: blur(8px);
  background: radial-gradient(520px 260px at 26% 30%, var(--glow-a), transparent 68%),
              radial-gradient(440px 240px at 76% 20%, var(--glow-b), transparent 68%); }
.hero h1 { position: relative; font-size: clamp(27px, 3.6vw, 38px); letter-spacing: -0.03em;
  line-height: 1.14; color: var(--ink); margin-bottom: 22px; }
.hero-search { position: relative; max-width: 560px; margin: 0 auto; display: flex;
  align-items: center; gap: 11px; padding: 0 17px;
  background: var(--paper); border: 1px solid var(--line); border-radius: 13px;
  box-shadow: 0 10px 30px rgba(0,0,0,.09); transition: border-color .18s ease, box-shadow .18s ease; }
.hero-search:focus-within { border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 18%, transparent); }
.hero-search svg { color: var(--dim); flex-shrink: 0; }
.hero-search input, .hero-search input[type="search"] {
  flex: 1; width: auto; border: 0; outline: 0; background: none; box-shadow: none;
  color: var(--ink); font: 16px/1 inherit; font-family: inherit; padding: 16px 0;
  -webkit-appearance: none; appearance: none; }
.hero-search input:focus, .hero-search input[type="search"]:focus {
  border: 0; box-shadow: none; }
.hero-search input::-webkit-search-decoration,
.hero-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.hero-search input::placeholder { color: var(--dim); }

/* ── Body ─────────────────────────────────────────────────────────── */
.main-content { flex: 1; padding: 40px 0 80px; }

.forum-layout { display: grid; grid-template-columns: 232px 1fr; gap: 32px; align-items: start; }
@media (max-width: 860px) { .forum-layout { grid-template-columns: 1fr; } }

.sidebar { position: sticky; top: 86px; }
@media (max-width: 860px) { .sidebar { position: static; } }
.sidebar-new { margin-bottom: 22px; }
.sidebar-nav { display: flex; flex-direction: column; gap: 2px; }
.sidebar-link { display: flex; align-items: center; gap: 11px; padding: 9px 12px;
  border-radius: 10px; font-size: 14.5px; color: var(--dim);
  transition: background .13s ease, color .13s ease; }
.sidebar-link:hover { background: var(--soft); color: var(--ink); }
.sidebar-link.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.sidebar-icon { font-size: 15px; width: 20px; text-align: center; flex-shrink: 0; }

/* ── Buttons ──────────────────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border-radius: 11px; border: 1px solid transparent; cursor: pointer;
  font: 620 15px/1 inherit; font-family: inherit; white-space: nowrap;
  transition: transform .13s ease, box-shadow .13s ease, background .13s ease, border-color .13s ease; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--paper); border-color: var(--ink);
  box-shadow: 0 8px 22px color-mix(in srgb, var(--ink) 20%, transparent); }
.btn-primary:hover { box-shadow: 0 12px 28px color-mix(in srgb, var(--ink) 26%, transparent); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-success { background: var(--green); color: #fff; border-color: var(--green); }
.btn-danger { background: transparent; color: var(--rose);
  border-color: color-mix(in srgb, var(--rose) 45%, transparent); }
.btn-danger:hover { background: color-mix(in srgb, var(--rose) 10%, transparent); }
.btn-sm { padding: 8px 15px; font-size: 14px; border-radius: 9px; }
.btn-xs { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }

/* ── The list of threads ──────────────────────────────────────────── */
.sort-tabs { display: flex; gap: 4px; margin-bottom: 18px; padding: 4px;
  background: var(--soft); border: 1px solid var(--line); border-radius: 12px; width: fit-content; }
.sort-tab { padding: 7px 15px; border-radius: 9px; font-size: 14px; color: var(--dim);
  transition: background .14s ease, color .14s ease; }
.sort-tab:hover { color: var(--ink); }
.sort-tab.active { background: var(--paper); color: var(--ink); font-weight: 620;
  box-shadow: 0 1px 3px rgba(0,0,0,.14); }

.thread-card { display: grid; grid-template-columns: auto 1fr; gap: 16px;
  padding: 20px 22px; margin-bottom: 12px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--paper);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease; }
.thread-card:hover { transform: translateY(-2px); box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.thread-card-left { position: relative; }
.thread-card-header { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 7px; }
.thread-card-title { font-size: 17.5px; font-weight: 640; letter-spacing: -0.012em;
  color: var(--ink); line-height: 1.32; margin-bottom: 5px; }
.thread-card:hover .thread-card-title { color: var(--accent); }
.thread-card-preview { font-size: 14.5px; color: var(--dim); line-height: 1.55; margin-bottom: 11px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thread-card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-size: 13px; color: var(--dim); }
.meta-user { font-weight: 620; color: var(--ink); }
.meta-dot { opacity: .45; }

.category-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px;
  border-radius: 999px; font-size: 12.5px; font-weight: 620; }
.category-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.pin-badge, .lock-badge { font-size: 12px; color: var(--dim); }
.solved-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px;
  border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--green);
  background: color-mix(in srgb, var(--green) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--green) 40%, transparent); }
.solved-badge-small { position: absolute; right: -4px; bottom: -4px;
  width: 19px; height: 19px; border-radius: 50%; background: var(--green); color: #fff;
  font-size: 11px; font-weight: 700; display: grid; place-items: center;
  border: 2px solid var(--paper); }

.avatar { border-radius: 50%; display: grid; place-items: center; color: #fff;
  font-weight: 700; flex-shrink: 0; line-height: 1; }

.empty-state { text-align: center; padding: 70px 20px; border: 1px dashed var(--line);
  border-radius: var(--radius); background: var(--soft); }
.empty-state svg { opacity: .5; margin-bottom: 14px; }
.empty-state p { color: var(--dim); margin-bottom: 18px; font-size: 16px; }
.search-info { margin-bottom: 16px; color: var(--dim); font-size: 15px; }

.join-banner { display: flex; align-items: center; justify-content: space-between; gap: 22px;
  flex-wrap: wrap; padding: 22px 24px; margin-bottom: 22px; border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  background: var(--accent-soft); }
.join-banner h3 { font-size: 17px; color: var(--ink); margin-bottom: 3px; }
.join-banner p { font-size: 14.5px; color: var(--dim); }
.join-banner-actions { display: flex; gap: 10px; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 6px;
  margin-top: 30px; flex-wrap: wrap; }
.pagination-btn, .pagination-num { padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--line); font-size: 14px; color: var(--dim); background: var(--paper);
  transition: border-color .14s ease, color .14s ease; }
.pagination-btn:hover, .pagination-num:hover { border-color: var(--accent); color: var(--accent); }
.pagination-num.active { background: var(--ink); color: var(--paper); border-color: var(--ink); font-weight: 620; }
.pagination-dots { color: var(--dim); padding: 0 4px; }

/* ── One thread ───────────────────────────────────────────────────── */
.thread-area { max-width: 860px; }
.breadcrumb { display: flex; align-items: center; gap: 9px; flex-wrap: wrap;
  font-size: 13.5px; color: var(--dim); margin-bottom: 18px; }
.breadcrumb a:hover { color: var(--accent); }
.breadcrumb-sep { opacity: .45; }
.thread-title { font-size: clamp(25px, 3.2vw, 33px); letter-spacing: -0.028em;
  line-height: 1.16; color: var(--ink); margin-bottom: 20px; }
.section-heading, .replies-heading { font-size: 18px; letter-spacing: -0.015em;
  color: var(--ink); margin: 38px 0 16px; }

.post-card, .post-content { border-radius: var(--radius); }
.post-header { display: flex; align-items: center; gap: 12px; margin-bottom: 15px; }
.post-author { font-weight: 640; color: var(--ink); font-size: 15px; }
.post-time { font-size: 13px; color: var(--dim); }
.post-body { padding: 24px 26px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--paper); margin-bottom: 16px; }
.post-content { display: flex; gap: 16px; }
.post-left { display: flex; flex-direction: column; align-items: center; gap: 9px; }
.post-meta { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--dim); }
.post-footer, .post-actions { display: flex; align-items: center; gap: 10px;
  flex-wrap: wrap; margin-top: 15px; padding-top: 14px; border-top: 1px solid var(--line); }
.post-vote { display: flex; align-items: center; gap: 7px; }
.like-count { font-variant-numeric: tabular-nums; font-weight: 620; color: var(--ink); }
.solution-label { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px;
  font-weight: 700; color: var(--green); }
.replies-section { margin-top: 10px; }
.locked-notice, .login-prompt { padding: 18px 22px; border-radius: 14px; font-size: 15px;
  color: var(--dim); text-align: center; border: 1px dashed var(--line); background: var(--soft); }
.locked-notice { border-color: color-mix(in srgb, var(--amber) 55%, transparent);
  background: color-mix(in srgb, var(--amber) 9%, transparent); }

/* A post that somebody marked as the answer earns a visible frame. */
.post-body.is-solution { border-color: color-mix(in srgb, var(--green) 45%, transparent);
  background: color-mix(in srgb, var(--green) 5%, transparent); }

/* ── What people write: Markdown ──────────────────────────────────── */
.markdown-body { color: var(--ink); font-size: 16px; line-height: 1.68; overflow-wrap: anywhere; }
.markdown-body > *:first-child { margin-top: 0; }
.markdown-body > *:last-child { margin-bottom: 0; }
.markdown-body p { margin: 0 0 15px; }
.markdown-body h1, .markdown-body h2, .markdown-body h3, .markdown-body h4 {
  margin: 26px 0 10px; letter-spacing: -0.018em; line-height: 1.25; }
.markdown-body h1 { font-size: 25px; } .markdown-body h2 { font-size: 21px; }
.markdown-body h3 { font-size: 18px; } .markdown-body h4 { font-size: 16px; }
.markdown-body ul, .markdown-body ol { margin: 0 0 15px; padding-left: 24px; }
.markdown-body li { margin: 4px 0; }
.markdown-body a { color: var(--accent); text-decoration: underline;
  text-underline-offset: 2px; text-decoration-thickness: 1px; }
.markdown-body blockquote { margin: 0 0 15px; padding: 3px 0 3px 18px;
  border-left: 3px solid var(--line); color: var(--dim); }
.markdown-body code { font: 0.88em ui-monospace, "SF Mono", Menlo, monospace;
  background: var(--soft); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; }
.markdown-body pre { margin: 0 0 16px; padding: 18px 20px; border-radius: 14px;
  overflow-x: auto; background: var(--code-bg); border: 1px solid var(--code-line);
  font: 13.5px/1.7 ui-monospace, "SF Mono", Menlo, monospace; }
.markdown-body pre code { background: none; border: 0; padding: 0; font-size: inherit; }
.markdown-body img { border-radius: 12px; border: 1px solid var(--line); }
.markdown-body table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 15px; }
.markdown-body th, .markdown-body td { padding: 9px 12px; text-align: left;
  border-bottom: 1px solid var(--line); }
.markdown-body th { color: var(--ink); font-weight: 620; background: var(--soft); }
.markdown-body hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }
.mention { color: var(--accent); font-weight: 620; }

/* ── Forms ────────────────────────────────────────────────────────── */
.form-page { max-width: 780px; margin: 0 auto; }
.form-card, .admin-card, .profile-header-card, .settings-form, .reply-form-section,
.notifications-area > .notification-list {
  padding: 26px 28px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--paper); }
.form-group { margin-bottom: 18px; }
.form-group-sm { margin-bottom: 12px; }
.form-group label, .settings-form label { display: block; margin-bottom: 7px;
  font-size: 13.5px; font-weight: 620; color: var(--ink); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .form-row { grid-template-columns: 1fr; } }
.form-hint { font-size: 13px; color: var(--dim); margin-top: 6px; }
.form-actions { display: flex; gap: 11px; align-items: center; margin-top: 22px; flex-wrap: wrap; }
.form-footer, .auth-footer { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--line);
  font-size: 14.5px; color: var(--dim); text-align: center; }
.form-link, .auth-footer a, .form-footer a { color: var(--accent); }
.form-link:hover { text-decoration: underline; }
.inline-form { display: inline; }

input[type="text"], input[type="email"], input[type="password"], input[type="search"],
input[type="url"], select, textarea {
  width: 100%; padding: 11px 14px; border-radius: 11px; background: var(--paper);
  border: 1px solid var(--line); color: var(--ink); font: 15px/1.5 inherit; font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
textarea { resize: vertical; min-height: 150px; line-height: 1.65; }
input::placeholder, textarea::placeholder { color: var(--dim); }
.input-disabled, input:disabled, select:disabled { background: var(--soft); color: var(--dim); cursor: not-allowed; }
select { appearance: none; padding-right: 34px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%),
                    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 17px) center, calc(100% - 12px) center;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.role-select { width: auto; min-width: 140px; }
.color-picker-row { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; }
.color-picker-row input[type="radio"] { display: none; }
.color-picker-row label { width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  margin: 0; border: 2px solid transparent; transition: transform .13s ease, border-color .13s ease; }
.color-picker-row input[type="radio"]:checked + label { border-color: var(--ink); transform: scale(1.15); }

.editor-toolbar { display: flex; gap: 5px; flex-wrap: wrap; padding: 7px;
  border: 1px solid var(--line); border-bottom: 0; border-radius: 11px 11px 0 0;
  background: var(--soft); }
.editor-toolbar + textarea { border-radius: 0 0 11px 11px; }
.editor-btn { padding: 5px 10px; border-radius: 7px; border: 1px solid transparent;
  background: none; cursor: pointer; color: var(--dim);
  font: 600 13px/1 ui-monospace, "SF Mono", Menlo, monospace;
  transition: background .13s ease, color .13s ease; }
.editor-btn:hover { background: var(--paper); color: var(--ink); border-color: var(--line); }

/* ── Signing in and up ────────────────────────────────────────────── */
.auth-page { max-width: 430px; margin: 60px auto; }
.auth-card { padding: 32px 30px; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--paper); box-shadow: var(--shadow); }
.auth-header { text-align: center; margin-bottom: 26px; }
.auth-header img { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 14px; }
.auth-header h1 { font-size: 24px; letter-spacing: -0.025em; color: var(--ink); margin-bottom: 6px; }
.auth-header p { font-size: 15px; color: var(--dim); }

/* ── Profile ──────────────────────────────────────────────────────── */
.profile-area { max-width: 860px; }
.profile-header-card { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.profile-info h1 { font-size: 25px; letter-spacing: -0.025em; color: var(--ink); margin-bottom: 5px; }
.profile-joined, .profile-last-seen { font-size: 13.5px; color: var(--dim); }
.profile-stats, .admin-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px; margin-bottom: 26px; }
.stat-card { padding: 20px; border-radius: var(--radius); background: var(--soft);
  border: 1px solid var(--line); }
.stat-number { display: block; font-size: 29px; font-weight: 700; letter-spacing: -0.03em;
  color: var(--ink); line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 13.5px; color: var(--dim); }

/* ── Notifications ────────────────────────────────────────────────── */
.notifications-area { max-width: 760px; }
.notifications-header { display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.notifications-header h1 { font-size: 25px; letter-spacing: -0.025em; color: var(--ink); }
.notification-list { display: flex; flex-direction: column; }
.notification-list > a, .notification-list > div { display: flex; gap: 14px; align-items: flex-start;
  padding: 15px 0; border-bottom: 1px solid var(--line); }
.notification-list > *:last-child { border-bottom: 0; }
.notif-icon { font-size: 17px; flex-shrink: 0; }
.notif-body { flex: 1; font-size: 14.5px; color: var(--dim); }
.notif-thread { color: var(--ink); font-weight: 620; }
.notif-time { font-size: 12.5px; color: var(--dim); flex-shrink: 0; }

/* ── Administration ───────────────────────────────────────────────── */
.admin-nav { display: flex; gap: 4px; margin-bottom: 24px; padding: 4px;
  background: var(--soft); border: 1px solid var(--line); border-radius: 12px; width: fit-content; }
.admin-nav a { padding: 7px 15px; border-radius: 9px; font-size: 14px; color: var(--dim); }
.admin-nav a:hover { color: var(--ink); }
.admin-nav a.active { background: var(--paper); color: var(--ink); font-weight: 620;
  box-shadow: 0 1px 3px rgba(0,0,0,.14); }
.admin-card { margin-bottom: 20px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.admin-table th, .admin-table td { padding: 11px 12px; text-align: left;
  border-bottom: 1px solid var(--line); }
.admin-table th { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--dim); font-weight: 620; }
.admin-table td { color: var(--dim); }
.admin-user-link { color: var(--ink); font-weight: 620; }
.admin-item { display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding: 14px 0; border-bottom: 1px solid var(--line); }
.admin-item:last-child { border-bottom: 0; }
.admin-item-actions { display: flex; gap: 8px; }
.admin-form, .admin-edit-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.admin-form input, .admin-edit-form input { width: auto; min-width: 150px; }

.settings-section-title { font-size: 16px; color: var(--ink); margin: 26px 0 14px; }
.settings-section-title:first-child { margin-top: 0; }
.settings-divider { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }

/* ── Flash messages ───────────────────────────────────────────────── */
.flash { padding: 13px 0; font-size: 15px; border-bottom: 1px solid var(--line); }
.flash .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.flash-success { background: color-mix(in srgb, var(--green) 12%, transparent); color: var(--green); }
.flash-error   { background: color-mix(in srgb, var(--rose) 12%, transparent);  color: var(--rose); }
.flash-info    { background: var(--accent-soft); color: var(--accent); }
.flash-close { background: none; border: 0; cursor: pointer; color: inherit;
  font-size: 22px; line-height: 1; opacity: .6; }
.flash-close:hover { opacity: 1; }

/* ── Foot ─────────────────────────────────────────────────────────── */
.site-footer { padding: 34px 0 60px; border-top: 1px solid var(--line);
  color: var(--dim); font-size: 14px; }
.site-footer .container { display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; }
.site-footer a:hover { color: var(--accent); text-decoration: underline; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; }
}

/* ── What forum.js toggles ────────────────────────────────────────── */
.nav-user-menu.open .user-dropdown { opacity: 1; visibility: visible; transform: none; }
.sidebar-overlay { position: fixed; inset: 0; z-index: 45; background: rgba(0,0,0,.45);
  opacity: 0; visibility: hidden; transition: opacity .22s ease, visibility .22s; }
.sidebar-overlay.open { opacity: 1; visibility: visible; }
@media (max-width: 860px) {
  .mobile-menu-btn { display: flex; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 46; width: 264px;
    padding: 22px; overflow-y: auto; background: var(--paper);
    border-right: 1px solid var(--line); transform: translateX(-100%);
    transition: transform .24s cubic-bezier(.2,.7,.3,1); }
  .sidebar.open { transform: none; }
}
