/* VPN Admin Panel - Modern Light Design */

:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 70px;
    --primary-color: #7C5CFC;
    --primary-light: #9B7DFF;
    --primary-dark: #6B4CE6;
    --secondary-color: #A78BFA;
    --accent-pink: #EC4899;
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --danger-color: #EF4444;
    --info-color: #3B82F6;
    
    /* Pastel gradients for cards */
    --gradient-purple: linear-gradient(135deg, #EDE9FE 0%, #DDD6FE 100%);
    --gradient-blue: linear-gradient(135deg, #E0F2FE 0%, #BAE6FD 100%);
    --gradient-pink: linear-gradient(135deg, #FCE7F3 0%, #FBCFE8 100%);
    --gradient-green: linear-gradient(135deg, #D1FAE5 0%, #A7F3D0 100%);
    --gradient-lavender: linear-gradient(135deg, #F3E8FF 0%, #E9D5FF 100%);
    
    /* Sidebar */
    --sidebar-bg: linear-gradient(180deg, #F5F3FF 0%, #EDE9FE 100%);
    --sidebar-text: #6B4CE6;
    --sidebar-hover: rgba(124, 92, 252, 0.1);
    --sidebar-active: rgba(124, 92, 252, 0.15);
    
    /* Text colors */
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --text-muted: #9CA3AF;
    
    /* Background */
    --bg-main: #FAFAFA;
    --bg-card: #FFFFFF;
    --bg-hover: #F9FAFB;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.03);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.04), 0 1px 2px rgba(0, 0, 0, 0.03);
    
    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

/* Reset and Base */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Sidebar */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(124, 92, 252, 0.1);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-header {
    padding: 1.75rem 1.5rem;
    border-bottom: 1px solid rgba(124, 92, 252, 0.1);
}

.sidebar-header h5 {
    margin: 0;
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-header h5 i {
    font-size: 1.5rem;
}

.sidebar.collapsed .sidebar-header h5 span {
    display: none;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0.75rem;
}

.sidebar-nav .nav-link {
    color: var(--text-secondary);
    padding: 0.875rem 1rem;
    display: flex;
    align-items: center;
    transition: all 0.2s ease;
    border-radius: var(--radius-sm);
    margin-bottom: 0.25rem;
    font-weight: 500;
    font-size: 0.9375rem;
}

.sidebar-nav .nav-link:hover {
    color: var(--primary-color);
    background: var(--sidebar-hover);
}

.sidebar-nav .nav-link.active {
    color: var(--primary-color);
    background: var(--sidebar-active);
    font-weight: 600;
}

.sidebar-nav .nav-link i {
    margin-right: 0.875rem;
    font-size: 1.125rem;
    width: 1.25rem;
    text-align: center;
    color: var(--primary-color);
    opacity: 0.8;
}

.sidebar-nav .nav-link.active i {
    opacity: 1;
}

.sidebar.collapsed .nav-link span {
    display: none;
}

.sidebar-footer {
    padding: 1rem 1rem;
    border-top: 1px solid rgba(124, 92, 252, 0.1);
}

.user-info {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    background: rgba(124, 92, 252, 0.08);
    border-radius: var(--radius-sm);
}

.user-info i {
    margin-right: 0.75rem;
    font-size: 1.25rem;
    color: var(--primary-color);
}

.user-info span {
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.875rem;
}

.sidebar.collapsed .user-info span {
    display: none;
}

/* Main Content */
.main-content {
    margin-left: var(--sidebar-width);
    transition: all 0.3s ease;
    min-height: 100vh;
    background: var(--bg-main);
    padding: 1.5rem;
}

.main-content.expanded {
    margin-left: var(--sidebar-collapsed-width);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
    background: var(--bg-card);
    transition: all 0.2s ease;
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    background: var(--bg-card);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    padding: 1.25rem 1.5rem;
    border-radius: var(--radius-md) var(--radius-md) 0 0 !important;
}

.card-title {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
    margin: 0;
}

.card-body {
    padding: 1.5rem;
}

/* Stat Cards */
.stat-card {
    border-radius: var(--radius-lg);
    transition: all 0.3s ease;
    border: none;
    overflow: hidden;
}

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

.stat-card .card-body {
    padding: 1.5rem;
}

.stat-card.stat-card-purple {
    background: var(--gradient-purple);
}

.stat-card.stat-card-blue {
    background: var(--gradient-blue);
}

.stat-card.stat-card-pink {
    background: var(--gradient-pink);
}

.stat-card.stat-card-green {
    background: var(--gradient-green);
}

.stat-card.stat-card-lavender {
    background: var(--gradient-lavender);
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.7);
    color: var(--primary-color);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-top: 0.25rem;
}

.stat-card .stat-change {
    font-size: 0.8125rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.stat-card .stat-change.positive {
    color: var(--success-color);
    background: rgba(16, 185, 129, 0.1);
}

.stat-card .stat-change.negative {
    color: var(--danger-color);
    background: rgba(239, 68, 68, 0.1);
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table th {
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
    padding: 1rem 1rem 0.75rem;
    background: var(--bg-card);
}

.table td {
    vertical-align: middle;
    padding: 1rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
    font-size: 0.9375rem;
}

.table tbody tr:hover {
    background: var(--bg-hover);
}

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

/* Badges */
.badge {
    font-weight: 500;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.75rem;
    letter-spacing: 0.01em;
}

.badge.bg-success {
    background: rgba(16, 185, 129, 0.1) !important;
    color: var(--success-color);
}

.badge.bg-danger {
    background: rgba(239, 68, 68, 0.1) !important;
    color: var(--danger-color);
}

.badge.bg-warning {
    background: rgba(245, 158, 11, 0.1) !important;
    color: var(--warning-color);
}

.badge.bg-info {
    background: rgba(59, 130, 246, 0.1) !important;
    color: var(--info-color);
}

.badge.bg-primary {
    background: rgba(124, 92, 252, 0.1) !important;
    color: var(--primary-color);
}

.badge.bg-secondary {
    background: rgba(107, 114, 128, 0.1) !important;
    color: var(--text-secondary);
}

/* Buttons */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 500;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    transition: all 0.2s ease;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 92, 252, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

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

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

.btn-success {
    background: var(--success-color);
    border: none;
}

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

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
}

.btn-group-sm > .btn,
.btn-sm {
    border-radius: 6px;
}

/* Forms */
.form-control,
.form-select {
    border-radius: var(--radius-sm);
    border: 1px solid rgba(0, 0, 0, 0.08);
    padding: 0.625rem 0.875rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background: var(--bg-card);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.1);
    outline: none;
}

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

.form-label {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.form-text {
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* Navbar */
.navbar {
    padding: 0.75rem 1.5rem;
    background: var(--bg-card) !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.navbar-brand {
    font-weight: 600;
    color: var(--text-primary) !important;
}

/* Page Headers */
.page-header {
    margin-bottom: 1.5rem;
}

.page-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.page-subtitle {
    color: var(--text-secondary);
    font-size: 0.9375rem;
    margin-top: 0.25rem;
}

/* Toast */
.toast {
    border-radius: var(--radius-md);
    border: none;
    box-shadow: var(--shadow-lg);
}

.toast-header {
    background: var(--bg-card);
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

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

.fade-in {
    animation: fadeIn 0.3s ease;
}

/* Status indicators */
.status-online {
    color: var(--success-color);
}

.status-offline {
    color: var(--danger-color);
}

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

/* User status badges */
.user-status {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

.user-status.active {
    background-color: var(--success-color);
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
}

.user-status.inactive {
    background-color: var(--danger-color);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.user-status.trial {
    background-color: var(--warning-color);
    box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.2);
}

.user-status.banned {
    background-color: var(--text-muted);
}

/* Server status */
.server-status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    font-weight: 500;
}

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

.server-status.offline {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

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

/* Loading spinner */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(250, 250, 250, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.spinner-border {
    color: var(--primary-color);
}

/* Charts */
.chart-container {
    position: relative;
    height: 300px;
}

/* Dropdown */
.dropdown-menu {
    border: none;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.dropdown-item {
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--text-primary);
}

.dropdown-item:hover {
    background: var(--bg-hover);
    color: var(--primary-color);
}

.dropdown-divider {
    border-color: rgba(0, 0, 0, 0.04);
    margin: 0.5rem 0;
}

/* Pagination */
.pagination {
    gap: 0.25rem;
}

.page-link {
    border: none;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    padding: 0.5rem 0.875rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.page-link:hover {
    background: var(--bg-hover);
    color: var(--primary-color);
}

.page-item.active .page-link {
    background: var(--primary-color);
    color: white;
}

.page-item.disabled .page-link {
    background: transparent;
    color: var(--text-muted);
}

/* Alerts */
.alert {
    border: none;
    border-radius: var(--radius-sm);
    padding: 1rem 1.25rem;
}

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

.alert-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning-color);
}

.alert-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info-color);
}

/* Nav Tabs */
.nav-tabs {
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.nav-tabs .nav-link {
    border: none;
    color: var(--text-secondary);
    font-weight: 500;
    padding: 0.75rem 1.25rem;
    border-radius: 0;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
    border-color: transparent;
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background: transparent;
    border-bottom: 2px solid var(--primary-color);
}

/* List Group */
.list-group-item {
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    padding: 1rem 1.25rem;
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item:hover {
    background: var(--bg-hover);
}

/* Progress */
.progress {
    height: 6px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.04);
}

.progress-bar {
    background: var(--primary-color);
    border-radius: 3px;
}

/* Input Group */
.input-group-text {
    background: var(--bg-hover);
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: var(--text-secondary);
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: var(--sidebar-collapsed-width);
    }
    
    .sidebar .nav-link span,
    .sidebar-header h5 span,
    .sidebar-footer .user-info span {
        display: none;
    }
    
    .main-content {
        margin-left: var(--sidebar-collapsed-width);
        padding: 1rem;
    }
    
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
}

/* Remove dark mode support - always light theme */

/* Print styles */
@media print {
    .sidebar,
    .navbar,
    .btn,
    .dropdown {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
        background: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Additional utility classes */
.text-primary {
    color: var(--primary-color) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.bg-primary-soft {
    background: rgba(124, 92, 252, 0.1);
}

.border-primary {
    border-color: var(--primary-color) !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(124, 92, 252, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(124, 92, 252, 0.3);
}

/* Selection */
::selection {
    background: rgba(124, 92, 252, 0.2);
    color: var(--text-primary);
}

/* Focus states */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 92, 252, 0.1);
}

/* Link styles */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

/* Empty state */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 3rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    opacity: 0.5;
}

.empty-state p {
    margin: 0;
    font-size: 0.9375rem;
}

/* Settings sections */
.settings-section {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-card);
}

.settings-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

/* Connection status indicator */
.connection-status {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    font-weight: 500;
}

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

.connection-status.disconnected {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger-color);
}

.connection-status i {
    font-size: 1rem;
}
