/* ========================================
   BASE STYLES - Mahalla AI
   Umumiy uslublar, o'zgaruvchilar, asosiy komponentlar
   ======================================== */

:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --accent: #10b981;
    --bg-color: #f8fafc;
    --surface: #ffffff;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --glass: rgba(255, 255, 255, 0.7);
    --border-radius: 20px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    overflow-x: hidden;
    line-height: 1.5;
}

.screen {
    min-height: 100vh;
    width: 100%;
    padding-bottom: 90px;
    transition: opacity 0.4s ease, transform 0.4s ease;
    opacity: 1;
}

.hidden {
    display: none !important;
    opacity: 0;
    transform: translateY(10px);
}

/* ===== LOADING ===== */
#loading {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    z-index: 2000;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.loader-content {
    text-align: center;
}

.logo-animation {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.5rem;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-animation::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary);
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.logo {
    width: 60px;
    z-index: 2;
}

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

/* ===== HEADER ===== */
header {
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--glass);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.2);
}

.user-info h3 {
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.user-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

.back-to-menu {
    border: none;
    background: #f1f5f9;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 1.2rem;
    cursor: pointer;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-menu-dark {
    font-size: 1.5rem;
    background: #f1f5f9;
    border: none;
    color: #1e293b;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

/* ===== COMMON COMPONENTS ===== */
.section-title {
    padding: 24px 20px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.section-title h3 {
    font-size: 1.15rem;
    font-weight: 700;
}

.btn-primary {
    background: #ffffff;
    color: var(--primary-dark);
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    animation: btnPulse 2s infinite;
}

@keyframes btnPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }

    50% {
        transform: scale(1.05);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    }
}

.search-bar {
    display: flex;
    gap: 12px;
}

.search-bar input {
    flex: 1;
    background: #f1f5f9;
    border: none;
    padding: 14px 20px;
    border-radius: 16px;
    font-size: 0.95rem;
    outline: none;
}

.filter-btn {
    background: var(--primary);
    color: white;
    border: none;
    width: 50px;
    border-radius: 16px;
    cursor: pointer;
}

/* ===== MODALS & FORMS ===== */
.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 2000;
    transition: opacity 0.3s ease;
}

.modal {
    background: white;
    width: 100%;
    max-width: 400px;
    border-radius: 28px;
    padding: 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalPop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes modalPop {
    from {
        transform: scale(0.9) translateY(20px);
        opacity: 0;
    }

    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-header h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.modal-header p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1.5px solid #e2e8f0;
    background: #f8fafc;
    font-size: 0.95rem;
    outline: none;
    transition: all 0.2s;
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.modal-footer {
    margin-top: 10px;
}