@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700;800;900&display=swap');

:root {
    --bg: #101114;
    --sidebar: #17181c;
    --panel: #1b1c21;
    --panel-light: #222329;
    --border: #303138;

    --text: #f4f4f5;
    --muted: #92939c;

    --accent: #d0d0d0;

    --green: #8ac9a0;
    --red: #da9292;
    --yellow: #dfc17b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font-family: inherit;
}

button {
    cursor: pointer;
}

svg {
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

[hidden] {
    display: none !important;
}

button:disabled {
    opacity: 0.5;
    cursor: wait;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #bbb;
    outline-offset: 3px;
}

/* LAYOUT */

.app {
    display: flex;
    min-height: 100vh;
}

/* SIDEBAR */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;

    width: 275px;

    display: flex;
    flex-direction: column;

    background: var(--sidebar);

    border-right: 1px solid var(--border);

    z-index: 1000;
}

.sidebar-header {
    min-height: 110px;
    padding: 32px 26px;

    border-bottom: 1px solid var(--border);
}

.brand {
    display: block;

    font-size: 24px;
    font-weight: 900;

    letter-spacing: -1.5px;

    white-space: nowrap;
}

.brand span {
    color: #a5a5a9;
}

.brand-subtitle {
    display: block;

    margin-top: 10px;

    color: #777982;

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 2px;
}

.sidebar-content {
    flex: 1;
    padding: 28px 15px;
    overflow-y: auto;
}

.nav-label {
    padding: 0 15px;

    margin-bottom: 17px;

    font-size: 9px;
    font-weight: 800;

    letter-spacing: 2px;

    color: #777982;
}

.nav-label-secondary {
    margin-top: 35px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav-item {
    width: 100%;

    display: flex;
    align-items: center;

    gap: 13px;

    padding: 15px;

    background: transparent;

    border: 1px solid transparent;
    border-radius: 7px;

    color: #a1a2aa;

    font-size: 11px;
    font-weight: 700;

    text-align: left;

    transition: 0.25s;
}

.nav-item:hover {
    background: #25262b;
    color: white;
}

.nav-item.active {
    background: #2c2d33;
    border-color: #42434a;
    color: white;
}

.nav-icon {
    color: #a9a9af;
}

.nav-icon svg {
    width: 19px;
    height: 19px;
}

.nav-count {
    margin-left: auto;

    padding: 5px 9px;

    background: #3c3d43;

    border-radius: 5px;

    color: white;

    font-size: 10px;
    font-weight: 800;
}

/* SIDEBAR FOOTER */

.sidebar-footer {
    padding: 20px;

    border-top: 1px solid var(--border);
}

.staff-profile {
    display: flex;
    align-items: center;
    gap: 12px;

    margin-bottom: 20px;
}

.staff-avatar {
    width: 44px;
    height: 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #303137;

    border: 1px solid #484950;
    border-radius: 9px;

    color: #ddd;
}

.staff-profile-info {
    min-width: 0;

    display: flex;
    flex-direction: column;
    gap: 6px;
}

.staff-profile-info strong {
    font-size: 12px;

    overflow: hidden;
    text-overflow: ellipsis;
}

.staff-profile-info span {
    font-size: 9px;
    font-weight: 800;

    color: #aaa;

    letter-spacing: 1px;
}

.logout-button {
    width: 100%;

    padding: 14px;

    background: #28292e;

    border: 1px solid #3c3d43;
    border-radius: 6px;

    color: #ccc;

    font-size: 10px;
    font-weight: 800;

    transition: 0.3s;
}

.logout-button:hover {
    background: #35363c;
    color: white;
}

/* MAIN */

.main-wrapper {
    width: calc(100% - 275px);
    margin-left: 275px;

    min-height: 100vh;
}

.topbar {
    height: 85px;

    padding: 0 45px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    background: #17181c;

    border-bottom: 1px solid var(--border);
}

.topbar-left,
.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.breadcrumb {
    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1px;

    color: #aaa;
}

.breadcrumb span {
    margin: 0 10px;
    color: #555;
}

.system-status {
    display: flex;
    align-items: center;
    gap: 10px;

    color: #aaa;

    font-size: 10px;
    font-weight: 800;
}

.system-dot {
    width: 7px;
    height: 7px;

    background: #8ac9a0;
    border-radius: 50%;

    box-shadow: 0 0 12px rgba(138,201,160,0.4);
}

/* MAIN CONTENT */

.main-content {
    max-width: 1600px;

    padding: 45px;
    margin: auto;

    animation: fadeIn 0.35s ease both;
}

.page-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;

    gap: 25px;
    margin-bottom: 35px;
}

.page-label {
    display: block;

    color: #96979e;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 3px;

    margin-bottom: 17px;
}

.page-heading h1 {
    font-size: clamp(25px, 3vw, 36px);
    font-weight: 900;

    margin-bottom: 13px;
}

.page-heading p {
    color: var(--muted);
    line-height: 1.8;
}

.refresh-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    gap: 10px;

    padding: 14px 20px;

    background: #28292e;

    border: 1px solid #43444b;
    border-radius: 6px;

    color: white;

    font-size: 10px;
    font-weight: 800;

    white-space: nowrap;

    transition: 0.3s;
}

.refresh-button:hover {
    background: #383940;
}

.refresh-button svg {
    width: 17px;
    height: 17px;
}

/* STATISTICS */

.statistics {
    display: grid;

    grid-template-columns: repeat(4, minmax(0, 1fr));

    gap: 20px;
    margin-bottom: 35px;
}

.stat-card {
    padding: 27px;

    background: var(--panel);

    border: 1px solid var(--border);
    border-radius: 10px;

    transition: 0.3s;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: #55565e;
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 10px;

    margin-bottom: 23px;
}

.stat-header span:first-child {
    font-size: 9px;
    font-weight: 800;

    color: #aaa;

    letter-spacing: 1px;
}

.stat-indicator {
    width: 9px;
    height: 9px;

    border-radius: 50%;
}

.stat-indicator.pending {
    background: var(--yellow);
}

.stat-indicator.approved {
    background: var(--green);
}

.stat-indicator.rejected {
    background: var(--red);
}

.stat-indicator.total {
    background: #aaa;
}

.stat-card strong {
    display: block;

    font-size: 37px;
    font-weight: 900;

    margin-bottom: 12px;
}

.stat-card p {
    color: #898a92;

    font-size: 10px;
    line-height: 1.7;
}

/* PANELS */

.content-panel {
    padding: 30px;

    margin-bottom: 30px;

    background: var(--panel);

    border: 1px solid var(--border);
    border-radius: 10px;
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 25px;

    margin-bottom: 30px;
}

.panel-header h2 {
    font-size: 15px;
    font-weight: 800;

    margin-bottom: 10px;
}

.panel-header p {
    color: #898a92;

    font-size: 11px;
}

/* SEARCH */

.search-wrapper {
    position: relative;

    width: 280px;
    max-width: 100%;
}

.search-wrapper svg {
    position: absolute;

    left: 14px;
    top: 50%;

    transform: translateY(-50%);

    width: 17px;
    height: 17px;

    color: #999;
}

.search-wrapper input {
    width: 100%;
    height: 45px;

    padding: 0 15px 0 42px;

    background: #25262b;

    border: 1px solid #3b3c43;
    border-radius: 6px;

    color: white;

    font-size: 11px;

    outline: none;
}

.search-wrapper input:focus {
    border-color: #777;
}

/* TABLE */

.table-wrapper {
    overflow-x: auto;
}

.applications-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.applications-table th {
    padding: 18px 15px;

    border-bottom: 1px solid #3a3b42;

    color: #8b8c94;

    font-size: 9px;
    font-weight: 800;

    white-space: nowrap;
}

.applications-table td {
    padding: 20px 15px;

    border-bottom: 1px solid #2d2e34;

    font-size: 11px;
}

.applications-table tbody tr {
    transition: background 0.2s;
}

.applications-table tbody tr:hover {
    background: #222329;
}

.application-id {
    color: #aaa;
    font-weight: 800;
}

.application-username {
    font-weight: 800;
}

.table-button {
    padding: 11px 15px;

    background: #d0d0d0;

    border: none;
    border-radius: 5px;

    color: #111;

    font-size: 10px;
    font-weight: 800;

    transition: 0.3s;
}

.table-button:hover {
    background: white;
}

/* BADGES */

.status-badge {
    display: inline-block;

    padding: 9px 12px;

    border-radius: 5px;

    font-size: 9px;
    font-weight: 800;

    white-space: nowrap;
}

.status-pending {
    background: rgba(220,180,80,0.12);
    color: var(--yellow);
}

.status-approved {
    background: rgba(90,190,120,0.12);
    color: var(--green);
}

.status-rejected {
    background: rgba(210,90,90,0.12);
    color: var(--red);
}

/* EMPTY */

.empty-list {
    padding: 45px 20px;

    text-align: center;

    color: #999;

    font-size: 12px;
}

/* REVIEW */

.review-question {
    padding: 25px;

    margin-bottom: 20px;

    background: #24252b;

    border: 1px solid #383940;
    border-radius: 9px;

    transition: border-color 0.3s;
}

.review-question.saved {
    border-color: var(--green);
}

.review-question h3 {
    font-size: 13px;
    line-height: 1.8;

    margin-bottom: 20px;
}

.review-answer {
    padding: 20px;

    margin-bottom: 20px;

    background: #191a1e;

    border: 1px solid #303138;
    border-radius: 6px;

    color: #bbb;

    font-size: 12px;
    line-height: 1.9;

    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.review-controls {
    display: grid;

    grid-template-columns: 190px minmax(0, 1fr) auto;

    gap: 12px;

    align-items: start;
}

.review-controls select,
.review-controls textarea,
.review-actions textarea {
    width: 100%;

    padding: 14px;

    background: #191a1e;

    border: 1px solid #45464d;
    border-radius: 6px;

    color: white;

    font-size: 11px;

    outline: none;
}

.review-controls select {
    min-height: 48px;
}

.review-comment-wrapper textarea {
    min-height: 90px;
    resize: vertical;
}

.review-save-button {
    min-height: 48px;

    padding: 12px 18px;

    background: #d0d0d0;

    border: none;
    border-radius: 5px;

    color: #111;

    font-size: 10px;
    font-weight: 800;
}

/* REVIEW ACTIONS */

.review-actions {
    padding-top: 25px;
    margin-top: 30px;

    border-top: 1px solid #383940;
}

.review-actions label {
    display: block;

    margin-bottom: 13px;

    color: #aaa;

    font-size: 10px;
    font-weight: 800;
}

.review-actions textarea {
    min-height: 110px;

    resize: vertical;
}

.action-buttons {
    display: flex;
    gap: 15px;

    margin-top: 20px;
}

.approve-button,
.reject-button {
    padding: 16px 25px;

    border: none;
    border-radius: 6px;

    font-size: 10px;
    font-weight: 800;

    transition: 0.3s;
}

.approve-button {
    background: var(--green);
    color: #111;
}

.reject-button {
    background: var(--red);
    color: #111;
}

.approve-button:hover,
.reject-button:hover {
    filter: brightness(1.15);
}

.close-button {
    padding: 12px 18px;

    background: #303137;

    border: 1px solid #484950;
    border-radius: 5px;

    color: white;

    font-size: 10px;
    font-weight: 800;
}

/* LOADING */

.loading-screen {
    min-height: calc(100vh - 85px);

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 20px;

    padding: 40px;

    text-align: center;
}

.loading-spinner {
    width: 42px;
    height: 42px;

    border: 3px solid #303138;
    border-top-color: #d0d0d0;

    border-radius: 50%;

    animation: spin 0.8s linear infinite;
}

.loading-screen h2 {
    font-size: 22px;
    font-weight: 900;
}

.loading-screen p {
    color: #999;

    font-size: 12px;
    line-height: 1.8;
}

/* TOAST */

.toast-container {
    position: fixed;

    top: 25px;
    right: 25px;

    z-index: 3000;

    display: flex;
    flex-direction: column;
    gap: 12px;

    width: min(380px, calc(100% - 40px));

    pointer-events: none;
}

.toast {
    padding: 17px 20px;

    background: #292a30;

    border: 1px solid #484950;
    border-left: 3px solid var(--green);

    border-radius: 7px;

    font-size: 11px;
    font-weight: 700;

    line-height: 1.7;

    box-shadow: 0 15px 40px rgba(0,0,0,0.3);

    animation: fadeIn 0.25s ease both;
}

.toast.error {
    border-left-color: var(--red);
}

.toast.warning {
    border-left-color: var(--yellow);
}

/* MOBILE */

.mobile-menu-button {
    display: none;

    background: none;
    border: none;

    color: white;
}

.mobile-overlay {
    position: fixed;
    inset: 0;

    background: rgba(0,0,0,0.65);

    z-index: 900;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 1300px) {
    .statistics {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1050px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-wrapper {
        width: 100%;
        margin-left: 0;
    }

    .mobile-menu-button {
        display: block;
    }

    .topbar {
        padding: 0 25px;
    }
}

@media (max-width: 750px) {
    .main-content {
        padding: 25px 15px;
    }

    .page-heading,
    .panel-header {
        flex-direction: column;
        align-items: stretch;
    }

    .search-wrapper {
        width: 100%;
    }

    .review-controls {
        grid-template-columns: 1fr;
    }

    .statistics {
        gap: 12px;
    }

    .stat-card {
        padding: 20px;
    }

    .content-panel {
        padding: 20px 15px;
    }

    .system-status {
        display: none;
    }
}

@media (max-width: 480px) {
    .statistics {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .approve-button,
    .reject-button {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* GTA-STORIES NEON STAFF ROLES */

.staff-role-badge {
    display: inline-flex;
    align-items: center;

    padding: 8px 12px;

    border: 1px solid currentColor;
    border-radius: 5px;

    font-size: 10px;
    font-weight: 900;

    letter-spacing: 1px;
}

.staff-role-badge.developer {
    color: #ff8500;

    background: rgba(255,133,0,0.1);

    box-shadow: 0 0 15px rgba(255,133,0,0.2);

    text-shadow: 0 0 9px rgba(255,133,0,0.7);
}

.staff-role-badge.head_of_staff {
    color: #e32842;

    background: rgba(177,18,38,0.15);

    box-shadow: 0 0 15px rgba(177,18,38,0.25);

    text-shadow: 0 0 9px rgba(227,40,66,0.6);
}

.staff-role-badge.administrator {
    color: #ff3549;

    background: rgba(255,53,73,0.1);

    box-shadow: 0 0 15px rgba(255,53,73,0.2);

    text-shadow: 0 0 9px rgba(255,53,73,0.6);
}