/* داشبورد و فرم سفارش */
.kando-alert {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}
.kando-alert.success { background: #d1fae5; color: #065f46; }
.kando-alert.error { background: #fee2e2; color: #991b1b; }

.kando-order-form .form-group { margin-bottom: 16px; }
.kando-order-form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
}
.kando-order-form .form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: 8px;
    background: var(--gray-50);
    transition: all 0.2s;
}
.kando-order-form .form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.admin-sidebar {
    background: #1a1a2e !important;
}

/* ادمین استایل‌های پیشخوان */
.kando-admin-wrap .kando-stats-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin: 20px 0;
}
.kando-stat-box {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px 28px;
    min-width: 140px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.kando-stat-num {
    display: block;
    font-size: 1.8rem;
    font-weight: 700;
    color: #4f46e5;
}
.kando-stat-label {
    font-size: 0.85rem;
    color: #64748b;
}


/* ========== ریسپانسیو و موبایل ========== */
.actions-cell { white-space: nowrap; min-width: 130px; }
.actions-cell .btn { display: inline-block; padding: 6px 12px; font-size: 0.8rem; margin: 2px; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.mobile-menu-fab {
    display: none;
    position: fixed;
    bottom: 22px;
    left: 18px;
    z-index: 10040;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #6366f1, #4f46e5);
    color: #fff;
    border: none;
    box-shadow: 0 8px 24px rgba(79,70,229,0.45);
    font-size: 1.4rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.55);
    z-index: 10020;
    -webkit-tap-highlight-color: transparent;
}
.mobile-menu-overlay.active { display: block !important; }

.kando-mobile-topbar {
    display: none;
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    padding: 10px 14px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.kando-mobile-topbar .kando-topbar-title {
    font-weight: 700;
    font-size: 1rem;
    color: #0f172a;
}

@media (max-width: 992px) {
    .kando-mobile-topbar { display: flex !important; }
    .mobile-menu-fab { display: flex !important; }
    .dashboard-header .sidebar-toggle-btn { display: none !important; }
    .kando-mobile-topbar .sidebar-toggle-btn { display: inline-flex !important; }

    .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
    .stat-card { padding: 14px !important; }
    .stat-card h3 { font-size: 1.2rem !important; }
    .dashboard-header h1 { font-size: 1.25rem !important; }
    .dashboard-content > div[style*="grid-template-columns"] { grid-template-columns: 1fr !important; }
    table { font-size: 0.85rem; }
}

@media (min-width: 993px) {
    .mobile-menu-fab,
    .mobile-menu-overlay,
    .kando-mobile-topbar,
    .dashboard-header .sidebar-toggle-btn {
        display: none !important;
    }
    .dashboard-sidebar {
        position: sticky !important;
        transform: none !important;
        right: auto !important;
        top: 0 !important;
        height: 100vh !important;
        width: 260px !important;
        box-shadow: none !important;
    }
}

@media (max-width: 576px) {
    .stats-grid { grid-template-columns: 1fr 1fr !important; }
    .form-control { font-size: 16px !important; }
}

/* وقتی منو باز است — اسکرول صفحه قفل؛ اسکرول داخل سایدبار آزاد */
html.kando-menu-open,
html.kando-menu-open body {
    overflow: hidden !important;
    height: 100%;
}
html.kando-menu-open .dashboard-sidebar.open {
    overflow-y: auto !important;
}
