/* ═══════════════════════════════════════════════════════════
   Anteiku Threads — Global Styles
   Matched to stream.yamlgenerator.com color scheme
   ═══════════════════════════════════════════════════════════ */

@font-face { font-family: 'Inter'; font-weight: 400; font-style: normal; font-display: swap; src: url('/static/fonts/inter-400.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 500; font-style: normal; font-display: swap; src: url('/static/fonts/inter-500.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 600; font-style: normal; font-display: swap; src: url('/static/fonts/inter-600.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 700; font-style: normal; font-display: swap; src: url('/static/fonts/inter-700.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-weight: 800; font-style: normal; font-display: swap; src: url('/static/fonts/inter-800.woff2') format('woff2'); }

:root {
    --bg: #080808;
    --bg2: #0f0f0f;
    --surface: rgba(255,255,255,0.04);
    --surface-hover: rgba(255,255,255,0.07);
    --glass: rgba(255,255,255,0.05);
    --glass-border: rgba(255,255,255,0.1);
    --border: rgba(255,255,255,0.08);
    --border-hover: rgba(255,255,255,0.18);
    --text: #f0f0f0;
    --muted: rgba(255,255,255,0.35);
    --muted2: rgba(255,255,255,0.18);
    --online: #22c55e;
    --danger: #ef4444;
    --danger-dim: rgba(239,68,68,0.12);
    --danger-border: rgba(239,68,68,0.3);
    --transition: 0.2s cubic-bezier(0.4,0,0.2,1);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

html {
    font-size: 15px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

a { color: rgba(255,255,255,0.7); text-decoration: none; transition: color var(--transition); }
a:hover { color: #fff; }

::selection { background: rgba(255,255,255,0.15); color: #fff; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* ═══════════════ TOP PROGRESS BAR ═══════════════ */

#progress-bar {
    position: fixed; top: 0; left: 0; z-index: 9999;
    width: 0; height: 2px;
    background: linear-gradient(90deg, rgba(255,255,255,0.6), #fff);
    transition: width 400ms ease;
    pointer-events: none;
}
#progress-bar.active { animation: progress-pulse 2s infinite; }
@keyframes progress-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ═══════════════ HEADER ═══════════════ */

.header {
    position: sticky; top: 0; z-index: 100;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 36px; height: 60px;
    background: rgba(8,8,8,0.85);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.header-logo {
    display: flex; align-items: center; gap: 10px;
    font-weight: 800; font-size: 1.15rem; color: #fff;
    letter-spacing: -0.5px;
}
.header-logo .dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--online);
    box-shadow: 0 0 6px var(--online);
    animation: livePulse 2s infinite;
}
@keyframes livePulse {
    0%,100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(0.75); }
}
.header-nav { display: flex; align-items: center; gap: 12px; }

.online-pill {
    display: flex; align-items: center; gap: 7px;
    padding: 6px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 100px;
    font-size: 0.75rem; font-weight: 600;
    color: var(--muted);
    transition: all var(--transition);
}
.online-pill .online-dot {
    width: 7px; height: 7px; border-radius: 50%;
    background: var(--online);
    box-shadow: 0 0 6px var(--online);
    animation: livePulse 2s infinite;
}

.header-user {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 14px 6px 6px;
    border-radius: 100px; cursor: pointer;
    background: var(--surface);
    border: 1px solid var(--border);
    transition: all var(--transition);
    position: relative;
}
.header-user:hover { background: var(--surface-hover); border-color: var(--border-hover); }
.header-user img {
    width: 30px; height: 30px; border-radius: 50%;
    object-fit: cover;
}
.header-user .name { font-size: 0.8rem; font-weight: 500; color: rgba(255,255,255,0.7); }
.header-user .role-badge {
    font-size: 0.6rem; font-weight: 700; text-transform: uppercase;
    color: var(--online); letter-spacing: 0.06em;
}

.user-dropdown {
    position: absolute; top: calc(100% + 8px); right: 0;
    min-width: 180px; padding: 6px;
    background: var(--bg2);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.5);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    opacity: 0; visibility: hidden;
    transform: translateY(-8px);
    transition: opacity var(--transition), transform var(--transition), visibility var(--transition);
}
.user-dropdown.open { opacity: 1; visibility: visible; transform: translateY(0); }
.user-dropdown a, .user-dropdown button {
    display: block; width: 100%; padding: 9px 14px;
    font: inherit; font-size: 0.8rem; font-weight: 500;
    color: rgba(255,255,255,0.7); background: none; border: none;
    border-radius: 10px; cursor: pointer;
    text-align: left;
    transition: all var(--transition);
}
.user-dropdown a:hover, .user-dropdown button:hover { background: var(--surface-hover); color: #fff; }
.user-dropdown .danger { color: var(--danger); }
.user-dropdown .danger:hover { background: var(--danger-dim); }

/* ═══════════════ LAYOUT ═══════════════ */

.page-layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 24px 36px;
}
@media (max-width: 900px) {
    .page-layout { grid-template-columns: 1fr; padding: 16px; }
    .sidebar { order: -1; }
}

.main-content { min-width: 0; }

/* ═══════════════ SIDEBAR ═══════════════ */

.sidebar { display: flex; flex-direction: column; gap: 16px; }

.sidebar-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 16px;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    transition: border-color var(--transition);
}
.sidebar-card:hover { border-color: var(--border-hover); }
.sidebar-card h3 {
    font-size: 0.7rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.2px;
    color: var(--muted); margin-bottom: 12px;
}

.cat-list { list-style: none; }
.cat-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px; border-radius: 10px;
    cursor: pointer; transition: all var(--transition);
    font-size: 0.85rem; font-weight: 500;
    color: rgba(255,255,255,0.7);
}
.cat-item:hover { background: var(--surface-hover); color: #fff; }
.cat-item.active { background: rgba(255,255,255,0.1); color: #fff; }
.cat-dot {
    width: 10px; height: 10px; border-radius: 50%;
    flex-shrink: 0;
}
.cat-count {
    margin-left: auto; font-size: 0.7rem;
    color: var(--muted2); font-weight: 600;
}

/* ═══════════════ CARDS / THREADS ═══════════════ */

.thread-list { display: flex; flex-direction: column; gap: 10px; }

.thread-card {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 18px 22px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4,0,0.2,1);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    position: relative;
    animation: cardIn 0.4s cubic-bezier(0.4,0,0.2,1) both;
}
.thread-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.5);
    border-color: rgba(255,255,255,0.2);
}
.thread-card:active { transform: translateY(0) scale(0.995); }
.thread-card.pinned-global { border-left: 3px solid rgba(255,255,255,0.4); }
.thread-card.pinned-user { border-left: 3px solid rgba(255,255,255,0.15); }

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

.thread-card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.thread-card-category {
    font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 0.06em;
    padding: 3px 10px; border-radius: 100px;
}
.thread-card-pin {
    font-size: 0.7rem; color: rgba(255,255,255,0.5); font-weight: 600;
    display: flex; align-items: center; gap: 4px;
}
.thread-card-title {
    font-size: 1.05rem; font-weight: 600;
    color: #fff; line-height: 1.4;
    margin-bottom: 4px;
}
.thread-card-excerpt {
    font-size: 0.85rem; color: var(--muted);
    line-height: 1.5;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    overflow: hidden;
}
.thread-card-footer {
    display: flex; align-items: center; gap: 10px;
    margin-top: 10px; font-size: 0.75rem; color: var(--muted2);
}
.thread-card-footer img {
    width: 20px; height: 20px; border-radius: 50%; object-fit: cover;
}
.thread-card-actions {
    margin-left: auto; display: flex; gap: 4px;
}

.thread-card-inner {
    display: flex; gap: 16px; align-items: flex-start;
}
.thread-card-content { flex: 1; min-width: 0; }
.thread-card-thumb {
    flex-shrink: 0; width: 120px; height: 80px;
    border-radius: 10px; overflow: hidden;
    background: var(--surface);
}
.thread-card-thumb img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform 0.3s ease;
}
.thread-card:hover .thread-card-thumb img { transform: scale(1.05); }
@media (max-width: 600px) {
    .thread-card-thumb { width: 80px; height: 60px; border-radius: 8px; }
}

/* ═══════════════ BUTTONS ═══════════════ */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    padding: 10px 22px;
    font: inherit; font-size: 0.8rem; font-weight: 600;
    border: none; border-radius: 10px;
    cursor: pointer; white-space: nowrap;
    transition: all var(--transition);
}
.btn:active { transform: scale(0.97); }

.btn-primary {
    background: rgba(255,255,255,0.1);
    color: #fff;
    border: 1px solid rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
}
.btn-primary:hover {
    background: rgba(255,255,255,0.16);
    border-color: rgba(255,255,255,0.25);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.btn-secondary {
    background: var(--surface);
    color: rgba(255,255,255,0.7);
    border: 1px solid var(--border);
}
.btn-secondary:hover { border-color: var(--border-hover); background: var(--surface-hover); color: #fff; }

.btn-ghost {
    background: transparent; color: var(--muted);
    padding: 6px 14px; font-size: 0.8rem;
    border-radius: 8px;
}
.btn-ghost:hover { color: #fff; background: var(--surface-hover); }

.btn-danger {
    background: var(--danger-dim); color: var(--danger);
    border: 1px solid var(--danger-border);
}
.btn-danger:hover { background: rgba(239,68,68,0.2); }

.btn-icon {
    width: 30px; height: 30px; padding: 0;
    border-radius: 8px;
    background: transparent; border: none; color: var(--muted2);
    display: inline-flex; align-items: center; justify-content: center;
    cursor: pointer;
    transition: all var(--transition);
}
.btn-icon:hover { color: #fff; background: var(--surface-hover); }
.btn-icon.active { color: #fff; }
.btn-icon.liked { color: #ef4444; }
.btn-icon.liked:hover { color: #f87171; }
.btn-icon:active { transform: scale(0.9); }

.like-btn {
    display: inline-flex; align-items: center; gap: 2px;
    width: auto; padding: 0 6px;
    transition: all 0.2s cubic-bezier(0.34,1.56,0.64,1);
}
.like-btn:active { transform: scale(1.15); }
.like-count { font-size: 0.7rem; font-weight: 600; min-width: 12px; }

/* ═══════════════ INPUTS ═══════════════ */

.input, .textarea, .select {
    width: 100%; padding: 11px 18px;
    font: inherit; font-size: 0.9rem;
    background: var(--glass); color: var(--text);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    outline: none;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    transition: all var(--transition);
}
.input:focus, .textarea:focus, .select:focus {
    border-color: rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.07);
    box-shadow: 0 0 0 3px rgba(255,255,255,0.04);
}
.input::placeholder, .textarea::placeholder {
    color: var(--muted2);
}
.textarea {
    resize: vertical; min-height: 120px; line-height: 1.6;
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', monospace;
    font-size: 0.85rem;
}
.select {
    appearance: none; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 14px center;
    padding-right: 36px;
}

label {
    display: block; font-size: 0.7rem; font-weight: 700;
    color: var(--muted); margin-bottom: 6px;
    text-transform: uppercase; letter-spacing: 1.2px;
}

/* ═══════════════ MODALS ═══════════════ */

.modal-overlay {
    position: fixed; inset: 0; z-index: 500;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden;
    transition: opacity 250ms ease, visibility 250ms ease;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
    background: var(--bg2);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 32px;
    max-width: 560px; width: 90%;
    box-shadow: 0 24px 80px rgba(0,0,0,0.8), inset 0 1px 0 rgba(255,255,255,0.06);
    transform: scale(0.94);
    opacity: 0;
    transition: transform 250ms cubic-bezier(0.4,0,0.2,1), opacity 250ms ease;
}
.modal-overlay.open .modal { transform: scale(1); opacity: 1; }

.modal-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 20px;
}
.modal-header h2 { font-size: 1.1rem; font-weight: 700; }
.modal-body { margin-bottom: 20px; }
.modal-footer { display: flex; gap: 8px; justify-content: flex-end; }

/* ═══════════════ CUSTOM SELECT ═══════════════ */

.csel {
    position: relative; width: 100%;
}
.csel-trigger {
    display: flex; align-items: center; justify-content: space-between;
    padding: 11px 18px;
    background: var(--glass); color: var(--text);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    font-size: 0.9rem; cursor: pointer;
    transition: all var(--transition);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.csel-trigger:hover { border-color: var(--border-hover); }
.csel.open .csel-trigger { border-color: rgba(255,255,255,0.25); background: rgba(255,255,255,0.07); }
.csel-trigger svg { flex-shrink: 0; color: var(--muted); transition: transform var(--transition); }
.csel.open .csel-trigger svg { transform: rotate(180deg); }
.csel-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.csel-dropdown {
    position: absolute; top: calc(100% + 6px); left: 0; right: 0;
    background: var(--bg2);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 6px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.6);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    z-index: 60;
    max-height: 220px; overflow-y: auto;
    opacity: 0; visibility: hidden;
    transform: translateY(-6px);
    transition: opacity 150ms ease, transform 150ms ease, visibility 150ms ease;
}
.csel.open .csel-dropdown { opacity: 1; visibility: visible; transform: translateY(0); }

.csel-option {
    padding: 9px 14px;
    font-size: 0.85rem; color: rgba(255,255,255,0.7);
    border-radius: 8px; cursor: pointer;
    transition: all var(--transition);
}
.csel-option:hover { background: var(--surface-hover); color: #fff; }
.csel-option.active { background: rgba(255,255,255,0.1); color: #fff; }

/* ═══════════════ SKELETON LOADING ═══════════════ */

.skeleton {
    background: linear-gradient(90deg, var(--glass) 25%, rgba(255,255,255,0.08) 50%, var(--glass) 75%);
    background-size: 200% 100%;
    animation: skeleton-pulse 1.5s ease infinite;
    border-radius: 14px;
}
@keyframes skeleton-pulse {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}
.skeleton-card {
    height: 120px; border-radius: 18px;
    margin-bottom: 10px;
}

/* ═══════════════ THREAD VIEW ═══════════════ */

.thread-view {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 18px;
    padding: 36px;
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    animation: cardIn 0.4s cubic-bezier(0.4,0,0.2,1);
}
.thread-view-title { font-size: 1.6rem; font-weight: 800; line-height: 1.3; margin-bottom: 12px; color: #fff; }
.thread-view-meta {
    display: flex; align-items: center; gap: 12px;
    font-size: 0.8rem; color: var(--muted);
    margin-bottom: 24px; padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.thread-view-meta img { width: 24px; height: 24px; border-radius: 50%; }
.thread-view-body {
    font-size: 0.95rem; line-height: 1.8; color: rgba(255,255,255,0.85);
}
.thread-view-body h1, .thread-view-body h2, .thread-view-body h3 {
    margin: 1.2em 0 0.4em; font-weight: 700; color: #fff;
}
.thread-view-body h1 { font-size: 1.3rem; }
.thread-view-body h2 { font-size: 1.15rem; }
.thread-view-body h3 { font-size: 1rem; }
.thread-view-body p { margin: 0.6em 0; }
.thread-view-body img {
    max-width: 100%; border-radius: 14px;
    margin: 12px 0;
}
.thread-view-body blockquote {
    border-left: 3px solid rgba(255,255,255,0.2);
    padding: 8px 16px; margin: 12px 0;
    background: rgba(255,255,255,0.03);
    border-radius: 0 10px 10px 0;
}
.thread-view-body code {
    background: rgba(255,255,255,0.08);
    padding: 2px 6px; border-radius: 4px;
    font-size: 0.85em;
}
.thread-view-body pre {
    background: rgba(255,255,255,0.04);
    padding: 16px; border-radius: 10px;
    overflow-x: auto; margin: 12px 0;
    border: 1px solid var(--border);
}
.thread-view-body pre code { background: none; padding: 0; }
.thread-view-body a { color: rgba(255,255,255,0.7); text-decoration: underline; text-underline-offset: 2px; }
.thread-view-body a:hover { color: #fff; }
.thread-view-body ul, .thread-view-body ol { padding-left: 1.5em; margin: 0.6em 0; }
.thread-view-body li { margin: 0.3em 0; }
.thread-view-body table {
    width: 100%; border-collapse: collapse; margin: 12px 0;
}
.thread-view-body th, .thread-view-body td {
    padding: 8px 12px; border: 1px solid var(--border);
    text-align: left; font-size: 0.85rem;
}
.thread-view-body th { background: var(--surface-hover); font-weight: 600; }
.thread-view-body hr { border: none; border-top: 1px solid var(--border); margin: 24px 0; }

.thread-view-actions {
    display: flex; gap: 8px; margin-top: 24px;
    padding-top: 16px; border-top: 1px solid var(--border);
}

/* ═══════════════ EDITOR ═══════════════ */

.editor-wrap {
    display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
    min-height: 300px;
}
@media (max-width: 768px) { .editor-wrap { grid-template-columns: 1fr; } }

.editor-preview {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 16px;
    overflow-y: auto; max-height: 500px;
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.editor-preview-empty {
    color: var(--muted2); font-style: italic;
    display: flex; align-items: center; justify-content: center;
    height: 100%; font-size: 0.85rem;
}
.editor-toolbar {
    display: flex; gap: 4px; margin-bottom: 8px;
    flex-wrap: wrap;
}

.drop-zone {
    border: 2px dashed var(--border);
    border-radius: 14px;
    padding: 24px; text-align: center;
    color: var(--muted); font-size: 0.85rem;
    cursor: pointer;
    transition: all var(--transition);
}
.drop-zone:hover, .drop-zone.dragover {
    border-color: rgba(255,255,255,0.3); background: rgba(255,255,255,0.03);
}
.drop-zone.uploading { pointer-events: none; opacity: 0.5; }

/* ═══════════════ LOGIN ═══════════════ */

.login-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg);
}
.login-card {
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(40px); -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 48px 40px;
    text-align: center; max-width: 420px; width: 90%;
    box-shadow: 0 0 80px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.08);
    animation: loginReveal 0.6s cubic-bezier(0.4,0,0.2,1);
}
@keyframes loginReveal {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
.login-card h1 {
    font-size: 1.6rem; font-weight: 800; margin-bottom: 4px;
    color: #fff;
}
.login-card .subtitle {
    color: var(--muted); font-size: 0.85rem; margin-bottom: 32px;
}
.login-tg-wrap { display: flex; justify-content: center; }
.login-powered {
    margin-top: 32px; font-size: 0.65rem; color: var(--muted2);
    letter-spacing: 1.5px; text-transform: uppercase;
}

/* ═══════════════ NO-ACCESS ═══════════════ */

.no-access-page {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; gap: 16px;
    text-align: center; padding: 24px;
}
.no-access-page h1 { font-size: 1.4rem; font-weight: 700; }
.no-access-page p { color: var(--muted); max-width: 400px; font-size: 0.9rem; }

/* ═══════════════ ADMIN TABLES ═══════════════ */

.admin-table {
    width: 100%; border-collapse: collapse;
    font-size: 0.85rem;
}
.admin-table th {
    text-align: left; padding: 10px 12px;
    font-size: 0.65rem; font-weight: 700;
    text-transform: uppercase; letter-spacing: 1.2px;
    color: var(--muted);
    border-bottom: 1px solid var(--border);
}
.admin-table td {
    padding: 10px 12px;
    border-bottom: 1px solid var(--border);
}
.admin-table tr { transition: background var(--transition); }
.admin-table tr:hover { background: var(--surface-hover); }

.role-pill {
    display: inline-block; padding: 3px 10px;
    border-radius: 100px; font-size: 0.65rem;
    font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.5px;
}
.role-pill.admin { background: rgba(34,197,94,0.08); color: var(--online); border: 1px solid rgba(34,197,94,0.25); }
.role-pill.user { background: var(--surface); color: var(--muted); border: 1px solid var(--border); }
.role-pill.banned { background: var(--danger-dim); color: var(--danger); border: 1px solid var(--danger-border); }

/* ═══════════════ TOASTS ═══════════════ */

.toast-container {
    position: fixed; bottom: 28px; right: 28px; z-index: 1000;
    display: flex; flex-direction: column; gap: 8px;
}
.toast {
    padding: 14px 22px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.4);
    font-size: 0.85rem; max-width: 360px; color: #fff;
    animation: toast-in 0.35s cubic-bezier(0.34,1.56,0.64,1);
}
.toast.success { border-left: 3px solid var(--online); }
.toast.error { border-left: 3px solid var(--danger); }
@keyframes toast-in {
    from { opacity: 0; transform: translateY(20px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ═══════════════ SCROLL TO TOP ═══════════════ */

.scroll-top {
    position: fixed; bottom: 24px; left: 24px; z-index: 200;
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--surface); border: 1px solid var(--border);
    color: var(--muted);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; opacity: 0; visibility: hidden;
    transition: all var(--transition);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.scroll-top.visible { opacity: 1; visibility: visible; }
.scroll-top:hover { transform: translateY(-2px); border-color: var(--border-hover); color: #fff; }

/* ═══════════════ UTILITY ═══════════════ */

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.text-muted { color: var(--muted); }
.text-sm { font-size: 0.8rem; }
.text-center { text-align: center; }
.hidden { display: none !important; }
