/*
 * ============================================
 *  ZARA-INSPIRED MINIMAL ADMIN THEME OVERRIDE
 * ============================================
 *  Layered on top of existing style.css + custom.css.
 *  Uses only: Bootstrap 5 (already included), Google Fonts Inter, vanilla CSS.
 *  No proprietary libraries. Fully responsive.
 */

/* ========================================
   0. CSS VARIABLES (override custom.css)
   ======================================== */
:root {
    --clr-primary: #111111;
    --clr-secondary: #555555;
    --clr-white: #ffffff;
    --clr-black: #111111;
    --clr-dark: #111111;
    --clr-light: #666666;
    --clr-light-sm: #e5e5e5;
    --clr-border: #e5e5e5;
    --clr-bg: #fafafa;
    --clr-sidebar-bg: #ffffff;
    --clr-hover: #f5f5f5;
    --clr-accent: #111111;
    --clr-muted: #999999;
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ========================================
   1. GLOBAL RESETS
   ======================================== */
body {
    font-family: var(--font-primary) !important;
    background: var(--clr-bg) !important;
    color: #333333;
    font-size: 14px;
    line-height: 1.6;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-primary) !important;
    color: var(--clr-black);
    font-weight: 500;
    letter-spacing: -0.01em;
}

p {
    color: #555555;
    font-size: 14px;
    line-height: 1.7;
}

a, button, .btn, ol li a, ul li a {
    transition: all 0.2s ease;
}

/* ========================================
   2. SIDEBAR — White, minimal, outline
   ======================================== */
.side-bar {
    background: var(--clr-sidebar-bg) !important;
    box-shadow: none !important;
    border-right: 1px solid var(--clr-border);
    font-weight: 400 !important;
}

/* Scrollbar — subtle */
.side-bar::-webkit-scrollbar {
    width: 3px;
}

.side-bar::-webkit-scrollbar-thumb {
    background: #d5d5d5;
    border-radius: 10px;
}

.side-bar::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

.side-bar::-webkit-scrollbar-track {
    background: transparent;
}

/* Logo area */
.side-bar-logo {
    padding: 20px 16px;
    border-bottom: 1px solid var(--clr-border);
    background-color: transparent !important;
}

/* Close button (mobile) */
.close-btn {
    color: var(--clr-black) !important;
}

/* Menu items */
.side-bar-manu li a {
    color: #444444 !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    padding: 9px 16px;
    border-radius: 6px;
    letter-spacing: 0.01em;
    transition: all 0.15s ease;
}

.side-bar-manu li a:hover {
    color: var(--clr-black) !important;
}

/* SVG icons — dark instead of white */
.side-bar-manu .sidebar-icon svg {
    fill: #666666 !important;
    width: 18px;
    height: 18px;
    transition: fill 0.15s ease;
}

.side-bar-manu .sidebar-icon svg path {
    fill: #666666 !important;
}

.side-bar-manu .sidebar-icon svg circle,
.side-bar-manu .sidebar-icon svg line,
.side-bar-manu .sidebar-icon svg polyline,
.side-bar-manu .sidebar-icon svg polygon,
.side-bar-manu .sidebar-icon svg rect {
    stroke: #666666 !important;
}

/* Override inline stroke="white" on path elements (subscription, affiliate icons) */
.side-bar-manu .sidebar-icon svg path[stroke] {
    stroke: #666666 !important;
}

/* Messages icon uses filled SVG without explicit fill attr */
.side-bar-manu .sidebar-icon svg path:not([fill="none"]) {
    fill: #666666 !important;
}

/* Hover state */
.side-bar-manu li:hover > a,
.side-bar-manu li.active > a {
    background-color: var(--clr-hover) !important;
    color: var(--clr-black) !important;
}

.side-bar-manu li:hover > a .sidebar-icon svg,
.side-bar-manu li.active > a .sidebar-icon svg {
    fill: var(--clr-black) !important;
}

.side-bar-manu li:hover > a .sidebar-icon svg path,
.side-bar-manu li.active > a .sidebar-icon svg path {
    fill: var(--clr-black) !important;
}

/* Active state — thin left accent */
.side-bar-manu li.active > a {
    position: relative;
    font-weight: 500 !important;
}

.side-bar-manu li.active > a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    bottom: 6px;
    width: 3px;
    background: var(--clr-accent);
    border-radius: 0 2px 2px 0;
}

/* Dropdown arrow */
.side-bar-manu .dropdown::before {
    color: #bbbbbb !important;
    font-size: 14px;
}

/* Sub-menu items */
.side-bar-manu li .dropdown-menu li a {
    color: #666666 !important;
    font-size: 12.5px !important;
    padding: 6px 14px;
}

.side-bar-manu li .dropdown-menu li a:hover,
.side-bar-manu li .dropdown-menu li a.active {
    color: var(--clr-black) !important;
    background-color: transparent !important;
    font-weight: 500 !important;
}

/* Sub-menu active background override */
.side-bar-manu .dropdown.active > .dropdown-menu .dropdown.active > a,
.side-bar-manu .dropdown.active > .dropdown-menu .dropdown.active .active {
    background: var(--clr-hover) !important;
    color: var(--clr-black) !important;
}

.side-bar-manu .dropdown.active .active {
    background-color: var(--clr-hover) !important;
    color: var(--clr-black) !important;
}

/* Sub-menu nested hover */
.side-bar-manu li .dropdown-menu li li:hover > a,
.side-bar-manu li .dropdown-menu li li.active > a {
    background-color: var(--clr-hover) !important;
    color: var(--clr-black) !important;
}

/* Version text */
.version-text {
    color: var(--clr-muted) !important;
    font-size: 11px;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

/* Sidebar addon badge */
.side-bar-addon {
    background-color: var(--clr-black) !important;
    color: white !important;
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.05em;
    border-radius: 3px;
    padding: 2px 6px !important;
}

/* ========================================
   3. HEADER — Flat, white, thin border
   ======================================== */
.main-header-section {
    background: var(--clr-white) !important;
    box-shadow: none !important;
    border-bottom: 1px solid var(--clr-border);
    padding: 12px 24px;
}

.main-header-section .profile-info img {
    height: 36px;
    width: 36px;
    min-width: 36px;
    border-radius: 50%;
    border: 1px solid var(--clr-border);
    object-fit: cover;
}

.main-header-section .profile-info .dropdown-menu {
    border: 1px solid var(--clr-border) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
    border-radius: 8px !important;
    padding: 4px 0 !important;
    min-width: 180px;
}

.main-header-section .profile-info .dropdown-menu li {
    border-bottom: 1px solid #f0f0f0 !important;
    padding: 0;
}

.main-header-section .profile-info .dropdown-menu li:last-child {
    border-bottom: none !important;
}

.main-header-section .profile-info .dropdown-menu li a {
    padding: 10px 16px;
    font-size: 13px;
    color: #444 !important;
    font-weight: 400;
}

.main-header-section .profile-info .dropdown-menu li a:hover {
    background-color: var(--clr-hover);
    color: var(--clr-black) !important;
}

.main-header-section .profile-info .dropdown-menu li a i {
    margin-right: 10px;
    color: #999;
    font-size: 13px;
}

/* "View Website" link */
.text-custom-primary,
.text-custom-primary:hover {
    color: var(--clr-black) !important;
    font-weight: 500 !important;
    font-size: 13px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

/* Language dropdown */
.language-change .btn-light {
    background: transparent !important;
    border: 1px solid var(--clr-border) !important;
    font-size: 13px;
    padding: 6px 12px;
    border-radius: 6px;
    color: #444;
}

.language-change .btn-light:focus {
    box-shadow: none !important;
}

/* Notification badge */
.notifications .bg-red {
    background-color: var(--clr-black) !important;
    font-size: 10px;
}

/* Notification dropdown */
.notification-header {
    border-bottom: 1px solid var(--clr-border);
    padding: 12px 16px;
}

.notification-header .text-red {
    color: var(--clr-black) !important;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.notification-footer .text-red {
    color: var(--clr-black) !important;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Header dropdown */
.main-header-section .dropdown-menu {
    border: 1px solid var(--clr-border) !important;
    border-radius: 8px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06) !important;
}

/* ========================================
   4. FOOTER — Minimal, thin top border
   ======================================== */
footer {
    background: var(--clr-white) !important;
    border-top: 1px solid var(--clr-border);
    padding: 16px 24px !important;
}

footer p {
    color: var(--clr-muted) !important;
    font-size: 12px;
    letter-spacing: 0.02em;
}

footer a.footer-acn {
    color: var(--clr-black) !important;
    font-weight: 500;
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* ========================================
   5. CARDS — Flat, thin border, minimal
   ======================================== */
.card {
    background-color: var(--clr-white) !important;
    border: 1px solid var(--clr-border) !important;
    border-radius: 8px !important;
    box-shadow: none !important;
}

/* ========================================
   6. TABLES — Clean, minimal borders
   ======================================== */
.table th {
    background: var(--clr-white) !important;
    border-bottom: 1px solid var(--clr-border) !important;
    border-top: none !important;
    font-weight: 500 !important;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--clr-muted) !important;
    padding: 12px 16px;
    height: auto !important;
}

.table td {
    border-bottom: 1px solid #f2f2f2;
    padding: 12px 16px;
    font-size: 13px;
    color: #333;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: var(--clr-hover);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* Business stat table headers */
.business-thead {
    border-top: 1px solid var(--clr-border);
    border-bottom: 1px solid var(--clr-border);
}

/* ========================================
   7. BUTTONS — Outlined and flat
   ======================================== */
.btn-primary {
    background-color: var(--clr-black) !important;
    border: 1px solid var(--clr-black) !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    font-size: 13px;
    letter-spacing: 0.02em;
    padding: 8px 20px;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: #333333 !important;
    border-color: #333333 !important;
}

.btn-custom-warning {
    background-color: var(--clr-black) !important;
    border: 1px solid var(--clr-black) !important;
    border-radius: 6px !important;
    font-weight: 500 !important;
    font-size: 13px;
    letter-spacing: 0.02em;
}

.btn-custom-warning:hover {
    background-color: #333333 !important;
}

/* Cancel button */
.cancel-btn {
    border: 1px solid var(--clr-border) !important;
    color: #444 !important;
    background-color: transparent;
    border-radius: 6px !important;
    font-weight: 400;
    font-size: 13px;
}

.cancel-btn:hover {
    background-color: var(--clr-black) !important;
    color: white !important;
    border-color: var(--clr-black) !important;
}

/* Save button */
.save-btn {
    background: var(--clr-black) !important;
    border-radius: 6px !important;
    font-weight: 500;
    font-size: 13px;
}

/* Feature add button */
.add-feature-btn {
    background: var(--clr-black) !important;
    border-radius: 6px !important;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.02em;
}

/* Verify button */
.verify-btn {
    background-color: var(--clr-black) !important;
    border-radius: 6px !important;
    font-weight: 500;
}

/* Payment button */
.payment-btn {
    background-color: var(--clr-black) !important;
    border-radius: 6px !important;
}

/* Nav pills */
.dropdown-item.active,
.dropdown-item:active,
.nav-pills .nav-link.active,
.nav-pills .show > .nav-link,
.btn-primary {
    background-color: var(--clr-black) !important;
}

.nav-link {
    color: var(--clr-black) !important;
}

/* ========================================
   8. FORMS — Clean, white inputs
   ======================================== */
.form-control {
    background-color: var(--clr-white) !important;
    border: 1px solid var(--clr-border);
    border-radius: 6px;
    font-size: 13px;
    padding: 10px 14px;
    transition: border-color 0.2s ease;
    color: #333;
}

.form-control:focus {
    border-color: var(--clr-black) !important;
    box-shadow: none !important;
    outline: none;
}

.form-control::placeholder {
    color: #bbb;
    font-weight: 300;
}

.form-select {
    background-color: var(--clr-white) !important;
    border: 1px solid var(--clr-border);
    border-radius: 6px;
    font-size: 13px;
    padding: 10px 14px;
}

.form-select:focus {
    border-color: var(--clr-black) !important;
    box-shadow: none !important;
}

/* Labels */
label {
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

/* ========================================
   9. DASHBOARD — Clean stat boxes
   ======================================== */
.business-stat-container {
    background-color: var(--clr-white);
    border-radius: 8px;
    border: 1px solid var(--clr-border);
    box-shadow: none !important;
}

.dashborad-table-container {
    background-color: var(--clr-white) !important;
    border-radius: 8px;
    border: 1px solid var(--clr-border);
    box-shadow: none !important;
}

.tab-table-container {
    background-color: var(--clr-white) !important;
    border-radius: 8px;
    border: 1px solid var(--clr-border);
}

/* Dashboard chart header */
.dashboard-chart h4 {
    font-weight: 500;
    font-size: 16px;
}

.dashboard-table-header h3 {
    font-weight: 500;
    font-size: 16px;
}

.dashboard-table-header a {
    color: var(--clr-black) !important;
    font-weight: 500;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Tabs */
.custom-tabs .tab-item {
    font-weight: 500;
    font-size: 13px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.custom-tabs .tab-item.active {
    color: var(--clr-black) !important;
    border-bottom: 2px solid var(--clr-black) !important;
    background: transparent !important;
}

/* Stat values */
.bus-stat-count {
    font-weight: 600 !important;
    color: var(--clr-black) !important;
}

.bus-stat-title {
    color: var(--clr-muted) !important;
    font-size: 13px !important;
    font-weight: 400 !important;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ========================================
   10. MODALS — Clean, minimal
   ======================================== */
.modal-content {
    border: 1px solid var(--clr-border) !important;
    border-radius: 10px !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.08) !important;
}

.modal-header {
    border-bottom: 1px solid var(--clr-border);
    padding: 20px 24px;
}

.modal-footer {
    border-top: 1px solid var(--clr-border);
    padding: 16px 24px;
}

/* ========================================
   11. CHECKBOXES — Clean
   ======================================== */
.table-hidden-checkbox:checked + .table-custom-checkmark {
    background-color: var(--clr-black) !important;
    border-color: var(--clr-black) !important;
}

.table-custom-checkmark {
    border: 1px solid #d0d0d0;
    border-radius: 4px;
}

/* ========================================
   12. MISC OVERRIDES
   ======================================== */

/* Table product quantity color */
.table-product-qt {
    color: var(--clr-black) !important;
    font-weight: 600;
}

/* Custom primary text */
.custom-primary {
    color: var(--clr-black) !important;
}

.custom-warning-color {
    color: var(--clr-black) !important;
}

/* Error styling — keep red for UX clarity */
.error {
    color: #dc3545 !important;
}

.indicate-text {
    color: #dc3545;
}

/* Discount button */
.discount-btn {
    color: var(--clr-black) !important;
    border: 1px solid var(--clr-border) !important;
    border-radius: 6px !important;
}

/* Gradient row — remove gradient */
.gradient-row {
    background: var(--clr-hover) !important;
}

/* Avatar */
.avatar {
    background: var(--clr-black) !important;
}

/* Toastr override for consistency */
.toast-success {
    background-color: var(--clr-black) !important;
}

/* Top button tabs */
.top-btn-custom:hover,
.top-btn-custom:active,
.top-btn-custom.active {
    color: var(--clr-black) !important;
    text-decoration: underline;
    font-weight: 500;
}

/* ========================================
   13. RESPONSIVE ADJUSTMENTS
   ======================================== */
@media (max-width: 1200px) {
    .side-bar-manu li a {
        font-size: 12.5px !important;
    }
}

@media (max-width: 991px) {
    .side-bar {
        border-right: none;
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.1) !important;
    }
}

@media (max-width: 767px) {
    .main-header-section {
        padding: 10px 16px;
    }

    footer {
        padding: 12px 16px !important;
    }

    .table th,
    .table td {
        padding: 10px 12px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .main-header-section {
        padding: 8px 12px;
    }

    .side-bar-logo {
        padding: 14px 12px;
    }
}

/* ========================================
   14. PRINT — Strip backgrounds
   ======================================== */
@media print {
    .side-bar,
    .main-header-section,
    footer {
        display: none !important;
    }

    .section-container {
        padding-left: 0 !important;
    }

    .card {
        border: none !important;
        box-shadow: none !important;
    }
}
