:root {
    --bg: #05070d;
    --surface: #090d18;
    --surface2: #0e1422;
    --border: rgba(255, 255, 255, 0.06);
    --accent: #4f7fff;
    --accent-dim: rgba(79, 127, 255, 0.12);
    --accent-glow: rgba(79, 127, 255, 0.25);
    --text: #e8ecf5;
    --muted: #3d4a63;
    --muted2: #5c6a82;
    --green: #22d87a;
    --red: #ff6b6b;
    --gold: #f0b429;
    --purple: #a78bfa;
}

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

body {
    background: var(--bg);
    font-family: 'Syne', sans-serif;
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
}

.ambient {
    position: fixed;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(79, 127, 255, 0.07) 0%, transparent 70%);
    top: -250px;
    left: 50%;
    transform: translateX(-50%);
    pointer-events: none;
    z-index: 0;
}

.ambient2 {
    position: fixed;
    width: 650px;
    height: 650px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(34, 216, 122, 0.04) 0%, transparent 70%);
    bottom: -200px;
    right: -200px;
    pointer-events: none;
    z-index: 0;
}

.page {
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    max-width: 1100px;
    z-index: 1;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

@media (max-width: 900px) {
    .two-col {
        grid-template-columns: 1fr;
    }
}

@keyframes fadeDown {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 -24px;
    padding: 12px 24px;
    animation: fadeDown 0.6s ease both;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-name {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.btn-logout {
    background: none;
    border: none;
    color: var(--muted2);
    padding: 8px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-logout:hover {
    color: var(--red);
    background: rgba(255, 107, 107, 0.1);
}

.welcome {
    text-align: center;
    padding: 40px 0 30px;
    animation: fadeUp 0.7s 0.1s ease both;
}

.welcome h1 {
    font-size: 32px;
    font-weight: 800;
    margin-bottom: 6px;
}

.welcome p {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    color: var(--muted2);
}

.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    margin-bottom: 24px;
    animation: fadeUp 0.7s 0.1s ease both;
}

.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 18px;
    text-align: center;
}

.stat-num {
    font-size: 28px;
    font-weight: 800;
}

.stat-label {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.blue {
    color: var(--accent);
}

.green {
    color: var(--green);
}

.gold {
    color: var(--gold);
}

.purple {
    color: var(--purple);
}

.section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    animation: fadeUp 0.7s 0.2s ease both;
}

.section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-title svg {
    width: 20px;
    height: 20px;
    color: var(--accent);
}

.badge {
    background: var(--accent);
    color: white;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-family: 'DM Mono', monospace;
    margin-left: auto;
}

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

.item {
    background: var(--surface2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
}

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

.item-name {
    font-size: 15px;
    font-weight: 700;
}

.item-meta {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: var(--muted2);
}

.item-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

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

.btn-primary:hover {
    box-shadow: 0 0 16px var(--accent-glow);
}

.btn-success {
    background: rgba(34, 216, 122, 0.15);
    color: var(--green);
}

.btn-success:hover {
    background: rgba(34, 216, 122, 0.25);
}

.btn-danger {
    background: rgba(255, 107, 107, 0.15);
    color: var(--red);
}

.btn-danger:hover {
    background: rgba(255, 107, 107, 0.25);
}

.btn-gold {
    background: rgba(240, 180, 41, 0.15);
    color: var(--gold);
}

.btn-gold:hover {
    background: rgba(240, 180, 41, 0.25);
}

.form-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.form-row input,
.form-row select {
    flex: 1;
    min-width: 120px;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px;
    color: var(--text);
    font-size: 13px;
}

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

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

.empty {
    text-align: center;
    padding: 24px;
    color: var(--muted2);
    font-size: 13px;
}

.status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 100px;
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    font-weight: 500;
}

.status.active {
    background: rgba(34, 216, 122, 0.1);
    color: var(--green);
}

.status.inactive,
.status.rejected {
    background: rgba(255, 107, 107, 0.1);
    color: var(--red);
}

.status.pending {
    background: rgba(240, 180, 41, 0.1);
    color: var(--gold);
}

/* License Cards */
.license-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s;
}

.license-card:hover {
    transform: translateY(-2px);
    border-color: rgba(79, 127, 255, 0.2);
}

.license-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--border);
}

.license-header .item-name {
    font-size: 16px;
    color: #fff;
    margin-bottom: 4px;
}

.license-key-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--surface2);
    padding: 10px 14px;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 16px;
}

.license-key {
    font-family: 'DM Mono', monospace;
    font-size: 12px;
    color: var(--accent);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: 1;
    justify-content: space-between;
}

.license-key:hover {
    color: #fff;
}

.license-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.license-detail {
    background: var(--surface2);
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.license-detail-label {
    font-family: 'DM Mono', monospace;
    font-size: 10px;
    color: var(--muted2);
    display: block;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* User Cards */
.user-card {
    background: var(--surface2);
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.user-name {
    font-weight: 700;
    font-size: 14px;
}

.user-id {
    font-family: 'DM Mono', monospace;
    font-size: 11px;
    color: var(--muted2);
}

/* Modal System */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(10px);
    padding: 20px;
}

.modal-panel {
    width: 100%;
    max-width: 500px;
    min-height: 450px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 28px;
    padding: 0;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
    animation: modalPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    max-height: calc(100vh - 60px);
}

@keyframes modalPop {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--surface2);
    border: 1px solid var(--border);
    color: var(--text);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close:hover {
    background: var(--red);
    color: white;
}

.user-group-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--surface2);
    border-radius: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.user-group-row:hover {
    background: var(--surface);
    border-color: var(--accent);
    transform: translateY(-2px);
}

.search-container {
    margin-bottom: 20px;
    position: relative;
    animation: fadeUp 0.7s 0.2s ease both;
}

.search-input {
    width: 100%;
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px 12px 40px;
    color: var(--text);
    font-family: 'Syne', sans-serif;
    font-size: 13px;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--accent);
    background: var(--surface);
    box-shadow: 0 0 15px var(--accent-glow);
}

.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted2);
    width: 16px;
    height: 16px;
    pointer-events: none;
}

/* Login Page Specific */
.login-wrapper {
    text-align: center;
}

.discord-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 20px 48px;
    background: #5865F2;
    border: none;
    border-radius: 12px;
    color: white;
    font-family: 'Syne', sans-serif;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s;
    box-shadow: 0 4px 16px rgba(88, 101, 242, 0.3);
}

.discord-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(88, 101, 242, 0.4);
}

.discord-btn svg {
    width: 22px;
    height: 22px;
}

/* Client Page Specific */
.steps {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 24px;
    animation: fadeUp 0.7s 0.15s ease both;
}

.steps-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.steps-title svg {
    width: 18px;
    height: 18px;
    color: var(--gold);
}

.patreon-btn {
    display: inline-block;
    background: var(--accent);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 16px;
    transition: all 0.2s;
}

.patreon-btn:hover {
    box-shadow: 0 0 16px var(--accent-glow);
    transform: translateY(-1px);
}

@keyframes copyPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }

    100% {
        transform: scale(1);
    }
}

.copied-anim {
    animation: copyPop 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: rgba(34, 216, 122, 0.15) !important;
    color: var(--green) !important;
    pointer-events: none;
}