/* TotalBranding EMS visual system */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');
:root {
    --bg: #0b0914;
    --bg-soft: #151022;
    --panel: rgba(24, 19, 40, .86);
    --panel-soft: rgba(255, 255, 255, .045);
    --line: rgba(255, 255, 255, .1);
    --line-strong: rgba(180, 110, 232, .35);
    --text: #f8f8fc;
    --muted: #9999ad;
    --accent: #9b5cff;
    --accent-deep: #6d28d9;
    --mint: #5eead4;
}

html { background: var(--bg); }
body {
    min-height: 100vh;
    margin: 0;
    background: radial-gradient(circle at 75% 0%, rgba(109, 40, 217, .15), transparent 34%), linear-gradient(135deg, #0b0914 0%, #171027 52%, #10182d 100%) !important;
    color: var(--text) !important;
    font-family: "DM Sans", "Segoe UI", sans-serif !important;
}
body::before {
    opacity: .8;
    background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px) !important;
}

.app { display: flex; min-height: 100vh; }
.sidebar {
    position: sticky;
    top: 0;
    display: flex;
    width: 260px;
    min-width: 260px;
    height: 100vh;
    flex-shrink: 0;
    flex-direction: column;
    padding: 28px 18px;
    overflow-y: auto;
    background: rgba(10, 8, 20, .78) !important;
    border-right-color: var(--line) !important;
    box-shadow: 12px 0 40px rgba(0, 0, 0, .12);
}
.sidebar nav { display: grid; gap: 7px; }
.sidebar .brand { flex-shrink: 0; }
.sidebar .nav-item { min-height: 44px; }
.sidebar .profile { flex-shrink: 0; }
.event-switcher { display: flex; align-items: center; gap: 11px; min-height: 58px; margin: -5px 10px 28px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.event-switcher img, .event-mark { display: grid; width: 38px; height: 38px; flex-shrink: 0; place-items: center; border-radius: 9px; object-fit: cover; color: #fff; background: linear-gradient(135deg, #9b5cff, #6d28d9); font-size: .8rem; font-weight: 700; }
.event-switcher strong { display: block; max-width: 158px; overflow: hidden; color: #f2f0f8; font-size: .76rem; text-overflow: ellipsis; white-space: nowrap; }
.event-switcher a { display: block; margin-top: 4px; color: var(--muted); font-size: .62rem; text-decoration: none; }
.event-switcher a:hover { color: var(--mint); }
.event-context { display: grid; gap: 4px; margin: -28px 14px 28px; padding: 12px 0 16px; border-bottom: 1px solid var(--line); }
.event-context strong { overflow: hidden; color: #f2f0f8; font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.event-context span { color: var(--muted); font-size: .65rem; }
.nav-icon { display: inline-grid; width: 22px; flex-shrink: 0; place-items: center; color: #b991ea; font-size: 1rem; }
.profile { display: flex; align-items: center; gap: 11px; margin-top: auto; padding: 15px 10px 8px; }
.page-content { flex: 1; min-width: 0; padding: 48px clamp(24px, 5vw, 74px); }
.moderators-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 30px; }
.moderators-header h1 { margin: 15px 0 10px; font-size: clamp(2.4rem, 5vw, 4.2rem); font-weight: 400; letter-spacing: -.05em; }
.moderator-row { display: grid; grid-template-columns: 1fr 1.5fr auto; align-items: center; gap: 18px; padding: 17px 25px; border-bottom: 1px solid rgba(255,255,255,.06); font-size: .82rem; }
.moderator-row:last-child { border-bottom: 0; }
.moderator-name { color: #eeeef7; }
.moderator-email { color: #aaa9bc; }
.moderator-row .row-actions { display: flex; gap: 8px; }
.moderator-row .action-button { padding: 8px 10px; border: 1px solid rgba(255,255,255,.12); border-radius: 8px; color: #c7a4ec; background: rgba(255,255,255,.04); cursor: pointer; font: inherit; font-size: .72rem; }
.moderator-row .action-button.delete { border-color: #9c3548; color: #ffaaa9; }
.moderator-row form { margin: 0; }
.moderator-toast { position: fixed; right: 24px; bottom: 24px; z-index: 20; display: flex; width: min(390px, calc(100vw - 48px)); align-items: center; justify-content: space-between; gap: 18px; padding: 15px 16px; border: 1px solid rgba(94,234,212,.35); border-radius: 12px; color: #b8fff4; background: rgba(18,18,31,.96); box-shadow: 0 18px 45px rgba(0,0,0,.35); font-size: .8rem; }
.moderator-toast.error { border-color: rgba(248,113,113,.45); color: #ffc0c0; }
.moderator-toast button { width: 26px; height: 26px; flex-shrink: 0; border: 0; border-radius: 6px; color: inherit; background: rgba(255,255,255,.06); cursor: pointer; font-size: 1.1rem; }
.content > .feedback { position: fixed; right: 24px; bottom: 24px; z-index: 20; width: min(390px, calc(100vw - 48px)); margin: 0; border: 1px solid rgba(94,234,212,.35); border-radius: 12px; color: #b8fff4; background: rgba(18,18,31,.96); box-shadow: 0 18px 45px rgba(0,0,0,.35); animation: feedback-toast-out .35s ease 6s forwards; }
.content > .feedback.error { border-color: rgba(248,113,113,.45); color: #ffc0c0; }
@keyframes feedback-toast-out { to { opacity: 0; visibility: hidden; transform: translateY(10px); } }
.brand-mark { display: grid; width: 62px; height: 62px; place-items: center; border: 0; border-radius: 0; overflow: hidden; }
.nav-item { transition: background .2s ease, color .2s ease, transform .2s ease; }
.nav-item:hover { transform: translateX(2px); }
.nav-item.active { background: linear-gradient(90deg, rgba(131,10,208,.28), rgba(131,10,208,.08)) !important; box-shadow: inset 3px 0 var(--accent); }
.profile { border-top-color: var(--line) !important; }

.content, .page-content { max-width: 1280px !important; }
h1 { color: var(--text); }
h1, h2, h3, .brand { font-family: "Space Grotesk", "DM Sans", sans-serif !important; }
.accent-word {
    display: inline-block;
    color: #c6a5f2;
    background: linear-gradient(110deg, #c084fc 0%, #fff 38%, #5eead4 65%, #a78bfa 100%);
    background-size: 240% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: color-drift 7s ease-in-out infinite;
}
@keyframes color-drift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}
@media (prefers-reduced-motion: reduce) {
    .accent-word { animation: none; }
    .event-card, .nav-item, .button { transition: none; }
}
.eyebrow { color: var(--mint) !important; }
.subtitle, .header-info { color: var(--muted) !important; }
.panel, .section, .preview, .stat, .event-card, .table-wrapper {
    background: var(--panel) !important;
    border-color: var(--line) !important;
    box-shadow: inset 0 1px rgba(255,255,255,.04), 0 18px 45px rgba(0,0,0,.12) !important;
    backdrop-filter: blur(16px);
}
.panel, .section, .preview, .table-wrapper, .event-card { border-radius: 16px !important; }
.event-card { transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease; }
.event-card:hover { transform: translateY(-4px); border-color: var(--line-strong) !important; box-shadow: 0 20px 50px rgba(0,0,0,.25) !important; }

.button, button.button {
    min-height: 42px;
    border-radius: 9px !important;
    border-color: var(--line) !important;
    background: var(--panel-soft) !important;
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.button:hover, button.button:hover { transform: translateY(-1px); background: rgba(155,92,255,.18) !important; }
.button.primary, .button-import, .button-danger {
    color: #fff !important;
    border-color: transparent !important;
    background: linear-gradient(135deg, #9b5cff, #6d28d9) !important;
    box-shadow: 0 10px 24px rgba(109,40,217,.25) !important;
}
.button-danger { background: linear-gradient(135deg, #b84261, #852d4a) !important; }

input, select, textarea, .input, .select {
    border-color: var(--line) !important;
    border-radius: 9px !important;
    background: rgba(255,255,255,.055) !important;
}
input:focus, select:focus, textarea:focus, .input:focus, .select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 3px rgba(155,92,255,.15) !important;
}

th { background: rgba(255,255,255,.04) !important; color: #c6a5f2 !important; }
td, th { border-bottom-color: rgba(255,255,255,.07) !important; }
tbody tr:hover { background: rgba(131,10,208,.08) !important; }
.feedback { border-radius: 10px !important; }
.choice-group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.field > .field-label { display: block; margin-bottom: 8px; color: #dad9e6; font-size: .78rem; font-weight: 700; }
.choice-group label { position: relative; margin: 0; }
.choice-group input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.choice-group label span { display: flex; min-height: 46px; align-items: center; justify-content: center; padding: 0 12px; border: 1px solid rgba(255,255,255,.12); border-radius: 9px; color: #8f8ba0; background: rgba(255,255,255,.035); cursor: pointer; font-size: .8rem; font-weight: 700; transition: border-color .2s ease, background .2s ease, color .2s ease; }
.choice-group input:checked + span { border-color: rgba(155,92,255,.75); color: #fff; background: linear-gradient(135deg, rgba(155,92,255,.42), rgba(83,55,159,.75)); box-shadow: 0 8px 20px rgba(109,40,217,.2); }
.choice-group input:focus-visible + span { outline: 2px solid var(--mint); outline-offset: 2px; }
.modal, .modal-backdrop { background: rgba(4,4,10,.78) !important; backdrop-filter: blur(8px); }
.modal-content, .modal { border-color: var(--line-strong) !important; border-radius: 16px !important; background: rgba(18,18,31,.97) !important; }

@media (max-width: 850px) {
    .sidebar { position: sticky; width: 76px; min-width: 76px; padding: 22px 10px; }
    .brand { justify-content: center; margin: 0 0 45px; }
    .brand-mark { width: 50px; height: 50px; }
    .brand span:not(.brand-mark), .nav-item span:not(.nav-icon), .profile > div, .logout { display: none; }
    .event-context { display: none; }
    .event-switcher { justify-content: center; margin-inline: 0; padding-bottom: 22px; }
    .event-switcher > div { display: none; }
    .nav-item { justify-content: center; padding: 14px 0; }
    .profile { justify-content: center; padding-inline: 0; }
}
@media (max-width: 560px) {
    .content, .page-content { padding: 30px 18px !important; }
    .moderators-header { display: block; }
    .moderators-header .button { margin-top: 22px; }
    .moderator-row { grid-template-columns: 1fr auto; padding-inline: 16px; }
    .moderator-email { grid-column: 1 / -1; }
}
