* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Rubik', sans-serif;
}

:root {
    --bg-dark: #090909;
    --bg-panel: #111214;
    --bg-field: #0b0c0e;
    --border-soft: rgba(255,255,255,0.1);
    --border-strong: rgba(255,255,255,0.2);
    --border-red: rgba(211,13,13,0.36);
    --text-main: #fff;
    --text-muted: #a8acb3;
    --text-body: #d7d9dd;
    --red: #d30d0d;
    --red-hot: #f03a3a;
    --green: #24854c;
    --gold: #96702a;
    --teal: #147b86;
    --discord: #5865f2;
    --shadow: rgba(0,0,0,0.34);
}

html {
    min-height: 100%;
    background: var(--bg-dark);
}

body.suggestions-page {
    min-height: 100vh;
    color: var(--text-main);
    background:
        linear-gradient(180deg, rgba(211,13,13,0.08) 0%, rgba(211,13,13,0) 34%),
        linear-gradient(135deg, #0a0a0a 0%, #101113 48%, #090909 100%);
    background-attachment: fixed;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

[hidden] {
    display: none !important;
}

.suggestions-shell {
    width: min(1480px, 100%);
    margin: 0 auto;
    padding: 24px;
}

.suggestions-topbar,
.suggestions-hero,
.suggestion-stats,
.submit-panel,
.suggestion-controls,
.suggestion-card {
    background: linear-gradient(180deg, rgba(20,22,26,0.98) 0%, rgba(15,16,19,0.98) 100%);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
    box-shadow: 0 18px 44px var(--shadow);
    backdrop-filter: blur(14px);
}

.suggestions-topbar {
    min-height: 70px;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 16px;
}

.brand-mark,
.page-links,
.account-zone,
.discord-login,
.logout-link,
.account-chip,
.ghost-button,
.suggestion-form button,
.comment-form button,
.save-note-button,
.link-row a,
.staff-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
}

.brand-mark,
.page-links a,
.discord-login,
.logout-link,
.ghost-button,
.link-row a {
    color: #fff;
    text-decoration: none;
}

.brand-mark img,
.account-chip img {
    border-radius: 50%;
}

.brand-mark {
    gap: 12px;
}

.brand-mark img {
    width: 44px;
    height: 44px;
    border: 1px solid #252525;
}

.brand-mark strong,
.brand-mark small {
    display: block;
}

.brand-mark small {
    color: var(--text-muted);
    margin-top: 2px;
}

.page-links {
    justify-self: center;
    gap: 8px;
}

.page-links a {
    min-height: 38px;
    padding: 9px 12px;
    color: var(--text-body);
    background: #17191c;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    font-weight: 700;
}

.account-zone {
    justify-self: end;
    gap: 10px;
}

.discord-login,
.logout-link,
.ghost-button,
.suggestion-form button,
.comment-form button,
.save-note-button {
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    font-weight: 700;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.discord-login {
    background: linear-gradient(180deg, #6671ff 0%, var(--discord) 100%);
    box-shadow: 0 10px 24px rgba(88,101,242,0.22);
}

.logout-link,
.ghost-button {
    background: #17191c;
}

.suggestion-form button {
    width: 100%;
    color: #fff;
    background: linear-gradient(180deg, #ef2424 0%, var(--red) 100%);
    box-shadow: 0 10px 24px rgba(211,13,13,0.22);
}

.comment-form button,
.save-note-button {
    width: fit-content;
    color: #fff;
    background: #1b1d21;
}

.discord-login:hover,
.logout-link:hover,
.ghost-button:hover,
.suggestion-form button:hover,
.comment-form button:hover,
.save-note-button:hover,
.page-links a:hover,
.staff-actions button:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
}

.account-chip {
    min-height: 42px;
    padding: 8px 12px;
    color: var(--text-body);
    background: #15171a;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    font-weight: 700;
}

.account-chip img {
    width: 28px;
    height: 28px;
}

.staff-badge,
.viewer-badge {
    padding: 5px 8px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 800;
}

.staff-badge {
    background: rgba(36,133,76,0.95);
}

.viewer-badge {
    background: #292d33;
}

.suggestions-hero {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
    padding: 24px;
    border-color: var(--border-red);
}

.tracker-kicker {
    color: var(--red-hot);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.suggestions-hero h1 {
    font-size: clamp(2.25rem, 5vw, 3.8rem);
    line-height: 1;
    margin-bottom: 12px;
}

.suggestions-hero p {
    color: var(--text-muted);
    line-height: 1.55;
}

.tracker-status {
    min-width: 160px;
    padding: 11px 13px;
    text-align: center;
    color: var(--text-body);
    background: #15171a;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    font-weight: 700;
}

.tracker-status.staff {
    border-color: rgba(36,133,76,0.52);
    color: #dff8e8;
}

.tracker-status.error {
    border-color: rgba(255,49,49,0.62);
    color: #ffd7d7;
}

.suggestion-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
    padding: 14px;
}

.suggestion-stats span {
    min-height: 70px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 12px;
    color: var(--text-muted);
    background: #15171a;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
}

.suggestion-stats strong {
    color: #fff;
    font-size: 1.45rem;
}

.suggestion-layout {
    display: grid;
    grid-template-columns: minmax(310px, 390px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.submit-panel {
    position: sticky;
    top: 18px;
    padding: 18px;
}

.login-gate {
    display: grid;
    gap: 12px;
    color: var(--text-muted);
    line-height: 1.55;
}

.server-gate {
    display: grid;
    gap: 12px;
    color: var(--text-muted);
    line-height: 1.55;
}

.login-gate i {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--discord);
    border-radius: 8px;
    font-size: 1.25rem;
}

.server-gate i {
    width: 44px;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--red);
    border-radius: 8px;
    font-size: 1.1rem;
}

.login-gate h2,
.server-gate h2,
.panel-head h2 {
    color: #fff;
}

.suggestion-form label {
    display: grid;
    gap: 7px;
    margin-bottom: 12px;
    color: var(--text-body);
    font-size: 0.86rem;
    font-weight: 800;
}

.panel-head {
    margin-bottom: 14px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-soft);
}

.panel-head p:last-child {
    margin-top: 6px;
    color: var(--text-muted);
    line-height: 1.45;
    font-size: 0.9rem;
}

.requirement-list {
    display: grid;
    gap: 8px;
    margin-bottom: 14px;
}

.requirement-list span {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 36px;
    padding: 9px 10px;
    color: var(--text-body);
    background: #15171a;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 800;
}

.requirement-list i {
    color: var(--red-hot);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

input,
select,
textarea {
    width: 100%;
    color: #fff;
    background: var(--bg-field);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    outline: none;
    transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

input,
select {
    min-height: 42px;
    padding: 10px 12px;
}

textarea {
    resize: vertical;
    padding: 11px 12px;
    line-height: 1.45;
}

.consent-card {
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 10px !important;
    padding: 12px;
    background: rgba(88,101,242,0.1);
    border: 1px solid rgba(88,101,242,0.28);
    border-radius: 8px;
}

.consent-card input {
    width: 18px;
    min-height: 18px;
    margin-top: 2px;
}

.consent-card strong,
.consent-card small {
    display: block;
}

.consent-card small {
    margin-top: 4px;
    color: var(--text-muted);
    font-weight: 500;
    line-height: 1.4;
}

input:focus,
select:focus,
textarea:focus,
.search-field:focus-within {
    border-color: rgba(255,49,49,0.72);
    box-shadow: 0 0 0 3px rgba(211,13,13,0.18);
}

.suggestion-controls {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) 160px 150px auto auto;
    gap: 10px;
    margin-bottom: 14px;
    padding: 14px;
}

.search-field,
.mine-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 12px;
    color: var(--text-muted);
    background: var(--bg-field);
    border: 1px solid var(--border-soft);
    border-radius: 6px;
}

.search-field input {
    min-height: 40px;
    padding: 0;
    border: 0;
    background: transparent;
}

.mine-toggle {
    font-weight: 800;
    white-space: nowrap;
}

.mine-toggle input {
    width: 16px;
    min-height: 16px;
}

.suggestions-list {
    display: grid;
    gap: 12px;
}

.suggestion-card {
    padding: 16px;
    border-left: 3px solid rgba(211,13,13,0.52);
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.suggestion-card:hover {
    transform: translateY(-1px);
    border-color: var(--border-strong);
    box-shadow: 0 16px 30px rgba(0,0,0,0.28);
}

.suggestion-card[data-status="denied"] {
    border-color: rgba(255,49,49,0.46);
}

.suggestion-card[data-status="approved"],
.suggestion-card[data-status="implemented"] {
    border-color: rgba(36,133,76,0.46);
}

.suggestion-head {
    display: flex;
    align-items: start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}

.suggestion-head h2 {
    margin-top: 8px;
    font-size: 1.08rem;
    line-height: 1.3;
}

.status-pill,
.tag-row span {
    display: inline-flex;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 5px 8px;
    color: #fff;
    background: rgba(211,13,13,0.2);
    border: 1px solid rgba(211,13,13,0.32);
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
}

.suggestion-body {
    color: var(--text-muted);
    line-height: 1.55;
    white-space: pre-wrap;
}

.tag-row,
.link-row,
.staff-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: 12px;
}

.tag-row span {
    background: #23262b;
    border-color: var(--border-soft);
}

.suggestion-meta {
    margin-top: 12px;
    padding-top: 12px;
    color: #858b95;
    border-top: 1px solid var(--border-soft);
    font-size: 0.8rem;
    font-weight: 700;
}

.response-box {
    margin-top: 12px;
    padding: 12px;
    color: #dff8e8;
    background: rgba(36,133,76,0.12);
    border: 1px solid rgba(36,133,76,0.3);
    border-radius: 6px;
    line-height: 1.5;
}

.moderation-panel,
.comments-panel {
    margin-top: 14px;
    padding: 14px;
    background: rgba(10,11,13,0.58);
    border: 1px solid var(--border-soft);
    border-radius: 8px;
}

.moderation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.moderation-grid label,
.comment-form {
    display: grid;
    gap: 8px;
}

.moderation-grid span {
    color: var(--text-body);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.save-note-button {
    margin-top: 12px;
    border-color: rgba(88,101,242,0.35);
}

.comments-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.comments-head strong {
    color: #fff;
}

.comment-count,
.comment-login,
.no-comments {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.comment-list {
    display: grid;
    gap: 9px;
}

.comment-item {
    padding: 11px;
    background: #15171a;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
}

.comment-item.staff-comment {
    border-color: rgba(88,101,242,0.35);
    background: rgba(88,101,242,0.1);
}

.comment-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 6px;
}

.comment-head strong {
    color: var(--text-body);
    font-size: 0.84rem;
}

.comment-head span {
    padding: 3px 7px;
    color: #fff;
    background: var(--discord);
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 800;
}

.comment-head small {
    color: #858b95;
    font-size: 0.75rem;
    font-weight: 700;
}

.comment-item p {
    color: var(--text-muted);
    line-height: 1.48;
    white-space: pre-wrap;
}

.comment-form {
    margin-top: 10px;
}

.comment-login {
    margin-top: 10px;
}

.link-row a {
    min-height: 30px;
    padding: 6px 8px;
    color: var(--text-body);
    background: #1b1d21;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 800;
}

.staff-actions {
    justify-content: flex-end;
    margin-top: 0;
}

.staff-actions button {
    min-height: 32px;
    padding: 7px 9px;
    color: #fff;
    background: #1b1d21;
    border: 1px solid var(--border-soft);
    border-radius: 6px;
    font-size: 0.76rem;
    font-weight: 800;
}

.staff-actions button[data-action="approve"],
.staff-actions button[data-action="implemented"] {
    background: rgba(36,133,76,0.95);
}

.staff-actions button[data-action="deny"],
.staff-actions button[data-action="delete"] {
    background: rgba(211,13,13,0.95);
}

.empty-state {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    color: var(--text-muted);
    text-align: center;
    background: rgba(17,18,20,0.96);
    border: 1px dashed var(--border-strong);
    border-radius: 8px;
}

@media (max-width: 980px) {
    .suggestions-topbar,
    .suggestions-hero,
    .suggestion-layout,
    .suggestion-controls {
        grid-template-columns: 1fr;
    }

    .suggestions-hero,
    .suggestions-topbar {
        align-items: stretch;
        display: flex;
        flex-direction: column;
    }

    .page-links,
    .account-zone {
        justify-self: start;
        flex-wrap: wrap;
    }

    .submit-panel {
        position: static;
    }
}

@media (max-width: 620px) {
    .suggestions-shell {
        padding: 16px;
    }

    .suggestion-stats,
    .form-grid,
    .moderation-grid {
        grid-template-columns: 1fr;
    }

    .discord-login,
    .logout-link,
    .account-chip,
    .ghost-button,
    .page-links,
    .page-links a {
        width: 100%;
    }

    .suggestion-head {
        flex-direction: column;
    }

    .staff-actions {
        justify-content: flex-start;
    }
}
