/* UKIJ Ekran - Uyghur Font */
@font-face {
    font-family: 'UKIJ Ekran';
    src: url('/UKIJEkran.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

* {
    font-family: 'UKIJ Ekran', 'Segoe UI', Tahoma, sans-serif;
}

body {
    background: #f4f6f9;
    min-height: 100vh;
}

/* RTL adjustments */
.navbar .me-auto {
    margin-left: auto !important;
    margin-right: 0 !important;
}

.dropdown-menu-end {
    left: 0 !important;
    right: auto !important;
}

/* Cards */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 20px;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    font-weight: bold;
}

.stat-card {
    transition: transform 0.2s;
    cursor: pointer;
}

.stat-card:hover {
    transform: translateY(-3px);
}

.stat-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.stat-card .number {
    font-size: 28px;
    font-weight: bold;
}

.stat-card .label {
    color: #6c757d;
    font-size: 14px;
}

/* Tables */
.table th {
    background: #f8f9fa;
    font-weight: 600;
}

.table th, .table td {
    vertical-align: middle;
}

/* Badges */
.badge-pending { background: #ffc107; color: #000; }
.badge-in_progress { background: #0d6efd; color: #fff; }
.badge-completed { background: #198754; color: #fff; }
.badge-delivered { background: #6f42c1; color: #fff; }
.badge-cancelled { background: #dc3545; color: #fff; }

/* Photos grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.photo-grid .photo-item {
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #dee2e6;
    position: relative;
}

.photo-grid .photo-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.photo-grid .photo-item .photo-desc {
    padding: 6px;
    font-size: 12px;
    background: #fff;
    text-align: center;
}

/* Search */
.search-box {
    position: relative;
}

.search-box .fa-search {
    position: absolute;
    left: 12px;
    top: 12px;
    color: #adb5bd;
}

/* Buttons */
.btn {
    border-radius: 8px;
}

/* Modal adjustments for RTL */
.modal-header .btn-close {
    margin: unset !important;
    margin-left: auto !important;
}

/* Print styles */
@media print {
    .navbar, .btn, .no-print { display: none !important; }
    .card { box-shadow: none; border: 1px solid #ddd; }
}

/* Form styling */
.form-control, .form-select {
    border-radius: 8px;
    padding: 10px 14px;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 3px rgba(13,110,253,0.15);
}

/* Order status timeline */
.timeline {
    position: relative;
    padding: 0;
}

.timeline-item {
    padding: 10px 0;
    border-bottom: 1px dashed #dee2e6;
}

.timeline-item:last-child {
    border-bottom: none;
}

/* Loading spinner */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #dee2e6;
    border-top-color: #0d6efd;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Alerts */
.alert {
    border-radius: 10px;
}

/* ========== موبىل ئۈچۈن ماسلاشتۇرۇش (Mobile Responsive) ========== */
@media (max-width: 768px) {
    /* Login page mobile */
    .login-card {
        padding: 24px 20px !important;
        margin: 15px;
        border-radius: 16px !important;
    }
    .login-card .logo {
        font-size: 36px !important;
    }
    .login-card h2 {
        font-size: 20px !important;
    }
    
    /* Tables - horizontal scroll */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .table-responsive table {
        min-width: 600px;
    }
    /* Small tables on mobile */
    .table-responsive-sm table {
        min-width: auto;
    }
    
    /* Cards */
    .card {
        border-radius: 10px;
        margin-bottom: 12px;
    }
    .card-body {
        padding: 12px;
    }
    .card-header {
        padding: 10px 12px !important;
        font-size: 14px;
    }
    
    /* Stat cards for mobile */
    .stat-card .number {
        font-size: 22px !important;
    }
    .stat-card .icon {
        width: 44px !important;
        height: 44px !important;
        font-size: 18px !important;
    }
    
    /* Filter buttons */
    .btn-group .btn, 
    a.btn, button.btn {
        padding: 6px 10px;
        font-size: 13px;
        margin: 1px;
    }
    
    /* Form inputs mobile friendly */
    .form-control, .form-select {
        padding: 8px 12px !important;
        font-size: 15px !important;
        min-height: 40px;
    }
    
    /* Buttons bigger touch target */
    .btn {
        padding: 8px 14px;
        font-size: 14px;
        min-height: 38px;
    }
    .btn-lg {
        padding: 12px 20px;
        font-size: 16px;
        min-height: 44px;
    }
    .btn-sm {
        padding: 5px 10px;
        font-size: 12px;
        min-height: 30px;
    }
    
    /* Navigation mobile tweaks */
    .navbar-brand {
        font-size: 16px;
    }
    .navbar .nav-link {
        padding: 10px 12px !important;
        font-size: 14px;
    }
    
    /* Modal mobile full width */
    .modal-dialog {
        margin: 10px;
    }
    .modal-content {
        border-radius: 14px;
    }
    .modal-header {
        padding: 12px 14px;
    }
    .modal-body {
        padding: 12px 14px;
    }
    .modal-footer {
        padding: 10px 14px;
        flex-direction: column;
        gap: 8px;
    }
    .modal-footer .btn {
        width: 100%;
    }
    .modal-xl .modal-dialog {
        max-width: 100%;
    }
    
    /* Photo grid mobile */
    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 8px;
    }
    .photo-grid .photo-item img {
        height: 100px;
    }
    
    /* Stats in my_orders */
    .col-3 .card .fs-3 {
        font-size: 20px !important;
    }
    
    /* Collapse spacing */
    .container-fluid {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Page titles */
    h4 {
        font-size: 16px !important;
    }
    
    /* Hide less important columns */
    .table td:nth-child(3),
    .table th:nth-child(3) {
        /* Optional hide on very small */
    }
}

/* Small phones (<400px) */
@media (max-width: 400px) {
    .stat-card .number {
        font-size: 18px !important;
    }
    .card-body {
        padding: 10px;
    }
    .btn {
        font-size: 13px;
        padding: 6px 10px;
    }
    h5 {
        font-size: 14px;
    }
    .table td, .table th {
        padding: 6px 8px !important;
        font-size: 13px;
    }
}
