/* Optional iOS-inspired client theme. Inert unless body has .theme-ios. */
body.theme-ios {
    --ios-bg: #f5f5f7;
    --ios-surface: #ffffff;
    --ios-surface-raised: rgba(255, 255, 255, .88);
    --ios-surface-soft: #fafafa;
    --ios-text: #1d1d1f;
    --ios-muted: #6e6e73;
    --ios-line: rgba(0, 0, 0, .11);
    --ios-line-strong: rgba(0, 0, 0, .16);
    --ios-blue: #0071e3;
    --ios-blue-soft: #eaf3ff;
    --ios-green: #248a3d;
    --ios-red: #ff3b30;
    --ios-orange: #ff9500;
    --ios-radius: 16px;
    --ios-shadow: 0 18px 38px -30px rgba(0, 0, 0, .42);
    color: var(--ios-text) !important;
    background: var(--ios-bg) !important;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", Inter, "PingFang SC", "Microsoft YaHei", sans-serif !important;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body.theme-ios.dark,
body.theme-ios.dark-mode {
    --ios-bg: #000000;
    --ios-surface: #1c1c1e;
    --ios-surface-raised: rgba(28, 28, 30, .9);
    --ios-surface-soft: #2c2c2e;
    --ios-text: #f5f5f7;
    --ios-muted: #a1a1a6;
    --ios-line: rgba(255, 255, 255, .14);
    --ios-line-strong: rgba(255, 255, 255, .22);
    --ios-blue: #0a84ff;
    --ios-blue-soft: rgba(10, 132, 255, .17);
    --ios-green: #30d158;
    --ios-red: #ff453a;
    --ios-orange: #ff9f0a;
    --ios-shadow: 0 20px 44px -30px rgba(0, 0, 0, .92);
}

body.theme-ios .wrapper,
body.theme-ios .content-page,
body.theme-ios .content-wrapper,
body.theme-ios .page-wrapper {
    color: var(--ios-text);
    background: var(--ios-bg) !important;
}

body.theme-ios .iq-top-navbar {
    background: var(--ios-surface-raised) !important;
    border-bottom: 1px solid var(--ios-line) !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
}

body.theme-ios .top-nav-control,
body.theme-ios .top-nav-theme .custom-control-label,
body.theme-ios .site-language-switcher,
body.theme-ios .top-nav-avatar-wrap {
    color: var(--ios-text) !important;
    background: var(--ios-surface) !important;
    border-color: var(--ios-line-strong) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 22px -20px rgba(0, 0, 0, .7) !important;
}

body.theme-ios .top-nav-control:hover,
body.theme-ios .top-nav-theme .custom-control-label:hover {
    color: var(--ios-blue) !important;
    background: var(--ios-blue-soft) !important;
    border-color: rgba(0, 113, 227, .32) !important;
}

body.theme-ios .iq-sidebar {
    background: var(--ios-surface-raised) !important;
    border-right: 1px solid var(--ios-line) !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: saturate(180%) blur(22px);
    backdrop-filter: saturate(180%) blur(22px);
}

body.theme-ios .iq-sidebar-logo {
    border-bottom: 1px solid var(--ios-line);
}

body.theme-ios .iq-sidebar .side-menu > li > a,
body.theme-ios .iq-sidebar .submenu li > a,
body.theme-ios .iq-sidebar .side-menu li > a,
body.theme-ios .iq-sidebar .side-menu li > a i,
body.theme-ios .iq-sidebar .side-menu li > a span,
body.theme-ios .iq-sidebar .side-menu li > a svg,
body.theme-ios .iq-sidebar .wrapper-menu {
    color: var(--ios-text) !important;
    stroke: currentColor !important;
}

body.theme-ios .iq-sidebar .side-menu li > a {
    margin: 2px 10px;
    border-radius: 12px !important;
    transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

body.theme-ios .iq-sidebar .side-menu li > a:hover {
    color: var(--ios-blue) !important;
    background: var(--ios-blue-soft) !important;
    transform: translateX(1px);
}

body.theme-ios .iq-sidebar .side-menu li.active > a,
body.theme-ios .iq-sidebar .side-menu li > a[aria-expanded="true"] {
    color: var(--ios-blue) !important;
    background: var(--ios-blue-soft) !important;
    box-shadow: none !important;
}

body.theme-ios .iq-sidebar .side-menu li.active > a i,
body.theme-ios .iq-sidebar .side-menu li.active > a span,
body.theme-ios .iq-sidebar .side-menu li.active > a svg {
    color: var(--ios-blue) !important;
}

body.theme-ios .iq-sidebar .submenu {
    background: transparent !important;
}

body.theme-ios .iq-sidebar .text-uppercase,
body.theme-ios .iq-sidebar .small,
body.theme-ios .iq-sidebar .menu-title,
body.theme-ios .iq-sidebar .sidebar-category {
    color: var(--ios-muted) !important;
}

body.theme-ios .iq-sidebar span[style*="yellow"] { color: var(--ios-blue) !important; }
body.theme-ios .iq-sidebar span[style*="red"] { color: var(--ios-red) !important; }

body.theme-ios .card,
body.theme-ios .modal-content,
body.theme-ios .dropdown-menu,
body.theme-ios .list-group-item {
    color: var(--ios-text);
    background: var(--ios-surface) !important;
    border-color: var(--ios-line) !important;
}

body.theme-ios .card {
    border: 1px solid var(--ios-line) !important;
    border-radius: var(--ios-radius) !important;
    box-shadow: var(--ios-shadow) !important;
}

body.theme-ios .card-header,
body.theme-ios .card-footer,
body.theme-ios .modal-header,
body.theme-ios .modal-footer {
    color: var(--ios-text);
    background: transparent !important;
    border-color: var(--ios-line) !important;
}

body.theme-ios .modal-content {
    border: 1px solid var(--ios-line) !important;
    border-radius: 22px !important;
    box-shadow: 0 24px 60px -36px rgba(0, 0, 0, .72) !important;
}

body.theme-ios .form-control,
body.theme-ios .custom-select,
body.theme-ios .input-group-text,
body.theme-ios select,
body.theme-ios textarea {
    color: var(--ios-text) !important;
    -webkit-text-fill-color: var(--ios-text);
    background-color: var(--ios-surface) !important;
    border-color: var(--ios-line-strong) !important;
    border-radius: 12px;
    box-shadow: none !important;
}

body.theme-ios .form-control::placeholder,
body.theme-ios textarea::placeholder {
    color: var(--ios-muted) !important;
    -webkit-text-fill-color: var(--ios-muted);
    opacity: 1;
}

body.theme-ios .form-control:focus,
body.theme-ios .custom-select:focus,
body.theme-ios select:focus,
body.theme-ios textarea:focus {
    border-color: var(--ios-blue) !important;
    box-shadow: 0 0 0 3px rgba(0, 113, 227, .13) !important;
}

body.theme-ios .btn {
    border-radius: 12px;
    font-weight: 600;
    box-shadow: none;
}

body.theme-ios .btn-primary,
body.theme-ios .btn-info {
    color: #fff !important;
    background: var(--ios-blue) !important;
    border-color: var(--ios-blue) !important;
}

body.theme-ios .btn-success {
    color: #fff !important;
    background: var(--ios-green) !important;
    border-color: var(--ios-green) !important;
}

body.theme-ios .btn-danger {
    color: #fff !important;
    background: var(--ios-red) !important;
    border-color: var(--ios-red) !important;
}

body.theme-ios .btn-warning {
    color: #fff !important;
    background: var(--ios-orange) !important;
    border-color: var(--ios-orange) !important;
}

body.theme-ios .btn-outline-primary {
    color: var(--ios-blue) !important;
    background: transparent !important;
    border-color: rgba(0, 113, 227, .48) !important;
}

body.theme-ios .btn-outline-secondary,
body.theme-ios .btn-light {
    color: var(--ios-text) !important;
    background: var(--ios-surface) !important;
    border-color: var(--ios-line-strong) !important;
}

body.theme-ios .table { color: var(--ios-text) !important; }
body.theme-ios .table th,
body.theme-ios .table td {
    color: inherit;
    border-color: var(--ios-line) !important;
}

body.theme-ios .table thead th,
body.theme-ios .table .thead-dark th {
    color: var(--ios-text) !important;
    background: var(--ios-bg) !important;
    border-color: var(--ios-line) !important;
}

body.theme-ios .table-striped tbody tr:nth-of-type(odd),
body.theme-ios .table-hover tbody tr:hover {
    color: var(--ios-text) !important;
    background: var(--ios-surface-soft) !important;
}

body.theme-ios .text-dark,
body.theme-ios h1,
body.theme-ios h2,
body.theme-ios h3,
body.theme-ios h4,
body.theme-ios h5,
body.theme-ios h6,
body.theme-ios label,
body.theme-ios strong { color: var(--ios-text); }

body.theme-ios .text-muted,
body.theme-ios .text-secondary,
body.theme-ios small { color: var(--ios-muted) !important; }
body.theme-ios a { color: var(--ios-blue); }

/* Keep the home category switcher consistent with the optional theme. */
body.theme-ios .shop-account-category-tabs .nav-link {
    color: var(--ios-text) !important;
    background: var(--ios-surface) !important;
    border: 1px solid var(--ios-line) !important;
    border-radius: 12px !important;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .025) !important;
}

body.theme-ios .shop-account-category-tabs .nav-link:hover {
    color: var(--ios-blue) !important;
    background: var(--ios-blue-soft) !important;
    border-color: rgba(0, 113, 227, .28) !important;
}

body.theme-ios .shop-account-category-tabs .nav-link.active,
body.theme-ios .shop-account-category-tabs .show > .nav-link {
    color: var(--ios-blue) !important;
    background: var(--ios-blue-soft) !important;
    border-color: rgba(0, 113, 227, .34) !important;
}

body.theme-ios .alert {
    border: 1px solid var(--ios-line) !important;
    border-radius: 14px !important;
    box-shadow: none !important;
}

body.theme-ios .pagination .page-link {
    color: var(--ios-blue);
    background: var(--ios-surface);
    border-color: var(--ios-line);
}

body.theme-ios .pagination .page-item.active .page-link {
    color: #fff;
    background: var(--ios-blue);
    border-color: var(--ios-blue);
}

body.theme-ios .iq-footer {
    color: var(--ios-muted);
    background: var(--ios-surface-raised) !important;
    border-top: 1px solid var(--ios-line);
    box-shadow: none !important;
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    backdrop-filter: saturate(180%) blur(18px);
}

body.theme-ios .badge-primary { color: #fff; background: var(--ios-blue); }
body.theme-ios .badge-success { color: #fff; background: var(--ios-green); }
body.theme-ios .blink-new { background: var(--ios-red); border-radius: 999px; animation: none; }

@media (max-width: 991.98px) {
    body.theme-ios .iq-sidebar {
        box-shadow: 22px 0 50px -34px rgba(0, 0, 0, .55) !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.theme-ios *,
    body.theme-ios *::before,
    body.theme-ios *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
