/* ============================================================
   ROCKET VPN Bot - Admin Panel Styles (Enhanced)
   Modern RTL design with animations and 3D effects
   ============================================================ */

:root {
    --primary: #6366f1;
    --primary-light: #818cf8;
    --primary-dark: #4f46e5;
    --secondary: #06b6d4;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --bg-dark: #0f172a;
    --bg-card: #1e293b;
    --bg-card-hover: #334155;
    --text-primary: #f1f5f9;
    --text-secondary: #94a3b8;
    --border-color: #334155;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --radius: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
}

/* ==================== Login Page ==================== */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    min-height: 100vh;
}

.login-box {
    background: var(--bg-card);
    padding: 3rem;
    border-radius: var(--radius);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    text-align: center;
    width: 420px;
    max-width: 90%;
    animation: fadeInUp 0.6s ease;
    border: 1px solid var(--border-color);
}

.login-icon {
    font-size: 5rem;
    margin-bottom: 1.5rem;
    animation: float 3s ease-in-out infinite;
    display: inline-block;
}

.login-box h1 {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-box input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-dark);
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 1rem;
    transition: var(--transition);
}

.login-box input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.login-box button {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: var(--transition);
    font-weight: 600;
}

.login-box button:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.4);
}

/* ==================== Sidebar ==================== */
.sidebar {
    width: 260px;
    background: var(--bg-card);
    border-left: 1px solid var(--border-color);
    padding: 1.5rem 1rem;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.logo {
    font-size: 1.2rem;
    font-weight: bold;
    text-align: center;
    padding: 1.5rem 0;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(135deg, var(--primary-light), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 3s infinite;
}

.sidebar ul {
    list-style: none;
    flex: 1;
}

.sidebar li {
    margin-bottom: 4px;
}

.sidebar a {
    display: block;
    padding: 12px 16px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    transition: var(--transition);
    font-size: 0.95rem;
}

.sidebar li.active a,
.sidebar a:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    transform: translateX(-4px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.sidebar-footer {
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
}

.sidebar-footer a {
    display: block;
    padding: 10px 16px;
    color: var(--danger);
    text-decoration: none;
    border-radius: 8px;
    transition: var(--transition);
    text-align: center;
}

.sidebar-footer a:hover {
    background: rgba(239, 68, 68, 0.1);
}

/* ==================== Content ==================== */
.content {
    flex: 1;
    margin-right: 260px;
    padding: 2rem;
    min-height: 100vh;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

header h1 {
    font-size: 1.75rem;
}

.header-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.live-indicator {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    animation: pulse 2s infinite;
}

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

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

.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1.2rem;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--primary);
}

.stat-card:hover::before {
    width: 6px;
}

.stat-card.users::before { background: var(--primary); }
.stat-card.orders::before { background: var(--secondary); }
.stat-card.revenue::before { background: var(--success); }
.stat-card.pending::before { background: var(--warning); }
.stat-card.services::before { background: #8b5cf6; }
.stat-card.tickets::before { background: var(--danger); }

.stat-icon {
    font-size: 2.5rem;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 16px;
    transition: var(--transition);
}

.stat-card:hover .stat-icon {
    transform: scale(1.1) rotate(5deg);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.75rem;
    font-weight: bold;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.stat-change {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 4px;
}

.stat-change.positive { color: var(--success); }
.stat-change.warning { color: var(--warning); }

/* ==================== Chart ==================== */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.card h2 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.chart-card {
    overflow: hidden;
}

.chart-container {
    display: flex;
    align-items: flex-end;
    gap: 1rem;
    height: 200px;
    padding: 1rem 0;
}

.chart-bar-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
    justify-content: flex-end;
}

.chart-bar {
    width: 100%;
    max-width: 60px;
    background: linear-gradient(180deg, var(--primary-light), var(--primary));
    border-radius: 8px 8px 0 0;
    position: relative;
    transition: var(--transition);
    min-height: 10px;
    animation: growUp 1s ease forwards;
}

.chart-bar:hover {
    background: linear-gradient(180deg, var(--secondary), var(--primary));
    transform: scaleY(1.05);
}

.chart-value {
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.85rem;
    font-weight: bold;
    color: var(--primary-light);
}

.chart-label {
    margin-top: 8px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* ==================== Tables ==================== */
.tables-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.table-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.table-card h2 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.table-responsive {
    overflow-x: auto;
}

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

th, td {
    padding: 12px 10px;
    text-align: right;
    border-bottom: 1px solid var(--border-color);
    font-size: 0.9rem;
}

th {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
}

td code {
    background: rgba(99, 102, 241, 0.1);
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    color: var(--primary-light);
}

tr:hover td {
    background: rgba(99, 102, 241, 0.05);
}

/* ==================== Badges ==================== */
.badge {
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    display: inline-block;
}

.badge-delivered, .badge-paid { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.badge-pending_admin, .badge-draft { background: rgba(245, 158, 11, 0.15); color: #f59e0b; }
.badge-rejected, .badge-failed_refunded { background: rgba(239, 68, 68, 0.15); color: #ef4444; }
.badge-awaiting_receipt { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; }

/* ==================== Stock Info ==================== */
.stock-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.stock-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--bg-dark);
    border-radius: 10px;
}

.stock-label {
    color: var(--text-secondary);
}

.stock-value {
    font-weight: bold;
    font-size: 1.1rem;
}

.stock-value.success { color: var(--success); }
.stock-value.danger { color: var(--danger); animation: pulse 1.5s infinite; }

/* ==================== Animations ==================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

@keyframes shimmer {
    0% { filter: brightness(1); }
    50% { filter: brightness(1.3); }
    100% { filter: brightness(1); }
}

@keyframes growUp {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* ==================== Responsive ==================== */
@media (max-width: 1200px) {
    .tables-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 70px;
        padding: 1rem 0.5rem;
    }
    .sidebar .logo { font-size: 0.7rem; }
    .sidebar a { font-size: 0; text-align: center; padding: 12px; }
    .sidebar a::first-letter { font-size: 1.5rem; }
    .sidebar-footer a { font-size: 0; }
    .sidebar-footer a::first-letter { font-size: 1.2rem; }
    .content { margin-right: 70px; padding: 1rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .chart-container { overflow-x: auto; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
}
