* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    touch-action: pan-y pinch-zoom !important;  /* Faqat vertikal skrollga ruxsat */
    -webkit-text-size-adjust: 100% !important;
    -moz-text-size-adjust: 100% !important;
    -ms-text-size-adjust: 100% !important;
    text-size-adjust: 100% !important;
    overflow-x: hidden;
    position: relative;
}

/* Input va button lar uchun maxsus */
input, 
button, 
select, 
textarea,
[contenteditable="true"] {
    font-size: 16px !important;  /* Safari avtomatik zoom qilmasligi uchun */
    touch-action: manipulation !important;
    -webkit-touch-callout: none !important;
    -webkit-user-select: none !important;
    user-select: none !important;
}

/* Focus holatida ham zoom bo'lmasligi uchun */
input:focus, 
button:focus, 
select:focus, 
textarea:focus {
    font-size: 16px !important;
    touch-action: manipulation !important;
}

:root {
    --primary: #263D67;
    --primary-light: #3a5490;
    --primary-dark: #1a2b47;
    --primary-soft: rgba(38, 61, 103, 0.1);
    --secondary: #ff6b6b;
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.1);
    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.1);
    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.1);
    --info: #3b82f6;
    --info-light: rgba(59, 130, 246, 0.1);
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #94a3b8;
    --white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.05);
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-lg: 0 20px 40px rgba(0,0,0,0.15);
    --border-radius: 24px;
    --border-radius-sm: 16px;
    --border-radius-lg: 32px;
}

body {
    background: linear-gradient(135deg, #f1f5f9 0%, #eef2f6 100%);
    min-height: 100vh;
}

/* Admin Container */
.admin-container {
    display: flex;
    min-height: 100vh;
    position: relative;
}

/* Sidebar */
.admin-sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 30px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    border-radius: 0 32px 32px 0;
    box-shadow: var(--shadow-lg);
    z-index: 100;
}

.sidebar-header {
    padding: 0 24px 30px 24px;
    border-bottom: 2px solid rgba(255,255,255,0.1);
    margin-bottom: 20px;
}

.sidebar-header h2 {
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 1px;
    background: linear-gradient(135deg, #fff 0%, rgba(255,255,255,0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

.sidebar-header p {
    font-size: 14px;
    opacity: 0.7;
    font-weight: 300;
}

.admin-menu {
    list-style: none;
    padding: 0 16px;
}

.admin-menu li {
    padding: 16px 24px;
    margin: 4px 0;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.admin-menu li i {
    width: 24px;
    font-size: 20px;
    opacity: 0.8;
}

.admin-menu li .badge {
    margin-left: auto;
    background: rgba(255,255,255,0.2);
    color: white;
    padding: 2px 8px;
    border-radius: 40px;
    font-size: 12px;
    font-weight: 600;
}

.admin-menu li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: var(--white);
    border-radius: 0 4px 4px 0;
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.admin-menu li:hover::before {
    transform: scaleY(1);
}

.admin-menu li:hover {
    background: rgba(255,255,255,0.15);
    transform: translateX(5px);
}

.admin-menu li.active {
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow);
}

.admin-menu li.active::before {
    transform: scaleY(1);
}

/* Main Content */
.admin-content {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
    min-height: 100vh;
}

/* Top Bar */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(10px);
    padding: 16px 24px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
}

.page-title h1 {
    font-size: 28px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.page-title p {
    color: var(--gray);
    font-size: 14px;
    font-weight: 400;
}

.admin-profile {
    display: flex;
    align-items: center;
    gap: 20px;
}

.notification-badge {
    position: relative;
    cursor: pointer;
}

.notification-badge i {
    font-size: 24px;
    color: var(--gray);
}

.badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--secondary);
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
}

.profile-info {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    background: var(--white);
    border-radius: 40px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.profile-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-text h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
}

.profile-text p {
    font-size: 12px;
    color: var(--gray);
}

/* Tabs */
.admin-tab {
    display: none;
    animation: fadeIn 0.3s ease;
}

.admin-tab.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Dashboard Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--white);
    padding: 24px;
    border-radius: 24px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(38,61,103,0.05) 0%, rgba(38,61,103,0) 100%);
    z-index: 0;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.stat-info {
    position: relative;
    z-index: 1;
}

.stat-info h3 {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-info p {
    font-size: 32px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1.2;
    margin-bottom: 4px;
}

.stat-info small {
    font-size: 12px;
    color: var(--gray);
}

.stat-info small span {
    color: var(--success);
    font-weight: 600;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.stat-icon i {
    font-size: 30px;
    color: white;
}

.profit-card {
    background: linear-gradient(135deg, var(--white) 0%, #f8fafc 100%);
}

/* Table Styles */
.table-container {
    background: var(--white);
    border-radius: 24px;
    padding: 24px;
    box-shadow: var(--shadow);
    margin-top: 24px;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 15px;
}

.table-header h2 {
    font-size: 20px;
    font-weight: 600;
    color: var(--dark);
}

.filter-group select {
    padding: 10px 20px;
    border: 2px solid #eef2f6;
    border-radius: 40px;
    font-size: 14px;
    color: var(--dark);
    background: var(--white);
    cursor: pointer;
    outline: none;
}

.filter-group select:focus {
    border-color: var(--primary);
}

.btn-add {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: var(--white);
    border: none;
    padding: 12px 28px;
    border-radius: 40px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.btn-add:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.btn-add i {
    font-size: 16px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
}

.admin-table th {
    text-align: left;
    padding: 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 2px solid #eef2f6;
}

.admin-table td {
    padding: 16px;
    font-size: 14px;
    color: var(--dark);
    border-bottom: 1px solid #eef2f6;
}

.admin-table tr:last-child td {
    border-bottom: none;
}

.admin-table tr:hover td {
    background: #f8fafc;
}

.loading-row {
    text-align: center;
    padding: 40px !important;
    color: var(--gray);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #eef2f6;
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.product-image {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    object-fit: cover;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 8px;
}

.btn-edit, .btn-delete, .btn-view {
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-edit {
    background: var(--warning-light);
    color: var(--warning);
}

.btn-edit:hover {
    background: var(--warning);
    color: white;
}

.btn-delete {
    background: var(--danger-light);
    color: var(--danger);
}

.btn-delete:hover {
    background: var(--danger);
    color: white;
}

.btn-view {
    background: var(--info-light);
    color: var(--info);
}

.btn-view:hover {
    background: var(--info);
    color: white;
}

/* Status Badges */
.status-badge {
    padding: 6px 14px;
    border-radius: 40px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-yangi {
    background: var(--warning-light);
    color: var(--warning);
}

.status-qabul {
    background: var(--success-light);
    color: var(--success);
}

.status-bekor {
    background: var(--danger-light);
    color: var(--danger);
}

/* Profit Analysis */
.profit-analysis {
    background: var(--white);
    border-radius: 24px;
    padding: 30px;
    box-shadow: var(--shadow);
}

.profit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.profit-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--dark);
}

.date-filter select {
    padding: 12px 24px;
    border: 2px solid #eef2f6;
    border-radius: 40px;
    font-size: 14px;
    color: var(--dark);
    background: var(--white);
    cursor: pointer;
    outline: none;
}

.profit-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.profit-stat-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8fafc;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.profit-stat-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.profit-stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 16px;
    background: var(--primary-soft);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.profit-stat-info h3 {
    font-size: 13px;
    font-weight: 500;
    color: var(--gray);
    margin-bottom: 5px;
}

.profit-stat-info p {
    font-size: 20px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.profit-stat-info small {
    font-size: 12px;
    color: var(--success);
}

.chart-container {
    margin: 40px 0;
    padding: 20px;
    background: #f8fafc;
    border-radius: 20px;
}

.chart-container h3 {
    margin-bottom: 20px;
    color: var(--dark);
}

.chart {
    height: 300px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.chart-bar {
    flex: 1;
    background: linear-gradient(180deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 10px 10px 0 0;
    min-height: 4px;
    transition: height 0.3s ease;
    position: relative;
}

.chart-bar:hover {
    opacity: 0.9;
}

.chart-bar::after {
    content: attr(data-value);
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    font-weight: 600;
    color: var(--dark);
}

.top-products {
    margin-top: 40px;
}

.top-products h3 {
    margin-bottom: 20px;
    color: var(--dark);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal.active {
    display: flex;
    animation: modalFade 0.3s ease;
}

@keyframes modalFade {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: var(--white);
    padding: 32px;
    border-radius: 32px;
    width: 90%;
    max-width: 500px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalSlide 0.3s ease;
}

@keyframes modalSlide {
    from { transform: translateY(-30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.modal-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
}

.close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 24px;
    color: var(--gray);
}

.close:hover {
    background: var(--danger);
    color: white;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #eef2f6;
    border-radius: 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #f8fafc;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    background: white;
    box-shadow: 0 0 0 4px rgba(38,61,103,0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.btn-save {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: white;
    border: none;
    border-radius: 40px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
}

.btn-save:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* Recent Orders */
.recent-orders {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 30px;
}

.order-card {
    background: var(--white);
    border-radius: 24px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.order-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.order-id {
    font-weight: 700;
    color: var(--primary);
    font-size: 16px;
}

.order-items {
    margin: 15px 0;
    padding: 15px 0;
    border-top: 1px solid #eef2f6;
    border-bottom: 1px solid #eef2f6;
}

.order-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 14px;
}

.order-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    font-weight: 700;
    color: var(--primary);
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    padding: 16px 24px;
    border-radius: 40px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 2000;
    animation: notificationSlide 0.3s ease;
    border-left: 4px solid var(--success);
}

.notification i {
    font-size: 24px;
    color: var(--success);
}

@keyframes notificationSlide {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 1024px) {
    .admin-sidebar {
        width: 240px;
    }
    .admin-content {
        margin-left: 240px;
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .admin-sidebar.active {
        transform: translateX(0);
    }
    .admin-content {
        margin-left: 0;
    }
    .stats-grid {
        grid-template-columns: 1fr;
    }
    .profit-cards {
        grid-template-columns: 1fr;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #eef2f6;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}


.badge{
    display: none;
}

@media (min-width:300px) and (max-width:730px) {
    
}

/* Password Tab Styles */
.password-container {
    max-width: 500px;
    margin: 40px auto;
    background: white;
    border-radius: 24px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(38, 61, 103, 0.1);
}

.password-header {
    text-align: center;
    margin-bottom: 30px;
}

.password-header i {
    font-size: 50px;
    color: #263D67;
    background: #f0f3fa;
    padding: 20px;
    border-radius: 60px;
    margin-bottom: 15px;
}

.password-header h2 {
    color: #263D67;
    margin: 0 0 5px;
}

.password-header p {
    color: #6b7280;
    margin: 0;
    font-size: 14px;
}

.password-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.password-input-group {
    position: relative;
}

.password-input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.password-input-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    font-size: 15px;
    transition: all 0.3s;
    background: white;
}

.password-input-group input:focus {
    outline: none;
    border-color: #263D67;
    box-shadow: 0 0 0 3px rgba(38, 61, 103, 0.1);
}

.password-toggle {
    position: absolute;
    right: 16px;
    bottom: 14px;
    cursor: pointer;
    color: #9ca3af;
    transition: color 0.3s;
}

.password-toggle:hover {
    color: #263D67;
}

.password-strength {
    height: 6px;
    background: #e5e7eb;
    border-radius: 10px;
    margin-top: 5px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.3s;
    border-radius: 10px;
}

.password-strength-text {
    font-size: 12px;
    margin-top: 5px;
    color: #6b7280;
}

.password-requirements {
    background: #f9fafb;
    border-radius: 14px;
    padding: 15px;
    margin-top: 10px;
}

.password-requirements h4 {
    margin: 0 0 10px;
    font-size: 14px;
    color: #374151;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 0;
    font-size: 13px;
    color: #6b7280;
}

.requirement-item i {
    font-size: 14px;
    width: 18px;
}

.requirement-item.valid {
    color: #10b981;
}

.requirement-item.invalid {
    color: #6b7280;
}

.password-actions {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.password-actions button {
    flex: 1;
    padding: 14px;
    border: none;
    border-radius: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background: #263D67;
    color: white;
    border: none;
    border-radius: 14px;
}

.btn-primary:hover {
    background: #1f3355;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(38, 61, 103, 0.3);
}

.btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.btn-secondary:hover {
    background: #e5e7eb;
}

/* Mobile Password Icon */
.mobile-password-icon {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: #263D67;
    color: white;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    box-shadow: 2px 2px 15px 0px #263D67;
    cursor: pointer;
    z-index: 999;
    transition: all 0.3s;
}

.mobile-password-icon:hover {
    transform: scale(1.1);
}

.mobile-password-icon i {
    font-size: 20px;
}

/* Password Sidebar (Mobile) */
.password-sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 300px;
    height: 100%;
    background: white;
    z-index: 1000;
    transition: left 0.3s ease;
    box-shadow: 2px 0 20px rgba(0,0,0,0.1);
    padding: 20px;
    overflow-y: auto;
}

.password-sidebar.active {
    left: 0;
}

.password-sidebar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f3fa;
}

.password-sidebar-header h3 {
    margin: 0;
    color: #263D67;
}

.close-sidebar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f3fa;
    border: none;
    color: #263D67;
    cursor: pointer;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
}

.close-sidebar:hover {
    background: #263D67;
    color: white;
}

.password-sidebar-content {
    padding: 10px 0;
}

.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

.overlay.active {
    display: block;
}

@media (max-width: 768px) {
    .mobile-password-icon {
        display: flex;
    }
}

/* ========== RO'YXATDAN O'TISH STYLES ========== */
.auth-container {
    max-width: 400px;
    margin: 50px auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(38, 61, 103, 0.15);
}

.auth-tabs {
    display: flex;
    margin-bottom: 30px;
    border-bottom: 2px solid #eef2f6;
}

.auth-tab {
    flex: 1;
    padding: 15px;
    background: none;
    border: none;
    font-size: 16px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    position: relative;
}

.auth-tab.active {
    color: #263D67;
}

.auth-tab.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #263D67;
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #263D67;
    box-shadow: 0 0 0 3px rgba(38, 61, 103, 0.1);
}

.form-group input.error {
    border-color: #ef4444;
}

.error-text {
    color: #ef4444;
    font-size: 12px;
    margin-top: 5px;
    display: none;
}

.error-text.show {
    display: block;
}

.btn-block {
    width: 100%;
    padding: 14px;
    background: #263D67;
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn-block:hover {
    background: #1f3355;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(38, 61, 103, 0.3);
}

.btn-block:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.auth-divider {
    text-align: center;
    margin: 20px 0;
    position: relative;
}

.auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #e5e7eb;
}

.auth-divider::after {
    content: '';
    position: absolute;
    right: 0;
    top: 50%;
    width: 45%;
    height: 1px;
    background: #e5e7eb;
}

.auth-divider span {
    background: white;
    padding: 0 15px;
    color: #6b7280;
    font-size: 14px;
}

.auth-footer {
    text-align: center;
    margin-top: 20px;
    color: #6b7280;
    font-size: 14px;
}

.auth-footer a {
    color: #263D67;
    text-decoration: none;
    font-weight: 600;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Password strength */
.password-strength {
    height: 5px;
    background: #e5e7eb;
    border-radius: 5px;
    margin-top: 8px;
    overflow: hidden;
}

.password-strength-bar {
    height: 100%;
    width: 0;
    transition: all 0.3s;
    border-radius: 5px;
}

.password-strength-text {
    font-size: 12px;
    margin-top: 5px;
    color: #6b7280;
}

/* Toast notification */
.toast {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    animation: slideInRight 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.toast.success {
    background: #10b981;
    border-left: 5px solid #0e9f6e;
}

.toast.error {
    background: #ef4444;
    border-left: 5px solid #dc2626;
}

.toast.warning {
    background: #f59e0b;
    border-left: 5px solid #d97706;
}

.toast.info {
    background: #3b82f6;
    border-left: 5px solid #2563eb;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 768px) {
    .auth-container {
        margin: 20px;
        padding: 20px;
    }
}

/* ========== KIRISH TUGMASI (ong tarafda) ========== */
.auth-btn {
    display: none;
    background: #10b981;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 15px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.auth-btn:hover {
    background: #0e9f6e;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(16, 185, 129, 0.3);
}

.auth-btn i {
    font-size: 16px;
}

/* ========== CHIQISH TUGMASI (ong tarafda) ========== */
.logout-btn {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 15px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: #dc2626;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(239, 68, 68, 0.3);
}

.logout-btn i {
    font-size: 16px;
}

/* ========== ADMIN PROFILE (ong tarafdagi qism) ========== */
.admin-profile {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* ========== LOGIN PAGE DIZAYNI (oldingi) ========== */
.login-container {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #263D67, #1a2b4a);
    padding: 20px;
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 50px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    animation: slideUp 0.5s ease;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 50px;
    color: #263D67;
    background: #f0f4ff;
    padding: 15px;
    border-radius: 50%;
    margin-bottom: 15px;
}

.login-header h1 {
    color: #263D67;
    font-size: 28px;
    margin-bottom: 5px;
}

.login-header p {
    color: #666;
    font-size: 14px;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.input-group input {
    width: 100%;
    padding: 15px 45px 15px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s;
}

.input-group input:focus {
    outline: none;
    border-color: #263D67;
    box-shadow: 0 0 0 3px rgba(38,61,103,0.1);
}

.input-group i {
    position: absolute;
    right: 15px;
    top: 47px;
    color: #999;
    cursor: pointer;
    font-size: 18px;
    transition: color 0.3s;
}

.input-group i:hover {
    color: #263D67;
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: #263D67;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.3s;
}

.login-btn:hover {
    background: #1a2b4a;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(38,61,103,0.3);
}

.error-message {
    background: #fee2e2;
    border-left: 5px solid #ef4444;
    color: #991b1b;
    padding: 12px 15px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    display: none;
}

.error-message.show {
    display: flex;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* ========== SPINNER ========== */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== NOTIFICATION BADGE ========== */
.notification-badge {
    position: relative;
    cursor: pointer;
}

.notification-badge i {
    font-size: 20px;
    color: #6b7280;
    transition: color 0.3s;
}

.notification-badge:hover i {
    color: #263D67;
}

.notification-badge .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ef4444;
    color: white;
    font-size: 10px;
    padding: 2px 5px;
    border-radius: 10px;
    min-width: 18px;
    text-align: center;
}

/* ========== PROFILE INFO ========== */
.profile-info {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 5px 10px;
    border-radius: 40px;
    transition: background 0.3s;
}

.profile-info:hover {
    background: #f0f3fa;
}

.profile-info img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.profile-text {
    text-align: right;
}

.profile-text h4 {
    font-size: 14px;
    color: #263D67;
    font-weight: 700;
}

.profile-text p {
    font-size: 12px;
    color: #6b7280;
}

/* ========== TOP BAR ========== */
.top-bar {
    background: white;
    padding: 15px 25px;
    border-radius: 15px;
    margin-bottom: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.page-title h1 {
    font-size: 24px;
    color: #263D67;
    font-weight: 700;
    margin-bottom: 5px;
}

.page-title p {
    color: #6b7280;
    font-size: 14px;
}

/* ========== MEDIA SCREEN (TELEFON UCHUN) ========== */

/* 1200px dan kichik - planshet */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .admin-sidebar {
        width: 250px;
    }
    
    .admin-content {
        margin-left: 250px;
    }
}

/* 992px dan kichik - kichik planshet */
@media (max-width: 992px) {
    .admin-sidebar {
        width: 220px;
    }
    
    .admin-content {
        margin-left: 220px;
        padding: 20px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-info p {
        font-size: 24px;
    }
}

/* 768px dan kichik - TELEFON */
@media (max-width: 768px) {
    /* Sidebar yashirin */
    .admin-sidebar {
        transform: translateX(-100%);
        position: fixed;
        z-index: 1000;
        width: 280px;
        height: 100vh;
        transition: transform 0.3s ease;
        box-shadow: 2px 0 20px rgba(0,0,0,0.2);
        background: white;
        top: 0;
        left: 0;
        overflow-y: auto;
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    /* Content to'liq en */
    .admin-content {
        margin-left: 0;
        padding: 15px;
        width: 100%;
    }
    
    /* Mobile menu toggle */
    .mobile-menu-toggle {
        display: flex;
        position: fixed;
        top: 15px;
        left: 15px;
        z-index: 1001;
        width: 45px;
        height: 45px;
        background: #263D67;
        color: white;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        box-shadow: 0 5px 15px rgba(38,61,103,0.3);
        align-items: center;
        justify-content: center;
        font-size: 20px;
    }
    
    /* Top bar vertikal */
    .top-bar {
        flex-direction: column;
        gap: 15px;
        padding: 15px;
        text-align: center;
        margin-top: 60px;
    }
    
    .page-title h1 {
        font-size: 20px;
    }
    
    .page-title p {
        font-size: 13px;
    }
    
    /* Admin profile tugmalar */
    .admin-profile {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        width: 100%;
    }
    
    /* Profile info */
    .profile-info {
        padding: 3px 8px;
        width: auto;
    }
    
    .profile-text h4 {
        font-size: 13px;
    }
    
    .profile-text p {
        font-size: 11px;
    }
    
    .profile-info img {
        width: 35px;
        height: 35px;
    }
    
    /* Kirish va Chiqish tugmalari */
    .auth-btn, .logout-btn {
        padding: 8px 12px;
        font-size: 13px;
        margin-left: 0;
    }
    
    .auth-btn i, .logout-btn i {
        font-size: 14px;
    }
    
    /* Notification badge */
    .notification-badge {
        position: relative;
    }
    
    .notification-badge i {
        font-size: 18px;
    }
    
    /* Stats grid bir kolonka */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    /* Stat card */
    .stat-card {
        padding: 15px;
    }
    
    .stat-info p {
        font-size: 22px;
    }
    
    .stat-info h3 {
        font-size: 14px;
    }
    
    .stat-info small {
        font-size: 11px;
    }
    
    .stat-icon {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }
    
    /* Table container */
    .table-container {
        padding: 15px;
        overflow-x: auto;
        border-radius: 12px;
    }
    
    .table-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .table-header h2 {
        font-size: 18px;
    }
    
    .filter-group {
        width: 100%;
    }
    
    .filter-group select {
        width: 100%;
        padding: 10px;
    }
    
    .btn-add {
        width: 100%;
        justify-content: center;
        padding: 12px;
    }
    
    /* Admin table scroll */
    .admin-table {
        min-width: 800px;
    }
    
    .admin-table th {
        padding: 12px 10px;
        font-size: 13px;
    }
    
    .admin-table td {
        padding: 10px;
        font-size: 13px;
    }
    
    /* Login card */
    .login-card {
        padding: 30px 20px;
        margin: 15px;
    }
    
    .login-header i {
        font-size: 40px;
        padding: 12px;
    }
    
    .login-header h1 {
        font-size: 24px;
    }
    
    .login-header p {
        font-size: 13px;
    }
    
    .input-group label {
        font-size: 13px;
    }
    
    .input-group input {
        padding: 12px 40px 12px 12px;
        font-size: 14px;
    }
    
    .input-group i {
        top: 43px;
        font-size: 16px;
    }
    
    .login-btn {
        padding: 12px;
        font-size: 14px;
    }
    
    .error-message {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    /* Password tab */
    .password-container {
        padding: 20px;
        margin: 10px;
    }
    
    .password-header i {
        font-size: 40px;
        padding: 15px;
    }
    
    .password-header h2 {
        font-size: 20px;
    }
    
    .password-header p {
        font-size: 13px;
    }
    
    .password-input-group input {
        padding: 12px 40px 12px 12px;
        font-size: 14px;
    }
    
    .password-requirements {
        padding: 15px;
    }
    
    .requirement-item {
        font-size: 12px;
        padding: 5px 0;
    }
    
    .password-actions {
        flex-direction: column;
        gap: 10px;
    }
    
    .password-actions button {
        width: 100%;
        padding: 12px;
    }
    
    /* Modal */
    .modal-content {
        padding: 20px;
        width: 95%;
        max-width: none;
        margin: 10px;
    }
    
    .modal-header h3 {
        font-size: 18px;
    }
    
    .modal-header .close {
        font-size: 24px;
    }
    
    .form-group label {
        font-size: 13px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .btn-save, .btn-block {
        padding: 12px;
        font-size: 14px;
    }
    
    /* Password sidebar mobil */
    .password-sidebar {
        width: 280px;
        padding: 20px;
    }
    
    .password-sidebar-header h3 {
        font-size: 16px;
    }
    
    .close-sidebar {
        width: 35px;
        height: 35px;
        font-size: 20px;
    }
    
    /* Auth tabs */
    .auth-tabs {
        margin-bottom: 20px;
    }
    
    .auth-tab {
        padding: 12px;
        font-size: 14px;
    }
    
    /* Auth footer */
    .auth-footer {
        font-size: 13px;
        margin-top: 15px;
    }
    
    /* Profit cards */
    .profit-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .profit-stat-card {
        padding: 15px;
    }
    
    .profit-stat-info h3 {
        font-size: 14px;
    }
    
    .profit-stat-info p {
        font-size: 18px;
    }
    
    /* Chart container */
    .chart-container {
        padding: 15px;
        margin-top: 20px;
    }
    
    .chart-container h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .chart {
        height: 200px;
    }
    
    /* Top products */
    .top-products {
        margin-top: 20px;
    }
    
    .top-products h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    /* Recent orders */
    .recent-orders {
        margin-top: 20px;
    }
    
    .order-card {
        padding: 12px;
    }
    
    .order-header .order-id {
        font-size: 13px;
    }
    
    .order-header .status-badge {
        font-size: 11px;
        padding: 3px 8px;
    }
    
    .order-items {
        font-size: 12px;
    }
    
    .order-total {
        font-size: 14px;
    }
    
    /* Toast notification */
    .toast {
        left: 15px;
        right: 15px;
        width: auto;
        font-size: 13px;
        padding: 12px 15px;
        top: 15px;
    }
    
    /* Overlay */
    .overlay.active {
        backdrop-filter: blur(2px);
    }
}

/* 576px dan kichik - kichik telefon */
@media (max-width: 576px) {
    .admin-profile {
        flex-direction: column;
        width: 100%;
    }
    
    .profile-info {
        width: 100%;
        justify-content: center;
        order: -1;
    }
    
    .auth-btn, .logout-btn {
        width: 100%;
        justify-content: center;
        margin: 5px 0;
    }
    
    .notification-badge {
        position: absolute;
        top: 10px;
        right: 10px;
    }
    
    .top-bar {
        position: relative;
        padding-top: 45px;
    }
    
    .stats-grid {
        gap: 10px;
    }
    
    .stat-card {
        padding: 12px;
    }
    
    .stat-info p {
        font-size: 20px;
    }
    
    .stat-icon {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    .login-card {
        padding: 25px 15px;
    }
    
    .login-header i {
        font-size: 35px;
        padding: 10px;
    }
    
    .login-header h1 {
        font-size: 22px;
    }
    
    .password-header i {
        font-size: 35px;
        padding: 12px;
    }
    
    .password-header h2 {
        font-size: 18px;
    }
}

/* 400px dan kichik - eng kichik telefon */
@media (max-width: 400px) {
    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
        font-size: 18px;
        top: 10px;
        left: 10px;
    }
    
    .top-bar {
        padding: 35px 10px 10px;
    }
    
    .profile-info {
        padding: 3px 5px;
    }
    
    .profile-text h4 {
        font-size: 12px;
    }
    
    .profile-text p {
        font-size: 10px;
    }
    
    .profile-info img {
        width: 30px;
        height: 30px;
    }
    
    .auth-btn, .logout-btn {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .auth-btn i, .logout-btn i {
        font-size: 12px;
    }
    
    .login-header i {
        font-size: 30px;
        padding: 8px;
    }
    
    .login-header h1 {
        font-size: 20px;
    }
    
    .input-group input {
        padding: 10px 35px 10px 10px;
        font-size: 13px;
    }
    
    .login-btn {
        padding: 10px;
        font-size: 13px;
    }
    
    .modal-content {
        padding: 15px;
    }
    
    .modal-header h3 {
        font-size: 16px;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .btn-save, .btn-block {
        padding: 10px;
        font-size: 13px;
    }
}

/* ========== ANIMATIONLAR ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========== LANDSCAPE ORIENTATION ========== */
@media (max-width: 900px) and (orientation: landscape) {
    .admin-sidebar {
        width: 200px;
    }
    
    .admin-content {
        margin-left: 200px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .login-card {
        padding: 20px;
    }
    
    .modal-content {
        max-height: 80vh;
        overflow-y: auto;
    }
}

@media (max-width: 768px) and (orientation: landscape) {
    .admin-sidebar {
        width: 240px;
    }
    
    .top-bar {
        margin-top: 0;
        padding: 10px;
    }
    
    .mobile-menu-toggle {
        top: 10px;
        left: 10px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========== SIDEBAR TOGGLE ========== */

/* Sidebar toggle tugmasi */
.sidebar-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
    background: #263D67;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 1001;
    box-shadow: 0 5px 15px rgba(38,61,103,0.3);
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: #1a2b4a;
    transform: scale(1.1);
}

/* Sidebar close tugmasi */
.sidebar-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: #f0f3fa;
    color: #263D67;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 1002;
    transition: all 0.3s ease;
}

.sidebar-close:hover {
    background: #263D67;
    color: white;
}

/* Sidebar styles */
.admin-sidebar {
    transition: transform 0.3s ease;
    z-index: 1000;
}

/* KOMPYUTER (768px dan katta) */
@media (min-width: 769px) {
    .admin-sidebar {
        transform: translateX(0) !important;
        width: 280px;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
    }
    
    .admin-content {
        margin-left: 280px;
    }
    
    .sidebar-toggle {
        display: none !important;
    }
    
    .sidebar-close {
        display: none !important;
    }
}

/* TELEFON (768px dan kichik) */
@media (max-width: 768px) {
    .sidebar-toggle {
        display: flex;
    }
    
    .sidebar-close {
        display: flex;
    }
    
    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 100%;
        max-width: 320px;
        transform: translateX(-100%);
        box-shadow: 2px 0 20px rgba(0,0,0,0.2);
        background: white;
        z-index: 1000;
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-content {
        margin-left: 0;
        width: 100%;
    }
    
    /* Overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }
}

/* Animation */
@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(-100%);
    }
}

/* ========== SIDEBAR TOGGLE ========== */

/* Sidebar toggle tugmasi */
.sidebar-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 45px;
    height: 45px;
    background: #263D67;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    z-index: 1001;
    box-shadow: 0 5px 15px rgba(38,61,103,0.3);
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: #1a2b4a;
    transform: scale(1.1);
}

/* Sidebar close tugmasi */
.sidebar-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 35px;
    height: 35px;
    background: #f0f3fa;
    color: #263D67;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    z-index: 1002;
    transition: all 0.3s ease;
}

.sidebar-close:hover {
    background: #263D67;
    color: white;
}

/* KOMPYUTER (768px dan katta) */
@media (min-width: 769px) {
    .admin-sidebar {
        transform: translateX(0) !important;
        width: 280px;
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .admin-content {
        margin-left: 280px;
    }
    
    .sidebar-toggle {
        display: none !important;
    }
    
    .sidebar-close {
        display: none !important;
    }
}

/* TELEFON (768px dan kichik) */
@media (max-width: 768px) {
    .sidebar-toggle {
        display: flex;
    }
    
    .sidebar-close {
        display: flex;
    }
    
    .admin-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        bottom: 0;
        width: 85%;
        max-width: 320px;
        transform: translateX(-100%);
        box-shadow: 2px 0 20px rgba(0,0,0,0.2);
        background: white;
        z-index: 1000;
        transition: transform 0.3s ease;
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-content {
        margin-left: 0;
        width: 100%;
    }
    
    /* Overlay */
    .sidebar-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .sidebar-overlay.active {
        display: block;
        opacity: 1;
    }
}
* { margin: 0; padding: 0; box-sizing: border-box; font-family: Arial; }
.login-container { display: flex; justify-content: center; align-items: center; height: 100vh; background: #263D67; }
.login-card { background: white; padding: 40px; border-radius: 10px; width: 350px; }
.admin-container { display: none; min-height: 100vh; background: #f5f5f5; }
.admin-sidebar { width: 250px; background: #263D67; color: white; position: fixed; height: 100%; padding: 20px; }
.admin-content { margin-left: 250px; padding: 20px; }
.admin-menu { list-style: none; }
.admin-menu li { padding: 15px; cursor: pointer; border-radius: 5px; margin: 5px 0; }
.admin-menu li.active { background: #1a2b4a; }
.top-bar { background: white; padding: 20px; border-radius: 10px; margin-bottom: 20px; display: flex; justify-content: space-between; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 20px; }
.stat-card { background: white; padding: 20px; border-radius: 10px; display: flex; justify-content: space-between; }
.admin-tab { display: none; }
.admin-tab.active { display: block; }
.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); }
.modal.active { display: flex; justify-content: center; align-items: center; }
.modal-content { background: white; padding: 30px; border-radius: 10px; width: 400px; }
.close { float: right; cursor: pointer; font-size: 24px; }
.btn-add { background: #10b981; color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; margin-bottom: 20px; }
.table-container { background: white; padding: 20px; border-radius: 10px; }
.admin-table { width: 100%; border-collapse: collapse; }
.admin-table th, .admin-table td { padding: 10px; text-align: left; border-bottom: 1px solid #ddd; }
.sidebar-toggle, .sidebar-close, .sidebar-overlay { display: none; }
@media (max-width: 768px) {
    .sidebar-toggle { display: block; position: fixed; top: 20px; left: 20px; z-index: 1001; background: #263D67; color: white; border: none; width: 45px; height: 45px; border-radius: 50%; cursor: pointer; }
    .admin-sidebar { transform: translateX(-100%); transition: 0.3s; z-index: 1000; }
    .admin-sidebar.active { transform: translateX(0); }
    .sidebar-close { display: block; position: absolute; top: 20px; right: 20px; background: none; color: white; border: none; font-size: 24px; cursor: pointer; }
    .sidebar-overlay.active { display: block; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 999; }
    .admin-content { margin-left: 0; }
    .stats-grid { grid-template-columns: 1fr; }
}


/* 1-qism (taxminan 2760-qator) */
.sidebar-toggle { display: none; }
.sidebar-close { display: none; }
.sidebar-overlay { display: none; }

@media (max-width: 768px) {
    .sidebar-toggle { display: block; }
    .sidebar-close { display: block; }
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.active { transform: translateX(0); }
    .sidebar-overlay.active { display: block; }
}

/* 2-qism (taxminan 2860-qator) - BU ORTIQCHA!
.sidebar-toggle { display: none; }
.sidebar-close { display: none; }
.sidebar-overlay { display: none; }

@media (max-width: 768px) {
    .sidebar-toggle { display: block; }
    .sidebar-close { display: block; }
    .admin-sidebar { transform: translateX(-100%); }
    .admin-sidebar.active { transform: translateX(0); }
    .sidebar-overlay.active { display: block; }
}
*/

/* ========== IPAD VERSIYA (768px - 1024px) ========== */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    
    /* Login container */
    #loginContainer {
        padding: 20px;
    }
    
    .login-card {
        width: 450px;
        padding: 30px;
    }
    
    /* Admin container */
    #adminContainer {
        flex-direction: row;
    }
    
    /* Sidebar */
    .sidebar {
        width: 220px;
        transform: none;
        position: relative;
        z-index: 10;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    }
    
    .sidebar.active {
        transform: none;
    }
    
    /* Sidebar toggle yashirish (ipad da doim ko'rinadi) */
    #sidebarToggle {
        display: none !important;
    }
    
    /* Close button yashirish */
    .sidebar-close {
        display: none !important;
    }
    
    /* Overlay yashirish */
    #sidebarOverlay {
        display: none !important;
    }
    
    /* Main content */
    .main-content {
        width: calc(100% - 220px);
        padding: 20px;
    }
    
    /* Dashboard cards */
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .dashboard-card {
        padding: 20px;
    }
    
    .dashboard-card-icon {
        width: 50px;
        height: 50px;
        font-size: 24px;
    }
    
    .dashboard-card-value {
        font-size: 24px;
    }
    
    /* Tables */
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    table {
        min-width: 700px;
    }
    
    th, td {
        padding: 12px 10px;
        font-size: 14px;
    }
    
    /* Categories tab */
    #categories .action-bar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    #categories .search-box {
        width: 300px;
    }
    
    /* Products tab */
    #products .action-bar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    #products .search-box {
        width: 300px;
    }
    
    /* Orders tab */
    #orders .action-bar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    #orders .filter-select {
        width: 200px;
    }
    
    /* Profit analysis */
    #profit .action-bar {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    
    #profit .period-select {
        width: 200px;
    }
    
    /* Modals */
    .modal-content {
        width: 600px;
        max-width: 90%;
    }
    
    .modal-header {
        padding: 15px 20px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        padding: 15px 20px;
    }
    
    /* Forms */
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .form-group {
        margin-bottom: 15px;
    }
    
    .form-group label {
        font-size: 14px;
        margin-bottom: 5px;
    }
    
    .form-control, 
    .form-select {
        padding: 10px 12px;
        font-size: 14px;
    }
    
    /* Password tab */
    .password-container {
        max-width: 600px;
        margin: 20px auto;
        padding: 25px;
    }
    
    .password-header h2 {
        font-size: 24px;
    }
    
    .password-input-group {
        margin-bottom: 20px;
    }
    
    /* Charts (agar mavjud bo'lsa) */
    .chart-container {
        height: 300px;
    }
    
    /* Buttons */
    .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .btn-primary, 
    .btn-secondary,
    .btn-danger {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    /* Mobile password icon yashirish */
    
    /* Password sidebar yashirish */
    .password-sidebar {
        display: none !important;
    }
    
    /* Auth modal */
    #authModal .modal-content {
        width: 500px;
    }
    
    .auth-tabs {
        padding: 0 20px;
    }
    
    .auth-tab {
        padding: 12px 20px;
        font-size: 16px;
    }
    
    .auth-form {
        padding: 25px;
    }
    
    /* Stats grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stat-item {
        padding: 15px;
    }
    
    .stat-value {
        font-size: 22px;
    }
    
    .stat-label {
        font-size: 13px;
    }
    
    /* Product image in table */
    td img {
        width: 35px;
        height: 35px;
    }
    
    /* Order items list */
    .order-items-list {
        max-width: 200px;
        font-size: 13px;
    }
    
    /* Badges */
    .badge {
        padding: 4px 8px;
        font-size: 11px;
    }
    
    /* Menu items */
    .admin-menu li {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .admin-menu li i {
        width: 20px;
        font-size: 16px;
        margin-right: 10px;
    }
    
    /* Dropdowns */
    .dropdown-menu {
        min-width: 180px;
    }
    
    .dropdown-item {
        padding: 10px 15px;
        font-size: 14px;
    }
    
    /* Toast notifications */
    .toast {
        top: 15px;
        right: 15px;
        padding: 12px 20px;
        font-size: 14px;
        max-width: 300px;
    }
    
    /* Loading spinner */
    .spinner {
        width: 14px;
        height: 14px;
        border-width: 2px;
    }
    
    /* Input groups with icons */
    .input-group {
        position: relative;
    }
    
    .input-group i {
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        font-size: 16px;
    }
    
    /* Responsive text */
    h1 {
        font-size: 28px;
    }
    
    h2 {
        font-size: 24px;
    }
    
    h3 {
        font-size: 20px;
    }
    
    h4 {
        font-size: 18px;
    }
    
    /* Container padding */
    .container {
        padding: 0 20px;
    }
    
    /* Grid gaps */
    .grid {
        gap: 15px;
    }
}

/* ========== IPAD PRO (1024px) VA KATTA IPAD ========== */
@media screen and (min-width: 1024px) and (max-width: 1366px) {
    
    .sidebar {
        width: 250px;
    }
    
    .main-content {
        width: calc(100% - 250px);
        padding: 25px;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .modal-content {
        width: 700px;
    }
    
    table {
        min-width: 800px;
    }
    
    th, td {
        padding: 15px;
        font-size: 15px;
    }
    
    #products .search-box {
        width: 350px;
    }
    
    #orders .filter-select {
        width: 250px;
    }
}

/* ========== IPAD LANDSCAPE ORIENTATSIYA ========== */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        padding: 15px;
    }
    
    .dashboard-card {
        padding: 15px;
    }
    
    .dashboard-card-icon {
        width: 45px;
        height: 45px;
        font-size: 22px;
    }
    
    .dashboard-card-value {
        font-size: 22px;
    }
    
    table {
        min-width: 650px;
    }
    
    th, td {
        padding: 10px 8px;
        font-size: 13px;
    }
    
    .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
    
    /* Scrollbar stillari */
    ::-webkit-scrollbar {
        width: 6px;
        height: 6px;
    }
    
    ::-webkit-scrollbar-track {
        background: #f1f1f1;
    }
    
    ::-webkit-scrollbar-thumb {
        background: #263D67;
        border-radius: 3px;
    }
}

/* ========== IPAD PORTRAIT ORIENTATSIYA ========== */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: portrait) {
    
    .sidebar {
        width: 240px;
    }
    
    .main-content {
        padding: 20px;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .action-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    #products .action-bar,
    #orders .action-bar,
    #profit .action-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    #products .search-box,
    #orders .filter-select,
    #profit .period-select {
        width: 100%;
    }
    
    .btn-add {
        width: 100%;
        justify-content: center;
    }
}

/* ========== UMUMIY IPAD STILLARI ========== */
@media screen and (min-width: 768px) and (max-width: 1024px) {
    
    /* Touch uchun optimallashtirish */
    button, 
    .btn, 
    .admin-menu li,
    select,
    .modal-close {
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }
    
    button:active,
    .btn:active,
    .admin-menu li:active {
        opacity: 0.7;
        transform: scale(0.98);
    }
    
    /* Scrollbar yashirish (lekin funksiya saqlanadi) */
    ::-webkit-scrollbar {
        width: 0;
        background: transparent;
    }
    
    /* Smooth scrolling */
    .table-container {
        scroll-behavior: smooth;
    }
    
    /* Better touch targets */
    input, 
    select, 
    textarea, 
    button {
        font-size: 16px !important; /* Zoom oldini olish */
    }
    
    /* Focus styles */
    input:focus, 
    select:focus, 
    textarea:focus, 
    button:focus {
        outline: none;
        box-shadow: 0 0 0 2px rgba(38, 61, 103, 0.3);
    }
    
    /* Disable text selection */
    .no-select {
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* Improve readability */
    p, li, td, th, label {
        line-height: 1.5;
    }
    
    /* Card hover effects (ipad da hover yo'q) */
    .dashboard-card:hover {
        transform: none;
        box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    }
}