/* MALA Firm - Dark Blue/Purple Glassmorphism Theme */

body {
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e) !important;
    min-height: 100vh;
    font-family: 'Segoe UI', sans-serif;
}

/* Sidebar - dark blue glass */
.sidebar {
    background: rgba(15, 12, 41, 0.92) !important;
    backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255,255,255,0.08) !important;
    box-shadow: 4px 0 24px rgba(0,0,0,0.5) !important;
    width: 220px;
    min-height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    z-index: 100;
}

.content {
    margin-left: 220px;
    padding: 0;
    width: calc(100% - 220px);
    overflow-x: hidden;
}

.container-fluid.p-4 {
    padding: 1.2rem 1.5rem !important;
}

/* Stat cards - glass effect */
.stat-card {
    background: rgba(255,255,255,0.07) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 16px;
    padding: 1.2rem 1.1rem;
    transition: all 0.3s cubic-bezier(0.34,1.56,0.64,1);
    box-shadow: 0 8px 32px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.08) !important;
    transform: translateY(0) scale(1);
    color: white;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99,102,241,0.05) 0%, transparent 60%);
    pointer-events: none;
}
.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: rgba(99,102,241,0.5) !important;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4), 0 0 40px rgba(99,102,241,0.2) !important;
}

/* Stat card typography - responsive */
.stat-number {
    font-size: clamp(0.95rem, 2vw, 1.5rem) !important;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stat-label {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.55);
    margin: 0 0 6px 0;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.stat-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
    margin-left: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Chart cards */
.chart-card {
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(255,255,255,0.1) !important;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    color: white;
}
.chart-card:hover {
    box-shadow: 0 16px 48px rgba(0,0,0,0.3), 0 0 30px rgba(99,102,241,0.15) !important;
    transform: translateY(-4px);
}
.chart-card h5 {
    color: white;
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Table glass style */
.glass-table {
    background: rgba(255,255,255,0.05) !important;
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.1) !important;
    overflow: hidden;
    color: white;
}
.glass-table thead th {
    background: rgba(99,102,241,0.15) !important;
    color: rgba(255,255,255,0.9) !important;
    border-color: rgba(255,255,255,0.08) !important;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 12px 16px;
    font-weight: 600;
}
.glass-table tbody td {
    color: rgba(255,255,255,0.85) !important;
    border-color: rgba(255,255,255,0.06) !important;
    padding: 12px 16px;
    vertical-align: middle;
    background: transparent !important;
}
.glass-table tbody tr {
    background: transparent !important;
}
.glass-table tbody tr:hover td {
    background: rgba(255,255,255,0.05) !important;
}
.glass-table .text-muted {
    color: rgba(255,255,255,0.5) !important;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Navbar glass */
.navbar {
    background: rgba(15, 12, 41, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.08) !important;
    box-shadow: 0 2px 20px rgba(0,0,0,0.2);
}
.navbar-brand, .navbar span {
    color: white !important;
}

/* Sidebar nav links */
.sidebar .nav-link {
    color: rgba(255,255,255,0.7) !important;
    border-radius: 10px;
    padding: 10px 14px;
    transition: all 0.3s ease;
    margin-bottom: 4px;
}
.sidebar .nav-link:hover {
    background: rgba(99,102,241,0.15) !important;
    color: white !important;
    transform: translateX(4px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.sidebar .nav-link.active {
    background: linear-gradient(135deg, rgba(99,102,241,0.4), rgba(139,92,246,0.3)) !important;
    border: 1px solid rgba(99,102,241,0.4) !important;
    color: white !important;
}
.sidebar-header {
    color: white;
}
.sidebar-header h4 {
    color: white !important;
}
.sidebar-header small {
    color: rgba(255,255,255,0.5) !important;
}

/* Logo text in sidebar */
.sidebar .fas.fa-gavel {
    color: #818cf8 !important;
}

/* Page heading */
.page-heading {
    color: white !important;
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

/* Badges */
.badge-paid {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}
.badge-unpaid {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Action buttons */
.btn-glass {
    background: rgba(99,102,241,0.2) !important;
    border: 1px solid rgba(99,102,241,0.4) !important;
    color: white !important;
    border-radius: 8px;
    padding: 6px 14px;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}
.btn-glass:hover {
    background: rgba(99,102,241,0.35) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    color: white !important;
}

/* Primary buttons */
.btn-primary {
    background: linear-gradient(135deg, #6366f1, #4f46e5) !important;
    border-color: #6366f1 !important;
}
.btn-primary:hover {
    background: linear-gradient(135deg, #4f46e5, #4338ca) !important;
    box-shadow: 0 0 20px rgba(99,102,241,0.3) !important;
}

/* Flash messages */
.alert {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    border-radius: 12px;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #0f0c29, #302b63);
}

.login-card {
    background: white;
    border-radius: 10px;
    padding: 40px;
    max-width: 400px;
    width: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.login-card .logo-placeholder {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 80px;
    height: 80px;
    background-color: var(--light-color);
    border-radius: 50%;
    margin: 0 auto;
}

.login-card h1 {
    font-size: 1.8rem;
    color: var(--primary-color);
}

.login-card .form-label {
    font-weight: 500;
    color: var(--dark-color);
}

.login-card .btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 600;
}

.login-card .btn-primary:hover {
    background-color: #0f2438;
    border-color: #0f2438;
}

/* Stat Cards */
.stat-card {
    border-left: 4px solid var(--secondary-color) !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.stat-card h2 {
    font-weight: 700;
    font-size: 2rem;
}

/* Cards */
.card {
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1) !important;
}

.card-header {
    background-color: #f8f9fa !important;
    border-bottom: 2px solid #e9ecef;
    font-weight: 600;
}

/* Badges */
.badge {
    padding: 6px 12px;
    font-weight: 500;
    font-size: 0.85rem;
}

/* Tables */
.table {
    margin-bottom: 0;
}

.table thead th {
    background-color: #f8f9fa;
    color: var(--primary-color);
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
    padding: 12px 15px;
}

.table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background-color: #f8f9fa;
}

/* Forms */
.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 8px;
}

.form-control,
.form-select {
    border-color: #e0e0e0;
    border-radius: 5px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Progress Bar */
.progress {
    background-color: #e9ecef;
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar {
    background: linear-gradient(90deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Form Steps */
.form-step {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-step.active {
    display: block;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0b5ed7;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(13, 110, 253, 0.3);
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-success:hover {
    background-color: #157347;
    border-color: #157347;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(25, 135, 84, 0.3);
}

.btn-danger {
    background-color: var(--danger-color);
    border-color: var(--danger-color);
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #c82333;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
}

.btn-outline-primary {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

/* Alerts */
.alert {
    border-radius: 5px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #842029;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffecb5;
    color: #664d03;
}

.alert-info {
    background-color: #cfe2ff;
    border-color: #b6d4fe;
    color: #084298;
}

/* Charts */
canvas {
    max-height: 300px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .content {
        margin-left: 0;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
    
    .table-responsive {
        font-size: 0.9rem;
    }
}

/* Utilities */
.text-muted {
    color: #6c757d !important;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

.opacity-25 {
    opacity: 0.25;
}

.cursor-pointer {
    cursor: pointer;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Create Receipt Form Styling */
.create-receipt-form label {
    color: rgba(255,255,255,0.8) !important;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 5px;
}
.create-receipt-form .form-control,
.create-receipt-form .form-select {
    background: rgba(255,255,255,0.07) !important;
    border: 1px solid rgba(255,255,255,0.15) !important;
    border-radius: 10px;
    color: white !important;
    padding: 0.6rem 0.9rem;
}
.create-receipt-form .form-control:focus,
.create-receipt-form .form-select:focus {
    background: rgba(255,255,255,0.1) !important;
    border-color: rgba(99,102,241,0.6) !important;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.2) !important;
    color: white !important;
}
.create-receipt-form .form-control::placeholder {
    color: rgba(255,255,255,0.3) !important;
}
.create-receipt-form textarea.form-control {
    min-height: 100px;
}
.create-receipt-form .form-select option {
    background: #1e1b4b;
    color: white;
}

/* Glass Input Styles */
.glass-input {
    background: rgba(255,255,255,0.07) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-radius: 10px !important;
    color: white !important;
    padding: 8px 12px;
}
.glass-input:focus {
    background: rgba(255,255,255,0.1) !important;
    border-color: rgba(99,102,241,0.5) !important;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.15) !important;
    color: white !important;
    outline: none;
}
.glass-input option {
    background: #1e1b4b;
    color: white;
}
.glass-input::placeholder {
    color: rgba(255,255,255,0.3) !important;
}

/* Receipts Table Styles */
.receipts-table {
    background: transparent !important;
}
.receipts-table tbody {
    background: transparent !important;
}
.receipts-table tbody tr {
    background: transparent !important;
    border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}
.receipts-table tbody tr:hover {
    background: rgba(255,255,255,0.05) !important;
}
.receipts-table tbody td {
    background: transparent !important;
    color: rgba(255,255,255,0.85) !important;
    border: none !important;
    padding: 12px !important;
    vertical-align: middle !important;
}
.receipts-table thead th {
    background: transparent !important;
    color: rgba(255,255,255,0.5) !important;
    border-bottom: 1px solid rgba(255,255,255,0.1) !important;
    border-top: none !important;
}

.glass-table td {
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 150px;
}
.glass-table td:first-child {
    max-width: 180px;
}
