/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-padding-top: 80px;
}

:root {
    --primary-color: #B8860B;
    --secondary-color: #DAA520;
    --success-color: #6B8E23;
    --danger-color: #8B4513;
    --warning-color: #B8860B;
    --dark-bg: #0a0a0a;
    --darker-bg: #000000;
    --card-bg: #1a1a1a;
    --text-primary: #F5F5DC;
    --text-secondary: #DAA520;
    --border-color: #2a2a2a;
    --gold: #B8860B;
    --black: #000000;
    --beige: #DAA520;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #000000;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background-color: var(--darker-bg);
    padding: 1.15rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 2px solid var(--gold);
    box-shadow: 0 2px 10px rgba(212, 175, 55, 0.2);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    max-width: 1460px;
    padding: 0 24px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--gold);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    text-decoration: none;
    flex-shrink: 0;
}

.nav-logo img {
    height: 50px;
    width: auto;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 0.55rem 0.75rem;
    align-items: center;
    justify-content: flex-end;
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
    align-content: center;
}

.nav-links li {
    flex: 0 0 auto;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
    font-size: 0.88rem;
    white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary-color);
}

.btn-login,
.btn-logout {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1.15rem;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.3s;
    white-space: nowrap;
}

.nav-bell-btn {
    background: transparent;
    border: none;
    color: var(--text-muted, #aaa);
    font-size: 1rem;
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: 5px;
    transition: color 0.2s;
    line-height: 1;
    display: flex;
    align-items: center;
}
.nav-bell-btn:hover { color: var(--gold); }
.nav-bell-btn.bell-enabled { color: var(--gold); }
.nav-bell-btn.bell-denied { color: #888; opacity: 0.5; cursor: not-allowed; }
/* DND button active state */
.nav-bell-btn.dnd-active { color: #9b59b6; }
.nav-bell-btn.dnd-active:hover { color: #b07dd1; }

@keyframes bellPulse {
    0%, 100% { color: var(--text-muted, #aaa); transform: scale(1); }
    50% { color: var(--gold); transform: scale(1.2); }
}

.btn-login:hover,
.btn-logout:hover {
    background-color: var(--secondary-color);
    color: white !important;
}

.mobile-menu-toggle {
    display: none;
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--gold);
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(218,165,32,0.35);
    border-radius: 8px;
    background: rgba(218,165,32,0.08);
    transition: background 0.2s, border-color 0.2s, transform 0.12s;
}
.mobile-menu-toggle:hover {
    background: rgba(218,165,32,0.15);
    border-color: rgba(218,165,32,0.55);
}
.mobile-menu-toggle:active {
    transform: translateY(1px);
}

@media (min-width: 1101px) and (max-width: 1280px) {
    .navbar {
        padding: 0.75rem 0;
    }

    .navbar .container {
        padding: 0 14px;
    }

    .nav-logo {
        font-size: 1.2rem;
        gap: 10px;
    }

    .nav-logo img {
        height: 42px;
    }

    .nav-links {
        gap: 0.25rem 0.75rem;
    }

    .nav-links a {
        font-size: 0.84rem;
    }

    .btn-login,
    .btn-logout {
        padding: 0.35rem 0.75rem;
        font-size: 0.82rem;
    }
}

@media (min-width: 1281px) and (max-width: 1459px) {
    .navbar {
        padding: 0.85rem 0;
    }

    .navbar .container {
        padding: 0 16px;
        gap: 1rem;
    }

    .nav-logo {
        font-size: 1.3rem;
        gap: 10px;
    }

    .nav-logo img {
        height: 46px;
    }

    .nav-links {
        gap: 0.3rem 0.9rem;
    }

    .nav-links a {
        font-size: 0.88rem;
    }

    .btn-login,
    .btn-logout {
        padding: 0.4rem 0.85rem;
        font-size: 0.86rem;
    }
}

@media (max-width: 1100px) {
    .navbar {
        padding: 0.75rem 0;
    }

    .navbar .container {
        padding: 0 14px;
        gap: 0.75rem;
        position: relative;
    }

    .nav-logo {
        font-size: 1.08rem;
        gap: 0.55rem;
    }

    .nav-logo img {
        height: 38px;
    }

    .nav-links {
        display: none;
    }

    .mobile-menu-toggle {
        display: inline-flex;
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 100%);
    padding: 20rem 2rem 25rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-bottom: 2px solid var(--gold);
}

/* Slideshow Styles */
.hero-slideshow,
.about-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-slideshow .slide,
.about-slideshow .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-color: #0a0a0a;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
}

.hero-slideshow .slide.active,
.about-slideshow .slide.active {
    opacity: 1;
}

.slideshow-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.75) 100%);
    z-index: 1;
}

#about {
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--gold) 0%, transparent 70%);
    opacity: 0.08;
    animation: pulse 10s infinite;
    z-index: 2;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--gold);
    text-shadow: 0 0 30px rgba(184, 134, 11, 0.4);
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-primary);
    margin-bottom: 2.5rem;
    line-height: 1.6;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.hero-badges .badge {
    background: rgba(184, 134, 11, 0.15);
    border: 1px solid var(--gold);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--gold);
    transition: all 0.3s;
}

.hero-badges .badge:hover {
    background: rgba(184, 134, 11, 0.25);
    transform: translateY(-2px);
}

.hero-badges .badge i {
    font-size: 0.85rem;
}

.server-status {
    display: inline-flex;
    gap: 2rem;
    margin: 2rem 0;
    background: rgba(26, 26, 26, 0.8);
    padding: 1rem 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.status-indicator.online i {
    color: var(--success-color);
    animation: blink 2s infinite;
}

.status-indicator.offline i {
    color: var(--danger-color);
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.player-count {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    background-color: var(--primary-color);
    color: #000000;
    padding: 0.9rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary i {
    margin-right: 0.5rem;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(184, 134, 11, 0.4);
}

.btn-danger {
    display: inline-flex;
    align-items: center;
    background-color: #dc2626;
    color: #fff;
    padding: 0.9rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-danger i {
    margin-right: 0.5rem;
}

.btn-danger:hover {
    background-color: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(220, 38, 38, 0.4);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    background-color: transparent;
    color: var(--gold);
    padding: 0.9rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    border: 2px solid var(--gold);
    cursor: pointer;
}

.btn-secondary i {
    margin-right: 0.5rem;
}

.btn-secondary:hover {
    background-color: var(--gold);
    color: #000000;
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(184, 134, 11, 0.4);
}
.btn-secondary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.btn-secondary:disabled:hover {
    background-color: transparent;
    color: inherit;
    transform: none;
    box-shadow: none;
}

.btn-large {
    padding: 1.1rem 2.5rem;
    font-size: 1.1rem;
}

.server-code {
    margin-top: 1.5rem;
    padding: 1rem 2rem;
    background: rgba(212, 175, 55, 0.1);
    border: 2px solid var(--gold);
    border-radius: 10px;
    display: inline-block;
}

.server-code p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.server-code strong {
    color: var(--gold);
    font-size: 1.3rem;
    letter-spacing: 2px;
}

/* Section Styles */
.section {
    padding: 20rem 2rem;
    background: #0d0d0d;
    position: relative;
    border-top: 2px solid var(--gold);
    border-bottom: 2px solid var(--gold);
    margin-bottom: 0;
}

.section.bg-dark {
    background: #000000;
    border-top: 2px solid var(--gold);
    border-bottom: 2px solid var(--gold);
}

.section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--gold);
    text-shadow: 0 0 20px rgba(184, 134, 11, 0.5);
    position: relative;
    padding-bottom: 1rem;
}

.section h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* Server Features Section */
#server-info {
    padding: 4rem 2rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    background: var(--card-bg);
    padding: 2.5rem 2rem;
    border-radius: 12px;
    text-align: left;
    border: 1px solid var(--border-color);
    transition: all 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--gold);
    box-shadow: 0 8px 25px rgba(184, 134, 11, 0.2);
}

.feature-card i {
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 1.2rem;
    display: block;
}

.feature-card h3 {
    margin-bottom: 0.8rem;
    color: var(--text-primary);
    font-size: 1.4rem;
    font-weight: 600;
}

.feature-card p {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* About Section */
#about {
    padding: 28rem 2rem;
}

#about .container {
    position: relative;
    z-index: 3;
}

.about-simple {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-simple h2 {
    margin-bottom: 1.5rem;
}

.about-text {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--text-primary);
    margin-bottom: 3rem;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.stat {
    text-align: center;
    padding: 1.5rem;
    background: rgba(184, 134, 11, 0.1);
    border: 1px solid var(--gold);
    border-radius: 10px;
    transition: all 0.3s;
}

.stat:hover {
    transform: translateY(-3px);
    background: rgba(184, 134, 11, 0.15);
    box-shadow: 0 5px 15px rgba(184, 134, 11, 0.2);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Support CTA Section */
.support-cta {
    background: linear-gradient(135deg, #0d0d0d 0%, #000000 100%);
    position: relative;
    padding: 4rem 2rem;
}

.support-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(184, 134, 11, 0.1), transparent 70%);
    pointer-events: none;
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.cta-content i {
    font-size: 4rem;
    color: var(--gold);
    margin-bottom: 1.5rem;
}

.cta-content h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

/* Rules */
.rules-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.rule-category {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.rule-category h3 {
    color: var(--gold);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.rule-category ul {
    list-style: none;
}

.rule-category li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.rule-category li:last-child {
    border-bottom: none;
}

.rule-category li::before {
    content: '✓';
    color: var(--gold);
    margin-right: 0.5rem;
    font-weight: bold;
}

/* Legislation */
.legislation-container {
    display: flex;
    flex-direction: column;
    gap: 3rem;
}

.law-section {
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.law-section h3 {
    color: var(--gold);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
}

.law-item {
    background: var(--dark-bg);
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 3px solid var(--gold);
}

.law-item h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.law-item p {
    color: var(--text-secondary);
    margin: 0.25rem 0;
}

.law-item strong {
    color: var(--gold);
}

/* Footer */
.footer {
    background-color: var(--darker-bg);
    padding: 4rem 2.5rem 1.5rem;
    border-top: 2px solid var(--gold);
    box-shadow: 0 -2px 10px rgba(184, 134, 11, 0.2);
}

.footer .container {
    max-width: 1460px;
    padding: 0 28px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.75rem;
    margin-bottom: 2.5rem;
}

.footer-section h4 {
    color: var(--gold);
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 0.65rem;
}

.footer-section a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 2.25rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #000000 0%, #0a0a0a 100%);
}

.login-box {
    background: var(--card-bg);
    padding: 3rem;
    border-radius: 15px;
    text-align: center;
    border: 2px solid var(--gold);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.2);
    max-width: 400px;
    width: 100%;
}

.login-logo {
    height: 100px;
    margin-bottom: 1rem;
}

.login-box h1 {
    margin-bottom: 1rem;
    color: var(--gold);
}

.login-box p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.btn-discord {
    display: inline-block;
    background: linear-gradient(135deg, var(--gold) 0%, var(--beige) 100%);
    color: var(--darker-bg);
    padding: 1rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-bottom: 1rem;
    width: 100%;
    transition: all 0.3s;
}

.btn-discord:hover {
    background: linear-gradient(135deg, var(--beige) 0%, var(--gold) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}

.btn-discord i {
    margin-right: 0.5rem;
}

.btn-back {
    display: inline-block;
    color: var(--text-secondary);
    text-decoration: none;
    margin-top: 1rem;
    transition: color 0.3s;
}

.btn-back:hover {
    color: var(--primary-color);
}

/* Dashboard */
.dashboard {
    padding: 2rem 2rem 4rem;
    min-height: 100vh;
    background: var(--dark-bg);
}

/* ── Dashboard stats grid (4-col) ── */
.db-stats-row {
    grid-template-columns: repeat(4, 1fr) !important;
}

/* ── Filters bar inside panel ── */
.db-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    background: rgba(255,255,255,0.01);
    align-items: center;
}

.db-filters .filter-group {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.db-filters .filter-group label {
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.db-filter-search {
    flex-grow: 1;
    min-width: 180px;
}

.db-filter-search .filter-input {
    width: 100%;
}

/* ── Ticket/app list inside panel ── */
.db-panel-list {
    padding: 1rem 1.25rem;
}

/* Legacy – keep old classes non-breaking */
.dashboard-header { display: none; }
.dashboard-title  { display: none; }

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-avatar img {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 3px solid var(--gold);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.user-details h2 {
    margin-bottom: 0.25rem;
}

.user-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--gold);
    color: var(--darker-bg);
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
}

.user-badge.staff {
    background: var(--gold);
    color: var(--darker-bg);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

/* Tickets List */
.tickets-section {
    margin-top: 2rem;
}

.tickets-header {
    margin-bottom: 2rem;
}

.tickets-section h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.tickets-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--card-bg);
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.filter-group label {
    color: var(--gold);
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap;
}

.filter-group label i {
    margin-right: 0.25rem;
}

.filter-select,
.filter-input {
    padding: 0.5rem 0.75rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: all 0.3s;
}

.filter-select:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 5px rgba(184, 134, 11, 0.3);
}

.filter-select {
    cursor: pointer;
    min-width: 150px;
}

.search-group {
    flex-grow: 1;
    min-width: 200px;
}

.filter-input {
    width: 100%;
}

.filter-input::placeholder {
    color: var(--text-secondary);
}

.filter-results {
    padding: 0.75rem 1rem;
    background: rgba(184, 134, 11, 0.1);
    border-left: 3px solid var(--gold);
    color: var(--text-primary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
    border-radius: 5px;
}

.tickets-list {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.ticket-card {
    background: var(--dark-bg);
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    border-left: 3px solid transparent;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, border-left-color 0.2s;
}

.ticket-card:hover {
    border-color: rgba(212,175,55,0.5);
    border-left-color: var(--gold);
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.ticket-card-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 0.5rem;
}

.ticket-card h4 {
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    font-size: 0.92rem;
    font-weight: 600;
}

.ticket-status {
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ticket-status.open {
    background: var(--success-color);
    color: white;
}

.ticket-status.awaiting-staff {
    background: #ef4444;
    color: white;
}

.ticket-status.awaiting-reply {
    background: #3b82f6;
    color: white;
}

.ticket-status.pending {
    background: var(--warning-color);
    color: white;
}

.ticket-status.awaiting-compensation {
    background: #f59e0b;
    color: white;
}

.ticket-status.assigned-staff {
    background: #8b5cf6;
    color: white;
}

.ticket-status.assigned-developer {
    background: #6366f1;
    color: white;
}

.ticket-status.closed {
    background: var(--text-secondary);
    color: white;
}

/* Rank badges */
.rank-badge {
    padding: 0.2rem 0.65rem;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.rank-support           { background: #3b82f6; color: #fff; }
.rank-admin             { background: #22c55e; color: #fff; }
.rank-snr_admin         { background: #14b8a6; color: #fff; }
.rank-head_admin        { background: #f97316; color: #fff; }
.rank-community_manager { background: #a855f7; color: #fff; }
.rank-founder           { background: var(--gold); color: #000; }

/* Dashboard user welcome */
.user-welcome {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.user-welcome strong {
    color: var(--text-primary);
}

.ticket-card p {
    color: var(--text-secondary);
    margin: 0.3rem 0;
    font-size: 0.85rem;
    line-height: 1.5;
}

.ticket-meta {
    display: flex;
    gap: 0.85rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: var(--card-bg);
    margin: 5% auto;
    padding: 2rem;
    border: 1px solid var(--border-color);
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-content.modal-large {
    max-width: 800px;
}

.modal-close {
    color: var(--text-secondary);
    float: right;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s;
}

.modal-close:hover {
    color: var(--danger-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Ticket Details */
.ticket-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.ticket-description {
    background: var(--dark-bg);
    padding: 1rem;
    border-radius: 8px;
    margin: 1rem 0;
    color: var(--text-secondary);
    white-space: pre-wrap;
}

.ticket-messages {
    margin: 2rem 0;
    max-height: 400px;
    overflow-y: auto;
}

.message {
    background: var(--dark-bg);
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    border-left: 3px solid var(--border-color);
}

.message.staff {
    border-left-color: var(--gold);
    background: rgba(212, 175, 55, 0.1);
}

.message-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.message-author {
    font-weight: bold;
    color: var(--gold);
}

.message-author.staff {
    color: var(--gold);
}

.message-time {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.message-content {
    color: var(--text-secondary);
    white-space: pre-wrap;
}

.reply-form {
    margin-top: 2rem;
}

.reply-form textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    font-family: inherit;
    margin-bottom: 1rem;
    resize: vertical;
}

.reply-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ─── Redesigned Ticket Modals ─── */

/* Section titles */
.ticket-info-section,
.ticket-details-section,
.ticket-view-info,
.ticket-messages-section {
    margin-bottom: 1rem;
}

.section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gold);
    margin-bottom: 0.75rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color);
}

/* Info card (shared for create + view) */
.ticket-info-card,
.ticket-details-card {
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.85rem 1rem;
}

.ticket-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.65rem;
}

.ticket-subject-message {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    margin-top: 0.65rem;
    padding-top: 0.65rem;
    border-top: 1px solid var(--border-color);
}

.ticket-original-message {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: var(--text-secondary);
    white-space: pre-wrap;
    line-height: 1.5;
}

.no-messages {
    text-align: center;
    color: var(--text-secondary);
    padding: 1.5rem;
    font-style: italic;
}

.info-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.info-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-primary);
    font-size: 0.88rem;
}

.info-value i {
    color: var(--gold);
    font-size: 0.85rem;
}

.creator-value {
    background: rgba(184, 134, 11, 0.1);
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(184, 134, 11, 0.25);
}

/* Select wrapper with icon */
.select-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.select-wrapper .dept-icon {
    position: absolute;
    left: 0.75rem;
    color: var(--gold);
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 1;
}

.select-wrapper select {
    padding-left: 2.2rem !important;
}

/* Selects & inputs in ticket modals */
.ticket-info-card select,
.ticket-info-card input,
.ticket-details-card select,
.ticket-details-card input,
.ticket-details-card textarea {
    width: 100%;
    padding: 0.45rem 0.65rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.88rem;
    transition: border-color 0.2s;
}

.ticket-info-card select:focus,
.ticket-info-card input:focus,
.ticket-details-card input:focus,
.ticket-details-card textarea:focus {
    outline: none;
    border-color: var(--gold);
}

.ticket-details-card textarea {
    resize: vertical;
    min-height: 150px;
}

/* Detail fields */
.detail-field {
    margin-bottom: 1rem;
}

.detail-field:last-child {
    margin-bottom: 0;
}

/* Form footer */
.form-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

/* Priority badges */
.priority-badge {
    display: inline-block;
    padding: 0.2rem 0.7rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.priority-low {
    background: rgba(52, 152, 219, 0.15);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.35);
}

.priority-medium {
    background: rgba(241, 196, 15, 0.15);
    color: #f1c40f;
    border: 1px solid rgba(241, 196, 15, 0.35);
}

.priority-high {
    background: rgba(231, 76, 60, 0.15);
    color: #e74c3c;
    border: 1px solid rgba(231, 76, 60, 0.35);
}

/* Ticket messages list (redesigned) */
.ticket-messages-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.ticket-message {
    background: var(--dark-bg);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--border-color);
}

.ticket-message.msg-staff {
    border-left-color: var(--gold);
    background: rgba(184, 134, 11, 0.08);
}

.ticket-message.msg-user {
    border-left-color: #3498db;
}

.ticket-message-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.6rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.ticket-message-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.ticket-message-date {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.role-badge {
    padding: 0.15rem 0.55rem;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.role-staff {
    background: var(--gold);
    color: #000;
}

.role-user {
    background: rgba(52, 152, 219, 0.2);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.35);
}

.role-system {
    background: rgba(149, 165, 166, 0.2);
    color: #95a5a6;
    border: 1px solid rgba(149, 165, 166, 0.35);
}

.ticket-message.msg-system {
    border-left-color: #95a5a6;
    background: rgba(149, 165, 166, 0.05);
}

.ticket-message.msg-system .ticket-message-author {
    color: #95a5a6;
    font-style: italic;
}

.ticket-message.msg-system .ticket-message-author i {
    color: #95a5a6;
    margin-right: 0.3rem;
}

.ticket-message.msg-system .ticket-message-body {
    font-style: italic;
    color: #95a5a6;
}

.ticket-message-body {
    color: var(--text-secondary);
    white-space: pre-wrap;
    line-height: 1.6;
}

/* Ticket reply form (redesigned) */
.ticket-reply-form {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.ticket-reply-form textarea {
    width: 100%;
    padding: 0.75rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
    margin-bottom: 0.75rem;
}

.ticket-reply-form textarea:focus {
    outline: none;
    border-color: var(--gold);
}

.reply-form-actions {
    display: flex;
    gap: 0.75rem;
    align-items: center;
}

.btn-close-ticket {
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: 1px solid #e74c3c;
    color: #e74c3c;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-close-ticket:hover {
    background: #e74c3c;
    color: #fff;
}

/* Ticket card priority indicator */
.ticket-card .ticket-meta .priority-indicator {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

/* Staff Portal */
.staff-portal {
    padding: 2rem 2rem 4rem;
    min-height: 100vh;
    background: var(--dark-bg);
}

/* ── Page Header ── */
.sp-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sp-page-title {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.sp-page-title i {
    font-size: 1.6rem;
    color: var(--gold);
}

.sp-page-title h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.1rem;
    line-height: 1.2;
}

.sp-identity {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.15rem;
}

/* ── Stats Row ── */
.sp-stats-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.sp-stat {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.9rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.sp-stat:hover {
    border-color: rgba(212,175,55,0.4);
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
}

.sp-stat--alert { border-left: 3px solid #ef4444; }
.sp-stat--success { border-left: 3px solid #22c55e; }

.sp-stat-icon {
    width: 2.2rem;
    height: 2.2rem;
    background: rgba(212,175,55,0.1);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sp-stat-icon i {
    font-size: 1rem;
    color: var(--gold);
}

.sp-stat--alert .sp-stat-icon { background: rgba(239,68,68,0.1); }
.sp-stat--alert .sp-stat-icon i { color: #ef4444; }
.sp-stat--success .sp-stat-icon { background: rgba(34,197,94,0.1); }
.sp-stat--success .sp-stat-icon i { color: #22c55e; }

.sp-stat-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.sp-stat-num {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    white-space: nowrap;
}

.sp-stat-lbl {
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-secondary);
    white-space: nowrap;
}

/* ── Shared Panel ── */
.sp-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.sp-panel-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gold);
    border-bottom: 1px solid var(--border-color);
    background: rgba(212,175,55,0.04);
}

/* ticket list inside panel */
.sp-panel .ticket-filters {
    padding: 0.85rem 1.25rem 0;
    margin-bottom: 0;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.85rem;
}

.sp-panel .tickets-list,
.sp-panel #staffTicketsList {
    padding: 1rem 1.25rem;
}

/* sidebar panel content */
.sp-panel .staff-members-list {
    padding: 0.85rem 1rem;
    max-height: 70vh;
    overflow-y: auto;
}

/* keep old .staff-list-panel working */
.staff-list-panel {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.25rem;
}

.staff-list-panel h3 {
    color: var(--gold);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.staff-header {
    margin-bottom: 2rem;
}

.staff-header h1 {
    margin-bottom: 0.25rem;
    color: var(--gold);
    font-size: 1.75rem;
}

.staff-user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.staff-display-name {
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
}

/* Section blocks (kept for modal reuse) */
.staff-section {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.staff-section-title {
    color: var(--gold);
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

.staff-section-title i {
    font-size: 1rem;
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    padding: 0.35rem 0.8rem;
    font-size: 0.85rem;
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
}

.btn-secondary:hover {
    border-color: var(--gold);
    color: var(--gold);
}

/* legacy stat-card kept for any other pages */
.staff-stats {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.75rem;
}

.stat-card {
    background: var(--dark-bg);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.stat-card i {
    font-size: 1.5rem;
    color: var(--gold);
}

.stat-number {
    display: block;
    font-size: 1.35rem;
    font-weight: bold;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.ticket-filters {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

/* Staff Portal Two-Column Layout */
.staff-portal-columns {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 1.25rem;
    align-items: start;
}

.staff-portal-main {
    min-width: 0;
}

.staff-portal-main .staff-section {
    margin-bottom: 0;
}

.staff-portal-sidebar {
    position: sticky;
    top: 80px;
}

.staff-members-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: 70vh;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.staff-member-card {
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.9rem 1rem;
    transition: border-color 0.2s;
}

.staff-member-card:hover {
    border-color: var(--gold);
}

.staff-member-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.staff-member-card:not(.collapsed) .staff-member-header {
    margin-bottom: 0.65rem;
    padding-bottom: 0.55rem;
    border-bottom: 1px solid var(--border-color);
}

.staff-header-right {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.collapse-arrow {
    color: var(--text-secondary);
    font-size: 0.75rem;
    transition: transform 0.2s;
}

.staff-member-card:not(.collapsed) .collapse-arrow {
    transform: rotate(180deg);
}

.staff-member-body {
    max-height: 300px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.2s ease;
    opacity: 1;
}

.staff-member-card.collapsed .staff-member-body {
    max-height: 0;
    opacity: 0;
}

.staff-member-name {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
}

.staff-member-header .rank-badge {
    font-size: 0.6rem;
    padding: 0.12rem 0.45rem;
}

.staff-member-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.4rem 0.5rem;
    margin-top: 0.15rem;
}

.staff-member-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.65rem;
    color: var(--text-secondary);
    line-height: 1.3;
}

.staff-member-stat .stat-val {
    font-weight: 700;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.3;
}

.staff-star-rating {
    display: flex;
    align-items: center;
    gap: 0.15rem;
    padding-top: 0.5rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    justify-content: center;
}

.star {
    font-size: 0.95rem;
    line-height: 1;
}

.star-filled {
    color: #d4a017;
}

.star-half {
    color: #d4a017;
    opacity: 0.55;
}

.star-empty {
    color: rgba(255, 255, 255, 0.15);
}

.star-rating-text {
    font-size: 0.7rem;
    color: var(--text-secondary);
    margin-left: 0.3rem;
}

/* Rating Stars Input (Dashboard Modal) */
.rating-stars-input {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.rating-star {
    font-size: 2.5rem;
    color: rgba(255, 255, 255, 0.15);
    cursor: pointer;
    transition: color 0.15s, transform 0.15s;
    line-height: 1;
}

.rating-star:hover,
.rating-star.hover {
    color: #d4a017;
    transform: scale(1.15);
}

.rating-star.active {
    color: #d4a017;
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
    padding: 0.65rem 1.2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 1200px) {
    .sp-stats-row { grid-template-columns: repeat(4, 1fr); }
    .staff-stats { grid-template-columns: repeat(4, 1fr); }
}

@media (max-width: 900px) {
    .sp-stats-row { grid-template-columns: repeat(3, 1fr); }
    .staff-portal-columns {
        grid-template-columns: 1fr;
    }
    .staff-portal-sidebar {
        position: static;
        order: 2;
    }
    .staff-portal-main {
        order: 1;
    }
    .staff-stats {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }
}

@media (max-width: 600px) {
    .sp-stats-row { grid-template-columns: repeat(2, 1fr); }
}

.filter-btn {
    padding: 0.5rem 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: var(--gold);
    color: var(--darker-bg);
    border-color: var(--gold);
}

.ticket-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.status-select,
.assign-input {
    padding: 0.5rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
}

.loading {
    text-align: center;
    padding: 3rem;
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .hero {
        padding: 4rem 1.5rem 6rem;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-subtitle {
        font-size: 1.05rem;
    }

    .hero-badges {
        gap: 0.5rem;
    }

    .hero-badges .badge {
        font-size: 0.8rem;
        padding: 0.5rem 1rem;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .server-status {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem 1.5rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }

    .stat {
        padding: 1rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .section {
        padding: 4rem 1.5rem;
    }

    .section h2 {
        font-size: 2rem;
    }

    .cta-content i {
        font-size: 3rem;
    }

    .cta-content h2 {
        font-size: 2rem;
    }

    .cta-content p {
        font-size: 1rem;
    }

    .db-stats-row {
        grid-template-columns: repeat(2, 1fr) !important;
    }

    .db-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .db-filters .filter-group {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
    }

    .db-filters .filter-select,
    .db-filters .filter-input {
        width: 100%;
    }

    .ticket-actions {
        flex-direction: column;
        width: 100%;
    }

    .ticket-actions select,
    .ticket-actions input,
    .ticket-actions button {
        width: 100%;
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 1.5rem;
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #000000;
}

::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--beige);
}

/* ─── Admin Portal ─────────────────────────────────────────── */
.admin-portal {
    min-height: 100vh;
    padding: 7rem 2rem 4rem;
    background: var(--dark-bg);
}
.admin-portal h1 {
    color: var(--gold);
    font-size: 2rem;
    margin-bottom: 0.3rem;
}
.admin-portal .admin-subtitle {
    color: var(--text-secondary);
    margin-bottom: 0;
}
.admin-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}

.admin-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0;
}
.tab-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); }

.tab-content { display: none; }
.tab-content.active { display: block; }

.admin-section-title {
    color: var(--gold);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 1.5rem 0 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

/* User rows */
.user-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    transition: border-color 0.2s;
}
.user-row.banned { border-color: #c0392b; background: rgba(192,57,43,0.08); }
.user-row-info { display: flex; flex-direction: column; gap: 0.25rem; }
.user-row-name { font-weight: 600; color: var(--text-primary); }
.user-row-id { font-size: 0.8rem; color: var(--text-secondary); font-family: monospace; }
.user-row-badges { display: flex; gap: 0.4rem; flex-wrap: wrap; margin-top: 0.25rem; }
.user-row-actions { display: flex; gap: 0.5rem; }

.badge-staff, .badge-banned, .badge-info {
    font-size: 0.72rem;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-weight: 600;
}
.badge-staff  { background: rgba(184,134,11,0.2); color: var(--gold); }
.badge-banned { background: rgba(192,57,43,0.2); color: #e74c3c; }
.badge-info   { background: rgba(255,255,255,0.07); color: var(--text-secondary); }
.badge-reviewer { background: rgba(59,130,246,0.2); color: #60a5fa; font-size: 0.72rem; padding: 0.2rem 0.55rem; border-radius: 999px; font-weight: 600; }

/* User Detail Modal */
.user-detail-header { text-align: center; margin-bottom: 1.5rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color); }
.user-detail-header h2 { color: var(--gold); margin-bottom: 0.25rem; }
.user-detail-id { color: var(--text-secondary); font-size: 0.85rem; font-family: monospace; }
.user-detail-badges { display: flex; justify-content: center; gap: 0.5rem; margin-top: 0.5rem; }
.user-detail-stats { display: flex; justify-content: center; gap: 1.5rem; margin-top: 0.75rem; flex-wrap: wrap; }
.detail-stat { color: var(--text-secondary); font-size: 0.85rem; display: flex; align-items: center; gap: 0.4rem; }
.detail-stat i { color: var(--gold); }

.user-detail-section { margin-bottom: 1.5rem; }
.user-detail-section h3 { color: var(--text-primary); font-size: 1rem; margin-bottom: 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.user-detail-section h3 i { color: var(--gold); font-size: 0.9rem; }

.user-detail-toggle { display: flex; align-items: center; gap: 1rem; }
.toggle-switch { position: relative; display: inline-block; width: 48px; height: 26px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: var(--bg-tertiary); border-radius: 26px; transition: 0.3s; }
.toggle-slider::before { content: ''; position: absolute; height: 20px; width: 20px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: 0.3s; }
.toggle-switch input:checked + .toggle-slider { background: var(--gold); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(22px); }

.review-types-grid { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 1rem; }
.review-type-item { display: flex; align-items: center; gap: 0.5rem; padding: 0.4rem 0; }
.review-type-item input[type="checkbox"] { accent-color: var(--gold); width: 16px; height: 16px; }
.review-type-item label { color: var(--text-primary); font-size: 0.9rem; cursor: pointer; }

/* Staff Rank Control */
.staff-rank-control { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.staff-rank-control .info-label { color: var(--text-secondary); font-size: 0.85rem; white-space: nowrap; }
.rank-select {
    padding: 0.5rem 0.75rem;
    background: var(--dark-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 0.9rem;
    min-width: 180px;
    cursor: pointer;
    transition: border-color 0.3s;
}
.rank-select:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 5px rgba(184, 134, 11, 0.3); }

/* Buttons */
.btn-sm { padding: 0.4rem 0.9rem; font-size: 0.82rem; border: none; border-radius: 5px; cursor: pointer; transition: opacity 0.2s; }
.btn-sm:hover { opacity: 0.85; }
.btn-danger  { background: #c0392b; color: #fff; }
.btn-success { background: #27ae60; color: #fff; padding: 0.55rem 1.2rem; border: none; border-radius: 6px; cursor: pointer; font-size: 0.9rem; }
.btn-muted   { background: rgba(255,255,255,0.08); color: var(--text-primary); padding: 0.55rem 1.2rem; border: 1px solid var(--border-color); border-radius: 6px; cursor: pointer; font-size: 0.9rem; transition: opacity 0.2s; }
.btn-muted:hover { opacity: 0.85; background: rgba(255,255,255,0.13); }

/* Admin table */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.admin-table th, .admin-table td {
    text-align: left;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}
.admin-table th { color: var(--gold); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
.admin-table tr:hover td { background: rgba(255,255,255,0.02); }
.admin-table code { background: rgba(255,255,255,0.06); padding: 0.15rem 0.4rem; border-radius: 4px; font-size: 0.85rem; }

/* Application rows */
.app-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 0.75rem;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.app-row:hover { border-color: var(--gold); background: rgba(184,134,11,0.05); }
.app-row-icon { font-size: 1.5rem; color: var(--gold); width: 2rem; text-align: center; }
.app-row-info { display: flex; flex-direction: column; gap: 0.2rem; flex: 1; }
.app-row-title { font-weight: 600; color: var(--text-primary); }
.app-row-user { font-size: 0.85rem; color: var(--text-secondary); }
.app-row-date { font-size: 0.75rem; color: var(--text-secondary); }

.app-status {
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
}
.app-status.pending  { background: rgba(230,126,34,0.2);  color: #e67e22; }
.app-status.approved { background: rgba(39,174,96,0.2);   color: #27ae60; }
.app-status.denied   { background: rgba(192,57,43,0.2);   color: #e74c3c; }

/* Application view modal */
.app-view-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1rem; }
.app-view-header h2 { color: var(--gold); font-size: 1.4rem; flex: 1; }
.data-table { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: 0.9rem; }
.data-table th, .data-table td { padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--border-color); color: var(--text-primary); text-align: left; vertical-align: top; }
.data-table th { color: var(--gold); width: 35%; font-weight: 600; }
.admin-notes-view { background: rgba(184,134,11,0.08); border-left: 3px solid var(--gold); padding: 0.75rem 1rem; border-radius: 0 6px 6px 0; margin: 0.75rem 0; font-size: 0.9rem; color: var(--text-primary); }
.app-review-actions { margin-top: 1.5rem; border-top: 1px solid var(--border-color); padding-top: 1.25rem; }
.action-buttons { display: flex; gap: 0.75rem; margin-top: 0.75rem; flex-wrap: wrap; }

/* Applications page cards */
.applications-page {
    min-height: 100vh;
    padding: 2rem 2rem 4rem;
    background: var(--dark-bg);
}
.applications-page h1 { color: var(--gold); font-size: 2rem; margin-bottom: 0.3rem; }
.page-header {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.page-subtitle { color: var(--text-secondary); font-size: 0.95rem; margin-top: 0.25rem; }

/* Legislation page */
.legislation-page {
    padding: 2rem 2rem 5rem;
    background: var(--dark-bg);
    min-height: 60vh;
}

/* ===== Legislation Cards ===== */
.leg-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.leg-card {
    background: var(--card-bg);
    border: 1px solid rgba(184, 134, 11, 0.25);
    border-radius: 8px;
    padding: 1.1rem 1.2rem 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: border-color 0.2s, transform 0.2s;
}

.leg-card:hover {
    border-color: rgba(184, 134, 11, 0.55);
    transform: translateY(-2px);
}

.leg-card p {
    font-size: 0.83rem;
    color: #aaa;
    line-height: 1.5;
    flex: 1;
    margin: 0;
}

.leg-card p em {
    color: #888;
    font-style: italic;
}

.leg-card-title {
    font-size: 0.93rem;
    font-weight: 700;
    color: var(--gold);
    line-height: 1.3;
}

.leg-penalties {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: auto;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255,255,255,0.07);
}

.leg-fine,
.leg-sentence {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.22rem 0.55rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.leg-fine {
    background: rgba(184, 134, 11, 0.15);
    color: #DAA520;
    border: 1px solid rgba(184,134,11,0.3);
}

.leg-sentence {
    background: rgba(220, 53, 69, 0.12);
    color: #f87171;
    border: 1px solid rgba(220,53,69,0.25);
}

.leg-sentence.leg-none {
    background: rgba(100,100,100,0.12);
    color: #888;
    border: 1px solid rgba(100,100,100,0.2);
}

/* Severe offence highlight */
.leg-card.leg-severe {
    border-color: rgba(220, 53, 69, 0.3);
}

.leg-card.leg-severe:hover {
    border-color: rgba(220, 53, 69, 0.6);
}

.leg-card.leg-severe .leg-card-title {
    color: #f87171;
}

.leg-sentence.leg-severe-s {
    background: rgba(220, 53, 69, 0.2);
    color: #f87171;
    border: 1px solid rgba(220,53,69,0.4);
    font-weight: 700;
}

/* Admin / regulatory card */
.leg-card.leg-admin {
    border-color: rgba(59, 130, 246, 0.25);
}

.leg-card.leg-admin:hover {
    border-color: rgba(59, 130, 246, 0.5);
}

.leg-card.leg-admin .leg-card-title {
    color: #60a5fa;
}

.leg-admin-note {
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.22rem 0.55rem;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(59,130,246,0.1);
    color: #93c5fd;
    border: 1px solid rgba(59,130,246,0.25);
}

.rule-intro {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: rgba(255,255,255,0.03);
    border-left: 3px solid rgba(184,134,11,0.4);
    border-radius: 0 4px 4px 0;
}

@media (max-width: 768px) {
    .leg-grid {
        grid-template-columns: 1fr;
    }
}


.app-types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}
.app-type-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.25s, transform 0.2s, box-shadow 0.25s;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.app-type-card:hover {
    border-color: var(--gold);
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(184,134,11,0.15);
}
.app-type-card i, .app-type-card .app-type-icon i { font-size: 2.5rem; color: var(--gold); margin-bottom: 1rem; }
.app-type-card h3 { font-size: 1.1rem; color: var(--text-primary); margin-bottom: 0.5rem; }
.app-type-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.5; flex: 1; }
.app-type-card .btn-primary { margin-top: 1.25rem; width: 100%; justify-content: center; }

.success-banner {
    background: rgba(39,174,96,0.15);
    border: 1px solid #27ae60;
    color: #27ae60;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    margin-bottom: 1.5rem;
    display: none;
    font-size: 0.95rem;
}

.loading { color: var(--text-secondary); padding: 1rem 0; font-size: 0.9rem; }
.text-muted { color: var(--text-secondary); font-size: 0.9rem; padding: 0.5rem 0; }

/* Responsive */
@media (max-width: 600px) {
    .user-row { flex-direction: column; align-items: flex-start; gap: 0.75rem; }
    .app-row  { flex-wrap: wrap; }
    .action-buttons { flex-direction: column; }
    .app-types-grid { grid-template-columns: 1fr 1fr; }
    .admin-tabs { overflow-x: auto; }
}

/* ─── Application Review Portal ────────────────────────────────── */
.review-portal {
    min-height: 100vh;
    padding: 2rem 2rem 4rem;
    background: var(--dark-bg);
}

.review-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.review-header h1 { color: var(--gold); font-size: 1.9rem; margin-bottom: 0.25rem; }
.review-subtitle { color: var(--text-secondary); font-size: 0.9rem; }

.reviewer-badges { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; }
.type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: rgba(184,134,11,0.15);
    border: 1px solid rgba(184,134,11,0.4);
    color: var(--gold);
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}

.access-denied {
    text-align: center;
    padding: 4rem 2rem;
    background: var(--card-bg);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}
.access-denied i { font-size: 3rem; color: #c0392b; margin-bottom: 1rem; display: block; }
.access-denied h2 { color: var(--text-primary); margin-bottom: 0.5rem; }
.access-denied p  { color: var(--text-secondary); margin-bottom: 1.5rem; }

/* Filters */
.review-filters { margin-bottom: 1.5rem; }
.filter-row { display: flex; gap: 0.75rem; flex-wrap: wrap; align-items: center; margin-bottom: 0.75rem; }

.review-stats { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.stat-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
}
.stat-pill.pending  { background: rgba(230,126,34,0.15); color: #e67e22; }
.stat-pill.approved { background: rgba(39,174,96,0.15);  color: #27ae60; }
.stat-pill.denied   { background: rgba(192,57,43,0.15);  color: #e74c3c; }
.stat-pill.total    { background: rgba(255,255,255,0.06); color: var(--text-secondary); }

/* Groups */
.review-group { margin-bottom: 1.75rem; }
.review-group-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--gold);
    font-weight: 700;
    font-size: 0.95rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.6rem 0.5rem;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 0.5rem;
}
.group-count {
    margin-left: auto;
    background: rgba(184,134,11,0.15);
    color: var(--gold);
    padding: 0.1rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
}

/* App rows in review portal */
.review-app-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--border-color);
    border-radius: 0 8px 8px 0;
    padding: 0.9rem 1.2rem;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
}
.review-app-row:hover { background: rgba(255,255,255,0.03); border-left-color: var(--gold); }
.review-app-row.pending  { border-left-color: #e67e22; }
.review-app-row.approved { border-left-color: #27ae60; }
.review-app-row.denied   { border-left-color: #c0392b; }

.review-app-info { display: flex; flex-direction: column; gap: 0.2rem; }
.review-app-name { font-weight: 600; color: var(--text-primary); font-size: 0.95rem; }
.review-app-user { font-size: 0.82rem; color: var(--text-secondary); }
.review-app-date { font-size: 0.75rem; color: var(--text-secondary); }
.review-app-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; }
.reviewed-by { font-size: 0.72rem; color: var(--text-secondary); }

/* Review modal */
.review-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    gap: 1rem;
}
.review-modal-title { display: flex; align-items: center; gap: 1rem; }
.review-modal-title i { font-size: 1.8rem; color: var(--gold); }
.review-modal-title h2 { color: var(--gold); font-size: 1.3rem; margin-bottom: 0.15rem; }
.review-modal-title p  { color: var(--text-secondary); font-size: 0.85rem; }

.review-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}
.review-meta span { display: flex; align-items: center; gap: 0.35rem; }

.review-decision {
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
}
.review-decision h3 { color: var(--gold); font-size: 1rem; margin-bottom: 1rem; }
.decision-buttons { display: flex; gap: 0.75rem; margin-top: 0.75rem; flex-wrap: wrap; }

.btn-approve {
    background: #27ae60; color: #fff;
    padding: 0.6rem 1.4rem; border: none; border-radius: 6px; cursor: pointer; font-size: 0.9rem;
    display: flex; align-items: center; gap: 0.5rem;
    transition: opacity 0.2s;
}
.btn-deny {
    background: #c0392b; color: #fff;
    padding: 0.6rem 1.4rem; border: none; border-radius: 6px; cursor: pointer; font-size: 0.9rem;
    display: flex; align-items: center; gap: 0.5rem;
    transition: opacity 0.2s;
}
.btn-pending {
    background: rgba(230,126,34,0.2); color: #e67e22;
    border: 1px solid #e67e22;
    padding: 0.6rem 1.4rem; border-radius: 6px; cursor: pointer; font-size: 0.9rem;
    display: flex; align-items: center; gap: 0.5rem;
    transition: opacity 0.2s;
}
.btn-approve:hover, .btn-deny:hover, .btn-pending:hover { opacity: 0.85; }
.btn-approve:disabled, .btn-deny:disabled, .btn-pending:disabled { opacity: 0.5; cursor: not-allowed; }

/* Admin portal reviewer management */
.section-desc { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1.5rem; }
.reviewer-assignment { background: rgba(255,255,255,0.02); border: 1px solid var(--border-color); border-radius: 10px; padding: 1.5rem; margin-bottom: 1.5rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.type-checkboxes { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 0.5rem; }
.checkbox-label {
    display: flex; align-items: center; gap: 0.5rem;
    background: var(--card-bg); border: 1px solid var(--border-color);
    padding: 0.5rem 0.9rem; border-radius: 6px; cursor: pointer;
    font-size: 0.88rem; color: var(--text-primary);
    transition: border-color 0.2s, background 0.2s;
}
.checkbox-label:hover { border-color: var(--gold); }
.checkbox-label input[type="checkbox"] { accent-color: var(--gold); width: 1rem; height: 1rem; }
.checkbox-label input[type="checkbox"]:checked + i,
.checkbox-label:has(input:checked) { color: var(--gold); }
.checkbox-label i { color: var(--text-secondary); font-size: 0.9rem; }

.type-pills { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.type-pill {
    display: inline-flex; align-items: center; gap: 0.3rem;
    background: rgba(184,134,11,0.12); color: var(--gold);
    border: 1px solid rgba(184,134,11,0.3);
    padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem;
}

/* Responsive */
@media (max-width: 600px) {
    .review-header { flex-direction: column; }
    .form-row { grid-template-columns: 1fr; }
    .decision-buttons { flex-direction: column; }
    .review-app-row { flex-wrap: wrap; gap: 0.5rem; }
}

/* ─── Rules Page ────────────────────────────────────────────────── */
.rules-hero {
    background: linear-gradient(135deg, #0d0d0d 0%, #1a1400 100%);
    padding: 8rem 2rem 4rem;
    text-align: center;
    border-bottom: 1px solid rgba(184,134,11,0.3);
}
.rules-hero-inner { max-width: 800px; margin: 0 auto; }
.rules-hero-icon {
    font-size: 3.5rem;
    color: var(--gold);
    margin-bottom: 1.25rem;
    opacity: 0.85;
}
.rules-hero h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    color: var(--text-primary);
    margin-bottom: 1rem;
    font-weight: 800;
}
.rules-hero p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}
.rules-meta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.rules-meta span { display: flex; align-items: center; gap: 0.4rem; }

/* Severity badges */
.sev {
    display: inline-block;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 0.18rem 0.55rem;
    border-radius: 3px;
    vertical-align: middle;
    flex-shrink: 0;
}
.sev-critical { background: rgba(192,57,43,0.2);  color: #e74c3c; border: 1px solid rgba(192,57,43,0.4); }
.sev-high     { background: rgba(230,126,34,0.2); color: #e67e22; border: 1px solid rgba(230,126,34,0.4); }
.sev-moderate { background: rgba(241,196,15,0.15);color: #f1c40f; border: 1px solid rgba(241,196,15,0.35); }
.sev-low      { background: rgba(52,152,219,0.15);color: #3498db; border: 1px solid rgba(52,152,219,0.35); }

/* Legend bar */
.rules-legend-bar {
    background: rgba(0,0,0,0.85);
    border-bottom: 1px solid var(--border-color);
    padding: 0.6rem 2rem;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 999;
    backdrop-filter: blur(8px);
}
.rules-legend-bar .container {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.legend-label { color: var(--text-secondary); font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px; }

/* Layout */
.rules-page { max-width: 1400px; margin: 0 auto; padding: 2rem 1.5rem 5rem; }
.rules-layout { display: grid; grid-template-columns: 250px 1fr; gap: 2.5rem; align-items: start; }

/* TOC */
.rules-toc {
    position: sticky;
    top: 80px;
}
.toc-inner {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
}
.toc-inner h3 { color: var(--gold); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 1rem; display: flex; align-items: center; gap: 0.5rem; }
.toc-inner nav { display: flex; flex-direction: column; gap: 0.1rem; }
.toc-inner nav a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.82rem;
    padding: 0.35rem 0.65rem;
    border-radius: 5px;
    transition: background 0.2s, color 0.2s;
    border-left: 2px solid transparent;
}
.toc-inner nav a:hover { color: var(--gold); background: rgba(184,134,11,0.08); border-left-color: var(--gold); }

/* Sections */
.rules-content { display: flex; flex-direction: column; gap: 0; }

.rule-section {
    border-bottom: 1px solid var(--border-color);
    padding: 2.5rem 0;
    scroll-margin-top: 80px;
}
.rule-section:last-of-type { border-bottom: none; }

.rule-section-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.rule-section-num {
    font-size: 2rem;
    font-weight: 900;
    color: rgba(184,134,11,0.25);
    line-height: 1;
    min-width: 3rem;
}
.rule-section-header h2 {
    color: var(--gold);
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin: 0;
}
.rule-section-header h2 i { font-size: 1.1rem; opacity: 0.75; }

.rule-intro {
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    background: rgba(255,255,255,0.03);
    border-left: 3px solid rgba(184,134,11,0.3);
    padding: 0.75rem 1rem;
    border-radius: 0 6px 6px 0;
}

.rule-subheader {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    margin: 2rem 0 0.85rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid var(--border-color);
}

/* Rules grid */
.rules-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 0.85rem;
}
.rules-grid-3 {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
}

.rule-card {
    background: rgba(255,255,255,0.025);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.15rem;
    transition: border-color 0.2s;
}
.rule-card:hover { border-color: rgba(184,134,11,0.3); }
.rule-card-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 0.88rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
}
.rule-card p { color: var(--text-secondary); font-size: 0.85rem; line-height: 1.6; margin: 0; }
.rule-card-highlight { border-color: rgba(184,134,11,0.2); }

/* Rules list block — grid of cards matching .rules-grid */
.rules-list-block {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.85rem;
}

/* ═══════════════════════════════════════════════════════════════
   GANG PORTAL — .gp-* classes
═══════════════════════════════════════════════════════════════ */
:root {
    --gang-color: #DAA520;
    --gang-color-15: rgba(218,165,32,0.12);
    --gang-color-30: rgba(218,165,32,0.28);
}

/* ── Layout ──────────────────────────────────────────────── */
.gp-layout {
    display: flex;
    height: calc(100vh - 64px);
    overflow: hidden;
}

/* ── Sidebar ─────────────────────────────────────────────── */
.gp-sidebar {
    width: 240px;
    flex-shrink: 0;
    background: #080808;
    border-right: 1px solid #181818;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
    scrollbar-width: thin;
    scrollbar-color: #1a1a1a #080808;
}
.gp-sidebar::-webkit-scrollbar { width: 3px; }
.gp-sidebar::-webkit-scrollbar-track { background: transparent; }
.gp-sidebar::-webkit-scrollbar-thumb { background: #1e1e1e; border-radius: 3px; }

.gp-identity {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 1.5rem 1.2rem 1.25rem;
    border-bottom: 1px solid #161616;
    position: relative;
}
.gp-identity::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--gang-color) 0%, rgba(218,165,32,0.2) 55%, transparent 100%);
}
.gp-gang-icon {
    font-size: 1.35rem;
    margin-bottom: 0.85rem;
    color: var(--gang-color);
    width: 44px;
    height: 44px;
    background: rgba(218,165,32,0.07);
    border: 1px solid rgba(218,165,32,0.18);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gp-gang-name-block { display: flex; flex-direction: column; gap: 0.12rem; }
.gp-gang-name {
    font-weight: 800;
    font-size: 0.97rem;
    color: #EFEFDC;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.gp-gang-tag {
    font-size: 0.68rem;
    color: var(--gang-color);
    font-weight: 700;
    letter-spacing: 0.08em;
    opacity: 0.8;
}

.gp-my-role {
    padding: 0.6rem 1.2rem;
    font-size: 0.74rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid #161616;
    color: #555;
    background: rgba(218,165,32,0.02);
}
.gp-role-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--gang-color);
    flex-shrink: 0;
    display: inline-block;
    box-shadow: 0 0 6px var(--gang-color);
}
.gp-my-role #gpMyRoleLabel {
    font-weight: 700;
    color: var(--gang-color);
    font-size: 0.76rem;
    opacity: 0.9;
}

/* ── Org Switcher ─────────────────────────────────────────────── */
.gp-org-switcher {
    padding: 0.3rem 0 0.4rem;
    border-bottom: 1px solid #161616;
    background: rgba(0,0,0,0.18);
}
.gp-org-switcher-label {
    font-size: 0.57rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #303030;
    padding: 0.6rem 1.2rem 0.3rem;
    display: block;
}
.gp-org-switch-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.45rem 1.2rem;
    border: none;
    border-left: 2px solid transparent;
    background: none;
    cursor: pointer;
    color: #565656;
    font-size: 0.8rem;
    font-weight: 600;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    text-align: left;
    border-radius: 0;
    font-family: inherit;
}
.gp-org-switch-btn:hover {
    background: rgba(255,255,255,0.04);
    color: #999;
}
.gp-org-switch-btn.active {
    background: rgba(218,165,32,0.07);
    color: var(--gang-color);
    border-left-color: var(--gang-color);
    font-weight: 700;
}
.gp-org-switch-icon {
    width: 26px; height: 26px;
    border-radius: 7px;
    border: 1px solid rgba(255,255,255,0.07);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.72rem;
    flex-shrink: 0;
    opacity: 0.7;
    transition: opacity 0.12s;
}
.gp-org-switch-btn:hover .gp-org-switch-icon { opacity: 0.9; }
.gp-org-switch-btn.active .gp-org-switch-icon {
    opacity: 1;
    border-color: rgba(255,255,255,0.13);
}
.gp-org-switch-name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.3;
}

.gp-nav {
    display: flex;
    flex-direction: column;
    padding: 0.4rem 0;
    flex: 1;
    gap: 0;
}
.gp-nav-section {
    font-size: 0.57rem;
    font-weight: 700;
    color: #303030;
    letter-spacing: 0.14em;
    padding: 0.85rem 1.2rem 0.25rem;
    text-transform: uppercase;
}
.gp-nav-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.58rem 1.2rem;
    border: none;
    background: none;
    color: #606060;
    font-size: 0.82rem;
    cursor: pointer;
    text-align: left;
    width: 100%;
    border-left: 2px solid transparent;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
    border-radius: 0;
    position: relative;
}
.gp-nav-item:hover {
    background: rgba(218,165,32,0.04);
    color: #aaa;
}
.gp-nav-item.active {
    background: rgba(218,165,32,0.07);
    color: var(--gang-color);
    border-left-color: var(--gang-color);
    font-weight: 700;
}
.gp-nav-item i { width: 15px; text-align: center; flex-shrink: 0; font-size: 0.8rem; }
.gp-nav-item span { flex: 1; }
.gp-badge, .gp-unread {
    background: rgba(139,69,19,0.7);
    color: #F5F5DC;
    font-size: 0.6rem;
    font-weight: 800;
    min-width: 16px;
    height: 16px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}
.gp-unread {
    background: #ef4444;
    color: #fff;
    animation: notifPulse 2s ease-in-out infinite;
}
@keyframes notifPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Navbar notification badge (cross-page) */
.nav-notif-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #fff;
    font-size: 0.58rem;
    font-weight: 800;
    min-width: 15px;
    height: 15px;
    border-radius: 8px;
    padding: 0 3px;
    margin-left: 4px;
    vertical-align: middle;
    line-height: 1;
}

/* Notification strip on dashboard / staff portal */
.db-notif-strip {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: linear-gradient(135deg, rgba(212,175,55,0.10), rgba(212,175,55,0.18));
    border: 1px solid rgba(212,175,55,0.35);
    border-radius: 8px;
    padding: 0.6rem 1rem;
    margin-bottom: 1.25rem;
    font-size: 0.87rem;
    color: var(--gold, #d4af37);
    font-weight: 500;
}
.db-notif-strip i { flex-shrink: 0; }
.db-notif-strip a { color: inherit; text-decoration: underline; }
.db-notif-strip-count {
    font-weight: 800;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    border-radius: 10px;
    padding: 0.1rem 0.45rem;
    margin-right: 0.1rem;
}

/* ── Main Content ─────────────────────────────────────────── */
.gp-main {
    flex: 1;
    overflow-y: auto;
    background: #070707;
    scrollbar-width: thin;
    scrollbar-color: #1a1a1a #070707;
}
.gp-main::-webkit-scrollbar { width: 5px; }
.gp-main::-webkit-scrollbar-track { background: transparent; }
.gp-main::-webkit-scrollbar-thumb { background: #1e1e1e; border-radius: 5px; }

.gp-tab {
    display: none;
    padding: 2rem 2.25rem;
    min-height: 100%;
    flex-direction: column;
}
.gp-tab.active { display: flex; }

.gp-chat-tab.active {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 64px);
    padding: 1rem;
    overflow: hidden;
    position: relative;
}
.gp-chat-tab.active::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(218,165,32,0.08), transparent 30%),
        radial-gradient(circle at bottom right, rgba(184,134,11,0.08), transparent 26%);
    pointer-events: none;
}
.gp-chat-layout {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 1rem;
    flex: 1;
    min-height: 0;
}
.gp-chat-main {
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.gp-tab-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.75rem;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid #181818;
}
.gp-tab-header h2 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 800;
    color: #F5F5DC;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    letter-spacing: -0.025em;
}
.gp-tab-header h2 i { color: var(--gang-color); font-size: 1.05rem; }

/* ── No-gang view ─────────────────────────────────────────── */
.gp-no-gang {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 3rem 1.5rem;
    background: #0a0a0a;
}
.gp-no-gang-inner { text-align: center; max-width: 900px; width: 100%; }
.gp-no-gang-icon { font-size: 3.5rem; color: #555; margin-bottom: 1rem; display: block; }
.gp-no-gang-inner h2 { color: #F5F5DC; margin-bottom: 0.5rem; }
.gp-no-gang-inner p { color: #888; margin-bottom: 2rem; }
.gp-apply-grid { display: flex; flex-direction: column; gap: 0.85rem; text-align: left; }
.gp-apply-card {
    background: #141414;
    border: 1px solid #1e1e1e;
    border-left: 4px solid var(--gang-color);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.gp-apply-card:hover {
    border-color: rgba(218,165,32,0.5);
    box-shadow: 0 6px 20px rgba(218,165,32,0.07), 0 2px 10px rgba(0,0,0,0.5);
    transform: translateY(-1px);
}
.gp-apply-card-icon { font-size: 1.75rem; flex-shrink: 0; }
.gp-apply-card-info { flex: 1; }
.gp-apply-card-name { font-weight: 700; font-size: 0.95rem; color: #F5F5DC; }
.gp-apply-card-desc { color: #888; font-size: 0.82rem; margin-top: 0.25rem; }

/* ── Overview ─────────────────────────────────────────────── */
.gp-overview-banner {
    background: linear-gradient(135deg, #111008 0%, #0f0f0d 55%, #0a0a0a 100%);
    border: 1px solid #201c0a;
    border-left: 4px solid var(--gang-color);
    border-radius: 12px;
    padding: 2.1rem 2.25rem;
    margin-bottom: 1.75rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 32px rgba(0,0,0,0.6), inset 0 1px 0 rgba(218,165,32,0.06);
}
.gp-overview-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, var(--gang-color) 0%, rgba(218,165,32,0.25) 40%, transparent 100%);
}
.gp-overview-banner::after {
    content: '';
    position: absolute;
    top: -60px; right: -60px;
    width: 220px; height: 220px;
    background: radial-gradient(circle, rgba(218,165,32,0.05) 0%, transparent 70%);
    pointer-events: none;
}
.gp-overview-title {
    font-size: 1.85rem;
    font-weight: 800;
    color: #F5F5DC;
    letter-spacing: -0.03em;
    line-height: 1.15;
}
.gp-overview-desc {
    color: #666;
    font-size: 0.875rem;
    margin-top: 0.45rem;
    line-height: 1.6;
    max-width: 600px;
}

.gp-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.85rem;
    margin-bottom: 1.75rem;
}
.gp-stat {
    background: #111111;
    border: 1px solid #1c1c1c;
    border-radius: 12px;
    padding: 1.2rem 1.35rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
}
.gp-stat::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(218,165,32,0.08), transparent);
}
.gp-stat:hover {
    border-color: rgba(218,165,32,0.3);
    box-shadow: 0 6px 24px rgba(218,165,32,0.06), 0 2px 12px rgba(0,0,0,0.55);
    transform: translateY(-2px);
}
.gp-stat > i {
    font-size: 1.1rem;
    color: var(--gang-color);
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(218,165,32,0.08);
    border: 1px solid rgba(218,165,32,0.15);
    border-radius: 11px;
}
.gp-stat-num { font-size: 1.5rem; font-weight: 800; color: #F5F5DC; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -0.03em; }
.gp-stat-lbl { font-size: 0.6rem; color: #555; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.35rem; font-weight: 700; }

.gp-overview-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
.gp-overview-card {
    background: #0e0e0e;
    border: 1px solid #191919;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 16px rgba(0,0,0,0.45);
}
.gp-overview-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.95rem 1.15rem 0;
}
.gp-overview-card-header .gp-section-title {
    margin-bottom: 0;
    border-left: none;
    padding-left: 0;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #161616;
    width: 100%;
}
.gp-overview-list { display: flex; flex-direction: column; gap: 0; }
.ov-ann-scroll {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 340px;
    overflow-y: auto;
    padding: 0.6rem 0.85rem 0.85rem;
    scrollbar-width: thin;
    scrollbar-color: #202020 transparent;
}
.ov-ann-scroll::-webkit-scrollbar { width: 3px; }
.ov-ann-scroll::-webkit-scrollbar-track { background: transparent; }
.ov-ann-scroll::-webkit-scrollbar-thumb { background: #222; border-radius: 3px; }

/* ── Overview announcement scroll cards ────────────────────── */
.ov-ann-scroll {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 0.3rem;
    scrollbar-width: thin;
    scrollbar-color: #202020 transparent;
}
.ov-ann-scroll::-webkit-scrollbar { width: 3px; }
.ov-ann-scroll::-webkit-scrollbar-track { background: transparent; }
.ov-ann-scroll::-webkit-scrollbar-thumb { background: #222; border-radius: 3px; }
.ov-ann-card {
    background: transparent;
    border: none;
    border-bottom: 1px solid #141414;
    border-radius: 0;
    padding: 0.75rem 0;
    transition: background 0.15s;
}
.ov-ann-card:last-child { border-bottom: none; }
.ov-ann-card:hover { background: rgba(255,255,255,0.015); border-color: #141414; box-shadow: none; }
.ov-ann-card.pinned { border-left: 2px solid var(--gang-color, #DAA520); padding-left: 0.6rem; }
.ov-ann-card-header {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.6rem;
}
.ov-ann-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(218,165,32,0.07);
    border: 1px solid rgba(218,165,32,0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.7rem;
    color: var(--gang-color, #DAA520);
}
.ov-ann-author-block { display: flex; flex-direction: column; gap: 0.1rem; flex: 1; min-width: 0; }
.ov-ann-author { font-size: 0.8rem; font-weight: 700; color: #E8E8D0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ov-ann-role-pill {
    display: inline-block;
    font-size: 0.58rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.08rem 0.4rem;
    border-radius: 20px;
    background: rgba(218,165,32,0.08);
    color: var(--gang-color, #DAA520);
    border: 1px solid rgba(218,165,32,0.15);
    width: fit-content;
}
.ov-ann-time { font-size: 0.67rem; color: #444; flex-shrink: 0; margin-left: auto; }
.ov-ann-actions { display: flex; gap: 0.3rem; flex-shrink: 0; margin-left: 0.4rem; }
.ov-ann-title { font-weight: 700; font-size: 0.85rem; color: #E8E8D0; margin-bottom: 0.25rem; line-height: 1.35; }
.ov-ann-preview { font-size: 0.76rem; color: #666; line-height: 1.5; }
.ov-pin-icon { color: var(--gang-color, #DAA520); font-size: 0.68rem; margin-right: 0.2rem; }
.gp-overview-item {
    background: #141414;
    border: 1px solid #1e1e1e;
    border-radius: 8px;
    padding: 0.9rem 1.1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 1px 6px rgba(0,0,0,0.35);
}
.gp-overview-item:hover { border-color: #282828; box-shadow: 0 3px 12px rgba(0,0,0,0.45); }
.gp-overview-item-body { min-width: 0; flex: 1; }
.gp-overview-item-title { font-weight: 600; font-size: 0.88rem; color: #F5F5DC; }
.gp-overview-item-sub { font-size: 0.74rem; color: #888; margin-top: 0.2rem; }
.gp-overview-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.45rem;
}
.gp-overview-event-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.22rem 0.45rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.03);
    border: 1px solid #262626;
    color: #aaa;
    font-size: 0.68rem;
    line-height: 1;
}
.gp-overview-event-desc {
    font-size: 0.73rem;
    color: #7f7f7f;
    line-height: 1.45;
    margin-top: 0.45rem;
}
.gp-event-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; margin-top: 5px; }

/* ── Announcements ───────────────────────────────────────── */
.gp-announcements-list { display: flex; flex-direction: column; gap: 0.75rem; }
.gp-announcement-card {
    background: #0e0e0e;
    border: 1px solid #1a1a1a;
    border-radius: 12px;
    padding: 1.2rem 1.35rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.gp-announcement-card:hover { border-color: rgba(218,165,32,0.2); box-shadow: 0 6px 22px rgba(0,0,0,0.55); }
.gp-announcement-card.pinned { border-left: 3px solid var(--gang-color, #DAA520); }
.gp-ann-author-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.85rem;
    padding-bottom: 0.7rem;
    border-bottom: 1px solid #171717;
}
.gp-ann-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(218,165,32,0.07);
    border: 1px solid rgba(218,165,32,0.14);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.8rem;
    color: var(--gang-color, #DAA520);
}
.gp-ann-author-info { display: flex; flex-direction: column; gap: 0.14rem; flex: 1; min-width: 0; }
.gp-ann-author-name { font-size: 0.86rem; font-weight: 700; color: #E8E8D0; }
.gp-ann-author-role {
    display: inline-block;
    font-size: 0.59rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 0.08rem 0.42rem;
    border-radius: 20px;
    background: rgba(218,165,32,0.07);
    color: var(--gang-color, #DAA520);
    border: 1px solid rgba(218,165,32,0.14);
    width: fit-content;
}
.gp-ann-timestamp { font-size: 0.7rem; color: #484848; flex-shrink: 0; margin-left: auto; }
.gp-ann-header { margin-bottom: 0.6rem; }
.gp-ann-title { font-weight: 700; font-size: 1rem; color: #F5F5DC; line-height: 1.4; }
.gp-ann-content { color: #aaa; font-size: 0.88rem; line-height: 1.7; white-space: pre-line; }
.gp-ann-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }
.gp-pinned-icon { color: var(--gang-color, #DAA520); }

/* ── Common form card ─────────────────────────────────────── */
.gp-form-card {
    background: #141414;
    border: 1px solid #1e1e1e;
    border-radius: 10px;
    padding: 1.4rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.gp-form-card-title {
    font-size: 0.88rem;
    font-weight: 700;
    color: #F5F5DC;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.gp-input {
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: #000000;
    border: 1px solid #2a2a2a;
    border-radius: 5px;
    color: #F5F5DC;
    font-size: 0.88rem;
    outline: none;
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.gp-input:focus { border-color: var(--gang-color); }
.gp-textarea {
    width: 100%;
    padding: 0.6rem 0.85rem;
    background: #000000;
    border: 1px solid #2a2a2a;
    border-radius: 5px;
    color: #F5F5DC;
    font-size: 0.88rem;
    outline: none;
    box-sizing: border-box;
    resize: vertical;
    font-family: inherit;
    transition: border-color 0.15s;
}
.gp-textarea:focus { border-color: var(--gang-color); }

/* ── Chat  ────────────────────────────────────────────────── */
.gp-chat-header {
    margin: 0;
    padding: 1rem 1.2rem;
    border: 1px solid #2a2a2a;
    border-bottom: none;
    border-radius: 20px 20px 0 0;
    font-weight: 700;
    font-size: 0.95rem;
    color: #F5F5DC;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-shrink: 0;
    background:
        linear-gradient(180deg, rgba(22,22,22,0.96) 0%, rgba(15,15,15,0.98) 100%),
        #000000;
    box-shadow: 0 12px 28px rgba(0,0,0,0.24);
}
.gp-chat-header i { color: var(--gang-color); }
.gp-chat-header span {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}
.gp-restricted-badge {
    font-size: 0.66rem;
    background: rgba(218,165,32,0.12);
    color: var(--gang-color);
    border: 1px solid rgba(218,165,32,0.25);
    border-radius: 999px;
    padding: 0.22rem 0.55rem;
    margin-left: 0.15rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.gp-chat-sidebar {
    min-height: 0;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    border: 1px solid #2a2a2a;
    border-radius: 20px;
    background: linear-gradient(180deg, rgba(18,18,18,0.96) 0%, rgba(11,11,11,0.98) 100%);
    box-shadow: 0 12px 28px rgba(0,0,0,0.24);
}
.gp-chat-sidebar-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    font-size: 0.84rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #f1c768;
    padding-bottom: 0.85rem;
    border-bottom: 1px solid #232323;
    margin-bottom: 0.9rem;
}
.gp-chat-presence-list {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    overflow-y: auto;
    padding-right: 0.15rem;
}
.gp-chat-presence-empty {
    color: #9d9d9d;
    font-size: 0.82rem;
    padding: 1rem 0.25rem;
}
.gp-chat-presence-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.8rem;
    border: 1px solid #232323;
    border-radius: 14px;
    background: rgba(255,255,255,0.02);
}
.gp-chat-presence-item.online {
    border-color: rgba(34,197,94,0.22);
    background: linear-gradient(180deg, rgba(22,46,30,0.18) 0%, rgba(14,18,14,0.3) 100%);
}
.gp-chat-presence-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, rgba(218,165,32,0.16) 0%, rgba(218,165,32,0.05) 100%);
    border: 1px solid rgba(218,165,32,0.28);
    color: var(--gang-color);
    box-shadow: 0 0 0 3px rgba(218,165,32,0.05);
}
.gp-chat-presence-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gp-chat-presence-info {
    min-width: 0;
    flex: 1;
}
.gp-chat-presence-name-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}
.gp-chat-presence-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: #f5efda;
    line-height: 1.3;
    overflow-wrap: break-word;
}
.gp-chat-presence-status {
    flex-shrink: 0;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-radius: 999px;
    padding: 0.2rem 0.45rem;
    border: 1px solid;
}
.gp-chat-presence-status.online {
    color: #4ade80;
    background: rgba(34,197,94,0.12);
    border-color: rgba(34,197,94,0.22);
}
.gp-chat-presence-status.offline {
    color: #a3a3a3;
    background: rgba(255,255,255,0.04);
    border-color: rgba(255,255,255,0.08);
}
.gp-chat-presence-meta {
    margin-top: 0.28rem;
    font-size: 0.76rem;
    color: #a68f5d;
    line-height: 1.45;
}
.gp-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1.1rem 1.1rem 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border-left: 1px solid #2a2a2a;
    border-right: 1px solid #2a2a2a;
    background:
        linear-gradient(180deg, rgba(12,12,12,0.94) 0%, rgba(8,8,8,0.98) 100%),
        repeating-linear-gradient(180deg, rgba(255,255,255,0.012) 0, rgba(255,255,255,0.012) 1px, transparent 1px, transparent 44px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
}
.gp-chat-empty {
    text-align: center;
    color: #b89b55;
    font-style: normal;
    font-size: 0.85rem;
    margin: auto;
    padding: 1.25rem 1.4rem;
    border: 1px dashed rgba(218,165,32,0.22);
    border-radius: 16px;
    background: rgba(255,255,255,0.015);
}
.gp-chat-date-divider {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.9rem;
    margin: 0.45rem 0 0.15rem;
}
.gp-chat-date-divider-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(255,255,255,0.02) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0.02) 100%);
}
.gp-chat-date-divider-label {
    flex-shrink: 0;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(18,18,18,0.96);
    color: #9ea3ad;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.gp-msg {
    max-width: min(75%, 620px);
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
    align-self: flex-start;
}
.gp-msg-mine {
    align-self: flex-end;
}
.gp-msg-header {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: 0.75rem;
    padding: 0 0.4rem;
}
.gp-msg-mine .gp-msg-header { justify-content: flex-end; }
/* Hide your own name — you know it's you */
.gp-msg-mine .gp-msg-author { display: none; }
.gp-msg-author {
    font-weight: 700;
    color: #f1c768;
    letter-spacing: 0.01em;
}
.gp-msg-time {
    color: #8f8f8f;
    font-size: 0.72rem;
    letter-spacing: 0.01em;
}
.gp-msg-bubble {
    position: relative;
    width: 100%;
}
.gp-msg-actions {
    position: absolute;
    top: 0.45rem;
    right: 0.45rem;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    z-index: 1;
}
/* Mine: flip actions to left so they don't cover text */
.gp-msg-mine .gp-msg-actions {
    right: auto;
    left: 0.45rem;
}
.gp-msg-mine .gp-msg-body-manage {
    padding-right: 0.95rem;
    padding-left: 5rem;
}
.gp-msg-action-btn {
    padding: 0.28rem;
    min-width: 28px;
    min-height: 28px;
    border-radius: 8px;
    background: rgba(0,0,0,0.42);
    border: 1px solid rgba(218,165,32,0.18);
}
.gp-msg-action-btn:hover {
    background: rgba(139,69,19,0.24);
    border-color: rgba(218,165,32,0.32);
}
.gp-msg-body {
    border-radius: 4px 18px 18px 18px;
    padding: 0.75rem 0.95rem;
    font-size: 0.9rem;
    word-break: break-word;
    white-space: pre-line;
    line-height: 1.55;
}
.gp-msg-body-manage {
    padding-right: 5rem;
}
/* Others — dark bubble, gold left border, left-corner cut */
.gp-msg:not(.gp-msg-mine) .gp-msg-body {
    background: linear-gradient(180deg, rgba(28,28,28,0.98) 0%, rgba(20,20,20,0.98) 100%);
    border: 1px solid #2a2a2a;
    border-left: 3px solid rgba(218,165,32,0.5);
    color: #f3efe2;
    box-shadow: 0 4px 14px rgba(0,0,0,0.22);
}
/* Mine — solid gold bubble, right-corner cut (iMessage style) */
.gp-msg-mine .gp-msg-body {
    background: linear-gradient(145deg, #c8900d 0%, #a37009 100%);
    border: 1px solid rgba(218,165,32,0.45);
    border-radius: 18px 4px 18px 18px;
    color: #fff8e8;
    text-shadow: 0 1px 2px rgba(0,0,0,0.18);
    box-shadow: 0 4px 18px rgba(160,106,0,0.35);
}
.gp-chat-form {
    display: flex;
    align-items: flex-end;
    gap: 0.7rem;
    padding: 1rem 1.1rem 1.1rem;
    border: 1px solid #2a2a2a;
    border-top: none;
    border-radius: 0 0 20px 20px;
    background: linear-gradient(180deg, rgba(14,14,14,0.98) 0%, rgba(10,10,10,0.98) 100%);
    flex-shrink: 0;
    box-shadow: 0 12px 28px rgba(0,0,0,0.24);
}
.gp-chat-input {
    flex: 1;
    padding: 0.9rem 1rem;
    background: linear-gradient(180deg, rgba(20,20,20,0.98) 0%, rgba(13,13,13,0.98) 100%);
    border: 1px solid #303030;
    border-radius: 14px;
    color: var(--text-primary);
    font-size: 0.92rem;
    outline: none;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
    /* textarea-specific */
    resize: none;
    overflow: hidden;
    min-height: 48px;
    max-height: 160px;
    line-height: 1.5;
    font-family: inherit;
    display: block;
}
.gp-chat-input::placeholder { color: #7e7e7e; }
.gp-chat-input:focus {
    border-color: rgba(218,165,32,0.55);
    box-shadow: 0 0 0 4px rgba(218,165,32,0.08);
}
.gp-chat-send {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #d6a10d 0%, #b8860b 100%);
    color: #000;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(218,165,32,0.24);
    transition: transform 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.gp-chat-send:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(218,165,32,0.32);
}

@media (max-width: 1100px) {
    .gp-chat-layout {
        grid-template-columns: 1fr;
    }
    .gp-chat-sidebar {
        max-height: 200px;
    }
}

.gp-btn-primary:hover {
    background: #c9961e;
    box-shadow: 0 4px 16px rgba(218,165,32,0.38);
}
.gp-btn-ghost {
    background: transparent;
    border: 1px solid #2a2a2a;
    color: #999;
}
.gp-btn-ghost:hover { background: #1a1a1a; border-color: #3a3a3a; color: #F5F5DC; }
.gp-btn-danger {
    background: rgba(139,69,19,0.12);
    border: 1px solid rgba(139,69,19,0.28);
    color: #cd853f;
}
.gp-btn-danger:hover { background: rgba(139,69,19,0.22); border-color: rgba(139,69,19,0.45); }

/* ── Applications ─────────────────────────────────────────── */
.gp-app-card {
    background: #141414;
    border: 1px solid #1e1e1e;
    border-radius: 10px;
    padding: 1.3rem 1.4rem;
    margin-bottom: 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}
.gp-app-card.gp-app-approved { border-left: 3px solid #22c55e; }
.gp-app-card.gp-app-denied   { border-left: 3px solid #ef4444; }
.gp-app-card.gp-app-pending  { border-left: 3px solid #f59e0b; }
.gp-app-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.gp-app-name { font-weight: 700; color: var(--text-primary); font-size: 0.95rem; }
.gp-app-discord { font-size: 0.8rem; color: #7289da; margin-top: 0.1rem; }
.gp-app-message { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; white-space: pre-line; }
.gp-app-notes {
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: var(--darker-bg);
    border-radius: 5px;
    padding: 0.4rem 0.6rem;
}
.gp-app-reviewed { font-size: 0.75rem; color: var(--text-secondary); }
.gp-app-actions {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding-top: 0.4rem;
    border-top: 1px solid var(--border-color);
}
.gp-status-badge {
    font-size: 0.72rem;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.gp-status-pending  { background: #f59e0b22; color: #f59e0b; border: 1px solid #f59e0b44; }
.gp-status-approved { background: #22c55e22; color: #22c55e; border: 1px solid #22c55e44; }
.gp-status-denied   { background: #ef444422; color: #ef4444; border: 1px solid #ef444444; }

.btn-approve {
    padding: 0.4rem 0.85rem;
    background: #22c55e22;
    color: #22c55e;
    border: 1px solid #22c55e44;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: background 0.15s;
}
.btn-approve:hover { background: #22c55e40; }
.btn-deny {
    padding: 0.4rem 0.85rem;
    background: #ef444422;
    color: #ef4444;
    border: 1px solid #ef444444;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    transition: background 0.15s;
}
.btn-deny:hover { background: #ef444440; }

/* ── Calendar ─────────────────────────────────────────────── */
.gp-calendar-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px;
    gap: 1.35rem;
    align-items: start;
}
.gp-calendar-surface {
    background: linear-gradient(180deg, rgba(18,18,18,0.98) 0%, rgba(12,12,12,0.98) 100%);
    border: 1px solid #212121;
    border-radius: 16px;
    padding: 1.1rem;
    box-shadow: 0 14px 34px rgba(0,0,0,0.3);
}
.gp-calendar-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 0.9rem;
}
.gp-calendar-form-span-2 { grid-column: span 2; }
.gp-calendar-inline-field {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}
.gp-calendar-inline-field input { max-width: 90px; }
.gp-calendar-inline-label {
    color: var(--text-secondary);
    font-size: 0.8rem;
    white-space: nowrap;
}
.gp-calendar-color-field {
    display: flex;
    align-items: center;
    gap: 0.7rem;
}
.gp-calendar-color-field input[type="color"] {
    width: 48px;
    height: 38px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: none;
    cursor: pointer;
}
.gp-calendar-form-note {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #a79363;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}
.gp-calendar-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.25rem;
    margin-bottom: 0.8rem;
}
.gp-cal-month {
    font-weight: 800;
    font-size: 1.05rem;
    color: #f6efda;
    min-width: 180px;
    text-align: center;
    letter-spacing: 0.02em;
}
.gp-cal-btn {
    background: #141414;
    border: 1px solid #2a2a2a;
    color: #f2e8cf;
    border-radius: 10px;
    width: 36px;
    height: 36px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: background 0.15s, border-color 0.15s, transform 0.15s;
}
.gp-cal-btn:hover { background: var(--gang-color-15); border-color: var(--gang-color); transform: translateY(-1px); }
.gp-calendar-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-bottom: 0.9rem;
}
.gp-calendar-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.03);
    border: 1px solid #242424;
    color: #a7a7a7;
    font-size: 0.74rem;
}
.gp-calendar-meta-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.gp-calendar-meta-dot.today { background: var(--gang-color); }
.gp-calendar-meta-dot.event { background: #b68934; }
.gp-calendar-meta-dot.repeat { background: #60a5fa; }

.gp-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    background: transparent;
    border: none;
    border-radius: 12px;
    overflow: hidden;
}
.gp-cal-day-header {
    background: rgba(255,255,255,0.03);
    padding: 0.55rem;
    text-align: center;
    font-size: 0.72rem;
    font-weight: 700;
    color: #8a8a8a;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-radius: 10px;
}
.gp-cal-cell {
    background: linear-gradient(180deg, #131313 0%, #101010 100%);
    min-height: 92px;
    padding: 0.55rem;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s, transform 0.12s;
    position: relative;
    border: 1px solid #1b1b1b;
    border-radius: 12px;
}
.gp-cal-cell:hover { background: #171717; border-color: rgba(218,165,32,0.22); transform: translateY(-1px); }
.gp-cal-empty { background: rgba(255,255,255,0.02); opacity: 0.35; cursor: default; border-style: dashed; }
.gp-cal-today .gp-cal-num {
    background: var(--gang-color);
    color: #000;
    border-radius: 50%;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
}
.gp-cal-num {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.gp-cal-events { display: flex; flex-wrap: wrap; gap: 2px; }
.gp-cal-event-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255,255,255,0.04);
}
.gp-cal-event-dot.recurring { outline: 1px solid rgba(96,165,250,0.55); }
.gp-cal-event-more { font-size: 0.64rem; color: var(--text-secondary); }
.gp-cal-has-event { box-shadow: inset 0 -2px 0 var(--gang-color-30); }

/* Calendar popup */
.gp-cal-popup {
    position: absolute;
    z-index: 1000;
    background: linear-gradient(180deg, #171717 0%, #101010 100%);
    border: 1px solid #232323;
    border-radius: 14px;
    padding: 1rem 1.05rem;
    width: 340px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.7), 0 2px 10px rgba(0,0,0,0.4);
}
.gp-cal-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-size: 0.88rem;
}

.gp-upcoming-header { margin-bottom: 0.8rem; }
.gp-upcoming-sub { color: #8d8d8d; font-size: 0.76rem; margin-top: -0.2rem; }
.gp-event-list { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.75rem; }
.gp-event-row {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.9rem 1rem;
    border: 1px solid #1d1d1d;
    border-radius: 12px;
    transition: background 0.15s, border-color 0.15s;
    background: rgba(255,255,255,0.015);
}
.gp-event-row:last-child { border-bottom: none; }
.gp-event-row:hover { background: rgba(255,255,255,0.03); border-color: rgba(218,165,32,0.16); }
.gp-event-color-bar { width: 4px; border-radius: 999px; min-height: 48px; flex-shrink: 0; align-self: stretch; }
.gp-event-info { flex: 1; }
.gp-event-title { font-weight: 700; font-size: 0.92rem; color: #f6efda; line-height: 1.35; }
.gp-event-desc { font-size: 0.78rem; color: var(--text-secondary); margin-top: 0.15rem; }
.gp-event-time { font-size: 0.75rem; color: var(--text-secondary); margin-top: 0.15rem; display: flex; align-items: center; gap: 0.3rem; }
.gp-event-meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin-top: 0.65rem;
}
.gp-event-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.28rem 0.55rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.03);
    border: 1px solid #262626;
    color: #b3b3b3;
    font-size: 0.71rem;
    line-height: 1;
}
.gp-event-btns { display: flex; gap: 0.25rem; flex-shrink: 0; }
.gp-event-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-left: 0.45rem;
    padding: 0.16rem 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(96,165,250,0.3);
    background: rgba(96,165,250,0.1);
    color: #93c5fd;
    font-size: 0.68rem;
    font-weight: 700;
    vertical-align: middle;
}

.gp-doc-card {
    background: linear-gradient(180deg, rgba(19,19,19,0.98) 0%, rgba(13,13,13,0.98) 100%);
    border: 1px solid #202020;
    border-radius: 16px;
    padding: 1.4rem 1.5rem;
    box-shadow: 0 14px 34px rgba(0,0,0,0.28);
}
.gp-doc-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #1d1d1d;
}
.gp-doc-title {
    font-size: 1.15rem;
    font-weight: 800;
    color: #f6efda;
    margin-bottom: 0.2rem;
}
.gp-doc-subtitle {
    font-size: 0.82rem;
    color: #8e8e8e;
    line-height: 1.5;
}
.gp-doc-meta {
    font-size: 0.74rem;
    color: #a58a52;
    white-space: nowrap;
}
.gp-doc-body {
    color: #d9d2bf;
    line-height: 1.7;
    font-size: 0.9rem;
}
.gp-doc-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 0.9rem;
}
.gp-doc-card-composer {
    margin-bottom: 1rem;
    padding: 1rem;
    border: 1px solid #232323;
    border-radius: 14px;
    background: rgba(255,255,255,0.02);
}
.gp-doc-card-composer-title {
    font-size: 0.82rem;
    font-weight: 700;
    color: #f6efda;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.gp-doc-card-editor-note {
    margin-bottom: 1rem;
    color: #9a8351;
    font-size: 0.78rem;
    line-height: 1.5;
}

[data-doj-charge-picker] [data-doj-charge-group-body] {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.35rem !important;
}

[data-doj-charge-picker] [data-doj-charge-item] {
    display: flex !important;
    width: 100% !important;
    min-height: 72px !important;
    height: auto !important;
    align-items: flex-start !important;
    gap: 0.75rem !important;
    padding: 0.75rem !important;
    box-sizing: border-box !important;
    overflow: visible !important;
    white-space: normal !important;
    opacity: 1 !important;
    visibility: visible !important;
}

[data-doj-charge-picker] [data-doj-charge-indicator] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 22px !important;
    width: 22px !important;
    height: 22px !important;
    min-width: 22px !important;
}

[data-doj-charge-picker] [data-doj-charge-item] > div:last-child {
    display: block !important;
    flex: 1 1 auto !important;
    min-width: 0 !important;
    overflow: visible !important;
}

[data-doj-charge-picker] [data-doj-charge-item] > div:last-child > div {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    white-space: normal !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.doj-charge-modal-content {
    max-width: 980px !important;
}

.doj-charge-modal-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.doj-charge-modal-category {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.doj-charge-modal-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.2rem 0.2rem 0;
}

.doj-charge-modal-category-title {
    font-size: 0.92rem;
    font-weight: 800;
    color: var(--text-primary);
}

.doj-charge-modal-category-count {
    font-size: 0.76rem;
    font-weight: 700;
    color: var(--text-secondary);
}

.doj-charge-modal-category-body {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.doj-charge-modal-item {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    padding: 0.7rem 0.9rem;
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 10px;
    background: rgba(255,255,255,0.02);
    cursor: pointer;
    transition: border-color 0.15s, background-color 0.15s, transform 0.15s;
    min-height: 74px;
}

.doj-charge-modal-item:hover,
.doj-charge-modal-item:focus {
    border-color: rgba(184,134,11,0.32);
    background: rgba(184,134,11,0.08);
    outline: none;
}

.doj-charge-modal-item.selected {
    border-color: rgba(184,134,11,0.35);
    background: rgba(184,134,11,0.12);
}

.doj-charge-modal-item-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    min-width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.18);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1;
    margin-top: 0.2rem;
}

.doj-charge-modal-item.selected .doj-charge-modal-item-mark {
    border-color: rgba(184,134,11,0.45);
    background: rgba(184,134,11,0.18);
    color: var(--gold);
}

.doj-charge-modal-item-main {
    flex: 1 1 auto;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.doj-charge-modal-item-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.35;
}

.doj-charge-modal-item-desc {
    font-size: 0.76rem;
    line-height: 1.45;
    color: var(--text-secondary);
}

.doj-charge-modal-item-side {
    flex: 0 0 170px;
    min-width: 170px;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.45rem;
    padding-left: 0.5rem;
}

.doj-charge-modal-item-inline-meta {
    font-size: 0.72rem;
    color: var(--text-secondary);
    white-space: normal;
    text-align: right;
    line-height: 1.35;
}
.gp-doc-item {
    background: linear-gradient(180deg, rgba(24,24,24,0.98) 0%, rgba(16,16,16,0.98) 100%);
    border: 1px solid #232323;
    border-left: 3px solid var(--gang-color);
    border-radius: 14px;
    padding: 1rem 1rem 0.95rem;
    box-shadow: 0 10px 24px rgba(0,0,0,0.22);
    position: relative;
}
.gp-doc-item-command {
    border-left-color: #60a5fa;
    background: linear-gradient(180deg, rgba(18,20,26,0.98) 0%, rgba(13,15,20,0.98) 100%);
}
.gp-doc-item-delete {
    position: absolute;
    top: 0.7rem;
    right: 0.7rem;
}
.gp-doc-item-title {
    color: #f8f0dc;
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.35;
    margin-bottom: 0.45rem;
    padding-right: 2rem;
}
.gp-doc-item-body {
    color: #e5dcc7;
    font-size: 0.87rem;
    line-height: 1.65;
    white-space: pre-wrap;
    overflow-wrap: break-word;
    padding-right: 2rem;
}
.gp-doc-item-command .gp-doc-item-body {
    font-family: Consolas, 'Courier New', monospace;
    color: #dbeafe;
}
.gp-iban-member-card .gp-member-main {
    align-items: flex-start;
}
.gp-iban-avatar {
    font-size: 1.15rem;
}
.gp-iban-clickable {
    cursor: pointer;
}
.gp-iban-clickable:hover {
    border-color: rgba(218,165,32,0.42);
    box-shadow: 0 14px 30px rgba(218,165,32,0.1), 0 6px 18px rgba(0,0,0,0.42);
}
.gp-iban-account-number {
    color: #e7dec8;
    font-size: 0.84rem;
    line-height: 1.55;
    font-family: Consolas, 'Courier New', monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.gp-iban-badge {
    background: rgba(218,165,32,0.12);
    color: #d9b463;
    border-color: rgba(218,165,32,0.24);
}
.gp-iban-empty-card {
    border-style: dashed;
}
.gp-iban-empty-card .gp-member-name {
    color: #f2e7cb;
}
.gp-iban-empty-card .gp-iban-account-number {
    color: #bda677;
    font-family: inherit;
}
.gp-doc-body p {
    margin: 0 0 1rem;
}
.gp-doc-body p:last-child {
    margin-bottom: 0;
}
.gp-doc-editor {
    margin-top: 1rem;
}
.gp-doc-textarea {
    min-height: 320px;
    font-size: 0.9rem;
    line-height: 1.6;
}

/* ── Bank ─────────────────────────────────────────────────── */
.gp-bank-balance-card {
    background: linear-gradient(180deg, #1a1508 0%, #141414 100%);
    border: 1px solid #282010;
    border-top: 3px solid var(--gang-color);
    border-radius: 10px;
    padding: 2.5rem 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 28px rgba(218,165,32,0.09), 0 2px 12px rgba(0,0,0,0.55);
}
.gp-bank-balance-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% -10%, rgba(218,165,32,0.11) 0%, transparent 65%);
    pointer-events: none;
}
.gp-bank-balance-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}
.gp-bank-balance-amount {
    font-size: 3.25rem;
    font-weight: 900;
    color: var(--gang-color);
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}
.gp-bank-balance-note { font-size: 0.78rem; color: var(--text-secondary); }
.gp-bank-balance-note.gp-sync-active { color: #9fd8a8; }
.gp-bank-balance-note.gp-sync-warning { color: #e6b86a; }

.gp-bank-link-card {
    margin-bottom: 1rem;
    border-color: rgba(218,165,32,0.2);
    background: linear-gradient(180deg, rgba(24,20,10,0.94) 0%, rgba(16,16,16,0.98) 100%);
}
.gp-bank-link-subtitle {
    color: var(--text-secondary);
    font-size: 0.86rem;
    line-height: 1.5;
    margin-bottom: 0.85rem;
}
.gp-bank-link-row {
    display: flex;
    gap: 0.75rem;
    align-items: flex-end;
    flex-wrap: wrap;
}
.gp-bank-link-field {
    flex: 1;
    min-width: 240px;
}
.gp-bank-link-note {
    margin-top: 0.7rem;
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.gp-bank-table-wrap { overflow-x: auto; }
.gp-bank-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.83rem;
}
.gp-bank-table th {
    background: #0a0a0a;
    padding: 0.7rem 1rem;
    text-align: left;
    color: #666;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid #1e1e1e;
    font-weight: 700;
}
.gp-bank-table td {
    padding: 0.7rem 1rem;
    border-bottom: 1px solid #1a1a1a;
    color: var(--text-primary);
    vertical-align: middle;
}
.gp-bank-table tr:last-child td { border-bottom: none; }
.gp-bank-table tr:hover td { background: var(--gang-color-15); }

.gp-bonus-form-card {
    margin-bottom: 1rem;
}
.gp-bonus-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.gp-bonus-form-actions {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.gp-bonus-inline-action {
    display: flex;
    align-items: flex-end;
}
.gp-bonus-drug-config {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.gp-bonus-drug-config-header {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 800;
    color: #d7b267;
    margin-bottom: 0.75rem;
}
.gp-bonus-drug-type-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-top: 0.85rem;
}
.gp-bonus-drug-type-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(218,165,32,0.24);
    background: rgba(218,165,32,0.08);
    color: #f0d38d;
    font-size: 0.8rem;
}
.gp-bonus-drug-type-chip strong {
    color: #fff2c8;
}
.gp-bonus-add-bar {
    margin-bottom: 1.1rem;
    display: flex;
    gap: 0.75rem;
}
.gp-bonus-request-note {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid rgba(218,165,32,0.18);
    border-radius: 14px;
    background: rgba(218,165,32,0.06);
    color: #e7d5a4;
    line-height: 1.55;
}
.gp-bonus-board {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.gp-bonus-column {
    min-width: 0;
}
.gp-bonus-column-title {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    margin-bottom: 0.8rem;
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #d7b267;
}
.gp-bonus-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}
.gp-bonus-card {
    background: linear-gradient(180deg, rgba(22,22,22,0.96) 0%, rgba(15,15,15,0.98) 100%);
    border: 1px solid #252525;
    border-radius: 16px;
    padding: 1rem 1rem 1.05rem;
    box-shadow: 0 10px 24px rgba(0,0,0,0.28);
}
.gp-bonus-card.pending {
    border-left: 3px solid rgba(245, 158, 11, 0.55);
}
.gp-bonus-card.completed {
    border-left: 3px solid rgba(34, 197, 94, 0.45);
}
.gp-bonus-input-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    margin-bottom: 0.95rem;
}
.gp-bonus-full-row {
    grid-column: 1 / -1;
}
.gp-bonus-static-value {
    min-height: 44px;
    display: flex;
    align-items: center;
    padding: 0.75rem 0.85rem;
    border: 1px solid #252525;
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    color: #ece3cf;
}
.gp-bonus-metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}
.gp-bonus-metric {
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    background: rgba(255,255,255,0.02);
    padding: 0.75rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0.28rem;
}
.gp-bonus-metric span {
    color: var(--text-secondary);
    font-size: 0.73rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.gp-bonus-metric strong {
    color: #f7e4ab;
    font-size: 1rem;
}
.gp-bonus-card-top {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: flex-start;
    margin-bottom: 0.9rem;
}
.gp-bonus-submitter {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}
.gp-bonus-avatar {
    width: 46px;
    height: 46px;
    flex-shrink: 0;
}
.gp-bonus-submitter-meta {
    min-width: 0;
}
.gp-bonus-submitter-name {
    font-weight: 700;
    color: #f4ead2;
}
.gp-bonus-submitter-time {
    color: var(--text-secondary);
    font-size: 0.78rem;
    margin-top: 0.15rem;
}
.gp-bonus-status.pending {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.24);
    color: #f3b656;
}
.gp-bonus-status.completed {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.24);
    color: #7ee39e;
}
.gp-bonus-completed-meta {
    margin-top: 0.85rem;
    color: var(--text-secondary);
    font-size: 0.78rem;
    border-top: 1px solid rgba(255,255,255,0.06);
    padding-top: 0.75rem;
}
.gp-bonus-actions {
    margin-top: 0.9rem;
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
}

@media (max-width: 980px) {
    .gp-bonus-board {
        grid-template-columns: 1fr;
    }
    .gp-bonus-form-grid {
        grid-template-columns: 1fr;
    }
    .gp-bonus-input-grid {
        grid-template-columns: 1fr;
    }
    .gp-bonus-metric-grid {
        grid-template-columns: 1fr;
    }
}

.gp-iban-linked-card {
    border-color: rgba(91, 196, 128, 0.22);
    box-shadow: 0 10px 24px rgba(30, 76, 44, 0.16);
}
.gp-iban-linked-card .gp-iban-badge {
    background: rgba(34, 197, 94, 0.14);
    border-color: rgba(34, 197, 94, 0.3);
    color: #7ee39e;
}

/* ── Members ──────────────────────────────────────────────── */
.gp-members-list { display: flex; flex-direction: column; gap: 1.5rem; }
.gp-members-group-title {
    font-size: 0.64rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #1a1a1a;
}
.gp-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 0.85rem;
}
.gp-member-card {
    background: linear-gradient(180deg, rgba(22,22,22,0.96) 0%, rgba(16,16,16,0.96) 100%);
    border: 1px solid #242424;
    border-radius: 14px;
    padding: 1.1rem 1.2rem;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
    box-shadow: 0 10px 24px rgba(0,0,0,0.28);
}
.gp-member-card.active {
    border-color: rgba(218,165,32,0.45);
    box-shadow: 0 14px 30px rgba(218,165,32,0.08), 0 6px 18px rgba(0,0,0,0.42);
}
.gp-member-card:hover {
    border-color: rgba(218,165,32,0.32);
    box-shadow: 0 12px 28px rgba(218,165,32,0.07), 0 6px 18px rgba(0,0,0,0.42);
    transform: translateY(-1px);
}
.gp-member-main {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.7rem;
    min-width: 0;
}
.gp-member-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(218,165,32,0.16) 0%, rgba(218,165,32,0.05) 100%);
    border: 1px solid rgba(218,165,32,0.3);
    color: var(--gang-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 0 0 4px rgba(218,165,32,0.06);
}
.gp-member-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.gp-member-info { min-width: 0; display: flex; flex-direction: column; gap: 0.2rem; }
.gp-member-name { font-weight: 800; font-size: 1rem; color: #f6efda; white-space: normal; overflow-wrap: break-word; word-break: normal; line-height: 1.3; }
.gp-member-since { font-size: 0.75rem; color: #b89b55; letter-spacing: 0.01em; }
.gp-member-side {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.65rem;
    flex-shrink: 0;
}
.gp-member-edit-btn { margin-left: 0; }
.gp-member-notes-btn { margin-left: 0; }
.gp-member-kick-btn { margin-left: 0; }
.gp-role-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 999px;
    border: 1px solid;
    white-space: nowrap;
    flex-shrink: 0;
}
.gp-member-notes-panel {
    margin-top: 1.2rem;
    padding: 1.2rem;
    border: 1px solid #1d1d1d;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(16,16,16,0.96) 0%, rgba(12,12,12,0.96) 100%);
    box-shadow: 0 10px 24px rgba(0,0,0,0.28);
}
.gp-member-notes-modal-panel {
    margin-top: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}
.gp-member-notes-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.9rem;
}
.gp-member-notes-target {
    color: var(--text-secondary);
    font-size: 0.85rem;
}
.gp-member-notes-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.gp-member-notes-actions {
    display: flex;
    justify-content: flex-end;
}
.gp-member-notes-list {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}
.gp-member-note-item {
    border: 1px solid #1f1f1f;
    border-radius: 12px;
    background: rgba(20,20,20,0.92);
    padding: 0.9rem 1rem;
}
.gp-member-note-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.55rem;
}
.gp-member-note-author {
    font-weight: 700;
    color: #f6efda;
    font-size: 0.88rem;
}
.gp-member-note-time {
    font-size: 0.74rem;
    color: #8d8d8d;
    margin-top: 0.12rem;
}
.gp-member-note-body {
    color: #d9d2bf;
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: break-word;
}

@media (max-width: 640px) {
    .gp-calendar-form-grid {
        grid-template-columns: 1fr;
    }
    .gp-calendar-form-span-2 {
        grid-column: span 1;
    }
    .gp-calendar-layout {
        grid-template-columns: 1fr;
    }
    .gp-calendar-meta {
        gap: 0.45rem;
    }
    .gp-event-title {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 0.35rem;
    }
    .gp-event-meta-grid {
        gap: 0.35rem;
    }
    .gp-event-badge {
        margin-left: 0;
    }
    .gp-members-grid {
        grid-template-columns: 1fr;
    }
    .gp-member-card {
        padding: 1rem;
    }
    .gp-member-avatar {
        width: 56px;
        height: 56px;
    }
}

/* ── Common utilities ─────────────────────────────────────── */
.gp-section-title {
    font-size: 0.62rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.13em;
    color: var(--gang-color);
    display: flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.9rem;
    padding-left: 0.6rem;
    border-left: 2px solid var(--gang-color);
    opacity: 0.85;
}
.gp-section-title i { opacity: 0.75; font-size: 0.75em; }
.gp-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 0.88rem;
}
.gp-count-badge {
    background: var(--gang-color-15);
    color: var(--gang-color);
    border: 1px solid var(--gang-color-30);
    font-size: 0.72rem;
    padding: 2px 8px;
    border-radius: 10px;
    font-weight: 700;
}
.gp-icon-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 0.25rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
    transition: background 0.15s, color 0.15s;
    display: flex;
    align-items: center;
}
.gp-icon-btn:hover { background: rgba(218,165,32,0.1); color: #F5F5DC; }
.gp-delete-btn:hover { background: rgba(139,69,19,0.2); color: #B8860B; }

/* ── Gang portal mobile ───────────────────────────────────── */
@media (max-width: 900px) {
    .gp-overview-grid { grid-template-columns: 1fr; gap: 0.85rem; }
    .gp-calendar-layout { grid-template-columns: 1fr; }
}

.gp-roles-shell {
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.gp-roles-pane-list {
    width: 220px;
    flex-shrink: 0;
}

.gp-roles-pane-editor {
    flex: 1;
    min-width: 300px;
}

@media (max-width: 768px) {
    /* Allow sticky sidebar to work (overflow:hidden breaks position:sticky) */
    .gp-layout { flex-direction: column; height: auto; overflow: visible; }

    /* Sticky sidebar — always visible at top while scrolling portal content */
    .gp-sidebar {
        width: 100%;
        flex-direction: column;
        flex-wrap: nowrap;
        overflow: visible;
        border-right: none;
        border-bottom: none;
        height: auto;
        position: sticky;
        top: var(--navbar-h, 62px);
        z-index: 400;
        background: #0a0a0a;
    }

    .gp-identity, .gp-my-role { display: none; }

    /* Org switcher becomes a compact horizontal strip when multiple orgs */
    .gp-org-switcher {
        display: flex !important;
        flex-direction: row;
        align-items: stretch;
        border-bottom: 1px solid rgba(255,255,255,0.07);
        border-right: none;
        background: transparent;
        padding: 0;
        overflow-x: auto;
        flex-shrink: 0;
        max-height: 52px;
    }
    .gp-org-switcher-label { display: none; }
    .gp-org-switch-btn {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 0.4rem;
        padding: 0.35rem 0.7rem;
        border-left: none;
        border-bottom: 2px solid transparent;
        min-width: 0;
        font-size: 0.72rem;
        flex: 1;
    }
    .gp-org-switch-btn.active {
        border-bottom-color: var(--gang-color);
        border-left-color: transparent;
    }
    .gp-org-switch-icon {
        width: 20px;
        height: 20px;
        border-radius: 5px;
        flex-shrink: 0;
    }
    .gp-org-switch-name {
        max-width: 120px;
        text-align: left;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* Old horizontal scroll nav strip — hidden by portal-mobile-nav.js at runtime */
    /* (do NOT set display:none here — JS needs to read children before hiding) */
    .gp-nav-section { display: none; }
    .gp-nav-item { white-space: nowrap; }
    .gp-nav-item.active { border-bottom-color: var(--gang-color); border-left-color: transparent; }

    .gp-main { height: auto; overflow-y: visible; }
    .gp-chat-tab.active { height: calc(100dvh - 120px); min-height: 420px; }
    .gp-chat-layout { display: flex; flex-direction: column; gap: 0; height: 100%; }
    .gp-chat-main { flex: 1; min-height: 0; display: flex; flex-direction: column; }
    .gp-chat-messages { flex: 1; min-height: 0; }
    .gp-chat-sidebar { display: none; }
    .gp-stats-row { grid-template-columns: 1fr 1fr; }
    .gp-calendar-grid { font-size: 0.72rem; }
    .gp-cal-cell { min-height: 48px; }
    .gp-members-grid { grid-template-columns: 1fr; }
    .gp-tab { padding: 1.25rem; }
    .gp-bonus-form-grid { grid-template-columns: 1fr; }
}
.rule-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    background: rgba(255,255,255,0.025);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.15rem;
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.55;
    transition: background 0.15s, border-color 0.2s;
}
.rule-item:hover { background: rgba(255,255,255,0.04); border-color: rgba(184,134,11,0.3); }
.rule-item .sev { margin-top: 0; flex-shrink: 0; }
.rule-item strong { color: var(--text-primary); }

/* Callouts */
.rule-callout {
    display: flex;
    gap: 1rem;
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    align-items: flex-start;
}
.rule-callout i { font-size: 1.3rem; flex-shrink: 0; margin-top: 0.15rem; }
.rule-callout p { margin: 0; font-size: 0.9rem; line-height: 1.65; }
.callout-critical {
    background: rgba(192,57,43,0.1);
    border: 1px solid rgba(192,57,43,0.35);
    border-left: 4px solid #c0392b;
}
.callout-critical i, .callout-critical p { color: #e07070; }
.callout-critical strong { color: #e74c3c; }

/* Requirements grid */
.requirements-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}
.requirement-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.5rem 1.25rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.requirement-card i { font-size: 2rem; color: var(--gold); }
.requirement-card h4 { color: var(--text-primary); font-size: 0.95rem; }
.requirement-card p { color: var(--text-secondary); font-size: 0.83rem; line-height: 1.5; }

/* Tier grid */
.tier-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.5rem;
}
.tier-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}
.tier-crew  { border-top: 3px solid #3498db; }
.tier-gang  { border-top: 3px solid #e67e22; }
.tier-org   { border-top: 3px solid var(--gold); }

.tier-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 1.15rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.tier-crew .tier-header i  { color: #3498db; font-size: 1.5rem; }
.tier-gang .tier-header i  { color: #e67e22; font-size: 1.5rem; }
.tier-org .tier-header i   { color: var(--gold); font-size: 1.5rem; }
.tier-header h3 { color: var(--text-primary); font-size: 1.05rem; margin: 0 0 0.1rem; }
.tier-label { font-size: 0.72rem; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }

.tier-specs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.85rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
}
.tier-specs span { font-size: 0.78rem; color: var(--text-secondary); display: flex; align-items: center; gap: 0.3rem; }
.tier-specs i { color: var(--gold); font-size: 0.75rem; }

.tier-allowed, .tier-denied { padding: 0.85rem 1.25rem; }
.tier-section-label { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; display: flex; align-items: center; gap: 0.4rem; margin-bottom: 0.5rem; }
.tier-section-label.allowed { color: #27ae60; }
.tier-section-label.denied  { color: #e74c3c; }
.tier-allowed ul, .tier-denied ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 0.3rem; }
.tier-allowed ul li, .tier-denied ul li { font-size: 0.82rem; color: var(--text-secondary); padding-left: 0.85rem; position: relative; }
.tier-allowed ul li::before { content: "\2713"; position: absolute; left: 0; color: #27ae60; }
.tier-denied  ul li::before { content: "\2717"; position: absolute; left: 0; color: #e74c3c; }

/* Promotion flow */
.promo-flow {
    background: rgba(255,255,255,0.025);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}
.promo-step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}
.promo-tier {
    background: rgba(184,134,11,0.12);
    border: 1px solid rgba(184,134,11,0.3);
    color: var(--gold);
    padding: 0.4rem 1.1rem;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.9rem;
}
.promo-step .fa-arrow-right { color: var(--text-secondary); }
.promo-flow p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.65; margin: 0.4rem 0; }
.promo-flow strong { color: var(--text-primary); }

/* Footer note */
.rules-footer-note {
    display: flex;
    gap: 1rem;
    background: rgba(184,134,11,0.07);
    border: 1px solid rgba(184,134,11,0.25);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    margin-top: 2rem;
    align-items: flex-start;
}
.rules-footer-note i { color: var(--gold); font-size: 1.3rem; flex-shrink: 0; margin-top: 0.1rem; }
.rules-footer-note strong { color: var(--text-primary); display: block; margin-bottom: 0.35rem; }
.rules-footer-note p { color: var(--text-secondary); font-size: 0.88rem; line-height: 1.6; margin: 0 0 0.25rem; }
.rules-updated { font-size: 0.78rem !important; color: rgba(255,255,255,0.3) !important; }

/* Rule list for hero section */
.rule-list {
    list-style: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0;
}
.rule-list li {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    padding-left: 1.25rem;
    position: relative;
}
.rule-list li::before {
    content: "\2022";
    color: var(--gold);
    position: absolute;
    left: 0;
    font-size: 1rem;
}

/* Responsive */
@media (max-width: 900px) {
    .rules-layout { grid-template-columns: 1fr; }
    .rules-toc { display: none; }
}
@media (max-width: 600px) {
    .tier-grid { grid-template-columns: 1fr; }
    .requirements-grid { grid-template-columns: 1fr 1fr; }
    .rules-grid, .rules-grid-3, .rules-list-block { grid-template-columns: 1fr; }
    .promo-step { flex-direction: column; }
}

/* ================================================================
   MOBILE RESPONSIVE — Comprehensive additions
   ================================================================ */

/* ── Navbar mobile dropdown ─────────────────────────────────── */
@media (max-width: 1100px) {
    .navbar {
        position: relative;
    }

    .nav-links.nav-open {
        display: flex !important;
        flex-direction: column;
        align-items: flex-start;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--darker-bg);
        border-bottom: 2px solid var(--gold);
        padding: 1rem 1.5rem 1.5rem;
        gap: 0.85rem;
        z-index: 999;
        box-shadow: 0 8px 24px rgba(0,0,0,0.6);
        max-height: calc(100vh - 64px);
        overflow-y: auto;
    }

    .nav-links.nav-open li {
        width: 100%;
    }

    .nav-links.nav-open a {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.4rem 0;
        font-size: 1rem;
    }

    .nav-links.nav-open .btn-login,
    .nav-links.nav-open .btn-logout {
        display: block;
        text-align: center;
        margin-top: 0.25rem;
        padding: 0.6rem 1rem;
    }

    /* ── Bell & DND buttons in mobile dropdown ─── */
    .nav-links.nav-open .nav-bell-btn {
        width: 100%;
        justify-content: flex-start;
        padding: 0.4rem 0;
        font-size: 1rem;
        gap: 0.65rem;
        border-radius: 0;
    }
    .nav-links.nav-open .nav-bell-btn::after {
        content: attr(data-mobile-label);
        font-size: 1rem;
        font-weight: 500;
        color: var(--text-secondary);
    }
    .nav-links.nav-open .nav-bell-btn:hover::after { color: var(--primary-color); }
    .nav-links.nav-open .nav-bell-btn.dnd-active { color: #9b59b6; }
    .nav-links.nav-open .nav-bell-btn.dnd-active::after { color: #9b59b6; }

    /* ── Staff portal & dashboard padding ─── */
    .staff-portal {
        padding: 1rem 0.85rem 3rem;
    }

    .dashboard {
        padding: 1rem 0.85rem 3rem;
    }

    /* ── Page header stacks vertically ─── */
    .sp-page-header {
        flex-wrap: wrap;
        gap: 0.75rem;
    }

    /* Button at right of page header fills full width on mobile */
    .sp-page-header > .btn-primary,
    .sp-page-header > .btn-secondary,
    .sp-page-header > button {
        width: 100%;
        justify-content: center;
    }

    /* ── Panel header wraps ─── */
    .sp-panel-header {
        flex-wrap: wrap;
        row-gap: 0.5rem;
    }

    /* Last item (button) in panel header stretches full width */
    .sp-panel-header > *:last-child:not(:first-child):is(button, a) {
        margin-left: 0;
        width: 100%;
        justify-content: center;
    }

    /* ── Ticket info grid: 2 columns ─── */
    .ticket-info-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* ── Ticket card header wraps ─── */
    .ticket-card-header {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    /* ── Reply form actions stack ─── */
    .reply-form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .reply-form-actions .btn-primary,
    .reply-form-actions .btn-close-ticket {
        width: 100%;
        justify-content: center;
    }

    /* ── Ticket actions (staff ticket panel) ─── */
    .ticket-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .ticket-actions select,
    .ticket-actions input,
    .ticket-actions button {
        width: 100%;
    }

    /* ── Admin portal ─── */
    .admin-portal {
        padding: 5rem 0.85rem 3rem;
    }

    .admin-tabs {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
    }

    .tab-btn {
        white-space: nowrap;
        flex-shrink: 0;
        padding: 0.65rem 1rem;
        font-size: 0.88rem;
    }

    /* ── Review portal ─── */
    .review-portal {
        padding: 1rem 0.85rem 3rem;
    }

    /* ── Form row: stack columns ─── */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* ── Modal content inner grid ─── */
    .modal-content .ticket-info-grid {
        grid-template-columns: 1fr 1fr;
    }

    /* ── Modal form footer ─── */
    .form-footer {
        flex-direction: column;
        gap: 0.5rem;
    }

    .form-footer .btn-primary,
    .form-footer .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    /* ── Login box ─── */
    .login-box {
        padding: 2rem 1.25rem;
        margin: 0 1rem;
    }

    /* ── Rules hero ─── */
    .rules-hero {
        padding: 5rem 1rem 2.5rem;
    }

    /* ── Applications grid ─── */
    .app-types-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ── Extra small phones (≤480 px) ─────────────────────────── */
@media (max-width: 480px) {
    /* Single-column ticket info */
    .ticket-info-grid {
        grid-template-columns: 1fr;
    }

    /* Modal inner grid also single col */
    .modal-content .ticket-info-grid {
        grid-template-columns: 1fr;
    }

    /* Dashboard & staff stats: single column */
    .db-stats-row {
        grid-template-columns: 1fr !important;
    }

    .sp-stats-row {
        grid-template-columns: 1fr 1fr !important;
    }

    /* Portal stats: single column */
    .gp-stats-row {
        grid-template-columns: 1fr !important;
    }

    /* Portal tab padding tighter */
    .gp-tab {
        padding: 0.75rem;
    }

    /* Page title smaller */
    .sp-page-title h1 {
        font-size: 1.2rem;
    }

    /* Container tighter */
    .container {
        padding: 0 12px;
    }

    /* Keep key action buttons usable in narrow layouts */
    #submitInlineRatingBtn,
    #appOpenToggleBtn {
        min-width: 0 !important;
        width: 100%;
    }

    /* App cards stack to single column on very small phones */
    .app-types-grid {
        grid-template-columns: 1fr;
    }

    /* Modal closer to edge */
    .modal-content {
        width: 98%;
        padding: 1rem;
        margin: 4% auto;
    }

    /* Compact stat cards */
    .sp-stat {
        padding: 0.65rem 0.75rem;
        gap: 0.5rem;
    }

    .sp-stat-num {
        font-size: 1.1rem;
    }

    /* Staff portal tighter */
    .staff-portal {
        padding: 0.75rem 0.6rem 2rem;
    }

    /* Smaller textarea */
    .ticket-reply-form textarea {
        font-size: 0.9rem;
    }

    /* Section title smaller */
    .section-title {
        font-size: 1rem;
    }

    /* Hide rules legend bar */
    .rules-legend-bar {
        display: none;
    }

    /* App review rows stack */
    .review-app-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .review-app-right {
        align-items: flex-start;
        flex-direction: row;
        gap: 0.5rem;
        flex-wrap: wrap;
    }

    /* Applications grid: 1 column */
    .app-types-grid {
        grid-template-columns: 1fr;
    }

    /* Nav logo smaller */
    .nav-logo {
        font-size: 1.15rem;
        gap: 8px;
    }

    .nav-logo img {
        height: 38px;
    }
}

/* ═══════════════════════════════════════════════════════════════
   ROLES & PERMISSIONS — Admin tab
═══════════════════════════════════════════════════════════════ */

.roles-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1.25rem;
    align-items: start;
    margin-top: 1.25rem;
}

/* ── Role list sidebar ─────────────────────────────────────── */
.roles-sidebar {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.85rem;
}
.roles-list { display: flex; flex-direction: column; gap: 2px; }
.role-list-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.65rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.14s;
    user-select: none;
}
.role-list-item:hover { background: var(--darker-bg); }
.role-list-item.active {
    background: rgba(212,175,55,0.1);
    outline: 1px solid rgba(212,175,55,0.25);
}
.role-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}
.role-list-name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.role-list-count {
    font-size: 0.68rem;
    color: var(--text-secondary);
}

/* ── Role editor panel ─────────────────────────────────────── */
.roles-editor {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
    min-height: 300px;
}
.roles-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
    color: var(--text-secondary);
    text-align: center;
}
.roles-placeholder i { font-size: 2.5rem; margin-bottom: 0.75rem; opacity: 0.4; }
.roles-placeholder p { font-size: 0.88rem; margin: 0; }
.roles-editor-header {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}
.roles-name-input {
    flex: 1;
    padding: 0.55rem 0.75rem;
    background: var(--input-bg, #0f0f1a);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 700;
    outline: none;
    transition: border-color 0.15s;
}
.roles-name-input:focus { border-color: var(--gold, #d4af37); }

/* ── Permissions grid ──────────────────────────────────────── */
.roles-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.6rem;
}
.permissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem;
}
.perm-group {
    background: var(--darker-bg);
    border: 1px solid var(--border-color);
    border-radius: 7px;
    padding: 0.75rem;
}
.perm-group-title {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--gold, #d4af37);
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.6rem;
}
.perm-group-perms { display: flex; flex-direction: column; gap: 0.35rem; }
.perm-row {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    padding: 0.4rem 0.5rem;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.12s;
}
.perm-row:hover { background: rgba(212,175,55,0.07); }
.perm-row input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; accent-color: var(--gold, #d4af37); }
.perm-info { display: flex; flex-direction: column; gap: 0.1rem; }
.perm-label { font-size: 0.83rem; font-weight: 600; color: var(--text-primary); }
.perm-desc { font-size: 0.72rem; color: var(--text-secondary); }

/* ── Gang Roles Permissions Grid (admin + gang portal) ────── */
.roles-perms-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.85rem;
    margin-top: 0.5rem;
}
.perm-group-label {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--gold, #DAA520);
    margin-bottom: 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #1a1a1a;
}
.perm-checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.28rem 0;
    cursor: pointer;
    font-size: 0.82rem;
    color: #aaa;
    transition: color 0.15s;
    user-select: none;
}
.perm-checkbox-row:hover { color: #F5F5DC; }
.perm-checkbox-row input[type="checkbox"] {
    accent-color: var(--gold, #DAA520);
    width: 14px; height: 14px;
    flex-shrink: 0;
    cursor: pointer;
}
.perm-checkbox-row i {
    color: var(--gold, #DAA520);
    opacity: 0.7;
    width: 14px;
    text-align: center;
    font-size: 0.78rem;
}
.perm-checkbox-row input:checked ~ span { color: #F5F5DC; }

/* ── Gang portal roles list ────────────────────────────────── */
.gp-roles-list { display: flex; flex-direction: column; gap: 0.3rem; }
.gp-role-list-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.6rem 0.85rem;
    cursor: pointer;
    border-radius: 6px;
    border: 1px solid #1a1a1a;
    background: #141414;
    transition: background 0.15s, border-color 0.15s;
    font-size: 0.88rem;
}
.gp-role-list-item:hover { background: rgba(218,165,32,0.07); border-color: rgba(218,165,32,0.2); }
.gp-role-list-item.active { background: rgba(218,165,32,0.1); border-color: rgba(218,165,32,0.3); }
.gp-role-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.gp-role-list-name { flex: 1; color: #F5F5DC; font-weight: 600; }
.gp-role-perm-count { font-size: 0.65rem; color: #666; }

/* ── Assigned users list ───────────────────────────────────── */
.roles-users-list { display: flex; flex-direction: column; gap: 0.35rem; }
.role-user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0.65rem;
    background: var(--darker-bg);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    gap: 0.75rem;
}
.role-user-row .user-row-id { display: block; font-size: 0.72rem; color: var(--text-secondary); }

@media (max-width: 768px) {
    .roles-layout { grid-template-columns: 1fr; }
    .permissions-grid { grid-template-columns: 1fr; }
}

/* ── Member search picker ──────────────────────────────────── */
.member-search-input {
    width: 100%;
    padding: 0.55rem 0.75rem;
    background: var(--input-bg, #0f0f1a);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.9rem;
    outline: none;
    transition: border-color 0.15s;
    box-sizing: border-box;
}
.member-search-input:focus { border-color: var(--gold, #d4af37); }
.member-search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-top: none;
    border-radius: 0 0 6px 6px;
    max-height: 230px;
    overflow-y: auto;
    z-index: 200;
    box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}
.member-search-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.85rem;
    cursor: pointer;
    transition: background 0.12s;
}
.member-search-option:hover { background: var(--darker-bg); }
.member-search-option .opt-name { font-size: 0.88rem; font-weight: 600; color: var(--text-primary); }
.member-search-option .opt-id { font-size: 0.72rem; color: var(--text-secondary); }

/* ================================================================
   DND (Do Not Disturb) Modal & Feedback
   ================================================================ */

/* Overlay */
#dndModalOverlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}
#dndModalOverlay.dnd-overlay-visible {
    opacity: 1;
}

/* Modal card */
.dnd-modal {
    background: #1a1a1a;
    border: 1px solid #9b59b6;
    border-radius: 1rem;
    padding: 1.5rem;
    width: min(340px, calc(100vw - 2rem));
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transform: scale(0.92) translateY(10px);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#dndModalOverlay.dnd-overlay-visible .dnd-modal {
    transform: scale(1) translateY(0);
}

.dnd-modal-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: #9b59b6;
}

.dnd-modal-sub {
    color: var(--text-secondary, #aaa);
    font-size: 0.88rem;
    margin: 0;
}

/* Duration option buttons */
.dnd-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: 0.25rem;
}

.dnd-opt-btn {
    background: rgba(155, 89, 182, 0.12);
    border: 1px solid rgba(155, 89, 182, 0.35);
    color: var(--gold, #d4af37);
    border-radius: 0.5rem;
    padding: 0.55rem 0.5rem;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    font-family: inherit;
    text-align: center;
}
.dnd-opt-btn:hover {
    background: rgba(155, 89, 182, 0.28);
    border-color: rgba(155, 89, 182, 0.7);
    color: #fff;
}

/* "Turn Off DND" button */
.dnd-cancel-btn {
    background: rgba(231, 76, 60, 0.1);
    border: 1px solid rgba(231, 76, 60, 0.4);
    color: #e74c3c;
    border-radius: 0.5rem;
    padding: 0.55rem 0.75rem;
    font-size: 0.88rem;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s;
    font-family: inherit;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}
.dnd-cancel-btn:hover {
    background: rgba(231, 76, 60, 0.22);
    border-color: rgba(231, 76, 60, 0.65);
}

/* "Cancel" (dismiss) button */
.dnd-dismiss-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.13);
    color: var(--text-muted, #888);
    border-radius: 0.5rem;
    padding: 0.45rem;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.15s;
    font-family: inherit;
}
.dnd-dismiss-btn:hover {
    background: rgba(255, 255, 255, 0.07);
    color: #bbb;
}

/* Feedback toast */
.dnd-feedback {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%) translateY(1.5rem);
    background: #1a1a1a;
    border: 1px solid #9b59b6;
    color: var(--gold, #d4af37);
    border-radius: 0.5rem;
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
    z-index: 100001;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    pointer-events: none;
    white-space: nowrap;
}
.dnd-feedback.dnd-feedback-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ================================================================
   MOBILE PORTAL NAVIGATION — Sticky bar + bottom-sheet drawer
   (portal-mobile-nav.js)
   ================================================================ */

/* ── Compact sticky bar (replaces old horizontal tab strip) ── */
.gp-mob-bar {
    display: none; /* hidden on desktop; shown by media query below */
}

@media (max-width: 768px) {
    .gp-mob-bar {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0.5rem 0.85rem;
        min-height: 46px;
        background: #0a0a0a;
        border-bottom: 1px solid rgba(255,255,255,0.08);
        gap: 0.65rem;
        flex-shrink: 0;
    }

    .gp-mob-bar-current {
        display: flex;
        align-items: center;
        gap: 0.55rem;
        color: var(--gang-color, var(--gold));
        font-size: 0.9rem;
        font-weight: 700;
        min-width: 0;
        flex: 1;
    }

    .gp-mob-bar-current i {
        font-size: 0.82rem;
        flex-shrink: 0;
    }

    .gp-mob-bar-current span {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .gp-mob-bar-btn {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
        background: rgba(218,165,32,0.1);
        border: 1px solid rgba(218,165,32,0.28);
        color: var(--gold);
        font-size: 0.77rem;
        font-weight: 600;
        padding: 0.42rem 0.8rem;
        border-radius: 7px;
        cursor: pointer;
        flex-shrink: 0;
        white-space: nowrap;
        transition: background 0.15s;
    }

    .gp-mob-bar-btn:hover,
    .gp-mob-bar-btn:active {
        background: rgba(218,165,32,0.2);
    }

    .gp-mob-bar-chevron {
        font-size: 0.68rem;
        transition: transform 0.2s;
    }

    .gp-mob-bar-chevron.rotated {
        transform: rotate(180deg);
    }
}

/* ── Bottom-sheet overlay (fixed, full-screen) ─────────────── */
.gp-mob-sheet {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 5000;
    flex-direction: column;
    justify-content: flex-end;
}

.gp-mob-sheet.open {
    display: flex;
}

.gp-mob-sheet-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
}

.gp-mob-sheet-panel {
    position: relative;
    background: #111;
    border-radius: 18px 18px 0 0;
    border-top: 2px solid var(--gang-color, var(--gold));
    max-height: 78vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    animation: gpMobSheetUp 0.24s ease;
}

@keyframes gpMobSheetUp {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
}

.gp-mob-sheet-handle {
    width: 40px;
    height: 4px;
    background: rgba(255,255,255,0.15);
    border-radius: 2px;
    margin: 0.65rem auto 0;
    flex-shrink: 0;
}

.gp-mob-sheet-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.7rem 1.25rem 0.6rem;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    flex-shrink: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-secondary, #888);
}

.gp-mob-sheet-close {
    background: none;
    border: none;
    color: #666;
    font-size: 1rem;
    cursor: pointer;
    padding: 0.2rem 0.45rem;
    border-radius: 5px;
    transition: color 0.15s;
    line-height: 1;
}

.gp-mob-sheet-close:hover { color: #bbb; }

.gp-mob-sheet-body {
    overflow-y: auto;
    padding: 0.5rem 0 2rem;
    flex: 1;
}

.gp-mob-sheet-section {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #3a3a3a;
    padding: 0.9rem 1.25rem 0.25rem;
}

.gp-mob-sheet-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    padding: 0.78rem 1.25rem;
    background: none;
    border: none;
    border-left: 3px solid transparent;
    color: #888;
    font-size: 0.92rem;
    cursor: pointer;
    text-align: left;
    transition: background 0.1s, color 0.1s, border-color 0.1s;
    font-family: inherit;
}

.gp-mob-sheet-item:hover  { background: rgba(255,255,255,0.04); color: #ccc; }
.gp-mob-sheet-item:active { background: rgba(255,255,255,0.06); }

.gp-mob-sheet-item.active {
    color: var(--gang-color, var(--gold));
    border-left-color: var(--gang-color, var(--gold));
    font-weight: 700;
    background: rgba(218,165,32,0.05);
}

.gp-mob-sheet-item i {
    width: 18px;
    text-align: center;
    font-size: 0.82rem;
    flex-shrink: 0;
}

.gp-mob-sheet-item span { flex: 1; }

.gp-mob-sheet-badge {
    flex-shrink: 0;
    background: rgba(239, 68, 68, 0.85);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    margin-left: auto;
}

/* ═══════════════════════════════════════════════════════════════
   CHAT ENHANCEMENTS — GIF button, picker, inline images
═══════════════════════════════════════════════════════════════ */

/* GIF button next to send */
.gp-chat-gif-btn {
    flex-shrink: 0;
    height: 42px;
    padding: 0 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(218,165,32,0.3);
    background: rgba(218,165,32,0.08);
    color: #d6a10d;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    transition: background 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.gp-chat-gif-btn:hover {
    background: rgba(218,165,32,0.16);
    border-color: rgba(218,165,32,0.55);
}

/* GIF picker floating panel */
.gp-gif-picker {
    position: fixed;
    z-index: 99999;
    width: 440px;
    max-width: calc(100vw - 16px);
    max-height: 420px;
    background: #141414;
    border: 1px solid #2e2e2e;
    border-radius: 18px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.7), 0 0 0 1px rgba(218,165,32,0.08);
    display: none;
    flex-direction: column;
    overflow: hidden;
}
.gp-gif-picker-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.7rem 0.85rem;
    border-bottom: 1px solid #222;
    flex-shrink: 0;
}
.gp-gif-search-input {
    flex: 1;
    background: rgba(255,255,255,0.05);
    border: 1px solid #303030;
    border-radius: 10px;
    padding: 0.5rem 0.75rem;
    color: #f3efe2;
    font-size: 0.88rem;
    outline: none;
    font-family: inherit;
}
.gp-gif-search-input:focus {
    border-color: rgba(218,165,32,0.5);
}
.gp-gif-close-btn {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    border: none;
    background: rgba(255,255,255,0.06);
    color: #aaa;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    transition: background 0.15s;
}
.gp-gif-close-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.gp-gif-grid {
    flex: 1;
    overflow-y: auto;
    columns: 2;
    column-gap: 8px;
    padding: 0.75rem;
}
.gp-gif-item {
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    background: #1a1a1a;
    transition: transform 0.12s, box-shadow 0.12s;
    border: 2px solid transparent;
    margin-bottom: 8px;
    break-inside: avoid;
    display: inline-block;
    width: 100%;
    box-sizing: border-box;
}
.gp-gif-item:hover {
    border-color: rgba(218,165,32,0.55);
    transform: scale(1.02);
    box-shadow: 0 4px 16px rgba(0,0,0,0.5);
}
.gp-gif-item img {
    width: 100%;
    height: auto;
    display: block;
}
.gp-gif-loading {
    column-span: all;
    text-align: center;
    padding: 2rem;
    color: #888;
    font-size: 0.85rem;
}
.gp-gif-trending-btn {
    background: none;
    border: none;
    color: #d6a10d;
    cursor: pointer;
    font-size: 0.85rem;
    text-decoration: underline;
    padding: 0;
}
.gp-gif-footer {
    flex-shrink: 0;
    text-align: center;
    padding: 0.35rem;
    font-size: 0.7rem;
    color: #555;
    border-top: 1px solid #1e1e1e;
}

/* Inline images/GIFs in chat messages */
.gp-msg-inline-img {
    max-width: 100%;
    max-height: 280px;
    border-radius: 10px;
    display: block;
    cursor: pointer;
    margin-top: 0.25rem;
    object-fit: contain;
}
.gp-msg-inline-img:hover { opacity: 0.92; }

/* Ticket reply form with GIF support */
.gp-ticket-reply-lower {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
}
.gp-ticket-reply-lower .gp-chat-gif-btn {
    height: 38px;
    font-size: 0.76rem;
}

/* Chat input wrapper — GIF button overlaid inside the textarea */
.gp-chat-input-wrap {
    flex: 1;
    position: relative;
    min-width: 0;
}
.gp-chat-input-wrap > .gp-chat-input {
    flex: none;
    width: 100%;
    box-sizing: border-box;
    padding-right: 3.6rem;
}
.gp-chat-input-wrap > .gp-chat-gif-btn {
    position: absolute;
    right: 0.45rem;
    bottom: 0.4rem;
    height: 32px;
    padding: 0 0.55rem;
    font-size: 0.7rem;
    border-radius: 8px;
    letter-spacing: 0;
    z-index: 2;
}
