:root {
    --bg-body: #0f172a;
    --bg-surface: #1e293b;
    --bg-hover: #334155;
    --border: #334155;
    --border-light: #475569;
    --primary: #3b82f6;
    --primary-hover: #2563eb;
    --text-main: #f8fafc;
    --text-dim: #94a3b8;
    --text-muted: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --radius: 8px;
    --transition: all 0.2s ease;
}

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

body {
    background: var(--bg-body);
    color: var(--text-main);
    font-size: 14px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* --- Layout --- */
.admin-container {
    display: flex;
    min-height: 100vh;
}

@media (max-width: 1024px) {
    .admin-container {
        flex-direction: column;
    }
}

/* --- Sidebar --- */
.sidebar {
    width: 260px;
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    padding: 24px 16px;
    transition: var(--transition);
    z-index: 1000;
}

@media (max-width: 1024px) {
    .sidebar {
        position: fixed;
        left: -260px;
        box-shadow: 10px 0 20px rgba(0,0,0,0.5);
    }
    .sidebar.open {
        left: 0;
    }
}

/* --- Mobile Nav --- */
.mobile-nav {
    display: none;
    background: var(--bg-surface);
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 900;
}

@media (max-width: 1024px) {
    .mobile-nav { display: flex; }
}

.menu-toggle {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    font-size: 18px;
    cursor: pointer;
    padding: 6px 10px;
    border-radius: var(--radius);
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 32px;
    padding: 0 8px;
}

.logo-box {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #fff;
    font-size: 16px;
}

.brand-info .brand-name {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

.brand-info .brand-sub {
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --- Nav Links --- */
.nav-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-section-title {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 24px 0 8px 8px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: var(--radius);
    font-weight: 500;
    transition: var(--transition);
}

.nav-link:hover {
    background: var(--bg-hover);
    color: var(--text-main);
}

.nav-link.active {
    background: var(--primary);
    color: #fff;
}

.nav-link.logout {
    color: var(--danger);
    margin-top: 32px;
}
.nav-link.logout:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* --- Main Content --- */
.main-content {
    flex: 1;
    padding: 32px 48px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

@media (max-width: 768px) {
    .main-content { padding: 24px 20px; }
}

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

.content-header h1 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}

.content-header p {
    color: var(--text-dim);
    font-size: 14px;
}

.status-badge {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    padding: 6px 12px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* --- Stats Grid --- */
.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-item {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
}

.stat-label {
    color: var(--text-dim);
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 28px;
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.02em;
}

/* --- Table --- */
.table-wrapper {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0;
    overflow-x: auto;
}

.table-header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.table-header h2 {
    font-size: 16px;
    font-weight: 600;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    text-align: left;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 12px 20px;
    border-bottom: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.3);
}

td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-main);
}

tr:last-child td {
    border-bottom: none;
}

/* --- Components --- */
.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.badge-plus { background: rgba(59, 130, 246, 0.15); color: var(--primary); }
.badge-standard { background: var(--bg-hover); color: var(--text-dim); }

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

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: var(--text-main);
    border: 1px solid var(--border);
    font-size: 12px;
}

/* --- Forms & Buttons --- */
.btn {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
}

.btn:hover {
    background: var(--bg-hover);
}

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

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

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

.form-group label {
    display: block;
    font-size: 13px;
    color: var(--text-dim);
    margin-bottom: 6px;
    font-weight: 500;
}

.form-control {
    width: 100%;
    background: var(--bg-body);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 10px 14px;
    color: var(--text-main);
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* --- Auth Card --- */
.auth-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: var(--bg-body);
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
}

/* --- Approval Cards (Manual Subscriptions) --- */
.approval-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

@media (max-width: 600px) {
    .approval-card {
        flex-direction: column;
    }
}

.proof-img {
    width: 200px;
    height: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    object-fit: cover;
    background: var(--bg-body);
}

@media (max-width: 600px) {
    .proof-img {
        width: 100%;
        max-width: 300px;
    }
}

.approval-details {
    flex: 1;
}

.approval-details h3 {
    margin: 12px 0 8px 0;
    font-size: 18px;
    font-weight: 600;
}

.approval-details p {
    color: var(--text-dim);
    margin-bottom: 6px;
    font-size: 14px;
}

.approval-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
}

/* --- Badges --- */
.badge-approved { background: rgba(16, 185, 129, 0.15); color: var(--success); }
.badge-rejected { background: rgba(239, 68, 68, 0.15); color: var(--danger); }
.badge-pending { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }

/* --- Additional Buttons --- */
.btn-success {
    background: var(--success);
    border-color: var(--success);
    color: #fff;
}
.btn-success:hover {
    background: #059669;
    border-color: #059669;
}

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}
.btn-danger:hover {
    background: #dc2626;
    border-color: #dc2626;
}

@media (max-width: 600px) {
    .hide-mobile { display: none; }
}
