/**
 * KekePro Management System - Custom Styles
 * Dark Blue & White Theme with Animations
 */

:root {
    --primary-color: #1a237e;
    --primary-dark: #0d1642;
    --primary-light: #3949ab;
    --secondary-color: #ffffff;
    --accent-color: #00acc1;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --danger-color: #dc3545;
    --info-color: #17a2b8;
    --light-bg: #f5f6fa;
    --dark-text: #2c3e50;
    --gray-text: #7f8c8d;
    --border-color: #e0e6ed;
    --card-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    --hover-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    --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-color: var(--light-bg);
    color: var(--dark-text);
    line-height: 1.6;
}

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

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

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

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

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

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

.animate-fadeIn {
    animation: fadeIn 0.5s ease forwards;
}

.animate-slideInLeft {
    animation: slideInLeft 0.5s ease forwards;
}

.animate-slideInRight {
    animation: slideInRight 0.5s ease forwards;
}

/* ==================== LOGIN PAGE ==================== */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.login-page::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 6s ease-in-out infinite;
}

.login-box {
    background: white;
    border-radius: 20px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
    width: 100%;
    max-width: 420px;
    padding: 45px;
    position: relative;
    z-index: 1;
    animation: fadeIn 0.6s ease;
}

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

.login-logo .logo-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    animation: float 3s ease-in-out infinite;
    box-shadow: 0 10px 30px rgba(26, 35, 126, 0.3);
}

.login-logo .logo-icon i {
    font-size: 45px;
    color: white;
}

.login-logo h1 {
    color: var(--primary-color);
    font-size: 28px;
    font-weight: 700;
    margin: 0;
}

.login-logo p {
    color: var(--gray-text);
    font-size: 15px;
    margin: 8px 0 0;
}

.form-floating > .form-control {
    height: 58px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    transition: var(--transition);
}

.form-floating > .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(26, 35, 126, 0.1);
}

.btn-login {
    height: 56px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    transition: var(--transition);
}

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(26, 35, 126, 0.35);
}

/* ==================== SIDEBAR ==================== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

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

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 270px;
    height: 100vh;
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    z-index: 1000;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

.sidebar-collapsed {
    width: 70px;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
}

.sidebar-close {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

.sidebar-logo {
    width: 48px;
    height: 48px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: pulse 2s ease-in-out infinite;
    overflow: hidden;
    padding: 6px;
}

.sidebar-logo .logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sidebar-logo i {
    font-size: 26px;
    color: var(--primary-color);
}

.sidebar-brand {
    color: white;
    transition: var(--transition);
}

.sidebar-collapsed .sidebar-brand {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-brand h4 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.sidebar-brand span {
    font-size: 12px;
    opacity: 0.8;
}

.sidebar-menu {
    padding: 15px 0;
    flex: 1;
}

.sidebar-menu .menu-item {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: var(--transition);
    border-left: 3px solid transparent;
    position: relative;
    overflow: hidden;
}

.sidebar-menu .menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 100%;
    background: rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

.sidebar-menu .menu-item:hover::before,
.sidebar-menu .menu-item.active::before {
    width: 100%;
}

.sidebar-menu .menu-item:hover,
.sidebar-menu .menu-item.active {
    color: white;
    border-left-color: var(--accent-color);
}

.sidebar-menu .menu-item i {
    font-size: 20px;
    width: 24px;
    text-align: center;
    transition: var(--transition);
}

.sidebar-menu .menu-item:hover i {
    transform: scale(1.1);
}

.sidebar-menu .menu-item span {
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    transition: var(--transition);
}

.sidebar-collapsed .menu-item span {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar-menu .menu-section {
    padding: 20px 20px 8px;
    font-size: 11px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1.5px;
    font-weight: 600;
}

.sidebar-footer {
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.sidebar-footer .version {
    color: rgba(255, 255, 255, 0.5);
    font-size: 12px;
}

/* ==================== MAIN CONTENT ==================== */
.main-content {
    margin-left: 270px;
    min-height: 100vh;
    transition: var(--transition);
}

.main-content-expanded {
    margin-left: 70px;
}

/* ==================== TOP NAVBAR ==================== */
.top-navbar {
    background: white;
    height: 75px;
    padding: 0 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--card-shadow);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.sidebar-toggle {
    background: var(--light-bg);
    border: none;
    font-size: 20px;
    color: var(--primary-color);
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--dark-text);
    margin: 0;
}

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

.nav-icon-btn {
    background: var(--light-bg);
    border: none;
    font-size: 18px;
    color: var(--gray-text);
    cursor: pointer;
    padding: 10px;
    border-radius: 10px;
    position: relative;
    transition: var(--transition);
}

.nav-icon-btn:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

.nav-icon-btn .badge {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 10px;
    padding: 3px 6px;
    animation: pulse 2s infinite;
}

.user-dropdown {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 12px;
    transition: var(--transition);
}

.user-dropdown:hover {
    background: var(--light-bg);
}

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

.user-info {
    line-height: 1.3;
}

.user-info .name {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark-text);
}

.user-info .role {
    font-size: 12px;
    color: var(--gray-text);
}

/* ==================== CONTENT AREA ==================== */
.content-area {
    padding: 25px;
    animation: fadeIn 0.4s ease;
}

/* ==================== STATS CARDS ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 22px;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 18px;
    animation: fadeIn 0.5s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

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

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    flex-shrink: 0;
    transition: var(--transition);
}

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

.stat-icon.primary {
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.15) 0%, rgba(57, 73, 171, 0.15) 100%);
    color: var(--primary-color);
}

.stat-icon.success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.15) 0%, rgba(40, 167, 69, 0.1) 100%);
    color: var(--success-color);
}

.stat-icon.warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, rgba(255, 193, 7, 0.1) 100%);
    color: var(--warning-color);
}

.stat-icon.danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15) 0%, rgba(220, 53, 69, 0.1) 100%);
    color: var(--danger-color);
}

.stat-icon.info {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.15) 0%, rgba(23, 162, 184, 0.1) 100%);
    color: var(--info-color);
}

.stat-content {
    flex: 1;
}

.stat-content .label {
    font-size: 13px;
    color: var(--gray-text);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-content .value {
    font-size: 26px;
    font-weight: 700;
    color: var(--dark-text);
}

.stat-content .change {
    font-size: 12px;
    margin-top: 6px;
    font-weight: 500;
}

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

.stat-content .change.negative {
    color: var(--danger-color);
}

/* ==================== CARDS ==================== */
.card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
    border: none;
    margin-bottom: 25px;
    transition: var(--transition);
    animation: fadeIn 0.5s ease;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.card-header {
    background: transparent;
    border-bottom: 1px solid var(--border-color);
    padding: 22px 25px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h5 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    color: var(--dark-text);
    display: flex;
    align-items: center;
}

.card-header h5 i {
    color: var(--primary-color);
}

.card-body {
    padding: 25px;
}

/* ==================== TABLES ==================== */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.data-table th {
    background: var(--light-bg);
    padding: 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--gray-text);
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border-color);
    white-space: nowrap;
}

.data-table td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
    vertical-align: middle;
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: rgba(26, 35, 126, 0.03);
    transform: scale(1.002);
}

.data-table .actions {
    display: flex;
    gap: 8px;
}

/* ==================== BADGES ==================== */
.badge {
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: rgba(40, 167, 69, 0.12);
    color: var(--success-color);
}

.badge-warning {
    background: rgba(255, 193, 7, 0.15);
    color: #856404;
}

.badge-danger {
    background: rgba(220, 53, 69, 0.12);
    color: var(--danger-color);
}

.badge-info {
    background: rgba(23, 162, 184, 0.12);
    color: var(--info-color);
}

.badge-primary {
    background: rgba(26, 35, 126, 0.12);
    color: var(--primary-color);
}

.badge-secondary {
    background: rgba(108, 117, 125, 0.12);
    color: #6c757d;
}

/* ==================== BUTTONS ==================== */
.btn {
    padding: 10px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.25);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(26, 35, 126, 0.35);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #34ce57 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.25);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #e4606d 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(220, 53, 69, 0.25);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ffda6a 100%);
    color: #000;
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.25);
}

.btn-info {
    background: linear-gradient(135deg, #17a2b8 0%, #48c1d4 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(23, 162, 184, 0.25);
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #868e96 100%);
    color: white;
}

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

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

.btn-sm {
    padding: 7px 14px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 30px;
    font-size: 16px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
}

.btn-icon:hover {
    transform: scale(1.1);
}

/* ==================== FORMS ==================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 600;
    color: var(--dark-text);
    margin-bottom: 8px;
    display: block;
    font-size: 14px;
}

.form-control {
    height: 50px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 14px;
    transition: var(--transition);
    width: 100%;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(26, 35, 126, 0.1);
    outline: none;
}

.form-control:disabled {
    background: var(--light-bg);
    cursor: not-allowed;
}

textarea.form-control {
    height: auto;
    min-height: 120px;
    resize: vertical;
}

.form-select {
    height: 50px;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    padding: 10px 16px;
    font-size: 14px;
    transition: var(--transition);
    width: 100%;
    background: white;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(26, 35, 126, 0.1);
    outline: none;
}

/* ==================== MODAL ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1050;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

.modal-content {
    background: white;
    border-radius: 20px;
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.modal-header {
    padding: 22px 25px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, rgba(26, 35, 126, 0.03) 0%, rgba(57, 73, 171, 0.03) 100%);
}

.modal-header h5 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary-color);
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--gray-text);
    cursor: pointer;
    padding: 5px;
    border-radius: 8px;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--light-bg);
    color: var(--danger-color);
    transform: rotate(90deg);
}

.modal-body {
    padding: 25px;
}

.modal-footer {
    padding: 18px 25px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    background: var(--light-bg);
}

/* ==================== ALERTS ==================== */
.alert {
    padding: 16px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideInLeft 0.4s ease;
}

.alert-success {
    background: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.alert-danger {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-color);
    border: 1px solid rgba(220, 53, 69, 0.2);
}

.alert-warning {
    background: rgba(255, 193, 7, 0.1);
    color: #856404;
    border: 1px solid rgba(255, 193, 7, 0.2);
}

.alert-info {
    background: rgba(23, 162, 184, 0.1);
    color: var(--info-color);
    border: 1px solid rgba(23, 162, 184, 0.2);
}

/* ==================== TABS ==================== */
.nav-tabs {
    border-bottom: 2px solid var(--border-color);
    display: flex;
    gap: 5px;
}

.nav-tabs .nav-link {
    padding: 14px 22px;
    color: var(--gray-text);
    font-weight: 500;
    border: none;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    background: none;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

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

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.nav-tabs .nav-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-tabs .nav-link.active::after {
    width: 100%;
}

.tab-content {
    padding: 25px 0;
}

/* ==================== PAGINATION ==================== */
.pagination {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 25px;
}

.pagination .page-link {
    padding: 10px 16px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    color: var(--dark-text);
    text-decoration: none;
    transition: var(--transition);
    font-weight: 500;
}

.pagination .page-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

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

/* ==================== PRINT STYLES ==================== */
@media print {
    .sidebar,
    .top-navbar,
    .no-print,
    .sidebar-overlay,
    .sidebar-toggle,
    .btn {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
        break-inside: avoid;
    }
    
    body {
        background: white;
    }
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
        z-index: 1001;
    }
    
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    }
    
    .sidebar-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1000;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
    }
    
    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .sidebar-collapsed {
        width: 280px;
    }
    
    .sidebar-collapsed .sidebar-brand,
    .sidebar-collapsed .menu-item span {
        opacity: 1;
        width: auto;
    }
    
    .sidebar-close {
        display: block !important;
    }
}

@media (max-width: 767px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .login-box {
        padding: 30px 20px;
        margin: 10px;
    }
    
    .content-area {
        padding: 15px;
    }
    
    .card-header {
        padding: 18px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .card-body {
        padding: 20px;
    }
    
    .data-table th,
    .data-table td {
        padding: 12px;
    }
    
    .top-navbar {
        padding: 0 15px;
        height: 65px;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .user-info {
        display: none;
    }
}

/* ==================== LOADING SPINNER ==================== */
.spinner {
    width: 45px;
    height: 45px;
    border: 4px solid rgba(26, 35, 126, 0.1);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(4px);
}

/* ==================== QR CODE ==================== */
.qr-code-container {
    text-align: center;
    padding: 25px;
}

.qr-code-container img {
    max-width: 220px;
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 15px;
    background: white;
    box-shadow: var(--card-shadow);
}

/* ==================== RECEIPT ==================== */
.receipt {
    max-width: 420px;
    margin: 0 auto;
    padding: 35px;
    border: 2px dashed var(--border-color);
    border-radius: 15px;
    background: white;
}

.receipt-header {
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 2px dashed var(--border-color);
}

.receipt-header .logo {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.receipt-header .logo i {
    font-size: 35px;
    color: white;
}

.receipt-header h3 {
    color: var(--primary-color);
    margin: 0;
    font-size: 22px;
}

.receipt-header p {
    color: var(--gray-text);
    margin: 5px 0 0;
}

.receipt-body {
    margin-bottom: 25px;
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px dotted var(--border-color);
}

.receipt-row:last-child {
    border-bottom: none;
}

.receipt-row .label {
    color: var(--gray-text);
}

.receipt-row .value {
    font-weight: 600;
}

.receipt-footer {
    text-align: center;
    padding-top: 25px;
    border-top: 2px dashed var(--border-color);
}

.receipt-qr {
    margin-top: 20px;
}

/* ==================== UTILITY CLASSES ==================== */
.text-primary { color: var(--primary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-danger { color: var(--danger-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-info { color: var(--info-color) !important; }
.text-muted { color: var(--gray-text) !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-info { background-color: var(--info-color) !important; }
.bg-light { background-color: var(--light-bg) !important; }

.fw-bold { font-weight: 700 !important; }
.fw-semibold { font-weight: 600 !important; }

.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 1rem !important; }
.mb-4 { margin-bottom: 1.5rem !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 1rem !important; }
.mt-4 { margin-top: 1.5rem !important; }

.d-flex { display: flex !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }
.gap-2 { gap: 0.5rem !important; }
.gap-3 { gap: 1rem !important; }

.w-100 { width: 100% !important; }
.text-center { text-align: center !important; }
.text-end { text-align: right !important; }

/* Hover effects for cards */
.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--hover-shadow);
}

/* Gradient text */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Glass effect */
.glass {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}
