/* =====================================================
   GSM KOYA — Midnight Blue Dark Theme
   theme.css
   ===================================================== */

/* ══════════════════════════════════════════════════════
   BASE
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] body {
    background: #0a0f1e;
    color: #e2e8f0;
}

/* ══════════════════════════════════════════════════════
   HEADER / NAV
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] header,
[data-theme="dark"] .header {
    background: rgba(10,15,30,0.97) !important;
    border-color: #1e3a5f !important;
}
[data-theme="dark"] #adminBottomNav,
[data-theme="dark"] .bottom-nav,
[data-theme="dark"] nav.main-bottom-nav {
    background: rgba(10,15,30,0.97) !important;
    border-color: #1e3a5f !important;
}
[data-theme="dark"] .admin-nav-item,
[data-theme="dark"] .bottom-nav-item,
[data-theme="dark"] .main-bottom-item {
    color: #60a5fa !important;
}
[data-theme="dark"] .admin-nav-item.active,
[data-theme="dark"] .bottom-nav-item.active,
[data-theme="dark"] .main-bottom-item.active {
    color: #ffffff !important;
}

/* ══════════════════════════════════════════════════════
   MODALS — هەموو جۆرەکانی modal
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] .modal-content,
[data-theme="dark"] .modal-box {
    background: #1e293b !important;
    border-color: #1e3a5f !important;
    color: #e2e8f0 !important;
}
[data-theme="dark"] .modal-header {
    background: #0f172a !important;
    border-color: #1e3a5f !important;
    color: #e2e8f0 !important;
}
[data-theme="dark"] .modal-body {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

/* profileModal — bottom sheet */
[data-theme="dark"] #profileModal > div,
[data-theme="dark"] #shopApplyModal .modal-content,
[data-theme="dark"] #changePasswordModal .modal-content,
[data-theme="dark"] #editProfileModal .modal-content {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

/* هەموو div ی مۆدڵی ئینلاین */
[data-theme="dark"] .modal > div[style*="background:#fff"],
[data-theme="dark"] .modal > div[style*="background: #fff"],
[data-theme="dark"] .modal > div[style*="background:white"],
[data-theme="dark"] .modal > div[style*="background: white"] {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}

/* ══════════════════════════════════════════════════════
   CARDS
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] .card {
    background: #111827 !important;
    border-color: #1e3a5f !important;
    color: #e2e8f0 !important;
}
[data-theme="dark"] .card-header {
    background: #0f1629 !important;
    border-color: #1e3a5f !important;
    color: #94a3b8 !important;
}
[data-theme="dark"] .card-body {
    background: #111827 !important;
    color: #e2e8f0 !important;
}

/* stat cards */
[data-theme="dark"] .stat-card {
    background: #111827 !important;
    border-color: #1e3a5f !important;
    color: #e2e8f0 !important;
}
[data-theme="dark"] .stat-number,
[data-theme="dark"] .stat-num {
    color: #60a5fa !important;
}
[data-theme="dark"] .stat-label,
[data-theme="dark"] .stat-lbl {
    color: #64748b !important;
}

/* ══════════════════════════════════════════════════════
   TABLES
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] .table-header {
    background: #0f1629 !important;
    border-color: #1e3a5f !important;
    color: #e2e8f0 !important;
}
[data-theme="dark"] .table-container,
[data-theme="dark"] table {
    background: #111827 !important;
}
[data-theme="dark"] thead tr,
[data-theme="dark"] th {
    background: #0f1629 !important;
    color: #64748b !important;
    border-color: #1e3a5f !important;
}
[data-theme="dark"] td {
    color: #e2e8f0 !important;
    border-color: #1a2744 !important;
}
[data-theme="dark"] tbody tr:hover td {
    background: rgba(59,130,246,0.07) !important;
}
[data-theme="dark"] .customers-container {
    background: #111827 !important;
    border-color: #1e3a5f !important;
}

/* ══════════════════════════════════════════════════════
   FORMS
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: #0f1629 !important;
    color: #e2e8f0 !important;
    border-color: #1e3a5f !important;
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: #334155 !important;
}
[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
    border-color: #3b82f6 !important;
    background: #111827 !important;
    box-shadow: 0 0 0 3px rgba(59,130,246,0.15) !important;
}
[data-theme="dark"] label {
    color: #94a3b8 !important;
}
[data-theme="dark"] .form-group {
    color: #e2e8f0 !important;
}

/* ══════════════════════════════════════════════════════
   BUTTONS
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] .btn-secondary {
    background: #1e293b !important;
    color: #94a3b8 !important;
    border-color: #1e3a5f !important;
}
[data-theme="dark"] .btn-secondary:hover {
    background: #1e3a5f !important;
    color: #e2e8f0 !important;
}
[data-theme="dark"] .logout-btn {
    background: #111827 !important;
    border-color: #1e3a5f !important;
    color: #94a3b8 !important;
}
[data-theme="dark"] .header-btn,
[data-theme="dark"] .theme-toggle-btn,
[data-theme="dark"] .user-info {
    background: rgba(17,24,39,0.9) !important;
    border-color: #1e3a5f !important;
    color: #94a3b8 !important;
}
[data-theme="dark"] .back-btn {
    background: rgba(17,24,39,0.9) !important;
    border-color: #1e3a5f !important;
    color: #94a3b8 !important;
}

/* ══════════════════════════════════════════════════════
   PROFILE SECTION
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] .profile-section,
[data-theme="dark"] .sidebar,
[data-theme="dark"] .user-card {
    background: #111827 !important;
    border-color: #1e3a5f !important;
}

/* ══════════════════════════════════════════════════════
   SEARCH / FILTER
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] .search-bar,
[data-theme="dark"] .filter-bar,
[data-theme="dark"] .filters,
[data-theme="dark"] .filters-section {
    background: #0f1629 !important;
    border-color: #1e3a5f !important;
}

/* ══════════════════════════════════════════════════════
   ORDER ITEMS / PRODUCT CARDS
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] .order-item,
[data-theme="dark"] .order-card,
[data-theme="dark"] .cart-item,
[data-theme="dark"] .product-card,
[data-theme="dark"] .bestseller-item {
    background: #111827 !important;
    border-color: #1e3a5f !important;
    color: #e2e8f0 !important;
}
[data-theme="dark"] .product-name,
[data-theme="dark"] .item-name,
[data-theme="dark"] .bestseller-name {
    color: #e2e8f0 !important;
}
[data-theme="dark"] .product-price,
[data-theme="dark"] .item-price {
    color: #60a5fa !important;
}

/* ══════════════════════════════════════════════════════
   PAYMENT CARDS
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] .payment-card {
    background: #111827 !important;
    border-color: #1e3a5f !important;
    color: #e2e8f0 !important;
}
[data-theme="dark"] .payment-card.selected {
    background: rgba(59,130,246,0.12) !important;
    border-color: #3b82f6 !important;
}
[data-theme="dark"] .payment-card-name {
    color: #94a3b8 !important;
}

/* ══════════════════════════════════════════════════════
   INFO ITEMS
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] .info-card {
    background: #111827 !important;
    border-color: #1e3a5f !important;
}
[data-theme="dark"] .info-item {
    border-color: #1e3a5f !important;
    color: #e2e8f0 !important;
}
[data-theme="dark"] .info-label,
[data-theme="dark"] .detail-label {
    color: #64748b !important;
}
[data-theme="dark"] .info-value,
[data-theme="dark"] .detail-value {
    color: #e2e8f0 !important;
}
[data-theme="dark"] .detail-section {
    background: #111827 !important;
    border-color: #1e3a5f !important;
}

/* ══════════════════════════════════════════════════════
   TEXT
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5 {
    color: #e2e8f0;
}
[data-theme="dark"] p {
    color: #94a3b8;
}
[data-theme="dark"] .page-title {
    color: #e2e8f0 !important;
}
[data-theme="dark"] .page-description,
[data-theme="dark"] .page-subtitle {
    color: #64748b !important;
}
[data-theme="dark"] .breadcrumb {
    color: #64748b !important;
}

/* ══════════════════════════════════════════════════════
   QUICK ACTIONS
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] .quick-action {
    background: #111827 !important;
    border-color: #1e3a5f !important;
    color: #94a3b8 !important;
}
[data-theme="dark"] .quick-action:hover {
    background: #1e3a5f !important;
    color: #60a5fa !important;
}

/* ══════════════════════════════════════════════════════
   FILE UPLOAD
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] .file-upload-area {
    background: #0f1629 !important;
    border-color: #1e3a5f !important;
    color: #64748b !important;
}

/* ══════════════════════════════════════════════════════
   BANKING DETAILS — هەمیشە light دەمێنێتەوە
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] .banking-details-section,
[data-theme="dark"] .banking-details-modal {
    background: rgba(16,185,129,0.06) !important;
    border-color: rgba(16,185,129,0.2) !important;
}
[data-theme="dark"] .banking-detail-item {
    background: rgba(255,255,255,0.05) !important;
    border-color: rgba(16,185,129,0.2) !important;
}
[data-theme="dark"] .banking-detail-value {
    color: #ffffff !important;
    background: rgba(255,255,255,0.08) !important;
    font-weight: 800 !important;
}
[data-theme="dark"] .banking-detail-label {
    color: #94a3b8 !important;
}

/* ══════════════════════════════════════════════════════
   DASHBOARD SPECIFIC
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] .main-content,
[data-theme="dark"] main {
    background: #0a0f1e !important;
}

/* ══════════════════════════════════════════════════════
   RECENT ORDERS POPUP (index.php)
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] #recentOrdersPopup {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}
[data-theme="dark"] #recentOrdersPopup * {
    border-color: #1e3a5f !important;
}

/* ══════════════════════════════════════════════════════
   DROPDOWN
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .dropdown {
    background: #1e293b !important;
    border-color: #1e3a5f !important;
}

/* ══════════════════════════════════════════════════════
   JS-CREATED MODALS (inline style override)
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] [id$="Modal"] {
    color: #e2e8f0 !important;
}
[data-theme="dark"] #profileModal > div,
[data-theme="dark"] #profileModalInner {
    background: #1e293b !important;
    color: #e2e8f0 !important;
}
[data-theme="dark"] #profileModalInner h3,
[data-theme="dark"] #profileModalInner h4,
[data-theme="dark"] #profileModalInner p,
[data-theme="dark"] #profileModalInner span:not(.status-badge):not(.badge):not(.btn) {
    color: #e2e8f0 !important;
}

/* ══════════════════════════════════════════════════════
   SPLASHSCREEN — هەمیشە light
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] #splashScreen {
    background: #0f172a !important;
}

/* ══════════════════════════════════════════════════════
   مۆبایل سیستەم دارک مۆد — بلۆک بکەین
   ══════════════════════════════════════════════════════ */
@media (prefers-color-scheme: dark) {
    /* ئەگەر کاربەر خۆی dark هەڵنەبژاردووە، system دارک ئەگنۆر بکە */
    :root:not([data-theme="dark"]) {
        color-scheme: light;
    }
}

/* ══════════════════════════════════════════════════════
   SCROLLBAR
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] ::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}
[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #0a0f1e;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #1e3a5f;
    border-radius: 3px;
}
[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: #3b82f6;
}

/* ══════════════════════════════════════════════════════
   CUSTOMER LOGIN PAGE
   ══════════════════════════════════════════════════════ */
[data-theme="dark"] .auth-container {
    background: rgba(17,24,39,0.97) !important;
    border-color: #1e3a5f !important;
    box-shadow: 0 25px 60px rgba(0,0,0,0.4) !important;
}
[data-theme="dark"] .auth-title {
    color: #e2e8f0 !important;
}
[data-theme="dark"] .auth-subtitle {
    color: #64748b !important;
}
[data-theme="dark"] .mode-toggle {
    background: rgba(30,58,95,0.4) !important;
}
[data-theme="dark"] .mode-btn {
    color: #64748b !important;
}
[data-theme="dark"] .mode-btn.active {
    color: #ffffff !important;
}
[data-theme="dark"] .form-group label {
    color: #94a3b8 !important;
}
[data-theme="dark"] .form-group input {
    background: #0f1629 !important;
    color: #e2e8f0 !important;
    border-color: #1e3a5f !important;
}
[data-theme="dark"] .form-group input:focus {
    background: #111827 !important;
    border-color: #3b82f6 !important;
    box-shadow: 0 0 20px rgba(59,130,246,0.2) !important;
}
[data-theme="dark"] .form-group input::placeholder {
    color: #334155 !important;
}
[data-theme="dark"] .google-btn {
    background: #111827 !important;
    color: #e2e8f0 !important;
    border-color: #1e3a5f !important;
}
[data-theme="dark"] .google-btn:hover {
    border-color: #3b82f6 !important;
    background: #1e293b !important;
}
[data-theme="dark"] .or-divider {
    color: #475569 !important;
}
[data-theme="dark"] .or-divider::before,
[data-theme="dark"] .or-divider::after {
    background: #1e3a5f !important;
}
[data-theme="dark"] .remember-label,
[data-theme="dark"] .features-list,
[data-theme="dark"] .feature-item {
    color: #94a3b8 !important;
}
[data-theme="dark"] .security-note,
[data-theme="dark"] .features-section {
    color: #64748b !important;
}
[data-theme="dark"] .back-link {
    color: #60a5fa !important;
}

/* modal-box لە login */
[data-theme="dark"] .modal-box {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border: 1px solid #1e3a5f !important;
}
[data-theme="dark"] .modal-box h2,
[data-theme="dark"] .modal-box h3,
[data-theme="dark"] .modal-box p,
[data-theme="dark"] .modal-box label {
    color: #e2e8f0 !important;
}
