:root {
    --bg: #050505;
    --panel: rgba(10, 10, 10, 0.94);
    --text: #f5f5f5;
    --muted: #9ca3af;
    --border: rgba(255,255,255,0.08);
    --brand: #e11d48;
    --brand-blue: #3b82f6;
    --brand-rgb: 225, 29, 72;
    --shadow: 0 18px 45px rgba(0,0,0,0.44);
    --font: 'Outfit', sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body {
    margin: 0;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--text);
    background: #000000;
    overflow-x: hidden;
}
body::before {
    display: none;
}
body::after {
    display: none;
}
a { color: inherit; text-decoration: none; }

body.auth-page {
    background: #000000;
}

.auth-shell, .community-shell {
    position: relative;
    z-index: 1;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 0;
}

.auth-shell-compact {
    width: min(520px, calc(100% - 24px));
    min-height: 100vh;
    padding-top: 24px;
    padding-bottom: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.page-topline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 16px;
    border: 1px solid var(--border);
    border-radius: 999px;
    color: var(--muted);
    font-weight: 900;
    transition: transform 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.back-link:hover {
    color: var(--text);
    border-color: rgba(var(--brand-rgb),0.45);
    transform: translateY(-2px);
}

.auth-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 900;
    letter-spacing: -0.03em;
    animation: authRise 0.7s ease both;
}
.auth-brand img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.auth-panel {
    min-height: calc(100vh - 100px);
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, 450px);
    gap: clamp(28px, 6vw, 72px);
    align-items: center;
}

.auth-panel-single {
    min-height: calc(100vh - 90px);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.auth-copy { animation: authRise 0.72s ease 0.08s both; }
.auth-copy h1, .member-hero h1 {
    margin: 10px 0 18px;
    max-width: 760px;
    font-size: clamp(2.7rem, 7vw, 6.2rem);
    line-height: 0.9;
    letter-spacing: -0.07em;
    background: linear-gradient(100deg, #fff 0%, #e5e7eb 38%, var(--brand) 72%, var(--brand-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.auth-copy p, .member-hero p {
    max-width: 620px;
    color: var(--muted);
    font-size: 1.08rem;
    line-height: 1.72;
}
.auth-signal {
    width: min(420px, 100%);
    margin-top: 24px;
    padding: 13px 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255,255,255,0.035);
    color: var(--muted);
}
.auth-signal span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--brand);
    box-shadow: 0 0 18px rgba(var(--brand-rgb),0.8);
    animation: signalPulse 1.8s ease-in-out infinite;
}
.auth-signal strong {
    color: var(--text);
    font-size: 0.9rem;
}
.auth-signal em {
    margin-left: auto;
    font-style: normal;
    font-size: 0.78rem;
}
.eyebrow {
    color: var(--brand);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 900;
    font-size: 0.78rem;
}

.auth-tabs {
    display: flex;
    justify-content: center;
    gap: 6px;
    padding: 6px;
    margin: 18px auto 0;
    border: 1px solid rgba(225, 29, 72, 0.5);
    border-radius: 999px;
    background: rgba(255,255,255,0.01);
    width: fit-content;
}
.auth-tabs a {
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 900;
    color: var(--muted);
    transition: color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.auth-tabs a:hover { color: var(--text); transform: translateY(-1px); }
.auth-tabs a.active {
    background: rgba(225, 29, 72, 0.12);
    color: #fff;
    border: 1px solid rgba(225, 29, 72, 0.4);
}

.auth-stack {
    display: grid;
    gap: 18px;
    align-content: center;
}

.auth-logo-lockup {
    display: flex;
    justify-content: center;
    animation: authRise 0.72s ease 0.1s both;
}
.auth-logo-lockup img {
    width: min(250px, 76vw);
    height: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.auth-card, .profile-card, .member-card, .side-panel, .community-stats article {
    background: var(--panel);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}
.auth-card {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    padding: 28px;
    background: rgba(8, 8, 8, 0.98);
    border: 1px solid rgba(225, 29, 72, 0.7);
    box-shadow: 0 0 0 1px rgba(255,255,255,0.02), 0 18px 48px rgba(0,0,0,0.55);
    animation: authCardIn 0.8s cubic-bezier(0.19, 1, 0.22, 1) 0.14s both;
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 16px;
    border: 1px solid rgba(225, 29, 72, 0.35);
    pointer-events: none;
    opacity: 0.75;
}

@keyframes borderSweep {
    0% { opacity: 0.35; }
    50% { opacity: 0.9; }
    100% { opacity: 0.35; }
}

.auth-card-compact {
    width: min(440px, 100%);
    padding: 26px 24px 22px;
}
.auth-card > * { position: relative; z-index: 1; }

.auth-card-head-centered {
    text-align: center;
    margin-bottom: 18px;
    padding-top: 6px;
}

.auth-card-head-centered .eyebrow {
    display: inline-block;
    margin-top: 12px;
}

.auth-card-head-centered h2 {
    margin: 8px 0 8px;
    font-size: clamp(2rem, 4vw, 2.7rem);
    letter-spacing: -0.06em;
}

.auth-card-head-centered p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.96rem;
}

.auth-logo-lockup-compact {
    justify-content: center;
}

.auth-logo-lockup-compact img {
    width: 120px;
    height: auto;
    filter: brightness(0) invert(1);
}

.auth-form { display: grid; gap: 14px; }
.auth-form label {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 900;
}
.auth-form input {
    width: 100%;
    min-height: 50px;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 14px 15px;
    color: var(--text);
    background: rgba(255,255,255,0.02);
    font: inherit;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.auth-form select,
.auth-form textarea {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px 15px;
    color: var(--text);
    background: rgba(255,255,255,0.045);
    font: inherit;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, transform 0.25s ease;
}
.auth-form textarea {
    min-height: 132px;
    resize: vertical;
    line-height: 1.5;
}
.auth-form select:focus,
.auth-form textarea:focus {
    outline: none;
    border-color: rgba(var(--brand-rgb),0.58);
    background: rgba(255,255,255,0.07);
    box-shadow: 0 0 0 4px rgba(var(--brand-rgb),0.13), 0 18px 35px rgba(0,0,0,0.2);
}
.form-wide { grid-column: 1 / -1; }
.request-form {
    grid-template-columns: 1fr 1fr;
}
.request-form button {
    grid-column: 1 / -1;
}
.auth-form input::placeholder { color: rgba(255,255,255,0.32); }
.auth-form input:focus {
    outline: none;
    border-color: rgba(var(--brand-rgb),0.58);
    background: rgba(255,255,255,0.07);
    box-shadow: 0 0 0 4px rgba(var(--brand-rgb),0.13), 0 18px 35px rgba(0,0,0,0.2);
    transform: translateY(-1px);
}
.auth-form button {
    border-radius: 14px;
    min-height: 52px;
    font: inherit;
    font-weight: 900;
    cursor: pointer;
}
.auth-form button {
    border: 0;
    color: #fff;
    background: linear-gradient(135deg, rgba(225,29,72,0.9), rgba(225,29,72,0.7));
    box-shadow: 0 14px 30px rgba(225,29,72,0.18);
    transition: transform 0.28s ease, box-shadow 0.28s ease, filter 0.28s ease;
}
.auth-form button:hover {
    transform: translateY(-2px);
    filter: saturate(1.08);
    box-shadow: 0 18px 34px rgba(225,29,72,0.24);
}
.flash {
    padding: 12px 14px;
    border-radius: 14px;
    margin-bottom: 16px;
    font-weight: 900;
    background: rgba(59,130,246,0.1);
    color: #93c5fd;
}
.flash.error { background: rgba(225,29,72,0.12); color: #fb7185; }

.community-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}
.community-top nav { display: flex; gap: 10px; }
.community-top nav a {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 999px;
    font-weight: 900;
    color: var(--muted);
}
.community-top nav a:hover { color: var(--text); border-color: rgba(var(--brand-rgb),0.45); }
.community-top {
    animation: authRise 0.7s ease both;
}
.member-hero {
    min-height: 330px;
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 28px;
    align-items: center;
    padding: 68px 0 30px;
}
.community-hero {
    position: relative;
    overflow: hidden;
}
.community-hero::before {
    content: "";
    position: absolute;
    inset: 44px 0 auto;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(var(--brand-rgb),0.55), transparent);
    animation: railSweep 4.8s ease-in-out infinite;
}
.community-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 24px;
}
.community-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 16px;
    border-radius: 999px;
    font-weight: 900;
    border: 1px solid var(--border);
    color: var(--text);
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
.community-actions a:first-child {
    border: 0;
    background: linear-gradient(135deg, var(--brand), var(--brand-blue));
}
.community-actions a:hover {
    transform: translateY(-3px);
    border-color: rgba(var(--brand-rgb),0.46);
}
.profile-card {
    border-radius: 20px;
    padding: 22px;
    display: grid;
    gap: 8px;
}
.community-profile-card {
    position: relative;
    overflow: hidden;
    animation: authCardIn 0.8s cubic-bezier(0.19, 1, 0.22, 1) 0.12s both;
}
.community-profile-card .avatar {
    width: 72px;
    height: 72px;
}
.profile-glow {
    position: absolute;
    inset: -80px -70px auto auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(var(--brand-rgb),0.26), transparent 64%);
    filter: blur(8px);
    animation: softOrbit 7s ease-in-out infinite;
}
.rank-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 4px 0;
}
.rank-strip b {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(var(--brand-rgb),0.12);
    color: #fb7185;
    font-size: 0.78rem;
}
.profile-card strong { font-size: 1.4rem; }
.profile-card span { color: #fb7185; font-weight: 900; }
.avatar {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 900;
    background: var(--avatar, var(--brand));
    box-shadow: 0 16px 34px rgba(var(--brand-rgb),0.24);
    overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.community-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin: 0 0 34px;
}
.community-stats article {
    border-radius: 18px;
    padding: 18px;
    animation: statFloat 0.7s ease both;
}
.community-stats article:nth-child(2) { animation-delay: 0.08s; }
.community-stats article:nth-child(3) { animation-delay: 0.16s; }
.community-stats article:nth-child(4) { animation-delay: 0.24s; }
.community-stats strong {
    display: block;
    font-size: clamp(2rem, 5vw, 3.2rem);
    line-height: 1;
}
.community-stats span {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.community-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 22px;
    align-items: start;
    padding-bottom: 70px;
}
.community-section-head {
    margin-bottom: 14px;
}
.community-section-head h2,
.side-panel h2 {
    margin: 6px 0 0;
    font-size: clamp(1.55rem, 3vw, 2.25rem);
    line-height: 1;
}
.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}
.member-card {
    border-radius: 18px;
    padding: 20px;
    display: grid;
    grid-template-columns: 64px 1fr;
    gap: 16px;
    transition: transform 0.28s ease, border-color 0.28s ease, box-shadow 0.28s ease;
    animation: memberIn 0.65s ease both;
}
.member-card:nth-child(2n) { animation-delay: 0.08s; }
.member-card:nth-child(3n) { animation-delay: 0.16s; }
.member-card:hover {
    transform: translateY(-6px) scale(1.01);
    border-color: rgba(var(--brand-rgb),0.36);
    box-shadow: 0 30px 80px rgba(var(--brand-rgb),0.13);
}
.member-card.is-owner { border-color: rgba(225,29,72,0.42); }
.member-role {
    margin: 0 0 4px;
    color: #fb7185;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}
.member-card h2 { margin: 0; line-height: 1.1; }
.member-card strong, .member-card span { display: block; color: var(--muted); }
.member-card p:last-child { margin-bottom: 0; color: var(--muted); line-height: 1.55; }

.community-side {
    display: grid;
    gap: 16px;
    position: sticky;
    top: 20px;
}
.side-panel {
    border-radius: 18px;
    padding: 18px;
    animation: authCardIn 0.75s cubic-bezier(0.19, 1, 0.22, 1) both;
}
.side-panel p {
    color: var(--muted);
    line-height: 1.6;
    margin-bottom: 0;
}
.role-list, .mini-feed {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}
.role-list div,
.mini-feed div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 12px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255,255,255,0.035);
}
.role-list span,
.mini-feed span,
.mini-feed p {
    color: var(--muted);
    font-size: 0.84rem;
}
.mini-feed div {
    flex-direction: column;
    gap: 4px;
}
.pulse-panel {
    position: relative;
    overflow: hidden;
}
.pulse-panel::after {
    content: "";
    position: absolute;
    inset: auto 18px 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--brand), var(--brand-blue), transparent);
    animation: railSweep 3.2s ease-in-out infinite;
}

.admin-shell { width: min(1280px, calc(100% - 32px)); }
.admin-hero {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
}
.admin-stat-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}
.admin-stat {
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: var(--shadow);
}
.admin-stat strong {
    display: block;
    font-size: 2.2rem;
    line-height: 1;
}
.admin-stat span {
    color: var(--muted);
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.72rem;
}
.admin-section {
    margin: 0 0 28px;
}
.admin-section-head {
    margin-bottom: 14px;
}
.admin-section-head h2 {
    margin: 6px 0 0;
    font-size: clamp(1.6rem, 3vw, 2.4rem);
}
.request-list {
    display: grid;
    gap: 14px;
}
.request-card,
.admin-table {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--panel);
    box-shadow: var(--shadow);
}
.request-card {
    padding: 18px;
}
.request-top {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: flex-start;
}
.request-top strong {
    display: block;
    font-size: 1.1rem;
}
.request-top span,
.request-meta,
.admin-row span {
    color: var(--muted);
}
.request-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0;
    font-size: 0.86rem;
}
.request-meta span {
    padding: 5px 9px;
    border-radius: 999px;
    background: rgba(255,255,255,0.05);
}
.request-card p {
    color: var(--text);
    line-height: 1.6;
}
.status-badge {
    flex: 0 0 auto;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 900;
    text-transform: uppercase;
}
.status-new { color: #93c5fd; background: rgba(59,130,246,0.12); }
.status-in_progress { color: #fbbf24; background: rgba(251,191,36,0.12); }
.status-done { color: #86efac; background: rgba(34,197,94,0.12); }
.status-archived { color: #cbd5e1; background: rgba(148,163,184,0.12); }
.status-form {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 12px;
}
.status-form select,
.status-form button {
    min-height: 40px;
    border-radius: 12px;
    font: inherit;
}
.status-form select {
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.045);
    color: var(--text);
    padding: 0 10px;
}
.status-form button {
    border: 0;
    padding: 0 14px;
    background: var(--text);
    color: #050505;
    font-weight: 900;
    cursor: pointer;
}
.admin-table {
    overflow: hidden;
}
.admin-row {
    display: grid;
    grid-template-columns: 1.15fr 0.8fr 1.3fr 1fr 1fr;
    gap: 12px;
    align-items: center;
    padding: 13px 16px;
    border-bottom: 1px solid var(--border);
}
.admin-row:last-child { border-bottom: 0; }
.empty-state {
    padding: 26px;
    border: 1px dashed var(--border);
    border-radius: 18px;
    color: var(--muted);
    text-align: center;
}

@keyframes authRise {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes authCardIn {
    from { opacity: 0; transform: translateY(26px) scale(0.97); filter: blur(10px); }
    to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}
@keyframes signalPulse {
    0%, 100% { transform: scale(1); opacity: 0.75; }
    50% { transform: scale(1.38); opacity: 1; }
}
@keyframes railSweep {
    0%, 100% { opacity: 0.25; transform: scaleX(0.4); }
    50% { opacity: 1; transform: scaleX(1); }
}
@keyframes softOrbit {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.75; }
    50% { transform: translate(-22px, 20px) scale(1.12); opacity: 1; }
}
@keyframes statFloat {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes memberIn {
    from { opacity: 0; transform: translateY(20px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (max-width: 780px) {
    .auth-panel, .member-hero, .admin-hero { grid-template-columns: 1fr; }
    .auth-panel { min-height: auto; padding: 56px 0; }
    .community-top { align-items: flex-start; flex-direction: column; }
    .page-topline { align-items: flex-start; flex-direction: column; }
    .auth-card { padding: 22px; }
    .request-form { grid-template-columns: 1fr; }
    .admin-row { grid-template-columns: 1fr; }
    .request-top, .status-form { flex-direction: column; align-items: stretch; }
    .community-stats { grid-template-columns: repeat(2, 1fr); }
    .community-layout { grid-template-columns: 1fr; }
    .community-side { position: static; }
}

@media (max-width: 460px) {
    .community-stats { grid-template-columns: 1fr; }
    .role-list div { flex-direction: column; gap: 4px; }
}

/* DigitForge auth/community polish */
.auth-page {
    background:
        radial-gradient(circle at 20% 12%, rgba(225,29,72,0.13), transparent 28%),
        radial-gradient(circle at 86% 18%, rgba(59,130,246,0.12), transparent 30%),
        #050505;
}

.auth-page .auth-shell {
    min-height: 100vh;
}

.auth-ambient {
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    overflow: hidden;
}

.auth-ambient::before,
.auth-ambient::after {
    content: "";
    position: absolute;
    inset: -20%;
    background-image:
        linear-gradient(rgba(255,255,255,0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.035) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(circle at 50% 42%, #000 0 28%, transparent 70%);
    animation: ambientDrift 16s linear infinite;
}

.auth-ambient::after {
    background-image:
        radial-gradient(circle, rgba(225,29,72,0.38) 0 1px, transparent 2px),
        linear-gradient(115deg, transparent 0 44%, rgba(59,130,246,0.14) 45% 46%, transparent 47%);
    background-size: 120px 120px, 260px 260px;
    opacity: 0.72;
    animation: ambientDrift 24s linear infinite reverse;
}

.auth-page .auth-brand,
.community-top .auth-brand {
    min-height: 46px;
    padding: 8px 16px 8px 10px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    background: rgba(255,255,255,0.035);
    box-shadow: 0 18px 45px rgba(0,0,0,0.24);
    backdrop-filter: blur(16px);
}

.auth-page .auth-panel {
    min-height: calc(100vh - 92px);
}

.auth-page .auth-copy h1 {
    max-width: 720px;
}

.auth-benefits {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    width: min(620px, 100%);
    margin-top: 28px;
}

.auth-benefits article {
    min-height: 104px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    background: rgba(255,255,255,0.035);
    box-shadow: 0 18px 45px rgba(0,0,0,0.18);
    backdrop-filter: blur(14px);
    transition: transform 0.28s ease, border-color 0.28s ease, background 0.28s ease;
}

.auth-benefits article:hover {
    transform: translateY(-4px);
    border-color: rgba(var(--brand-rgb),0.34);
    background: rgba(255,255,255,0.055);
}

.auth-benefits strong {
    display: block;
    color: var(--brand);
    font-size: 0.82rem;
    letter-spacing: 0.16em;
}

.auth-benefits span {
    display: block;
    margin-top: 18px;
    color: var(--text);
    font-weight: 900;
    line-height: 1.18;
}

.auth-page .auth-logo-lockup img {
    width: min(290px, 74vw);
    filter: drop-shadow(0 24px 48px rgba(0,0,0,0.42));
}

.auth-page .auth-card {
    border-radius: 26px;
    padding: 30px;
    background:
        linear-gradient(145deg, rgba(255,255,255,0.085), rgba(255,255,255,0.032)),
        rgba(8,8,10,0.82);
}

.auth-page .auth-card::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(110deg, transparent, rgba(255,255,255,0.15), transparent);
    transform: translateX(-130%);
    animation: cardSheen 5.4s ease-in-out infinite;
}

.auth-card-head {
    position: relative;
    z-index: 1;
    margin-bottom: 20px;
}

.auth-card-head span {
    color: var(--brand);
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.auth-card-head h2 {
    margin: 8px 0 6px;
    font-size: clamp(1.8rem, 4vw, 2.55rem);
    line-height: 0.95;
    letter-spacing: -0.05em;
}

.auth-card-head p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}

.auth-page .auth-form label {
    color: rgba(255,255,255,0.72);
}

.auth-page .auth-form input {
    border-radius: 16px;
    background: rgba(0,0,0,0.24);
}

.auth-page .auth-form button,
.quick-links a,
.community-actions a:first-child {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    border: 1px solid rgba(var(--brand-rgb),0.46);
    color: var(--text);
    background: transparent;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.035), 0 18px 38px rgba(0,0,0,0.26);
}

.auth-page .auth-form button::before,
.quick-links a::before,
.community-actions a:first-child::before {
    content: "";
    position: absolute;
    left: -12%;
    right: -12%;
    bottom: -145%;
    height: 150%;
    z-index: -1;
    border-radius: 42% 48% 0 0;
    background: linear-gradient(135deg, var(--brand), var(--brand-blue));
    transition: transform 0.55s cubic-bezier(0.19, 1, 0.22, 1);
}

.auth-page .auth-form button:hover::before,
.quick-links a:hover::before,
.community-actions a:first-child:hover::before {
    transform: translateY(-78%);
}

.auth-page .auth-form button:hover,
.quick-links a:hover,
.community-actions a:first-child:hover {
    border-color: transparent;
    box-shadow: 0 24px 54px rgba(var(--brand-rgb),0.2);
}

.auth-return {
    width: fit-content;
    margin: -4px auto 0;
    color: var(--muted);
    font-weight: 900;
    transition: color 0.22s ease, transform 0.22s ease;
}

.auth-return:hover {
    color: var(--text);
    transform: translateY(-2px);
}

.community-shell::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 12%, rgba(225,29,72,0.11), transparent 26%),
        radial-gradient(circle at 88% 28%, rgba(59,130,246,0.105), transparent 28%),
        linear-gradient(180deg, rgba(255,255,255,0.025), transparent 42%);
}

.community-top {
    position: sticky;
    top: 16px;
    z-index: 20;
    padding: 8px;
    border: 1px solid rgba(255,255,255,0.075);
    border-radius: 999px;
    background: rgba(5,5,5,0.62);
    box-shadow: 0 24px 58px rgba(0,0,0,0.28);
    backdrop-filter: blur(18px);
}

.community-top nav a {
    transition: color 0.25s ease, border-color 0.25s ease, background 0.25s ease, transform 0.25s ease;
}

.community-top nav a:hover {
    background: rgba(255,255,255,0.055);
    transform: translateY(-1px);
}

.community-section-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
}

.community-toolbar {
    display: grid;
    justify-items: end;
    gap: 10px;
    min-width: min(430px, 100%);
}

.member-search {
    width: 100%;
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.member-search input {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0 16px;
    color: var(--text);
    background: rgba(255,255,255,0.045);
    font: inherit;
    text-transform: none;
    letter-spacing: 0;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background 0.25s ease;
}

.member-search input:focus {
    border-color: rgba(var(--brand-rgb),0.48);
    background: rgba(255,255,255,0.07);
    box-shadow: 0 0 0 4px rgba(var(--brand-rgb),0.12);
}

.role-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.role-filters button {
    min-height: 34px;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 0 12px;
    color: var(--muted);
    background: rgba(255,255,255,0.035);
    font: inherit;
    font-size: 0.82rem;
    font-weight: 900;
    cursor: pointer;
    transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}

.role-filters button:hover,
.role-filters button.active {
    color: var(--text);
    border-color: rgba(var(--brand-rgb),0.42);
    background: rgba(var(--brand-rgb),0.12);
    transform: translateY(-1px);
}

.member-card[hidden] {
    display: none;
}

.member-empty {
    margin-top: 16px;
}

.member-role {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.online-dot,
.offline-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    color: #86efac;
    background: rgba(34,197,94,0.11);
    font-size: 0.68rem;
    letter-spacing: 0.08em;
}

.offline-dot {
    color: #cbd5e1;
    background: rgba(148,163,184,0.1);
}

.quick-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

.quick-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-radius: 999px;
    font-weight: 900;
}

@keyframes ambientDrift {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(72px, 72px, 0); }
}

@keyframes cardSheen {
    0%, 42% { transform: translateX(-130%); opacity: 0; }
    52% { opacity: 0.78; }
    70%, 100% { transform: translateX(130%); opacity: 0; }
}

@media (max-width: 900px) {
    .auth-benefits {
        grid-template-columns: 1fr;
    }

    .community-section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .community-toolbar {
        justify-items: stretch;
        min-width: 0;
    }

    .role-filters {
        justify-content: flex-start;
    }
}

@media (max-width: 780px) {
    .auth-page .auth-panel {
        padding: 40px 0 52px;
    }

    .auth-page .auth-copy h1 {
        font-size: clamp(2.45rem, 15vw, 4.2rem);
    }

    .community-top {
        position: static;
        border-radius: 24px;
    }

    .community-top nav {
        width: 100%;
        flex-wrap: wrap;
    }

    .community-top nav a {
        flex: 1 1 auto;
        text-align: center;
    }

    .member-role {
        align-items: flex-start;
        flex-direction: column;
    }
}

@media (max-width: 520px) {
    .auth-shell,
    .community-shell {
        width: min(100% - 20px, 1180px);
        padding: 18px 0;
    }

    .auth-page .auth-card {
        padding: 22px;
        border-radius: 22px;
    }

    .auth-tabs {
        width: 100%;
    }

    .auth-tabs a {
        flex: 1;
        text-align: center;
        padding-inline: 10px;
    }

    .quick-links {
        grid-template-columns: 1fr;
    }
}
