/**
 * ===========================================
 * CORENEXIS API PLATFORM - MAIN STYLESHEET
 * ===========================================
 */

/* Import Jost Font */
@import url('https://fonts.googleapis.com/css2?family=Jost:wght@300;400;500;600;700&display=swap');

/* ===========================================
   CSS VARIABLES
   =========================================== */
:root {
    --primary: #fe5940;
    --primary-light: #ff7a65;
    --primary-dark: #e5402a;
    --secondary: #000b36;
    --secondary-light: #1a2a5e;
    --body-bg: rgb(244, 245, 249);
    --white: #ffffff;
    --gray-50: #f8f9fc;
    --gray-100: #f1f3f7;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --success: #22c55e;
    --success-light: #dcfce7;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --danger-light: #fee2e2;
    --info: #3b82f6;
    --info-light: #dbeafe;
    --font-family: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --transition: all 0.2s ease;
    --sidebar-width: 280px;
    --header-height: 70px;
}

/* ===========================================
   RESET & BASE
   =========================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    font-size: 15px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--gray-700);
    background-color: var(--body-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button, input, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

h1, h2, h3, h4, h5, h6 {
    color: var(--secondary);
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 { font-size: 2rem; }
h2 { font-size: 1.75rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ===========================================
   AUTH PAGES
   =========================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    position: relative;
    overflow: hidden;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(254, 89, 64, 0.1) 0%, transparent 70%);
}

.auth-page::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -30%;
    width: 80%;
    height: 80%;
    background: radial-gradient(circle, rgba(254, 89, 64, 0.08) 0%, transparent 60%);
}

.auth-container {
    width: 100%;
    max-width: 440px;
    position: relative;
    z-index: 1;
}

.auth-card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: 45px 40px;
    box-shadow: var(--shadow-xl);
}

.auth-logo {
    text-align: center;
    margin-bottom: 35px;
}

.auth-logo img {
    height: 45px;
    margin: 0 auto;
}

.auth-title {
    text-align: center;
    margin-bottom: 8px;
    font-size: 1.75rem;
    color: var(--secondary);
}

.auth-subtitle {
    text-align: center;
    color: var(--gray-500);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

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

.auth-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--gray-700);
    font-size: 0.9rem;
}

.auth-form .form-control {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
}

.auth-form .form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(254, 89, 64, 0.1);
}

.auth-form .form-control::placeholder {
    color: var(--gray-400);
}

.password-wrapper {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--gray-400);
    cursor: pointer;
    padding: 4px;
}

.password-toggle:hover {
    color: var(--gray-600);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    box-shadow: 0 4px 14px rgba(254, 89, 64, 0.35);
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(254, 89, 64, 0.4);
    color: var(--white);
}

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

.btn-secondary:hover:not(:disabled) {
    background: var(--secondary-light);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--gray-200);
    color: var(--gray-700);
}

.btn-outline:hover:not(:disabled) {
    border-color: var(--primary);
    color: var(--primary);
}

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

.btn-danger:hover:not(:disabled) {
    background: #dc2626;
    color: var(--white);
}

.btn-block { width: 100%; }
.btn-sm { padding: 10px 20px; font-size: 0.875rem; }
.btn-lg { padding: 16px 32px; font-size: 1.125rem; }

.auth-links {
    text-align: center;
    margin-top: 25px;
    padding-top: 25px;
    border-top: 1px solid var(--gray-200);
    color: var(--gray-500);
    font-size: 0.95rem;
}

.auth-links a { font-weight: 500; }

.forgot-link {
    display: block;
    text-align: right;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: var(--gray-500);
}

.forgot-link:hover { color: var(--primary); }

/* OTP Input */
.otp-container {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin: 25px 0;
}

.otp-input {
    width: 52px;
    height: 60px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    transition: var(--transition);
}

.otp-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(254, 89, 64, 0.1);
}

.resend-otp {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--gray-500);
}

.resend-otp button {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 500;
    cursor: pointer;
}

.resend-otp button:disabled {
    color: var(--gray-400);
    cursor: not-allowed;
}

.turnstile-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success { background: var(--success-light); color: #166534; border: 1px solid #bbf7d0; }
.alert-danger { background: var(--danger-light); color: #991b1b; border: 1px solid #fecaca; }
.alert-warning { background: var(--warning-light); color: #92400e; border: 1px solid #fde68a; }
.alert-info { background: var(--info-light); color: #1e40af; border: 1px solid #bfdbfe; }

/* ===========================================
   DASHBOARD LAYOUT
   =========================================== */
.dashboard-layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--secondary);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-header {
    padding: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo { height: 38px; }

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
}

.nav-section { margin-bottom: 25px; }

.nav-section-title {
    padding: 0 25px 10px;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, 0.4);
    font-weight: 600;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 25px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.05);
}

.nav-link.active {
    color: var(--white);
    background: rgba(254, 89, 64, 0.15);
}

.nav-link.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--primary);
    border-radius: 0 4px 4px 0;
}

.nav-icon {
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.nav-icon svg {
    width: 20px;
    height: 20px;
}

.dropdown-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-right: 8px;
}

.dropdown-icon svg {
    width: 16px;
    height: 16px;
}

.sidebar-footer {
    padding: 20px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

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

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 600;
    font-size: 1rem;
}

.user-info { flex: 1; min-width: 0; }

.user-name {
    color: var(--white);
    font-weight: 600;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-email {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.8rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    height: var(--header-height);
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 30px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.header-left { display: flex; align-items: center; gap: 20px; }

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--gray-600);
}

.page-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary);
    margin: 0;
}

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

.header-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gray-100);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray-600);
    position: relative;
}

.header-btn:hover { background: var(--gray-200); color: var(--secondary); }

/* Profile Dropdown */
.profile-dropdown { position: relative; }

.profile-trigger {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px 6px 6px;
    background: var(--gray-100);
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition);
}

.profile-trigger:hover { background: var(--gray-200); }

.profile-trigger .user-avatar { width: 34px; height: 34px; font-size: 0.875rem; }

.profile-trigger .user-name {
    color: var(--gray-700);
    font-weight: 500;
    font-size: 0.9rem;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    min-width: 220px;
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition);
    z-index: 100;
    overflow: hidden;
}

.profile-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header { padding: 15px 18px; border-bottom: 1px solid var(--gray-200); }
.dropdown-header .user-name { color: var(--secondary); font-weight: 600; font-size: 0.95rem; }
.dropdown-header .user-email { color: var(--gray-500); font-size: 0.85rem; }

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    color: var(--gray-700);
    font-size: 0.9rem;
    transition: var(--transition);
}

.dropdown-item:hover { background: var(--gray-50); color: var(--secondary); }
.dropdown-item.danger { color: var(--danger); }
.dropdown-item.danger:hover { background: var(--danger-light); }
.dropdown-divider { height: 1px; background: var(--gray-200); margin: 8px 0; }

.page-content { flex: 1; padding: 30px; }

/* ===========================================
   CARDS & COMPONENTS
   =========================================== */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
}

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

.card-title { font-size: 1.1rem; font-weight: 600; color: var(--secondary); margin: 0; }
.card-body { padding: 25px; }
.card-footer { padding: 20px 25px; border-top: 1px solid var(--gray-200); background: var(--gray-50); }

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 25px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 18px;
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.stat-icon.primary { background: linear-gradient(135deg, rgba(254, 89, 64, 0.1) 0%, rgba(254, 89, 64, 0.2) 100%); color: var(--primary); }
.stat-icon.success { background: linear-gradient(135deg, rgba(34, 197, 94, 0.1) 0%, rgba(34, 197, 94, 0.2) 100%); color: var(--success); }
.stat-icon.warning { background: linear-gradient(135deg, rgba(245, 158, 11, 0.1) 0%, rgba(245, 158, 11, 0.2) 100%); color: var(--warning); }
.stat-icon.info { background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(59, 130, 246, 0.2) 100%); color: var(--info); }

.stat-content { flex: 1; }
.stat-value { font-size: 1.75rem; font-weight: 700; color: var(--secondary); line-height: 1.2; margin-bottom: 4px; }
.stat-label { color: var(--gray-500); font-size: 0.9rem; }

/* API Cards */
.api-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.api-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.api-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }

.api-card-header {
    padding: 25px;
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    color: var(--white);
}

.api-icon { font-size: 2.5rem; margin-bottom: 15px; }
.api-name { font-size: 1.25rem; font-weight: 600; margin-bottom: 6px; color: var(--white); }
.api-description { font-size: 0.9rem; color: rgba(255, 255, 255, 0.7); line-height: 1.5; }
.api-card-body { padding: 25px; }

.api-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; margin-bottom: 20px; }

.api-stat { text-align: center; padding: 15px; background: var(--gray-50); border-radius: var(--radius); }
.api-stat-value { font-size: 1.25rem; font-weight: 700; color: var(--secondary); }
.api-stat-label { font-size: 0.8rem; color: var(--gray-500); margin-top: 2px; }

.api-card-footer {
    padding: 20px 25px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.api-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}

.api-status.active { background: var(--success-light); color: #166534; }
.api-status.inactive { background: var(--gray-100); color: var(--gray-500); }
.api-status.suspended { background: var(--danger-light); color: #991b1b; }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* Tables */
.table-wrapper { overflow-x: auto; }

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

.table th, .table td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--gray-200); }
.table th { background: var(--gray-50); font-weight: 600; color: var(--secondary); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
.table td { color: var(--gray-700); font-size: 0.9rem; }
.table tbody tr:hover { background: var(--gray-50); }
.table tbody tr:last-child td { border-bottom: none; }

/* Badges */
.badge { display: inline-flex; align-items: center; padding: 4px 10px; font-size: 0.75rem; font-weight: 600; border-radius: 50px; }
.badge-success { background: var(--success-light); color: #166534; }
.badge-danger { background: var(--danger-light); color: #991b1b; }
.badge-warning { background: var(--warning-light); color: #92400e; }
.badge-info { background: var(--info-light); color: #1e40af; }
.badge-secondary { background: var(--gray-100); color: var(--gray-600); }

/* Forms */
.form-group { margin-bottom: 20px; }
.form-label { display: block; margin-bottom: 8px; font-weight: 500; color: var(--gray-700); font-size: 0.9rem; }

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 0.95rem;
    transition: var(--transition);
    background: var(--white);
}

.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(254, 89, 64, 0.1); }
.form-control:disabled { background: var(--gray-100); cursor: not-allowed; }
.form-text { margin-top: 6px; font-size: 0.85rem; color: var(--gray-500); }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 11, 54, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    padding: 20px;
}

.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
    background: var(--white);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9);
    transition: var(--transition);
}

.modal-overlay.open .modal { transform: scale(1); }

.modal-header { padding: 25px 25px 0; display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-size: 1.25rem; font-weight: 600; color: var(--secondary); margin: 0; }

.modal-close {
    width: 80px;
    height: 56px;
    border-radius: 10%;
    background: var(--gray-100);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--gray-500);
}

.modal-close:hover { background: var(--gray-200); color: var(--secondary); }
.modal-body { padding: 25px; }
.modal-footer { padding: 0 25px 25px; display: flex; justify-content: flex-end; gap: 12px; }

/* Wallet */
.wallet-balance {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--secondary-light) 100%);
    border-radius: var(--radius-xl);
    padding: 35px;
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.wallet-balance::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(254, 89, 64, 0.2) 0%, transparent 70%);
}

.wallet-balance-label { font-size: 0.9rem; color: rgba(255, 255, 255, 0.7); margin-bottom: 8px; }
.wallet-balance-amount { font-size: 2.5rem; font-weight: 700; }
.wallet-currency { font-size: 1.25rem; font-weight: 400; opacity: 0.7; }

/* Empty State */
.empty-state { text-align: center; padding: 60px 30px; }

.empty-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    background: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--gray-400);
}

.empty-title { font-size: 1.25rem; font-weight: 600; color: var(--secondary); margin-bottom: 8px; }
.empty-text { color: var(--gray-500); margin-bottom: 25px; }

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

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

.btn .spinner { width: 18px; height: 18px; border-width: 2px; border-color: rgba(255, 255, 255, 0.3); border-top-color: var(--white); }

.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--body-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.page-loading .spinner { width: 40px; height: 40px; }

/* Plan Cards */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 20px; }

.plan-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    transition: var(--transition);
}

.plan-card:hover { border-color: var(--primary); }
.plan-card.popular { border-color: var(--primary); position: relative; }

.plan-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: var(--white);
    padding: 4px 16px;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
}

.plan-name { font-size: 1.25rem; font-weight: 600; color: var(--secondary); margin-bottom: 10px; }
.plan-price { margin-bottom: 20px; }
.plan-amount { font-size: 2.5rem; font-weight: 700; color: var(--secondary); }
.plan-period { color: var(--gray-500); font-size: 0.9rem; }

.plan-features { list-style: none; padding: 0; margin: 0 0 25px; text-align: left; }

.plan-features li {
    padding: 10px 0;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-600);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.plan-features li::before { content: '✓'; color: var(--success); font-weight: 600; }

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 1024px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .mobile-toggle { display: flex; }

    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 99;
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }

    .sidebar-overlay.open { opacity: 1; visibility: visible; }
}

@media (max-width: 768px) {
    .auth-card { padding: 35px 25px; }
    .page-content { padding: 20px; }
    .header { padding: 0 20px; }
    .stats-grid { grid-template-columns: 1fr; }
    .api-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .card-header { flex-direction: column; align-items: flex-start; gap: 15px; }
    .profile-trigger .user-name { display: none; }
    .otp-container { gap: 8px; }
    .otp-input { width: 45px; height: 54px; font-size: 1.25rem; }
}

@media (max-width: 480px) {
    .auth-page { padding: 20px 15px; }
    .auth-card { padding: 30px 20px; }
    .wallet-balance { padding: 25px; }
    .wallet-balance-amount { font-size: 2rem; }
    .modal { margin: 10px; }
}

/* ===========================================
   UTILITIES
   =========================================== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--gray-500); }
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }
.w-100 { width: 100%; }
.fw-normal { font-weight: 400; }
.fw-medium { font-weight: 500; }
.fw-semibold { font-weight: 600; }
.fw-bold { font-weight: 700; }
