.auth-page{min-height:70vh;display:grid;place-items:center;padding:60px 20px}.auth-card{width:min(460px,100%);padding:34px;background:rgba(20,16,31,.94);border:1px solid var(--line);border-radius:22px;box-shadow:var(--shadow)}.auth-logo{width:118px;display:block;margin:auto}.auth-card h1{font-size:42px;text-align:center;margin:10px 0}.auth-card>p{text-align:center;color:var(--muted);line-height:1.55}.auth-card form,.builder-card form{display:grid;gap:14px}.auth-card label,.builder-card label{display:grid;gap:7px;font-size:12px;font-weight:800;color:#cfc4df}.auth-card input,.builder-card input,.builder-card select,.question-row input,.question-row select{padding:12px;border-radius:9px;border:1px solid var(--line);background:#0e0a16;color:#fff}.auth-foot{text-align:center;margin-top:18px;color:var(--muted);font-size:13px}.auth-foot a{color:#c99aff}.form-error{padding:10px 12px;border-radius:9px;background:rgba(223,77,77,.12);color:#ffb0b0;margin:9px 0}.toast{position:fixed;right:20px;top:92px;z-index:200;padding:12px 16px;border-radius:10px;background:#1f182c;border:1px solid var(--line);box-shadow:var(--shadow)}.toast.success{border-color:rgba(70,190,110,.35)}.toast.error{border-color:rgba(220,70,70,.35)}.account-chip{font-size:12px;color:#c8bad8}.connect-banner{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:16px 18px;margin-bottom:18px;border:1px solid #6748ad;border-radius:13px;background:rgba(88,58,150,.15)}.connect-banner div{display:grid;gap:4px}.connect-banner span{font-size:12px;color:var(--muted)}.discord-btn{background:#5865f2;padding:10px 14px;border-radius:8px;font-weight:800}.head-actions{display:flex;gap:8px;align-items:center}.ticket-row small,.admin-ticket-row small{display:block;color:#9990a2;margin-top:4px}.status.awaiting-response{background:#63b7d5;color:white}.status.pending{background:#eba942;color:white}.status.resolved{background:#4da866;color:white}.status.closed{background:#dd684d;color:white}.ticket-view-page{padding:42px 0}.ticket-window{background:#f7f7f8;color:#38343c;border-radius:12px;overflow:visible;box-shadow:0 30px 100px rgba(0,0,0,.28)}.ticket-toolbar{height:52px;background:#dfdfe1;display:flex;align-items:center;justify-content:space-between;padding:0 20px;letter-spacing:2px;font-size:11px;font-weight:800}.ticket-detail-grid{display:grid;grid-template-columns:330px 1fr;min-height:580px}.ticket-meta{padding:26px;background:#eeeef0;border-right:1px solid #ddd}.ticket-meta dl{margin:18px 0}.ticket-meta dt{font-size:10px;letter-spacing:1.6px;color:#969299;font-weight:800;margin-top:16px}.ticket-meta dd{margin:4px 0 0;color:#4b474d;line-height:1.4}.appeal-note{font-size:12px;color:#a04e48!important;margin-top:8px!important}.conversation{padding:28px}.appeal-card{display:grid;grid-template-columns:150px 1fr;border:1px solid #e3e1e5;border-radius:8px;padding:26px;background:white}.profile-side{display:flex;flex-direction:column;align-items:center;justify-content:center;border-right:1px solid #eee;gap:15px}.profile-side img{width:72px;height:72px;border-radius:12px}.mc-head{width:64px;height:64px;background:#3b3840;color:white;display:grid;place-items:center}.answers{padding-left:28px}.answers h2{margin:0 0 18px;font-size:22px}.answer-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px}.answer b{font-size:12px}.answer p{margin:5px 0;color:#777078;line-height:1.45;font-size:13px}.reply-box{display:flex;align-items:center;gap:10px;margin:28px 0 20px}.reply-box input{flex:1;padding:11px 13px;border:1px solid #ddd;border-radius:7px}.reply-box button{border:0;background:#8b2cff;color:#fff;border-radius:7px;padding:10px 15px;font-weight:800}.avatar-mini{width:32px;height:32px;border-radius:7px;background:#7c43bf;color:white;display:grid;place-items:center;flex:0 0 auto}.messages{display:grid;gap:10px}.message{display:flex;gap:12px;padding:13px;border-radius:8px;background:#ececef}.message p{margin:5px 0}.message small{color:#96909a}.staff-tag{font-size:9px;background:#8b2cff;color:#fff;border-radius:4px;padding:2px 5px;margin-left:6px}.no-replies{text-align:center;color:#bbb5bd;padding:36px 10px}.status-form{position:relative}.status-form .status{border:0;cursor:pointer}.status-menu{display:none;position:absolute;right:0;top:34px;background:#fff;padding:8px;border-radius:6px;box-shadow:0 8px 20px rgba(0,0,0,.2);z-index:5;min-width:150px}.status-menu.show{display:grid;gap:6px}.status-menu button{border:0;color:#fff;font-weight:800;padding:7px;border-radius:4px;cursor:pointer}.status-menu button[value=closed]{background:#dd684d}.status-menu button[value=resolved]{background:#4da866}.admin-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.support-panel .centered{justify-content:center}.admin-ticket-head,.admin-ticket-row{display:grid;grid-template-columns:1.45fr .75fr .85fr;gap:12px;align-items:center}.admin-ticket-head{padding:10px 18px;background:#ececee;color:#9c969e;font-size:9px;letter-spacing:1.5px;font-weight:800}.admin-ticket-row{padding:13px 18px;border-bottom:1px solid #e4e0e6;font-size:13px}.admin-links{padding:18px 0 60px}.builder-grid{display:grid;grid-template-columns:1fr 1fr;gap:18px}.builder-card,.question-list{padding:22px;border:1px solid var(--line);border-radius:16px;background:rgba(255,255,255,.03)}.builder-card h2,.question-list h2{font-family:Rajdhani;font-size:29px}.check{display:flex!important;grid-template-columns:auto 1fr!important;align-items:center;gap:8px!important}.check input{width:auto}.category-list{display:grid;gap:7px;margin-top:18px}.category-list>div{display:flex;justify-content:space-between;gap:10px;padding:10px;border:1px solid var(--line);border-radius:8px}.category-list button,.danger-btn{border:0;background:#7e2930;color:white;padding:7px 9px;border-radius:6px;cursor:pointer}.question-list{margin-top:18px;margin-bottom:60px}.question-row{display:grid;grid-template-columns:2fr .6fr .4fr .7fr auto auto;gap:10px;align-items:end;padding:12px 0;border-bottom:1px solid var(--line)}.question-row>div{display:grid;gap:4px}.question-row small{color:var(--muted)}
@media(max-width:900px){.admin-grid,.builder-grid{grid-template-columns:1fr}.ticket-detail-grid{grid-template-columns:1fr}.ticket-meta{border-right:0;border-bottom:1px solid #ddd}.appeal-card{grid-template-columns:1fr}.profile-side{border-right:0;border-bottom:1px solid #eee;padding-bottom:20px}.answers{padding:20px 0 0}.answer-grid{grid-template-columns:1fr}.question-row{grid-template-columns:1fr 1fr}.connect-banner{align-items:flex-start;flex-direction:column}}

/* v3 modal fixes */
html.modal-open,html.modal-open body{overflow:hidden!important;height:100%}
.modal{overflow-y:auto;overscroll-behavior:contain;align-items:flex-start;padding:34px 20px}
.modal.show{display:flex;justify-content:center}
.modal-card{display:flex;flex-direction:column;width:min(680px,100%);max-height:calc(100dvh - 68px);overflow:hidden;margin:auto}
.modal-head{flex:0 0 auto}
.modal-card form{display:flex;flex-direction:column;min-height:0}
.modal-body{overflow-y:auto;overscroll-behavior:contain;padding:20px 20px 0;scrollbar-gutter:stable}
.modal-actions{position:sticky;bottom:0;background:#fff;padding:16px 0 20px;margin-top:6px;border-top:1px solid #eee8f2;z-index:2}
.modal-actions .btn{min-width:132px}
.modal-actions .btn-cancel{background:#c83c4b;color:#fff;border:1px solid #b52c3a}
.modal-actions .btn-cancel:hover{filter:brightness(1.05)}
.admin-nav-btn{border-color:rgba(176,108,255,.34);background:rgba(139,44,255,.12);color:#e6d2ff}
@media(max-width:650px){.modal{padding:12px}.modal-card{max-height:calc(100dvh - 24px);border-radius:13px}.modal-actions{flex-direction:column-reverse}.modal-actions .btn{width:100%}}

/* v4 ticket polish */
.ticket-window{border-radius:16px;overflow:hidden}.ticket-toolbar{border-radius:16px 16px 0 0}.conversation{background:#f8f7f9}.appeal-card{border-radius:14px;box-shadow:0 8px 24px rgba(55,42,63,.05)}.reply-box{padding:10px 12px;background:#f0eef2;border:1px solid #e1dce5;border-radius:13px}.reply-box input{background:#fff;border-radius:10px}.reply-box button{width:42px;height:38px;padding:0;display:grid;place-items:center}.avatar-mini-img,.message-avatar{width:36px;height:36px;border-radius:7px;object-fit:cover;flex:0 0 auto}.message{border-radius:13px;background:#eeecef;border:1px solid #e5e0e7}.message-name{font-size:13px}.message p{color:#55505a;line-height:1.45}.staff-tag{display:none!important}.mc-head{border-radius:10px}.profile-side img{border-radius:10px}.status.closed{background:#dd684d;color:#fff}.ticket-meta{border-radius:0 0 0 16px}.conversation{border-radius:0 0 16px 0}.support-panel{background:#eeebf1}.ticket-panel{background:#f0edf2}.support-head{background:#ddd9e0}.ticket-table-head{background:#e8e4eb}.ticket-list{background:#f2eff4}.modal-card{background:#f5f2f6}.modal-head{background:#e6e0e9}.modal-body{background:#f5f2f6}.modal-actions{background:#f5f2f6}.field input,.field select,.field textarea{background:#fbfafc}


/* v5 ticket creator + admin ticket lists */
.ticket-identifier{
    font-weight:900;
    letter-spacing:.7px;
    color:#3f3943!important;
}
.creator-profile .creator-name{
    color:#241f27;
    font-size:15px;
    font-weight:900;
    text-decoration:none;
}
.creator-profile .creator-name:hover{text-decoration:underline}
.creator-rank{
    margin-top:-8px;
    color:var(--creator-rank-color,#765f86);
    font-size:9px;
    line-height:1;
    font-weight:900;
    letter-spacing:2.1px;
    text-transform:uppercase;
}
.ticket-reply-separator{
    height:16px;
    margin:20px -28px 0;
    background:#fff;
    border-top:1px solid #ece9ee;
    border-bottom:1px solid #ece9ee;
}
.ticket-reply-separator + .reply-box{margin-top:18px}

.admin-ticket-panel{
    min-height:0;
    background:#f3f3f4;
    border-color:#e4e1e6;
}
.admin-ticket-panel .support-head{
    background:#dedde0;
}
.admin-ticket-head{
    background:#ececee;
}
.admin-ticket-row{
    background:#f5f5f6;
    color:#37313b;
}
.admin-ticket-row:hover{
    background:#f0f0f2;
}
.admin-ticket-link{
    color:#5e82a8;
    font-weight:500;
    text-decoration:none;
}
.admin-ticket-link:hover{
    color:#466f9a;
    text-decoration:underline;
}
.admin-ticket-title small{
    color:#938b97;
    font-size:10px;
    font-weight:500;
}
.admin-player{
    display:flex;
    align-items:center;
    gap:8px;
    min-width:0;
}
.admin-player img,.admin-player-fallback{
    width:26px;
    height:26px;
    border-radius:5px;
    flex:0 0 26px;
}
.admin-player img{
    object-fit:cover;
}
.admin-player-fallback{
    display:grid;
    place-items:center;
    background:#ddd9df;
    color:#6d6671;
    font-size:11px;
}
.admin-player-name{
    color:var(--player-color,#765f86);
    font-weight:500;
    text-decoration:none;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}
.admin-player-name:hover{text-decoration:underline}
.admin-last-message{
    color:#5e5861;
    white-space:nowrap;
}
.admin-ticket-head.assigned-head,.admin-ticket-row.assigned-row{
    grid-template-columns:1.55fr .72fr 1fr;
}
.admin-ticket-head.unassigned-head,.admin-ticket-row.unassigned-row{
    grid-template-columns:1.25fr 1fr 1fr;
}
@media(max-width:900px){
    .ticket-reply-separator{margin-left:-28px;margin-right:-28px}
    .admin-ticket-row{font-size:12px}
}

/* v6 FAQ reference styling */
.faq-reference{padding:20px 18px 24px;background:#efeff0;color:#5f5b60}
.faq-reference .faq-item{padding:0 0 12px;margin:0;border:0}
.faq-reference .faq-q{font-size:15px;font-weight:500;color:#777378;margin:0 0 2px;line-height:1.18}
.faq-reference .faq-a{font-size:13px;line-height:1.38;color:#666267}
.faq-reference .faq-link{color:#6e8cad;text-decoration:none;cursor:pointer}
.faq-reference .faq-link:hover{text-decoration:underline}
.faq-reference .faq-red{color:#b45c63}

.auto-punishment{display:grid;gap:3px;padding:12px 14px;border:1px solid #d7d0dc;border-radius:10px;background:#ece8ef;color:#4a454e}
.auto-punishment b{font-size:12px;letter-spacing:.6px;color:#b34f58}
.auto-punishment span{font-size:13px}
.auto-punishment small{font-size:11px;color:#918995}
.auto-punishment.empty-punishment{display:flex;align-items:center;gap:8px;color:#8e6770}

/* Clean flash notifications */
.toast{position:fixed;right:24px;top:92px;z-index:500;display:flex;align-items:center;min-width:230px;max-width:390px;padding:13px 16px 13px 42px;border-radius:12px;background:rgba(22,17,30,.97);color:#f7f3fb;border:1px solid rgba(255,255,255,.09);box-shadow:0 14px 42px rgba(0,0,0,.38);font-size:13px;font-weight:700;opacity:0;transform:translateY(-9px) scale(.98);animation:spaceToastIn .24s ease forwards,spaceToastOut .24s ease 3.6s forwards}
.toast:before{font-family:"Font Awesome 6 Free";font-weight:900;position:absolute;left:15px;width:18px;text-align:center}
.toast.success{border-color:rgba(77,168,102,.35)}
.toast.success:before{content:"\f00c";color:#58bc75}
.toast.error{border-color:rgba(221,104,77,.4)}
.toast.error:before{content:"\f071";color:#e77861}
@keyframes spaceToastIn{to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes spaceToastOut{to{opacity:0;transform:translateY(-8px) scale(.98);pointer-events:none}}
@media(max-width:650px){.toast{left:14px;right:14px;top:78px;max-width:none}}


/* v6.1 - keep ticket statuses on one clean line */
.ticket-row .status,
.admin-ticket-row .status,
.status-form .status{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    white-space:nowrap;
    word-break:normal;
    line-height:1;
    min-width:max-content;
    max-width:none;
    padding:7px 10px;
    font-size:10px;
    font-weight:800;
}
.ticket-row > [data-label="STATUS"],
.admin-ticket-row > span:nth-child(2){
    min-width:0;
    overflow:visible;
}


/* v6.2 - spacing between ticket information and existing replies, including closed tickets */
.ticket-message-separator{
    height:18px;
    margin:22px -28px 18px;
    background:#fff;
    border-top:1px solid #ece9ee;
    border-bottom:1px solid #ece9ee;
}
.ticket-message-separator + .reply-box{
    margin-top:0;
}
.ticket-message-separator ~ .messages{
    margin-top:0;
}
@media(max-width:900px){
    .ticket-message-separator{
        margin-left:-28px;
        margin-right:-28px;
    }
}
