/**
 * Azma Custom CSS - استایل‌های سفارشی شهر آزما ایران
 */

/* ========== تنظیمات پایه ========== */
:root {
    --primary-color: #10b981;
    --primary-dark: #059669;
    --primary-light: #34d399;
    --secondary-color: #6366f1;
    --danger-color: #ef4444;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-color: #64748b;
}

body {
    font-family: 'Vazir', sans-serif;
    background-color: #f1f5f9;
    direction: rtl;
    color: var(--dark-color);
}

/* ========== اسکرول بار سفارشی ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/* ========== دکمه بازگشت به بالا ========== */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.scroll-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ========== کانتینر اسنک‌بار ========== */
.azma-snackbar-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    pointer-events: none;
}

/* ========== استایل اسنک‌بار ========== */
.azma-snackbar {
    min-width: 280px;
    max-width: 450px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.2);
    transform: translateY(100px);
    transition: transform 0.3s ease;
    pointer-events: auto;
    position: relative;
}

.azma-snackbar.show {
    transform: translateY(0);
}

.azma-snackbar-content {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    gap: 12px;
}

.azma-snackbar-icon {
    flex-shrink: 0;
}

.azma-snackbar-icon i {
    font-size: 22px;
}

.azma-snackbar-message {
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: white;
}

.azma-snackbar-close {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: all 0.2s;
}

.azma-snackbar-close:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.azma-snackbar-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    background: rgba(255,255,255,0.5);
    transform-origin: left;
    animation: azmaProgress linear forwards;
}

@keyframes azmaProgress {
    from { transform: scaleX(1); }
    to { transform: scaleX(0); }
}

/* رنگ‌های اسنک‌بار */
.azma-snackbar-success {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
}
.azma-snackbar-success .azma-snackbar-icon i {
    color: white;
}

.azma-snackbar-error {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
}

.azma-snackbar-warning {
    background: linear-gradient(135deg, var(--warning-color), #d97706);
}

.azma-snackbar-info {
    background: linear-gradient(135deg, var(--info-color), #2563eb);
}

/* ========== لودینگ اسپینر ========== */
.azma-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.azma-loading-spinner {
    background: white;
    padding: 30px 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 20px 35px -10px rgba(0,0,0,0.3);
}

/* ========== کارت‌ها ========== */
.azma-card {
    background: white;
    border-radius: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    overflow: hidden;
}

.azma-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -12px rgba(0,0,0,0.1);
}

/* ========== دکمه‌ها ========== */
.btn-azma {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 12px;
    font-weight: 500;
    transition: all 0.2s;
}

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

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

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

/* ========== فرم‌ها ========== */
.form-control,
.form-select {
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    padding: 12px 16px;
    font-size: 14px;
    transition: all 0.2s;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--dark-color);
}

/* ========== جداول ========== */
.table-azma {
    background: white;
    border-radius: 16px;
    overflow: hidden;
}

.table-azma thead th {
    background: var(--light-color);
    border-bottom: 2px solid #e2e8f0;
    padding: 15px;
    font-weight: 600;
}

.table-azma tbody td {
    padding: 12px 15px;
    vertical-align: middle;
}

/* ========== وضعیت‌ها ========== */
.badge-success {
    background: #dcfce7;
    color: #166534;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fed7aa;
    color: #92400e;
}

.badge-info {
    background: #dbeafe;
    color: #1e40af;
}

/* ========== سایدبار ========== */
.azma-sidebar {
    background: white;
    height: 100vh;
    position: fixed;
    right: 0;
    top: 0;
    width: 280px;
    box-shadow: -2px 0 8px rgba(0,0,0,0.05);
    transition: all 0.3s;
    z-index: 1000;
}

.azma-sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

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

.azma-sidebar-menu li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: var(--gray-color);
    text-decoration: none;
    transition: all 0.2s;
    border-radius: 12px;
    margin: 0 12px;
}

.azma-sidebar-menu li a:hover,
.azma-sidebar-menu li.active a {
    background: rgba(16, 185, 129, 0.1);
    color: var(--primary-color);
}

.azma-sidebar-menu li a i {
    width: 20px;
    text-align: center;
}

/* ========== هدر ========== */
.azma-header {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 99;
}

/* ========== ریسپانسیو ========== */
@media (max-width: 768px) {
    .azma-sidebar {
        right: -280px;
    }
    
    .azma-sidebar.open {
        right: 0;
    }
    
    .azma-snackbar {
        min-width: auto;
        width: calc(100% - 40px);
    }
    
    .azma-snackbar-content {
        padding: 12px 16px;
    }
}