/* Variables */
:root {
    --sidebar-width: 250px;
    --topbar-height: 60px;

    /* Theme Colors */
    --primary-color: #6366f1;   /* Indigo */
    --secondary-color: #8b5cf6; /* Purple */
    --accent-color: #10b981;    /* Emerald */
    --dark-bg: #1e293b;         /* Slate Dark */
    --light-bg: #f9fafb;        /* Soft Light */
}

/* Base */
body {
    background-color: var(--light-bg);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
 body {
            padding-top: 56px; /* Height of navbar */
            overflow-x: hidden;
        }
        
        /* Fixed navbar */
        .navbar {
            position: fixed;
            top: 0;
            right: 0;
            left: 0;
            z-index: 1030;
        }
        
        /* Fixed sidebar for desktop */
        .sidebar {
            position: fixed;
            top: 56px;
            bottom: 0;
            left: 0;
            z-index: 1020;
            width: 220px;
            overflow-y: auto;
            background-color: --primary-color;
            border-right: 1px solid #dee2e6;
            transition: all 0.3s ease;
        }
        
        /* Content area adjustment for fixed sidebar */
        .content-area {
            margin-left: 220px;
            transition: margin-left 0.3s ease;
            padding: 20px;
        }
        
        /* Mobile sidebar toggle button */
        .sidebar-toggle {
            display: none;
            cursor: pointer;
            font-size: 1.25rem;
        }
        
        /* Mobile styles */
        @media (max-width: 767.98px) {
            .sidebar {
                transform: translateX(-100%);
                width: 250px;
            }
            
            .sidebar.show {
                transform: translateX(0);
            }
            
            .content-area {
                margin-left: 0;
            }
            
            .sidebar-toggle {
                display: block;
            }
            
            /* Overlay when sidebar is open on mobile */
            .sidebar-overlay {
                display: none;
                position: fixed;
                top: 56px;
                left: 0;
                right: 0;
                bottom: 0;
                background-color: rgba(0, 0, 0, 0.5);
                z-index: 1019;
            }
            
            .sidebar-overlay.show {
                display: block;
            }
        }
.login-container {
    max-width: 400px;
    width: 100%;
    padding: 15px;
    margin: auto;
}
.img-thumbnail { border-radius: 8px; border: 1px solid #e2e8f0; }
.text-danger { font-size: 0.875rem; margin-top: 0.25rem; }
.form-text { font-size: 0.85rem; color: #6c757d; }

/* Forms */
.form-label { font-weight: 600; color: #334155; margin-bottom: 8px; }
.form-control, .form-select, input, select {
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    padding: 12px 15px;
    transition: all 0.3s ease;
}
.form-control:focus, .form-select:focus, input:focus, select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}
.form-check-input { width: 20px; height: 20px; margin-right: 8px; }
.form-check-input:checked { background-color: var(--primary-color); border-color: var(--primary-color); }

/* Buttons */
.btn { border-radius: 8px; padding: 8px 16px; font-weight: 500; transition: all 0.3s ease; }
.btn + .btn { margin-left: 10px; }
.btn-primary { background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); border: none; color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(99, 102, 241, 0.3); }
.btn-secondary { background: #f1f5f9; color: #475569; border: none; }
.btn-secondary:hover { background: #e2e8f0; color: #1e293b; }
.btn-outline-primary { border: 1px solid var(--primary-color); color: var(--primary-color); }
.btn-outline-primary:hover { background: var(--primary-color); color: white; }
.btn-outline-secondary { border: 1px solid #94a3b8; color: #64748b; }
.btn-outline-secondary:hover { background: #e2e8f0; color: #334155; }
.btn-outline-danger { border: 1px solid #ef4444; color: #ef4444; }
.btn-outline-danger:hover { background: #ef4444; color: white; }

/* Tables */
.table { margin-bottom: 0; }
.table th {
    border-top: none; font-weight: 600; color: #64748b;
    text-transform: uppercase; font-size: 0.8rem; letter-spacing: 0.5px;
}
.table td { vertical-align: middle; }
.table-responsive { border-radius: 12px; overflow: hidden; }
.table-hover tbody tr:hover { background-color: #f1f5f9; }
.badge { padding: 8px 12px; border-radius: 20px; font-weight: 500; }

/* Pagination */
.pagination .page-link { border-radius: 8px; margin: 0 3px; border: 1px solid #e2e8f0; color: #475569; }
.pagination .page-item.active .page-link { background: linear-gradient(45deg, var(--primary-color), var(--secondary-color)); border-color: var(--primary-color); }

/* Cards */
.card { border: none; border-radius: 12px; box-shadow: 0 4px 6px rgba(0,0,0,0.08); margin-bottom: 24px; }
.card-header { background-color: #f8fafc; border-bottom: 1px solid #e2e8f0; padding: 15px 20px; font-weight: 600; color: #1e293b; }
.card-body { padding: 20px; }
.action-buttons { display: flex; gap: 8px; }

/* Alerts */
.alert { border: none; border-radius: 8px; box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

/* Layout: Navbar & Sidebar */
.navbar { 
    height: var(--topbar-height); 
    background-color: #ffffff !important; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); 
    border-bottom: 1px solid #dee2e6;
}
.navbar-brand { 
    font-weight: 600; 
    color: #212529 !important;
}
.sidebar { 
    min-height: calc(100vh - var(--topbar-height)); 
    background-color: #ffffff; 
    padding-top: 1rem; 
    color: #495057; 
    border-right: 1px solid #dee2e6;
}
.sidebar .nav-link { 
    color: #495057; 
    border-radius: 0; 
    margin: 0; 
    padding: 12px 20px; 
    transition: 0.2s; 
    border-left: 3px solid transparent;
}
.sidebar .nav-link i { width: 20px; margin-right: 10px; }
.sidebar .nav-link:hover { 
    background-color: #f8f9fa; 
    color: #212529; 
    border-left-color: #6c757d;
}
.sidebar .nav-link.active { 
    background-color: #e9ecef; 
    color: #212529; 
    border-left-color: #007bff; 
    font-weight: 500;
}
.sidebar h6 { 
    color: #6c757d; 
    font-size: 0.8rem; 
    margin: 20px 0 10px 20px; 
    text-transform: uppercase; 
    letter-spacing: 0.5px;
}
.content-area { padding: 20px; }

/* Dashboard quick actions */
.quick-action-card { 
    transition: all 0.3s ease; 
    border: 1px solid #dee2e6; 
    border-radius: 8px; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.1); 
    overflow: hidden; 
    height: 240px; 
    display: flex; 
    flex-direction: column; 
    background-color: #ffffff;
}
.quick-action-card:hover { 
    transform: translateY(-2px); 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); 
    border-color: #007bff;
}
.card-content { 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    height: 100%;
}
.card-body.flex { 
    display: flex; 
    flex-direction: column; 
    justify-content: space-between; 
    height: 100%; 
    padding: 20px;
}
.quick-action-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    padding: 20px;
}
.action-icon { 
    font-size: 2rem; 
    margin-bottom: 15px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
    padding: 12px; 
    border-radius: 50%; 
    background: #f8f9fa; 
    width: 60px; 
    height: 60px; 
    margin: 0 auto 15px auto;
}
.action-button { 
    transition: all 0.3s ease; 
    border-radius: 6px; 
    padding: 8px 16px; 
    font-weight: 500; 
    align-self: center; 
    min-width: 120px;
    margin-top: auto;
}
.action-button:hover { transform: scale(1.05); }

/* Border left classes for statistics cards */
.border-left-primary { border-left: 4px solid #007bff !important; }
.border-left-success { border-left: 4px solid #28a745 !important; }
.border-left-info { border-left: 4px solid #17a2b8 !important; }
.border-left-warning { border-left: 4px solid #ffc107 !important; }
.border-left-danger { border-left: 4px solid #dc3545 !important; }
.border-left-secondary { border-left: 4px solid #6c757d !important; }

/* Helpers */
.filter-form .form-select, .filter-form .btn { border-radius: 8px; }
.filter-info { margin-bottom: 20px; padding: 10px; background-color: #f8f9fa; border-radius: 5px; }
.uuid-text {
    font-family: 'SF Mono', Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 0.85rem; color: #475569; background: #f1f5f9;
    padding: 6px 10px; border-radius: 6px; display: inline-block; max-width: 150px;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.uuid-text:hover { overflow: visible; white-space: normal; word-break: break-all; z-index: 10; position: relative; background: #e2e8f0; }
.user-phone { font-family: 'SF Mono', Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace; font-weight: 500; font-size: 1.1rem; }
.info-table { border-radius: 8px; overflow: hidden; }
.info-table tr:last-child td { border-bottom: none; }
.section-title { color: var(--primary-color); margin-bottom: 15px; }
.payment-details { font-size: 0.9rem; line-height: 1.4; }
.payment-details strong { color: #475569; }

/* QR preview (screen) */
.qr-code-img { width: 70px; height: 70px; object-fit: contain; border: 1px solid #e2e8f0; border-radius: 8px; padding: 5px; background: white; transition: all 0.3s ease; }
.qr-code-img:hover { transform: scale(1.8); z-index: 10; position: relative; box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1); }
.qr-preview { text-align: center; padding: 20px; border: 2px dashed #ccc; border-radius: 5px; margin: 20px 0; }
.qr-item { margin-bottom: 20px; }

/* Print */
.print-section { display: none; }
@media print {
    body * { visibility: hidden; }
    .print-section, .print-section * { visibility: visible; display: block; }
    .print-section { position: absolute; left: 0; top: 0; width: 100%; }
    .no-print { display: none !important; }
    .page {
        display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: auto; gap: 10px;
        justify-items: center; align-items: center; margin: 0 auto; width: 100%;
    }
    .qr-item {
        break-inside: avoid; text-align: center; padding: 5px; border: 1px solid #ccc; border-radius: 5px;
        width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%;
    }
    .qr-code { max-width: 150px; width: 100%; margin: 0 auto; display: block; }
    h5 { margin: 5px 0; text-align: center; width: 100%; }
    p { margin: 2px 0; text-align: center; width: 100%; }
}
