/* ============================================================
   GLOBAL STYLES
   ============================================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

:root {
    --primary: #1e3a5f;
    --primary-dark: #0f2b4a;
    --secondary: #d4af37;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #3b82f6;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --sidebar-width: 260px;
    --radius: 16px;
    --transition: 0.3s ease;
}

body {
    background: var(--gray-100);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ============================================================
   SCROLLBAR
   ============================================================ */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
::-webkit-scrollbar-track {
    background: var(--gray-100);
}
::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0b1120 0%, #1a2639 100%);
    padding: 20px;
}

.login-box {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 32px;
    padding: 40px 36px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.6);
}

.login-icon {
    font-size: 56px;
    color: var(--secondary);
    background: rgba(212, 175, 55, 0.15);
    padding: 16px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 16px;
}

.login-box h2 {
    color: #fff;
    font-size: 28px;
    font-weight: 800;
}

.login-box p {
    color: #9aa8c7;
    font-size: 14px;
    margin-bottom: 24px;
}

.login-box .form-group {
    margin-bottom: 16px;
    text-align: left;
}

.login-box .form-group label {
    display: block;
    color: #b6c4e0;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 5px;
}

.login-box .form-group input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: all 0.2s;
}

.login-box .form-group input:focus {
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
}

.login-box .form-group input::placeholder {
    color: #5e6f8d;
}

.btn-login {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, var(--secondary), #f5d76e);
    border: none;
    border-radius: 14px;
    color: var(--gray-800);
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 4px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(212, 175, 55, 0.35);
}

.btn-login:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.divider {
    display: flex;
    align-items: center;
    gap: 16px;
    color: #5e6f8d;
    font-size: 13px;
    margin: 20px 0;
}

.divider::before,
.divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
}

.btn-google {
    width: 100%;
    padding: 14px;
    background: #4285f4;
    color: #fff;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s;
}

.btn-google:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 133, 244, 0.35);
}

.login-error {
    color: var(--danger);
    font-size: 14px;
    margin-top: 12px;
    padding: 10px 16px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 10px;
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: none;
}

.login-error.show {
    display: block;
}

.login-info {
    margin-top: 20px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    color: #9aa8c7;
    font-size: 13px;
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.login-info i {
    color: var(--secondary);
    margin-right: 8px;
}

.login-info strong {
    color: #fff;
}

.login-footer {
    margin-top: 16px;
    color: #5e6f8d;
    font-size: 12px;
}

.login-footer i {
    color: var(--secondary);
}

/* ============================================================
   ADMIN PANEL
   ============================================================ */
.admin-container {
    display: flex;
    min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    width: var(--sidebar-width);
    background: var(--gray-800);
    color: #fff;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: transform var(--transition);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}
.sidebar::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 10px;
}

.sidebar-header {
    padding: 20px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header .logo-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: var(--secondary);
    flex-shrink: 0;
}

.sidebar-header h2 {
    font-size: 17px;
    font-weight: 700;
}

.sidebar-header p {
    font-size: 10px;
    opacity: 0.6;
    margin-top: -2px;
}

.sidebar-menu {
    flex: 1;
    padding: 8px 0;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    color: var(--gray-400);
    transition: all 0.2s;
    border-left: 3px solid transparent;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    position: relative;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.sidebar-item.active {
    background: rgba(255, 255, 255, 0.08);
    border-left-color: var(--secondary);
    color: #fff;
}

.sidebar-item i {
    width: 18px;
    font-size: 14px;
    flex-shrink: 0;
}

.sidebar-item .badge {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    padding: 1px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    flex-shrink: 0;
    min-width: 18px;
    text-align: center;
}

.sidebar-footer {
    padding: 12px 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.admin-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.admin-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--secondary), #f5d76e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    color: var(--gray-800);
    flex-shrink: 0;
}

.admin-email {
    font-size: 11px;
    opacity: 0.7;
    word-break: break-all;
}

.admin-role {
    font-size: 9px;
    color: var(--secondary);
    font-weight: 600;
}

.logout-btn {
    width: 100%;
    padding: 8px;
    background: rgba(255, 255, 255, 0.06);
    border: none;
    border-radius: 8px;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.logout-btn:hover {
    background: var(--danger);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 16px;
    min-width: 0;
}

.main-header {
    background: #fff;
    border-radius: var(--radius);
    padding: 14px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 10px;
}

.page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.page-title i {
    color: var(--primary);
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--gray-600);
    padding: 4px;
}

.menu-toggle:hover {
    color: var(--primary);
}

.header-time {
    font-size: 12px;
    color: var(--gray-500);
    font-weight: 500;
}

/* ============================================================
   STATS GRID
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary);
    transition: all 0.2s;
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.stat-card .stat-icon {
    font-size: 24px;
    opacity: 0.1;
    float: right;
    margin-top: -6px;
}

.stat-card .stat-title {
    font-size: 11px;
    color: var(--gray-500);
    font-weight: 500;
}

.stat-card .stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--gray-800);
}

.stat-card .stat-sub {
    font-size: 11px;
    color: var(--gray-400);
    margin-top: 3px;
}

/* ============================================================
   TABLE
   ============================================================ */
.table-container {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    overflow: hidden;
}

.table-container h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.table-responsive {
    overflow-x: auto;
    margin: -8px -8px 0 -8px;
    padding: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    min-width: 600px;
}

th,
td {
    padding: 8px 12px;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

th {
    background: var(--gray-50);
    font-weight: 600;
    color: var(--gray-700);
    white-space: nowrap;
}

tr:hover td {
    background: var(--gray-50);
}

/* ============================================================
   STATUS BADGES
   ============================================================ */
.status-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
    display: inline-block;
    cursor: pointer;
    white-space: nowrap;
}

.status-pending {
    background: #fef3c7;
    color: #92400e;
}
.status-confirmed {
    background: #dbeafe;
    color: #1e40af;
}
.status-preparing {
    background: #ede9fe;
    color: #5b21b6;
}
.status-ready {
    background: #d1fae5;
    color: #065f46;
}
.status-pickup {
    background: #ccfbf1;
    color: #115e59;
}
.status-cancelled {
    background: #fee2e2;
    color: #991b1b;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
    padding: 6px 14px;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
}
.btn-success {
    background: var(--success);
    color: #fff;
}
.btn-danger {
    background: var(--danger);
    color: #fff;
}
.btn-warning {
    background: var(--warning);
    color: #fff;
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--gray-300);
    color: var(--gray-700);
}

.btn-sm {
    padding: 4px 10px;
    font-size: 11px;
}

.action-btn {
    padding: 3px 8px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 11px;
    margin: 0 2px;
    transition: all 0.2s;
}

.action-btn:hover {
    transform: scale(1.05);
}
.action-view {
    background: var(--info);
    color: #fff;
}
.action-edit {
    background: var(--warning);
    color: #fff;
}
.action-delete {
    background: var(--danger);
    color: #fff;
}
.action-send {
    background: var(--success);
    color: #fff;
}

/* ============================================================
   FILTER BAR
   ============================================================ */
.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-bar select {
    padding: 6px 12px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 12px;
    outline: none;
    background: #fff;
    min-width: 130px;
}

.filter-bar select:focus {
    border-color: var(--primary);
}

/* ============================================================
   PRODUCTS GRID
   ============================================================ */
.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.product-card {
    background: #fff;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.2s;
}

.product-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.product-card .product-image {
    height: 140px;
    background: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.product-card .product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.product-card .product-image i {
    font-size: 40px;
    color: var(--gray-400);
}

.product-card .product-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--danger);
    color: #fff;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 700;
}

.product-card .product-info {
    padding: 12px 14px;
}

.product-card .product-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--gray-800);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.product-card .product-price {
    font-size: 16px;
    font-weight: 700;
    color: var(--primary);
}

.product-card .product-category {
    font-size: 11px;
    color: var(--gray-500);
    margin-top: 2px;
}

.product-card .product-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
}

.product-card .product-actions button {
    flex: 1;
    padding: 5px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
}

.product-card .product-actions .edit-btn {
    background: var(--warning);
    color: #fff;
}
.product-card .product-actions .delete-btn {
    background: var(--danger);
    color: #fff;
}

/* ============================================================
   SETTINGS
   ============================================================ */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.settings-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 16px 18px;
    box-shadow: var(--shadow);
}

.settings-card h3 {
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 14px;
    color: var(--gray-800);
    display: flex;
    align-items: center;
    gap: 8px;
}

.settings-card h3 i {
    color: var(--primary);
}

.settings-row {
    display: flex;
    gap: 10px;
}

.settings-row .form-group {
    flex: 1;
}

/* ============================================================
   FORM
   ============================================================ */
.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-600);
    margin-bottom: 3px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px 12px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 13px;
    outline: none;
    transition: all 0.2s;
    background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 58, 95, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 50px;
}

.form-group .help-text {
    font-size: 10px;
    color: var(--gray-400);
    margin-top: 3px;
}

.required {
    color: var(--danger);
}

.toggle-group {
    display: flex;
    gap: 16px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.toggle-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-700);
    cursor: pointer;
}

.toggle-label input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: var(--primary);
}

/* ============================================================
   IMAGE UPLOAD
   ============================================================ */
.image-upload-area {
    border: 2px dashed var(--gray-300);
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}

.image-upload-area:hover {
    border-color: var(--primary);
    background: var(--gray-50);
}

.image-upload-area i {
    font-size: 28px;
    color: var(--gray-400);
}

.image-upload-area p {
    color: var(--gray-500);
    font-size: 12px;
    margin-top: 6px;
}

.image-url-input {
    display: flex;
    gap: 8px;
    margin-top: 8px;
}

.image-url-input input {
    flex: 1;
    padding: 8px 12px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 12px;
    outline: none;
}

.image-url-input input:focus {
    border-color: var(--primary);
}

.image-url-input button {
    padding: 8px 14px;
    background: var(--primary);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 12px;
    white-space: nowrap;
}

.image-url-input button:hover {
    opacity: 0.9;
}

.image-preview {
    margin-top: 10px;
}

.image-preview img {
    max-width: 100%;
    max-height: 160px;
    border-radius: 8px;
    border: 2px solid var(--gray-200);
    object-fit: contain;
}

/* ============================================================
   MODALS
   ============================================================ */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 16px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #fff;
    border-radius: 24px;
    padding: 24px;
    width: 100%;
    max-width: 520px;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn 0.3s ease;
}

@keyframes modalIn {
    from {
        transform: scale(0.95) translateY(20px);
        opacity: 0;
    }
    to {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 2px solid var(--gray-200);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 700;
    color: var(--gray-800);
}

.modal-header h2 i {
    color: var(--primary);
    margin-right: 6px;
}

.modal-close {
    font-size: 28px;
    cursor: pointer;
    color: var(--gray-500);
    transition: all 0.2s;
    line-height: 1;
}

.modal-close:hover {
    color: var(--danger);
    transform: rotate(90deg);
}

/* ============================================================
   REASON GRID
   ============================================================ */
.reason-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}

.reason-item {
    padding: 12px;
    border: 2px solid var(--gray-200);
    border-radius: 10px;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
    font-size: 12px;
    font-weight: 500;
}

.reason-item:hover {
    border-color: var(--danger);
    background: #fff5f5;
}

.reason-item.selected {
    border-color: var(--danger);
    background: #fee2e2;
}

.reason-item i {
    display: block;
    font-size: 18px;
    margin-bottom: 3px;
    color: var(--danger);
}

/* ============================================================
   USED STATUS
   ============================================================ */
.used-yes {
    background: #d1fae5;
    color: #065f46;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
}

.used-no {
    background: #fee2e2;
    color: #991b1b;
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 10px;
    font-weight: 600;
}

/* ============================================================
   NOTIFICATION
   ============================================================ */
.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: var(--gray-800);
    color: #fff;
    padding: 12px 20px;
    border-radius: 12px;
    z-index: 3000;
    display: none;
    font-size: 13px;
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    border-left: 4px solid var(--success);
}

.notification.show {
    display: block;
    animation: slideUp 0.4s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 40px;
    color: var(--gray-300);
    margin-bottom: 10px;
}

.empty-state h3 {
    font-size: 16px;
    color: var(--gray-600);
    margin-bottom: 3px;
}

/* ============================================================
   RESPONSIVE - MOBILE FIRST
   ============================================================ */

/* Tablet va kichik desktop */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .products-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    .sidebar.active {
        transform: translateX(0);
    }
    .main-content {
        margin-left: 0;
        padding: 12px;
    }
    .menu-toggle {
        display: block;
    }
    .settings-grid {
        grid-template-columns: 1fr;
    }
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .stats-grid[style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .stats-grid[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* Telefon */
@media (max-width: 768px) {
    .login-box {
        padding: 28px 20px;
    }
    .login-box h2 {
        font-size: 24px;
    }

    .main-header {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 12px 16px;
    }
    .page-title {
        font-size: 16px;
    }
    .header-time {
        text-align: right;
        font-size: 11px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .stats-grid .stat-value {
        font-size: 20px;
    }
    .stat-card {
        padding: 12px 14px;
    }
    .stat-card .stat-icon {
        font-size: 20px;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .settings-row {
        flex-direction: column;
    }

    .reason-grid {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 16px;
        margin: 8px;
        max-width: 100%;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .filter-bar select {
        width: 100%;
    }

    .table-container {
        padding: 12px 14px;
    }
    table {
        font-size: 11px;
        min-width: 500px;
    }
    th,
    td {
        padding: 6px 10px;
    }

    .stats-grid[style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: 1fr 1fr !important;
    }
    .stats-grid[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr 1fr !important;
    }

    .notification {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: none;
        font-size: 12px;
        padding: 10px 16px;
    }
}

/* Kichik telefonlar */
@media (max-width: 480px) {
    .login-box {
        padding: 20px 16px;
        border-radius: 24px;
    }
    .login-box h2 {
        font-size: 20px;
    }
    .login-icon {
        font-size: 40px;
        padding: 12px;
    }
    .btn-login,
    .btn-google {
        font-size: 14px;
        padding: 12px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .stat-card .stat-value {
        font-size: 17px;
    }
    .stat-card .stat-title {
        font-size: 10px;
    }
    .stat-card {
        padding: 10px 12px;
    }

    .sidebar {
        width: 260px;
    }
    .sidebar-item {
        font-size: 12px;
        padding: 8px 14px;
    }

    .main-content {
        padding: 8px;
    }
    .main-header {
        padding: 10px 12px;
    }
    .page-title {
        font-size: 14px;
    }

    .product-card .product-image {
        height: 120px;
    }
    .product-card .product-title {
        font-size: 13px;
    }
    .product-card .product-price {
        font-size: 14px;
    }

    .modal-content {
        padding: 14px;
    }
    .modal-header h2 {
        font-size: 16px;
    }

    .stats-grid[style*="grid-template-columns: repeat(4, 1fr)"] {
        grid-template-columns: 1fr 1fr !important;
    }
    .stats-grid[style*="grid-template-columns: repeat(3, 1fr)"] {
        grid-template-columns: 1fr 1fr !important;
    }
}

/* Landscape telefonlar uchun */
@media (max-height: 600px) and (orientation: landscape) {
    .login-box {
        padding: 16px 20px;
    }
    .login-box h2 {
        font-size: 20px;
    }
    .login-icon {
        font-size: 32px;
        padding: 10px;
        margin-bottom: 8px;
    }
    .login-box p {
        margin-bottom: 12px;
    }
    .login-box .form-group {
        margin-bottom: 10px;
    }
    .login-box .form-group input {
        padding: 8px 12px;
        font-size: 13px;
    }
    .btn-login,
    .btn-google {
        padding: 10px;
        font-size: 13px;
    }
    .divider {
        margin: 12px 0;
    }
}