:root {
    --primary: #8b5cf6;
    --primary-dark: #6d28d9;
    --accent: #ec4899;
    --bg-main: #030712;
    --bg-card: rgba(17, 24, 39, 0.7);
    --text-main: #f9fafb;
    --text-dim: #9ca3af;
    --border: rgba(255, 255, 255, 0.08);
    --success: #10b981;
    --warning: #f59e0b;
    --error: #ef4444;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    min-height: 100vh;
    padding-bottom: 4rem;
    overflow-x: hidden;
}

/* Background effects */
.bg-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.glow-1 {
    position: absolute;
    top: -10%;
    right: -10%;
    width: 50%;
    height: 60%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.15) 0%, transparent 70%);
    filter: blur(80px);
}

.glow-2 {
    position: absolute;
    bottom: -10%;
    left: -10%;
    width: 40%;
    height: 50%;
    background: radial-gradient(circle, rgba(236, 72, 153, 0.1) 0%, transparent 70%);
    filter: blur(80px);
}

/* Layout */
.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 2rem;
}

header {
    padding: 4rem 0 3rem;
    text-align: center;
}

header h1 {
    font-size: 3.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #fff 0%, var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-dim);
    font-size: 1.1rem;
    font-weight: 300;
}

/* Sidebar/Nav Style Header */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 2rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
    font-size: 1.25rem;
    letter-spacing: 0.05em;
}

.logo span {
    color: var(--primary);
}

.logo-badge {
    font-size: 0.65rem;
    background: var(--primary);
    color: white;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    letter-spacing: 0;
}

/* Dashboard Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    padding: 1.5rem;
    border-radius: 16px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
}

.stat-label {
    color: var(--text-dim);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
}

.stat-trend {
    font-size: 0.75rem;
    margin-top: 0.5rem;
    color: var(--success);
}

/* Table Design */
.table-wrapper {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

thead th {
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-dim);
    font-weight: 600;
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border);
}

tbody td {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9375rem;
}

tbody tr {
    transition: background 0.2s ease;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.client-name {
    font-weight: 600;
    color: var(--text-main);
}

.client-subdomain {
    color: var(--primary);
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.85rem;
    opacity: 0.9;
}

/* Status Tags */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pill.active {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.status-pill.suspended {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
}

.payment-status {
    font-size: 0.85rem;
}

.payment-status.paid {
    color: var(--success);
}

.payment-status.pending {
    color: var(--warning);
}

/* Buttons */
.btn {
    padding: 0.6rem 1rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
}

.btn-toggle {
    background: rgba(139, 92, 246, 0.1);
    color: var(--primary);
    border-color: rgba(139, 92, 246, 0.2);
}

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

.btn-toggle.suspending {
    background: rgba(239, 68, 68, 0.1);
    color: var(--error);
    border-color: rgba(239, 68, 68, 0.2);
}

.btn-toggle.suspending:hover {
    background: var(--error);
    color: white;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

tbody tr {
    animation: fadeIn 0.4s ease-out forwards;
}

/* Loader */
.loader-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.8);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }

    .nav {
        padding: 1.5rem;
    }
}
