/* assets/css/dashboard.css */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-primary: #0a0f1d;
    --bg-secondary: #121829;
    --bg-glass: rgba(255, 255, 255, 0.03);
    --border-glass: rgba(255, 255, 255, 0.07);
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --accent-blue: #3b82f6;
    --accent-purple: #8b5cf6;
    --accent-glow: rgba(139, 92, 246, 0.4);
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --sidebar-width: 260px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Mode Overrides */
html.light-theme, html.light-theme body {
    --bg-primary: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-glass: rgba(0, 0, 0, 0.02);
    --border-glass: rgba(0, 0, 0, 0.08);
    --text-primary: #0f172a;
    --text-secondary: #64748b;
    --accent-glow: rgba(139, 92, 246, 0.15);
}

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

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
}

/* Scrollbars */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-glass);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-purple);
}

/* Auth Pages Style */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: radial-gradient(circle at top right, rgba(59, 130, 246, 0.15), transparent 40%),
                radial-gradient(circle at bottom left, rgba(139, 92, 246, 0.15), transparent 40%);
}

.auth-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 20px;
    width: 100%;
    max-width: 450px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
}

.auth-header {
    text-align: center;
    margin-bottom: 30px;
}

.auth-header h1 {
    font-size: 2.2rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
}

.auth-header p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    position: relative;
}

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

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--accent-purple);
    box-shadow: 0 0 10px var(--accent-glow);
}

.btn-primary {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 92, 246, 0.5);
}

.auth-footer {
    text-align: center;
    margin-top: 25px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-footer a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Layout Core */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-secondary);
    border-right: 1px solid var(--border-glass);
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    flex-col: column;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transition);
}

.sidebar-brand {
    padding: 25px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-glass);
}

.sidebar-brand h2 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.sidebar-user {
    padding: 20px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    display: flex;
    justify-content: center;
    align-items: center;
    font-weight: 700;
    font-size: 1.2rem;
    color: white;
}

.user-details h4 {
    font-size: 0.95rem;
    font-weight: 600;
}

.user-details span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

.sidebar-menu {
    list-style: none;
    padding: 20px 10px;
    flex: 1;
    overflow-y: auto;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px 15px;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    font-weight: 500;
    transition: var(--transition);
}

.sidebar-menu a:hover,
.sidebar-menu li.active a {
    color: var(--text-primary);
    background: var(--bg-glass);
    border-left: 3px solid var(--accent-purple);
}

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

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 10px;
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-logout:hover {
    background: var(--accent-red);
    color: white;
}

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

.header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.header-title h1 {
    font-size: 2rem;
    font-weight: 700;
}

.header-title p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 3px;
}

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

.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.card-wallet {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(139, 92, 246, 0.2);
}

.card-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
}

.card-value {
    font-size: 2.2rem;
    font-weight: 800;
    margin-top: 10px;
    background: linear-gradient(135deg, var(--text-primary), #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card-action {
    margin-top: 15px;
}

.btn-small {
    padding: 8px 16px;
    background: var(--accent-purple);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: var(--transition);
}

.btn-small:hover {
    background: #7c3aed;
}

/* Service Categories */
.category-section {
    margin-bottom: 40px;
}

.category-title {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 20px;
    border-left: 4px solid var(--accent-purple);
    padding-left: 10px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.service-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 20px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 160px;
    text-decoration: none;
    color: inherit;
}

.service-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-purple);
    box-shadow: 0 10px 20px rgba(139, 92, 246, 0.1);
}

.service-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.service-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(139, 92, 246, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--accent-purple);
    font-size: 1.2rem;
}

.service-price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--accent-green);
    background: rgba(16, 185, 129, 0.1);
    padding: 4px 8px;
    border-radius: 6px;
}

.service-card-body {
    margin-top: 15px;
}

.service-card-body h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 5px;
}

.service-card-body p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Tables styling */
.table-container {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow: hidden;
    margin-top: 20px;
}

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

.table-header h3 {
    font-size: 1.2rem;
    font-weight: 600;
}

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

.custom-table th {
    background: rgba(255, 255, 255, 0.01);
    padding: 15px 20px;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-glass);
}

.custom-table td {
    padding: 15px 20px;
    border-bottom: 1px solid var(--border-glass);
    font-size: 0.95rem;
}

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

.status-badge {
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.status-badge.success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
}

.status-badge.pending {
    background: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
}

.status-badge.failed {
    background: rgba(239, 68, 68, 0.1);
    color: var(--accent-red);
}

/* Form Styles inside Main Content */
.form-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    padding: 30px;
    max-width: 700px;
    margin: 0 auto;
}

/* Alert Notification Banner */
.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid var(--accent-green);
    color: #34d399;
}

.alert-danger {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--accent-red);
    color: #f87171;
}

/* Floating WhatsApp Widget */
.whatsapp-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: white;
    font-size: 32px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 999;
    transition: var(--transition);
}

.whatsapp-widget:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.5);
}

/* QR Code Payment View */
.qr-payment-box {
    text-align: center;
    padding: 20px;
    border: 1px dashed var(--border-glass);
    border-radius: 12px;
    margin: 20px 0;
    background: rgba(255,255,255,0.01);
}

.qr-image {
    background: white;
    padding: 15px;
    border-radius: 12px;
    display: inline-block;
    margin-bottom: 15px;
}

.qr-timer {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-purple);
}

/* Service Output Presentation */
.output-card {
    margin-top: 30px;
    background: #1e293b;
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 25px;
}

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

.output-header h3 {
    font-size: 1.2rem;
    color: var(--accent-green);
}

.output-body pre {
    white-space: pre-wrap;
    word-break: break-all;
    font-family: monospace;
    font-size: 0.9rem;
    background: #0f172a;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}

/* Mobile Header & Side Toggle Actions */
.mobile-header {
    display: none;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.btn-sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.4rem;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.btn-sidebar-close {
    display: none;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.3rem;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 15px;
}

/* Ensure tables are scrollable horizontally instead of squishing columns */
.table-container {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.custom-table {
    min-width: 750px;
}

/* Responsive Overrides */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }
    
    .sidebar.open {
        transform: translateX(0);
        box-shadow: 10px 0 40px rgba(0, 0, 0, 0.9);
    }
    
    .btn-sidebar-close {
        display: block;
    }
    
    .mobile-header {
        display: flex;
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px 15px;
    }
    
    .header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .header-bar .card-wallet {
        width: 100%;
        justify-content: space-between;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-card {
        padding: 20px;
    }
    
    .auth-card {
        padding: 25px 20px;
    }
}

