:root {
    --bg: #080a14;
    --bg-soft: #10152b;
    --card: rgba(17, 24, 50, 0.78);
    --card-border: rgba(255, 255, 255, 0.12);
    --text: #f3f6ff;
    --muted: #a7b1cc;
    --primary: #5b8cff;
    --primary-strong: #366ef7;
    --accent: #7df6d9;
    --shadow: 0 18px 35px rgba(0, 0, 0, 0.35);
    --body-bg-mid: #17234e;
    --body-bg-deep: #05070f;
    --glow-a: rgba(91, 140, 255, 0.18);
    --glow-b: rgba(125, 246, 217, 0.1);
    --glow-c: rgba(54, 110, 247, 0.2);
    --topbar-bg: rgba(7, 10, 20, 0.72);
}

html[data-ui-mode="light"] {
    color-scheme: light;
    --bg: #f4f7ff;
    --bg-soft: #e4ebff;
    --card: rgba(255, 255, 255, 0.92);
    --card-border: rgba(20, 45, 100, 0.1);
    --text: #0c1430;
    --muted: #4a5878;
    --primary: #366ef7;
    --primary-strong: #214dbe;
    --accent: #0d9f84;
    --shadow: 0 18px 42px rgba(40, 70, 140, 0.14);
    --body-bg-mid: #c5d6ff;
    --body-bg-deep: #eef2ff;
    --glow-a: rgba(54, 110, 247, 0.22);
    --glow-b: rgba(13, 159, 132, 0.12);
    --glow-c: rgba(99, 102, 241, 0.18);
    --topbar-bg: rgba(255, 255, 255, 0.82);
}

html[data-ui-preset="aurora"] {
    --primary: #a78bfa;
    --primary-strong: #7c3aed;
    --accent: #5eead4;
    --glow-a: rgba(167, 139, 250, 0.22);
    --glow-b: rgba(94, 234, 212, 0.12);
    --glow-c: rgba(124, 58, 237, 0.2);
}

html[data-ui-preset="ember"] {
    --primary: #fb7185;
    --primary-strong: #e11d48;
    --accent: #fcd34d;
    --glow-a: rgba(251, 113, 133, 0.22);
    --glow-b: rgba(252, 211, 77, 0.12);
    --glow-c: rgba(225, 29, 72, 0.2);
}

html[data-ui-preset="neon"] {
    --primary: #22d3ee;
    --primary-strong: #06b6d4;
    --accent: #f472b6;
    --glow-a: rgba(34, 211, 238, 0.2);
    --glow-b: rgba(244, 114, 182, 0.14);
    --glow-c: rgba(6, 182, 212, 0.22);
}

html[data-ui-preset="aurora"][data-ui-mode="light"] {
    --primary: #6d28d9;
    --primary-strong: #5b21b6;
    --accent: #0f766e;
}

html[data-ui-preset="ember"][data-ui-mode="light"] {
    --primary: #be123c;
    --accent: #b45309;
}

html[data-ui-preset="neon"][data-ui-mode="light"] {
    --primary: #0891b2;
    --accent: #db2777;
}

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

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    color: var(--text);
    background: radial-gradient(circle at 20% 15%, var(--body-bg-mid) 0%, var(--bg) 42%, var(--body-bg-deep) 100%);
    overflow-x: hidden;
    transition: color 0.35s ease, background 0.55s ease;
}

.bg-gradient {
    position: fixed;
    inset: -20% -10%;
    background: conic-gradient(from 180deg at 50% 50%, var(--glow-a), var(--glow-b), var(--glow-c), transparent 70%);
    filter: blur(60px);
    pointer-events: none;
    z-index: -1;
    animation: pulse 14s ease-in-out infinite alternate;
    transition: background 0.6s ease, filter 0.6s ease;
}

.container {
    width: min(1100px, calc(100% - 2rem));
    margin: 0 auto;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    backdrop-filter: blur(10px);
    background: var(--topbar-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: background 0.35s ease, border-color 0.35s ease;
}

html[data-ui-mode="light"] .topbar {
    border-bottom-color: rgba(20, 45, 100, 0.08);
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
}

.brand-dot {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    box-shadow: 0 0 14px rgba(91, 140, 255, 0.9);
}

.nav {
    display: flex;
    gap: 1rem;
}

.nav a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav a:hover {
    color: var(--text);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

.actions-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.7rem;
}

.user-toolbar-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 1.05rem;
    text-decoration: none;
    cursor: pointer;
    color: #061024;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: 2px solid rgba(255, 255, 255, 0.22);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 6px 16px rgba(0, 0, 0, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.user-toolbar-avatar:hover {
    transform: translateY(-2px);
    border-color: rgba(125, 246, 217, 0.55);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 10px 22px rgba(54, 110, 247, 0.35);
}

.user-toolbar-dropdown {
    position: relative;
    list-style: none;
}

.user-toolbar-dropdown > summary {
    list-style: none;
}

.user-toolbar-dropdown > summary::-webkit-details-marker {
    display: none;
}

.user-toolbar-dropdown > summary.user-toolbar-avatar {
    display: inline-flex;
    list-style: none;
}

.user-toolbar-avatar--image {
    padding: 0;
    overflow: hidden;
    border-radius: 50%;
    line-height: 0;
    flex-shrink: 0;
}

.user-toolbar-avatar-img {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
    min-height: 0;
    object-fit: cover;
    border-radius: 50%;
    /* harte Kreis-Maske: zuverlässiger als nur border-radius bei <img> in <summary> */
    -webkit-clip-path: circle(50% at 50% 50%);
    clip-path: circle(50% at 50% 50%);
}

.user-toolbar-dropdown[open] > summary.user-toolbar-avatar {
    border-color: rgba(125, 246, 217, 0.55);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.45),
        0 8px 20px rgba(54, 110, 247, 0.35);
}

.user-toolbar-dropdown-panel {
    position: absolute;
    z-index: 100;
    top: calc(100% + 0.55rem);
    right: 0;
    min-width: 12.75rem;
    max-width: min(92vw, 17rem);
    padding: 0.4rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: linear-gradient(180deg, rgba(22, 28, 52, 0.98) 0%, rgba(10, 14, 28, 0.99) 100%);
    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.55),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.user-toolbar-dropdown-item {
    display: block;
    padding: 0.68rem 0.9rem;
    border-radius: 10px;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.user-toolbar-dropdown-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.user-toolbar-dropdown-item--danger {
    color: #ffc4cf;
    margin-top: 0.15rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0 0 10px 10px;
}

.user-toolbar-dropdown-item--danger:hover {
    background: rgba(255, 90, 120, 0.15);
    color: #fff;
}

.icon-toolbar-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 14px;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.16);
    background: linear-gradient(180deg, rgba(40, 48, 78, 0.95) 0%, rgba(18, 22, 40, 0.98) 100%);
    color: var(--text);
    text-decoration: none;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 4px 14px rgba(0, 0, 0, 0.35);
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.icon-toolbar-btn:hover {
    transform: translateY(-2px);
    border-color: rgba(125, 246, 217, 0.42);
    background: linear-gradient(180deg, rgba(55, 65, 100, 0.98) 0%, rgba(28, 34, 58, 0.99) 100%);
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 8px 20px rgba(0, 0, 0, 0.4);
}

.icon-toolbar-btn:active {
    transform: translateY(0);
}

.icon-toolbar-btn svg {
    flex-shrink: 0;
}

.icon-toolbar-btn--primary {
    border-color: rgba(91, 140, 255, 0.55);
    background: linear-gradient(180deg, rgba(100, 145, 255, 0.95) 0%, rgba(54, 110, 247, 0.98) 100%);
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 8px 22px rgba(54, 110, 247, 0.45);
}

.icon-toolbar-btn--primary:hover {
    border-color: rgba(125, 246, 217, 0.55);
    color: #fff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.28),
        0 12px 28px rgba(54, 110, 247, 0.5);
}

.icon-toolbar-btn--logout {
    border-color: rgba(255, 159, 177, 0.35);
    background: linear-gradient(180deg, rgba(70, 36, 48, 0.9) 0%, rgba(36, 18, 28, 0.95) 100%);
    color: #ffd0d8;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.08),
        0 4px 14px rgba(0, 0, 0, 0.35);
}

.icon-toolbar-btn--logout:hover {
    border-color: rgba(255, 159, 177, 0.65);
    background: linear-gradient(180deg, rgba(95, 45, 58, 0.95) 0%, rgba(48, 22, 32, 0.98) 100%);
    color: #fff;
}

.icon-toolbar-btn--badge-wrap {
    overflow: visible;
}

.icon-toolbar-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 20px;
    text-align: center;
    color: #061024;
    background: linear-gradient(135deg, var(--accent), #5bffc8);
    border: 2px solid rgba(8, 10, 20, 0.85);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.btn {
    border: 0;
    border-radius: 12px;
    padding: 0.65rem 1rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn.primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #fff;
    box-shadow: 0 10px 20px rgba(54, 110, 247, 0.35);
}

.btn.ghost {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
}

.hero {
    margin: 2.4rem 0 1.8rem;
    padding: 2rem;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(20, 30, 62, 0.72), rgba(14, 20, 42, 0.72));
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
}

.eyebrow {
    margin: 0;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
}

h1, h2, h3 {
    margin-top: 0.4rem;
    margin-bottom: 0.5rem;
}

h1 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    line-height: 1.15;
}

.lead {
    color: var(--muted);
    max-width: 70ch;
}

.stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.8rem;
    margin-top: 1.4rem;
}

.stat-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 1rem;
}

.stat-value {
    display: block;
    font-size: 1.7rem;
    font-weight: 800;
}

.stat-label {
    color: var(--muted);
    font-size: 0.9rem;
}

.category,
.latest,
.thread-head,
.reply-box {
    margin-bottom: 1.2rem;
    padding: 1.2rem;
    border-radius: 18px;
    background: var(--card);
    border: 1px solid var(--card-border);
    box-shadow: var(--shadow);
}

.category-head p {
    margin-top: 0.15rem;
    color: var(--muted);
}

.board-grid {
    display: grid;
    gap: 0.8rem;
}

.board-grid--single {
    max-width: 36rem;
}

.board-card {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    border-radius: 14px;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.board-card:hover {
    transform: translateY(-3px);
    border-color: rgba(125, 246, 217, 0.45);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}

.board-card--support {
    background: linear-gradient(125deg, rgba(91, 140, 255, 0.14), rgba(125, 246, 217, 0.08), rgba(54, 110, 247, 0.1));
    border-color: rgba(91, 140, 255, 0.22);
    animation: boardGlow 7s ease-in-out infinite alternate;
}

@keyframes boardGlow {
    0% {
        box-shadow: 0 0 0 rgba(91, 140, 255, 0);
    }
    100% {
        box-shadow: 0 10px 36px rgba(91, 140, 255, 0.18);
    }
}

.board-meta-pill {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.28rem 0.65rem;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(91, 140, 255, 0.35), rgba(125, 246, 217, 0.2));
    color: var(--text);
}

html[data-ui-mode="light"] .board-card,
html[data-ui-mode="light"] .topic-row {
    border-color: rgba(20, 45, 100, 0.1);
    background: rgba(255, 255, 255, 0.72);
}

.board-title {
    color: var(--text);
    text-decoration: none;
    font-weight: 650;
}

.board-main p,
.board-meta {
    color: var(--muted);
}

.board-meta {
    display: flex;
    flex-direction: column;
    text-align: right;
    gap: 0.3rem;
    font-size: 0.9rem;
}

.topic-list {
    display: grid;
    gap: 0.7rem;
}

.topic-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    text-decoration: none;
    color: inherit;
    padding: 0.9rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.topic-row:hover {
    border-color: rgba(91, 140, 255, 0.42);
}

.topic-row h3 {
    margin: 0;
    font-size: 1rem;
}

.topic-row p,
.topic-row-meta {
    margin: 0.2rem 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.topic-row-meta {
    display: flex;
    flex-direction: column;
    text-align: right;
    gap: 0.2rem;
}

.support-thread {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.support-msg {
    border-radius: 16px;
    padding: 1rem 1.1rem;
    border: 1px solid var(--card-border);
    background: var(--card);
    box-shadow: var(--shadow);
    animation: supportMsgIn 0.45s ease both;
}

.support-msg--root {
    border-color: rgba(91, 140, 255, 0.22);
    background: linear-gradient(165deg, rgba(91, 140, 255, 0.08), rgba(17, 24, 50, 0.85));
}

.support-msg-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    margin-bottom: 0.55rem;
    font-size: 0.88rem;
    color: var(--muted);
}

.support-msg-head strong {
    color: var(--text);
    font-weight: 700;
}

.support-msg-date {
    font-variant-numeric: tabular-nums;
}

.support-msg-body {
    line-height: 1.55;
    word-break: break-word;
}

.support-msg-empty {
    color: var(--muted);
    font-style: normal;
    font-weight: 500;
}

.support-attach-list {
    margin: 0.65rem 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.support-attach-link {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.support-attach-link:hover {
    text-decoration: underline;
}

.support-attach-meta {
    margin-left: 0.45rem;
    font-size: 0.78rem;
    color: var(--muted);
}

@keyframes supportMsgIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-form input[type="file"] {
    width: 100%;
    font-size: 0.88rem;
}

.thread-layout {
    margin-top: 2rem;
}

.posts {
    display: grid;
    gap: 1rem;
}

.post-card {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1rem;
    padding: 1rem;
    border-radius: 16px;
    background: var(--card);
    border: 1px solid var(--card-border);
}

.post-author {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding-right: 1rem;
}

.avatar {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-weight: 800;
    font-size: 1.2rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #061024;
}

.avatar-image {
    display: block;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid rgba(255, 255, 255, 0.18);
    -webkit-clip-path: circle(50% at 50% 50%);
    clip-path: circle(50% at 50% 50%);
}

.post-author h3 {
    margin-bottom: 0.2rem;
}

.post-author p {
    margin-top: 0;
    color: var(--muted);
}

.post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    color: var(--muted);
}

.post-actions {
    display: flex;
    gap: 0.45rem;
}

.post-actions button {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border-radius: 10px;
    padding: 0.45rem 0.65rem;
    cursor: pointer;
}

.post-actions input,
.post-actions select {
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border-radius: 10px;
    padding: 0.4rem 0.55rem;
}

.reply-box textarea {
    width: 100%;
    min-height: 150px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(8, 12, 24, 0.95);
    color: var(--text);
    padding: 0.9rem;
    resize: vertical;
}

.admin-panels {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.admin-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.admin-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.55rem 0.9rem;
    border-radius: 10px;
    text-decoration: none;
    color: var(--muted);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.03);
    font-weight: 600;
    transition: 0.18s ease;
}

.admin-tab:hover {
    color: var(--text);
    border-color: rgba(125, 246, 217, 0.35);
}

.admin-tab.active {
    color: #fff;
    border-color: rgba(91, 140, 255, 0.6);
    background: linear-gradient(135deg, rgba(91, 140, 255, 0.7), rgba(54, 110, 247, 0.68));
}

/* ——— Admin App (admin.php) ——— */
.admin-app {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

.thread-head.admin-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(125, 246, 217, 0.18);
    background:
        radial-gradient(1200px 400px at 10% -20%, rgba(91, 140, 255, 0.35), transparent 55%),
        radial-gradient(900px 360px at 90% 120%, rgba(125, 246, 217, 0.12), transparent 50%),
        linear-gradient(165deg, rgba(18, 24, 48, 0.96) 0%, rgba(8, 10, 22, 0.98) 100%);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.thread-head.admin-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(120deg, transparent 40%, rgba(255, 255, 255, 0.04) 50%, transparent 60%);
    opacity: 0.5;
}

.admin-role-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #0a1020;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: 1px solid rgba(255, 255, 255, 0.25);
}

.admin-hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1rem;
}

.admin-tabs-wrap {
    margin-bottom: 1.25rem;
}

.admin-tabs-wrap .admin-tabs {
    padding: 0.35rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(4, 8, 18, 0.55);
    backdrop-filter: blur(10px);
}

.admin-order-form-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.btn.btn-sm {
    padding: 0.38rem 0.65rem;
    font-size: 0.82rem;
    border-radius: 10px;
}

.btn.danger,
.btn.btn-sm.danger {
    border-color: rgba(255, 120, 150, 0.45);
    background: linear-gradient(180deg, rgba(255, 90, 120, 0.35) 0%, rgba(180, 40, 70, 0.45) 100%);
    color: #fff;
}

.btn.danger:hover,
.btn.btn-sm.danger:hover {
    border-color: rgba(255, 170, 190, 0.65);
    filter: brightness(1.06);
}

.admin-forum-hub {
    display: flex;
    flex-direction: column;
    gap: 1.35rem;
}

.admin-hub-header {
    padding: 0.15rem 0 0.25rem;
}

.admin-hub-eyebrow {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(125, 246, 217, 0.85);
}

.admin-hub-title {
    margin: 0 0 0.5rem;
    font-size: clamp(1.45rem, 2.5vw, 1.85rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.admin-hub-lead {
    margin: 0;
    max-width: 52rem;
    color: var(--muted);
    line-height: 1.55;
}

.admin-hub-quick {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

@media (max-width: 720px) {
    .admin-hub-quick {
        grid-template-columns: 1fr;
    }
}

.admin-surface {
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 1.1rem 1.15rem 1.15rem;
    background: linear-gradient(180deg, rgba(22, 28, 52, 0.55) 0%, rgba(10, 14, 28, 0.72) 100%);
    box-shadow:
        0 14px 40px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.admin-surface--accent {
    border-color: rgba(91, 140, 255, 0.28);
    background: linear-gradient(180deg, rgba(30, 40, 78, 0.65) 0%, rgba(12, 16, 36, 0.85) 100%);
}

.admin-surface--wide {
    padding: 1.2rem 1.25rem 1.35rem;
}

.admin-surface-title {
    margin: 0 0 0.65rem;
    font-size: 1.05rem;
    font-weight: 800;
}

.admin-surface-hint {
    margin: 0 0 0.85rem;
    font-size: 0.9rem;
    color: var(--muted);
    line-height: 1.45;
}

.admin-surface-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.admin-form--tight {
    gap: 0.65rem;
}

.admin-field label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.8rem;
    font-weight: 700;
    color: rgba(203, 216, 255, 0.92);
    letter-spacing: 0.02em;
}

.admin-form .admin-field input,
.admin-form .admin-field textarea,
.admin-form .admin-field select,
.admin-form .admin-select {
    width: 100%;
    margin-bottom: 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(6, 10, 22, 0.92);
    color: var(--text);
    padding: 0.65rem 0.75rem;
    font: inherit;
}

.admin-form .admin-field textarea {
    resize: vertical;
    min-height: 4.5rem;
}

.admin-form--tight .admin-field textarea {
    min-height: 3.5rem;
}

.admin-form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.admin-check-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
}

.admin-check {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
}

.admin-check input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent);
}

.admin-card-top {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
}

.admin-drag-grip {
    flex: 0 0 auto;
    width: 14px;
    height: 22px;
    margin-top: 0.15rem;
    border-radius: 5px;
    background: repeating-linear-gradient(
        180deg,
        rgba(255, 255, 255, 0.22) 0 2px,
        transparent 2px 4px
    );
    opacity: 0.55;
    cursor: grab;
}

.admin-category-item:active .admin-drag-grip,
.admin-board-item:active .admin-drag-grip {
    cursor: grabbing;
}

.admin-card-title-block {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.admin-card-kicker {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(125, 246, 217, 0.75);
}

.admin-card-heading {
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.25;
    word-break: break-word;
}

.admin-card-top-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
}

.admin-card-delete {
    margin: 0;
}

.admin-card-preview {
    margin: 0.55rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
    line-height: 1.45;
}

.admin-card-divider {
    height: 1px;
    margin: 0.85rem 0 0.75rem;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
}

.admin-board-column-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.admin-board-column-head h4 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 800;
}

.admin-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
}

.admin-pill--ok {
    color: #0a1020;
    border-color: rgba(125, 246, 217, 0.45);
    background: linear-gradient(135deg, rgba(125, 246, 217, 0.95), rgba(91, 140, 255, 0.85));
}

.admin-pill--off {
    opacity: 0.75;
}

.admin-column-empty {
    margin: 0.35rem 0 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.admin-empty {
    margin: 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.admin-empty--pad {
    padding: 0.75rem 0;
}

.admin-perm-list {
    list-style: none;
    margin: 0.5rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-perm-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.65rem;
    padding: 0.65rem 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.02);
}

.admin-perm-user {
    font-weight: 700;
}

.admin-perm-arrow {
    color: var(--muted);
}

.admin-perm-board {
    flex: 1;
    min-width: 8rem;
    font-weight: 600;
    color: rgba(220, 230, 255, 0.95);
}

.admin-perm-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.admin-mod-intro .lead {
    max-width: 40rem;
}

.admin-panel {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 14px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
}

.admin-panel input,
.admin-panel textarea,
.admin-select {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(8, 12, 24, 0.95);
    color: var(--text);
    padding: 0.62rem 0.7rem;
    margin-bottom: 0.65rem;
}

.admin-category-list {
    display: grid;
    gap: 0.7rem;
    margin-bottom: 1rem;
}

.admin-board-manager {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-board-column {
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1rem 1.05rem 1.1rem;
    background: linear-gradient(180deg, rgba(22, 28, 52, 0.45) 0%, rgba(10, 14, 28, 0.65) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.admin-board-column h3,
.admin-board-column-head h4 {
    margin: 0 0 0.65rem;
    font-size: 1.05rem;
}

.admin-board-column-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-theme-head {
    margin: 0 0 0.5rem;
    font-size: 0.88rem;
    color: var(--muted);
}

.profile-theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
    gap: 0.65rem;
}

.profile-theme-card {
    position: relative;
}

.profile-theme-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.profile-theme-card label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    min-height: 6.5rem;
    padding: 0.75rem 0.8rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    background: rgba(8, 12, 24, 0.55);
    transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.profile-theme-card label:hover {
    transform: translateY(-3px);
    border-color: rgba(125, 246, 217, 0.35);
}

.profile-theme-card input:checked + label {
    border-color: rgba(91, 140, 255, 0.65);
    box-shadow: 0 0 0 2px rgba(91, 140, 255, 0.22), 0 12px 28px rgba(0, 0, 0, 0.2);
}

.profile-theme-swatch {
    height: 5px;
    border-radius: 999px;
    margin-bottom: 0.15rem;
}

.profile-theme-card[data-preset="plertanix"] .profile-theme-swatch {
    background: linear-gradient(90deg, #5b8cff, #7df6d9);
}

.profile-theme-card[data-preset="aurora"] .profile-theme-swatch {
    background: linear-gradient(90deg, #a78bfa, #5eead4);
}

.profile-theme-card[data-preset="ember"] .profile-theme-swatch {
    background: linear-gradient(90deg, #fb7185, #fcd34d);
}

.profile-theme-card[data-preset="neon"] .profile-theme-swatch {
    background: linear-gradient(90deg, #22d3ee, #f472b6);
}

.profile-theme-name {
    font-weight: 800;
    font-size: 0.92rem;
}

.profile-theme-desc {
    font-size: 0.76rem;
    color: var(--muted);
    line-height: 1.35;
}

.profile-mode-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
}

.profile-mode-option {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    cursor: pointer;
    font-weight: 600;
    background: rgba(8, 12, 24, 0.45);
    transition: border-color 0.2s ease, background 0.2s ease;
}

.profile-mode-option:has(input:checked) {
    border-color: rgba(91, 140, 255, 0.55);
    background: rgba(91, 140, 255, 0.12);
}

html[data-ui-mode="light"] .profile-theme-card label,
html[data-ui-mode="light"] .profile-mode-option {
    background: rgba(255, 255, 255, 0.75);
    border-color: rgba(20, 45, 100, 0.12);
}

.admin-board-list {
    display: grid;
    gap: 0.7rem;
    min-height: 4rem;
}

.admin-board-item,
.admin-category-item {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    padding: 0.75rem;
    background: rgba(8, 12, 24, 0.65);
    cursor: move;
}

.admin-board-item.is-dragging,
.admin-category-item.is-dragging {
    opacity: 0.65;
    border-color: rgba(125, 246, 217, 0.6);
}

.admin-board-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.admin-board-item > p,
.admin-category-item > p {
    margin: 0.5rem 0 0.7rem;
    color: var(--muted);
}

.admin-board-drag-handle {
    color: var(--muted);
    user-select: none;
    letter-spacing: 1px;
}

.admin-board-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
}

.admin-board-actions details {
    flex: 1;
}

.admin-board-actions summary {
    cursor: pointer;
    color: #cbd8ff;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.admin-board-actions form {
    margin: 0;
}

.reply-actions {
    margin-top: 0.8rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.auth-page {
    max-width: 480px;
    margin: 0 auto;
    padding-top: 2.5rem;
    padding-bottom: 2rem;
}

.auth-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 1.25rem;
    padding: 0.28rem;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(0, 0, 0, 0.25);
}

.auth-tab {
    flex: 1;
    text-align: center;
    padding: 0.55rem 0.75rem;
    border-radius: 11px;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none;
    color: var(--muted);
    border: 1px solid transparent;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.auth-tab:hover {
    color: var(--text);
}

.auth-tab.active {
    color: #fff;
    border-color: rgba(91, 140, 255, 0.45);
    background: linear-gradient(135deg, rgba(91, 140, 255, 0.55), rgba(54, 110, 247, 0.5));
    box-shadow: 0 6px 18px rgba(54, 110, 247, 0.22);
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-stack label {
    display: block;
    margin-top: 0.75rem;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--muted);
    letter-spacing: 0.02em;
}

.form-stack > label:first-of-type {
    margin-top: 0;
}

.form-stack input[type="text"],
.form-stack input[type="email"],
.form-stack input[type="password"],
.form-stack input[type="number"],
.form-stack select {
    width: 100%;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(8, 12, 24, 0.92);
    color: var(--text);
    padding: 0.72rem 0.85rem;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-stack input::placeholder {
    color: rgba(167, 177, 204, 0.55);
}

.form-stack input:hover,
.form-stack select:hover {
    border-color: rgba(125, 246, 217, 0.22);
}

.form-stack input:focus,
.form-stack select:focus {
    border-color: rgba(91, 140, 255, 0.65);
    box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.18);
}

.form-stack textarea {
    width: 100%;
    min-height: 150px;
    margin-top: 0;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(8, 12, 24, 0.92);
    color: var(--text);
    padding: 0.85rem 0.9rem;
    font-size: 1rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.form-stack textarea:focus {
    border-color: rgba(91, 140, 255, 0.65);
    box-shadow: 0 0 0 3px rgba(91, 140, 255, 0.18);
}

.form-stack textarea::placeholder {
    color: rgba(167, 177, 204, 0.55);
}

.form-stack .form-actions {
    margin-top: 1.15rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem;
}

.form-stack .form-actions .btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.form-stack .form-footer-links {
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1rem;
}

.form-stack .form-footer-links a {
    color: var(--muted);
    font-size: 0.9rem;
    text-decoration: none;
    font-weight: 500;
}

.form-stack .form-footer-links a:hover {
    color: var(--accent);
}

.footer {
    margin-top: 1.8rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(4, 7, 14, 0.62);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    color: var(--muted);
}

.footer-links {
    display: flex;
    gap: 1rem;
}

.footer-links a {
    color: var(--muted);
    text-decoration: none;
}

.reveal {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
    transition: opacity 0.45s ease, transform 0.45s ease;
}

.reveal.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

@keyframes pulse {
    0% {
        transform: rotate(0deg) scale(1);
    }
    100% {
        transform: rotate(12deg) scale(1.07);
    }
}

@media (max-width: 900px) {
    .nav {
        display: none;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .post-card {
        grid-template-columns: 1fr;
    }

    .post-author {
        border-right: 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
        padding-right: 0;
        padding-bottom: 0.8rem;
    }

    .topic-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .topic-row-meta {
        text-align: left;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .admin-panels {
        grid-template-columns: 1fr;
    }

}
