:root {
    --bg-primary: #0a0a0f;
    --bg-secondary: #12121a;
    --bg-card: #16161f;
    --bg-card-hover: #1c1c28;
    --accent: #7c6aef;
    --accent-dim: rgba(124, 106, 239, 0.12);
    --accent-glow: rgba(124, 106, 239, 0.3);
    --text-primary: #e8e6f0;
    --text-secondary: #9a96a8;
    --text-muted: #5a5670;
    --border: #2a2835;
    --success: #4ade80;
    --gold: #f59e0b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* NAV */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.nav-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    object-fit: cover;
}

.nav-name {
    font-size: 16px;
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: 2px;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover {
    color: var(--text-primary);
}

.nav-discord {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--accent) !important;
    padding: 6px 14px;
    border: 1px solid var(--accent);
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-discord:hover {
    background: var(--accent-dim);
}

.nav-signin {
    color: var(--text-primary) !important;
    padding: 7px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 500 !important;
}

.nav-signin:hover {
    border-color: var(--accent);
    color: var(--accent) !important;
    background: var(--accent-dim);
}

.nav-signup {
    background: var(--accent) !important;
    color: #fff !important;
    padding: 7px 18px;
    border-radius: 8px;
    transition: all 0.2s;
    font-weight: 600 !important;
}

.nav-signup:hover {
    background: #6b59de !important;
    box-shadow: 0 0 20px var(--accent-glow);
}

/* HERO */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 120px 24px 80px;
    overflow: hidden;
}

.hero-glow {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.4;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 640px;
}

.hero-logo {
    width: 120px;
    height: 120px;
    border-radius: 24px;
    object-fit: cover;
    margin-bottom: 32px;
    box-shadow: 0 0 60px var(--accent-glow), 0 0 120px rgba(124, 106, 239, 0.15);
}

.hero h1 {
    font-size: 56px;
    font-weight: 800;
    letter-spacing: 6px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-tagline {
    font-size: 20px;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 20px;
}

.hero-desc {
    font-size: 16px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 36px;
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
}

.btn-primary:hover {
    background: #6b59de;
    box-shadow: 0 0 24px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* SECTIONS */
.section-title {
    font-size: 32px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
    letter-spacing: 1px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: 15px;
    margin-bottom: 48px;
}

/* FEATURES */
.features {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.features .section-title {
    margin-bottom: 48px;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    transition: all 0.2s;
}

.feature-card:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover);
    transform: translateY(-2px);
}

.feature-icon {
    color: var(--accent);
    margin-bottom: 16px;
}

.feature-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* PRICING */
.pricing {
    padding: 100px 0;
}

.pricing .section-title {
    margin-bottom: 12px;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.price-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 20px;
    text-align: center;
    transition: all 0.2s;
    position: relative;
}

.price-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
}

.price-card.popular {
    border-color: var(--accent);
    background: linear-gradient(180deg, rgba(124, 106, 239, 0.08) 0%, var(--bg-card) 100%);
}

.price-card.best-value {
    border-color: var(--gold);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.08) 0%, var(--bg-card) 100%);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 14px;
    border-radius: 20px;
    white-space: nowrap;
    letter-spacing: 0.5px;
}

.value-badge {
    background: var(--gold) !important;
    color: #000 !important;
}

.price-duration {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
    margin-top: 4px;
}

.price-amount {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.price-per {
    font-size: 12px;
    color: var(--text-muted);
}

/* HOW IT WORKS */
.how-it-works {
    padding: 100px 0;
    background: var(--bg-secondary);
}

.steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 60px;
}

.step {
    text-align: center;
    padding: 20px;
}

.step-num {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-dim);
    border: 2px solid var(--accent);
    color: var(--accent);
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
}

.step h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.step p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* PAYMENT INFO */
.payment-info {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 36px;
    max-width: 700px;
    margin: 0 auto;
}

.payment-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    text-align: center;
}

.crypto-addresses {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.crypto-row {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px;
}

.crypto-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--accent);
    min-width: 36px;
    letter-spacing: 1px;
}

.crypto-addr {
    flex: 1;
    font-size: 12px;
    color: var(--text-secondary);
    font-family: 'SF Mono', 'Fira Code', monospace;
    word-break: break-all;
    user-select: all;
}

.copy-btn {
    background: var(--accent-dim);
    color: var(--accent);
    border: 1px solid rgba(124, 106, 239, 0.3);
    border-radius: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.copy-btn:hover {
    background: var(--accent);
    color: #fff;
}

.payment-note {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    line-height: 1.6;
}

/* FAQ */
.faq {
    padding: 100px 0;
}

.faq .section-title {
    margin-bottom: 48px;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
}

.faq-item h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-primary);
}

.faq-item p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* FOOTER */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border);
    background: var(--bg-secondary);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    letter-spacing: 2px;
    font-size: 14px;
}

.footer-logo {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    object-fit: cover;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-copy {
    font-size: 12px;
    color: var(--text-muted);
}

/* RESPONSIVE */
@media (max-width: 900px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .steps {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero h1 {
        font-size: 40px;
    }
}

@media (max-width: 600px) {
    .nav-links a:not(.nav-discord):not(.nav-signin):not(.nav-signup) {
        display: none;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .steps {
        grid-template-columns: 1fr;
    }

    .faq-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 32px;
        letter-spacing: 3px;
    }

    .hero-logo {
        width: 80px;
        height: 80px;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }

    .auth-card {
        padding: 32px 20px;
    }
}

/* NAV ACTIVE */
.nav-active {
    color: var(--accent) !important;
}

/* STATUS PAGE */
.status-page {
    padding: 40px 0 100px;
    min-height: calc(100vh - 64px);
}

.status-main-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 48px;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.status-indicator {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 32px;
}

.status-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #9a96a8;
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.status-label {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 3px;
    color: #9a96a8;
}

.status-meta {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.status-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
}

.status-meta-row:last-child {
    border-bottom: none;
}

.status-meta-key {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.status-meta-val {
    font-size: 14px;
    color: var(--text-secondary);
}

.status-loading {
    color: var(--text-muted);
    font-size: 14px;
    text-align: center;
    padding: 20px;
}

/* STATUS TIMELINE */
.status-timeline {
    max-width: 600px;
    margin: 24px auto 0;
}

.timeline-entry {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}

.timeline-entry:last-child {
    border-bottom: none;
}

.timeline-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 4px;
}

.timeline-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timeline-status {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
}

.timeline-date {
    font-size: 12px;
    color: var(--text-muted);
}

.timeline-notes {
    font-size: 13px;
    color: var(--text-secondary);
}

/* AUTH PAGE */
.auth-section {
    min-height: calc(100vh - 64px);
    display: flex;
    align-items: center;
    padding: 100px 0 60px;
}

.auth-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 48px 40px;
    max-width: 420px;
    margin: 0 auto;
    text-align: center;
}

.auth-logo {
    width: 64px;
    height: 64px;
    border-radius: 14px;
    object-fit: cover;
    margin-bottom: 24px;
}

.auth-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 28px;
}

.auth-tab {
    flex: 1;
    padding: 10px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: inherit;
}

.auth-tab.active {
    background: var(--accent);
    color: #fff;
}

.form-group {
    margin-bottom: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
}

.form-group input::placeholder {
    color: var(--text-muted);
}

.form-error {
    font-size: 13px;
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
    text-align: left;
}

.form-error:empty {
    display: none;
}

.form-success {
    font-size: 13px;
    color: var(--success);
    margin-bottom: 14px;
    padding: 12px;
    background: rgba(74, 222, 128, 0.08);
    border-radius: 8px;
}

.btn-full {
    width: 100%;
    justify-content: center;
    margin-bottom: 16px;
}

.auth-link {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s;
}

.auth-link:hover {
    color: var(--accent);
}

.auth-switch {
    margin-top: 16px;
    font-size: 13px;
    color: var(--text-muted);
}

.auth-switch .auth-link {
    color: var(--accent);
    font-weight: 500;
}

.auth-heading {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.auth-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
}

.auth-desc strong {
    color: var(--text-primary);
}

.verify-icon {
    margin-bottom: 20px;
}

.settings-label {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 14px;
}

.btn-sm {
    padding: 10px 24px;
    font-size: 14px;
}

/* DISCORD LINK */
.btn-discord {
    background: #5865F2 !important;
    color: #fff !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-discord:hover {
    background: #4752c4 !important;
    box-shadow: 0 0 20px rgba(88, 101, 242, 0.3);
}

.discord-desc {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 16px;
}

.discord-linked {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
}

.discord-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.discord-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.discord-username {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.discord-status-text {
    font-size: 12px;
    color: #4ade80;
    font-weight: 500;
}

/* DASHBOARD */
.dashboard-section {
    padding: 100px 0 60px;
    min-height: calc(100vh - 64px);
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 16px;
}

.dashboard-welcome h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 4px;
}

.dashboard-welcome p {
    color: var(--text-secondary);
    font-size: 14px;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.dashboard-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
}

.dashboard-card:first-child {
    grid-column: 1 / -1;
}

.dashboard-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.dashboard-card h3 svg {
    color: var(--accent);
}

.dashboard-placeholder {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.dashboard-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
}

.dashboard-link:hover {
    text-decoration: underline;
}

/* KEY CARDS */
.key-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
}

.key-card:last-child {
    margin-bottom: 0;
}

.key-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.key-reveal-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
}

.key-value {
    font-size: 14px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: var(--text-primary);
}

.key-reveal-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 2px;
    display: flex;
    align-items: center;
    transition: color 0.2s;
}

.key-reveal-btn:hover {
    color: var(--accent);
}

.key-status {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.key-details {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.key-details span {
    font-size: 12px;
    color: var(--text-muted);
}

/* DASH STATUS */
.dash-status-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dash-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dash-status-date {
    margin-left: auto;
    font-size: 12px;
    color: var(--text-muted);
}

/* WIDE CARD */
.dashboard-card-wide {
    grid-column: 1 / -1;
}

/* TICKET CARDS */
.ticket-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.ticket-tab {
    padding: 6px 18px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.ticket-tab:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
}

.ticket-tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.ticket-scroll-container {
    max-height: 360px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.ticket-scroll-container::-webkit-scrollbar {
    width: 6px;
}

.ticket-scroll-container::-webkit-scrollbar-track {
    background: transparent;
}

.ticket-scroll-container::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.ticket-card {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 12px;
}

.ticket-card:last-child {
    margin-bottom: 0;
}

.ticket-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
}

.ticket-type {
    font-size: 13px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: capitalize;
}

.ticket-type-purchase { background: rgba(247,147,26,0.15); color: #f7931a; }
.ticket-type-unlisted { background: rgba(155,89,182,0.15); color: #9b59b6; }
.ticket-type-question { background: rgba(52,152,219,0.15); color: #3498db; }
.ticket-type-general  { background: rgba(149,165,166,0.15); color: #95a5a6; }

.ticket-status {
    font-size: 12px;
    font-weight: 600;
}

.ticket-details {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.ticket-details span {
    font-size: 12px;
    color: var(--text-muted);
}

/* ADMIN PORTAL */
.admin-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.admin-title {
    font-size: 1.5em;
    font-weight: 700;
    color: var(--text-primary);
}

.admin-filters {
    display: flex;
    gap: 10px;
}

.admin-filters select {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 13px;
    cursor: pointer;
}

.admin-stats {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.admin-stat-box {
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 24px;
    text-align: center;
    min-width: 100px;
}

.admin-stat-num {
    font-size: 1.8em;
    font-weight: 700;
    color: var(--accent);
}

.admin-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.admin-ticket-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 8px;
    flex-wrap: wrap;
    position: relative;
}

.unread-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #f7931a;
    flex-shrink: 0;
    box-shadow: 0 0 6px rgba(247, 147, 26, 0.5);
    animation: unread-pulse 2s ease-in-out infinite;
}

@keyframes unread-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.keygen-opt {
    padding: 10px 16px;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: background 0.15s;
}

.keygen-opt:hover {
    background: var(--bg-card-hover);
}

.admin-ticket-row .ticket-type {
    min-width: 80px;
    text-align: center;
}

.admin-ticket-user {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 120px;
}

.admin-ticket-date {
    font-size: 12px;
    color: var(--text-muted);
    margin-left: auto;
}

/* CLICKABLE TICKETS */
.ticket-clickable {
    cursor: pointer;
    transition: border-color 0.2s;
}

.ticket-clickable:hover {
    border-color: var(--accent);
}

.ticket-view-link {
    color: var(--accent) !important;
    font-weight: 500;
    margin-left: auto;
}

/* TICKET DETAIL */
.ticket-detail-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.ticket-messages {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 8px;
}

.ticket-msg {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
}

.ticket-msg:last-child {
    border-bottom: none;
}

.ticket-msg-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    flex-shrink: 0;
}

.ticket-msg-avatar-placeholder {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--border);
    flex-shrink: 0;
}

.ticket-msg-body {
    flex: 1;
    min-width: 0;
}

.ticket-msg-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.ticket-msg-name {
    font-weight: 600;
    font-size: 13px;
    color: var(--text-primary);
}

.ticket-msg-role {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: 4px;
    background: rgba(255,255,255,0.06);
}

.ticket-msg-time {
    font-size: 11px;
    color: var(--text-muted);
    margin-left: auto;
    white-space: nowrap;
}

.ticket-msg-content {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

/* TICKET REPLY */
.ticket-reply-box {
    display: flex;
    gap: 10px;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

.ticket-reply-input {
    flex: 1;
    background: var(--bg-primary);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 14px;
    color: var(--text-primary);
    font-size: 14px;
    font-family: inherit;
    resize: none;
    min-height: 40px;
    max-height: 120px;
}

.ticket-reply-input:focus {
    outline: none;
    border-color: var(--accent);
}

.ticket-reply-input::placeholder {
    color: var(--text-muted);
}

/* ADMIN NAV LINK */
.nav-admin {
    color: #f7931a !important;
    font-weight: 600;
}

/* KEYS PAGE */
.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
    min-width: 120px;
    flex: 1;
    text-align: center;
}

.stat-num {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.keys-table-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow-x: auto;
}

.keys-header-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 0.7fr 1.2fr 1fr 1.5fr;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    min-width: 700px;
}

.keys-row {
    display: grid;
    grid-template-columns: 2fr 1.5fr 0.7fr 1.2fr 1fr 1.5fr;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid rgba(42, 40, 53, 0.5);
    align-items: center;
    font-size: 13px;
    min-width: 700px;
    transition: background 0.15s;
}

.keys-row:hover {
    background: var(--bg-card-hover);
}

.keys-row:last-child {
    border-bottom: none;
}

.kc-key code {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 12px;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 3px 6px;
    border-radius: 4px;
}

.kc-user {
    color: var(--text-secondary);
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.kc-status {
    font-weight: 600;
    font-size: 12px;
}

.kc-hwid {
    font-family: 'SF Mono', 'Fira Code', monospace;
    font-size: 11px;
}

.kc-expires {
    color: var(--text-secondary);
    font-size: 12px;
}

.kc-actions {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.key-action-btn {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid;
    transition: all 0.2s;
    white-space: nowrap;
}

.key-action-reset {
    background: rgba(96, 165, 250, 0.1);
    color: #60a5fa;
    border-color: rgba(96, 165, 250, 0.3);
}

.key-action-reset:hover {
    background: #60a5fa;
    color: #fff;
}

.key-action-revoke {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.key-action-revoke:hover {
    background: #ef4444;
    color: #fff;
}

.key-action-activate {
    background: rgba(74, 222, 128, 0.1);
    color: #4ade80;
    border-color: rgba(74, 222, 128, 0.3);
}

.key-action-activate:hover {
    background: #4ade80;
    color: #000;
}

.key-filter-btn {
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    transition: all 0.2s;
}

.key-filter-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.key-filter-btn.active {
    background: var(--accent-dim);
    border-color: var(--accent);
    color: var(--accent);
}

@media (max-width: 768px) {
    .keys-header-row,
    .keys-row {
        grid-template-columns: 1fr;
        gap: 4px;
    }
    .keys-header-row {
        display: none;
    }
    .keys-row {
        padding: 12px 16px;
    }
    .kc-key, .kc-user, .kc-status, .kc-hwid, .kc-expires, .kc-actions {
        display: block;
    }
    .stat-card {
        min-width: 80px;
    }
}
