/* ===== Global ===== */
* {
    font-family: 'Vazirmatn', sans-serif;
}

body {
    background-color: #f0f2f5;
    padding-top: 70px;
}

.main-content {
    min-height: calc(100vh - 70px);
    padding: 0 15px;
}

/* ===== Navbar ===== */
.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
}

.navbar .dropdown-menu {
    text-align: right;
}

/* ===== Cards ===== */
.stat-card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    font-weight: 600;
}

/* ===== Tables ===== */
.table {
    margin-bottom: 0;
}

.table thead th {
    font-weight: 600;
    white-space: nowrap;
}

.table td {
    vertical-align: middle;
}

/* ===== Buttons ===== */
.btn {
    border-radius: 8px;
    font-weight: 500;
}

.btn-lg {
    border-radius: 10px;
}

/* ===== Forms ===== */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.6rem 0.9rem;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* ===== AI Section ===== */
.ai-receipt-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    padding: 20px;
    color: white;
}

.ai-receipt-section h5 {
    color: white;
}

.ai-receipt-section .text-muted {
    color: rgba(255,255,255,0.8) !important;
}

.ai-receipt-section .btn-outline-primary {
    color: white;
    border-color: rgba(255,255,255,0.5);
}

.ai-receipt-section .btn-outline-primary:hover {
    background-color: rgba(255,255,255,0.15);
    color: white;
}

#ai_result {
    border-radius: 8px;
}

/* ===== Badges ===== */
.badge {
    font-weight: 500;
    padding: 0.4em 0.8em;
    border-radius: 6px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    .stat-card .card-title {
        font-size: 1rem;
    }
    
    .stat-card .card-text {
        font-size: 0.8rem;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table thead th,
    .table td {
        padding: 0.4rem 0.5rem;
    }
    
    .btn-sm {
        padding: 0.25rem 0.4rem;
        font-size: 0.75rem;
    }
    
    h2 {
        font-size: 1.3rem;
    }
    
    .ai-receipt-section {
        padding: 15px;
    }
}

@media (max-width: 576px) {
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .navbar-nav {
        padding-top: 10px;
    }
    
    .navbar-nav .dropdown-menu {
        border: none;
        padding-left: 15px;
    }
    
    .stat-card .card-title {
        font-size: 0.9rem;
    }
    
    .stat-card i {
        font-size: 1.5rem !important;
    }
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ===== Loading Spinner ===== */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* ===== Image Preview ===== */
.img-thumbnail {
    border-radius: 8px;
    max-width: 100%;
}

/* ===== Tab Content ===== */
.nav-tabs {
    border-bottom: 2px solid #dee2e6;
}

.nav-tabs .nav-link {
    border: none;
    border-radius: 8px 8px 0 0;
    color: #6c757d;
    font-weight: 500;
}

.nav-tabs .nav-link.active {
    color: #0d6efd;
    border-bottom: 3px solid #0d6efd;
    background: transparent;
}