/* JAZ Ledger visual system */
:root,
[data-theme="light"] {
    --font-arabic: 'IBM Plex Sans Arabic', 'Cairo', system-ui, sans-serif;
    --type-caption: 0.72rem;
    --type-small: 0.82rem;
    --type-body: 0.92rem;
    --type-heading: 1.2rem;
    --type-display: 2.15rem;
    --brand-50: #edf4ef;
    --brand-100: #d7e6db;
    --brand-200: #b6d0be;
    --brand-300: #91b59d;
    --brand-400: #5b8c6b;
    --brand-500: #326747;
    --brand-600: #28563a;
    --brand-700: #214830;
    --brand-800: #1b3b29;
    --brand-900: #173323;
    --accent-400: #d6a86a;
    --accent-500: #bd8950;
    --accent-600: #98693b;
    --success: #347b58;
    --success-muted: #e7f2eb;
    --danger: #b84d45;
    --danger-muted: #f9ece9;
    --warning: #a56b26;
    --warning-muted: #f8f0e2;
    --info: #426d88;
    --info-muted: #eaf1f5;
    --bg-root: #f4f3ef;
    --bg-canvas: #f4f3ef;
    --bg-surface-1: #203d2d;
    --bg-surface-2: #ffffff;
    --bg-surface-3: #f8f8f5;
    --bg-elevated: #ffffff;
    --bg-overlay: rgba(22, 36, 27, 0.48);
    --text-primary: #202c24;
    --text-secondary: #536157;
    --text-tertiary: #7d8980;
    --text-inverse: #ffffff;
    --text-brand: #326747;
    --border-subtle: #e9ece7;
    --border-default: #dfe5dd;
    --border-strong: #cad5ca;
    --border-brand: #b8cbbd;
    --shadow-sm: 0 2px 6px rgba(27, 46, 33, 0.045);
    --shadow-md: 0 8px 22px rgba(27, 46, 33, 0.07);
    --shadow-lg: 0 18px 48px rgba(27, 46, 33, 0.12);
    --shadow-xl: 0 28px 80px rgba(21, 39, 27, 0.22);
    --shadow-glow: 0 8px 24px rgba(50, 103, 71, 0.12);
    --shadow-glow-brand: 0 10px 28px rgba(50, 103, 71, 0.16);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-2xl: 24px;
    --sidebar-width: 264px;
}

html {
    background: #f4f3ef;
}

body {
    background: #f4f3ef !important;
    color: #202c24 !important;
    font-family: var(--font-arabic) !important;
    line-height: 1.7;
}

body::before {
    display: none !important;
}

::selection {
    color: #fff;
    background: #326747;
}

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-thumb {
    background: #c8d2c8;
}

.app-container,
.container {
    min-height: 100vh;
}

.sidebar {
    background: #203d2d !important;
    color: #f4f5ef !important;
    border: 0 !important;
    box-shadow: 8px 0 28px rgba(22, 43, 29, 0.08);
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

.sidebar::before {
    height: 4px !important;
    background: #c89b64 !important;
}

.sidebar-header {
    text-align: right !important;
    padding: 28px 24px 24px !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 8px !important;
    color: #f7f5ee !important;
    background: none !important;
    -webkit-text-fill-color: currentColor !important;
    animation: none !important;
    font-size: 1.12rem !important;
    font-weight: 700 !important;
    letter-spacing: 0 !important;
}

.sidebar-logo::before {
    content: "J";
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(220, 191, 148, 0.5);
    border-radius: 12px;
    color: #e1c49b;
    font-family: Georgia, serif;
    font-size: 23px;
    font-weight: 700;
}

.sidebar-subtitle {
    padding-right: 50px;
    color: #b9c9bc !important;
    font-size: 0.76rem !important;
    letter-spacing: 0 !important;
}

.sidebar-nav {
    gap: 4px !important;
    padding: 20px 14px !important;
}

.nav-item {
    min-height: 44px;
    padding: 9px 13px !important;
    color: #c1cec3 !important;
    border-radius: 10px !important;
    font-weight: 500 !important;
    font-size: 0.88rem !important;
    gap: 12px !important;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.075) !important;
    color: #fff !important;
}

.nav-item.active {
    background: rgba(222, 197, 158, 0.14) !important;
    color: #f5dfbd !important;
    font-weight: 600 !important;
}

.nav-item.active::before {
    width: 3px !important;
    height: 22px !important;
    background: #d1a878 !important;
    box-shadow: none !important;
}

.nav-icon {
    display: grid;
    place-items: center;
    width: 28px !important;
    height: 28px;
    border-radius: 8px;
    color: #d1a878 !important;
    font-size: 0 !important;
    filter: none !important;
}

.nav-icon::before {
    font-size: 17px;
    line-height: 1;
}

.nav-item[href$="index.html"] .nav-icon::before { content: "⌂"; }
.nav-item[href$="statistics.html"] .nav-icon::before { content: "⌁"; }
.nav-item[href$="agents.html"] .nav-icon::before { content: "♙"; }
.nav-item[href$="cards.html"] .nav-icon::before { content: "▤"; }
.nav-item[href$="reports.html"] .nav-icon::before { content: "▧"; }
.nav-item[href$="pos.html"] .nav-icon::before { content: "◫"; }
.nav-item[href$="inventory.html"] .nav-icon::before { content: "▦"; }
.nav-item[href$="users.html"] .nav-icon::before { content: "♧"; }
.nav-item[href$="activity.html"] .nav-icon::before { content: "◷"; }
.nav-item[href$="settings.html"] .nav-icon::before { content: "⚙"; }

.nav-item.active .nav-icon {
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-footer {
    padding: 16px !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
    background: rgba(12, 27, 17, 0.18) !important;
}

.sidebar-footer #currentUser,
.sidebar-footer .user-info {
    color: #f2f3ed !important;
}

.sidebar-footer button,
.sidebar-footer .logout-btn {
    width: 100%;
    min-height: 42px;
    margin: 8px 0 0 !important;
    padding: 9px 12px !important;
    border: 1px solid rgba(226, 189, 154, 0.25) !important;
    border-radius: 10px !important;
    background: rgba(184, 77, 69, 0.16) !important;
    color: #f1c0b9 !important;
    font: inherit;
    cursor: pointer;
    transition: background 160ms ease, border-color 160ms ease;
}

.sidebar-footer button:hover {
    background: rgba(184, 77, 69, 0.26) !important;
    border-color: rgba(226, 189, 154, 0.45) !important;
}

.main-content {
    min-width: 0;
    padding: 34px 42px !important;
    background: #f4f3ef !important;
}

.page-header {
    position: relative;
    margin: 0 0 28px !important;
    padding: 2px 0 22px;
    border-bottom: 1px solid #dfe5dd;
    animation: none !important;
}

.page-header::before {
    display: block;
    margin-bottom: 7px;
    color: #a56f48;
    content: "JAZ LEDGER  /  BUSINESS DESK";
    font-family: 'IBM Plex Sans Arabic', sans-serif;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.13em;
    direction: ltr;
    text-align: right;
}

body:has(.nav-item.active[href$="index.html"]) .page-header::before { content: "JAZ / نظرة العمل"; }
body:has(.nav-item.active[href$="statistics.html"]) .page-header::before { content: "JAZ / التحليلات"; }
body:has(.nav-item.active[href$="agents.html"]) .page-header::before { content: "JAZ / شبكة الوكلاء"; }
body:has(.nav-item.active[href$="cards.html"]) .page-header::before { content: "JAZ / المنتجات والتسعير"; }
body:has(.nav-item.active[href$="reports.html"]) .page-header::before { content: "JAZ / التقارير"; }
body:has(.nav-item.active[href$="pos.html"]) .page-header::before { content: "JAZ / المبيعات"; }
body:has(.nav-item.active[href$="inventory.html"]) .page-header::before { content: "JAZ / إدارة المخزون"; }
body:has(.nav-item.active[href$="users.html"]) .page-header::before { content: "JAZ / الوصول والصلاحيات"; }
body:has(.nav-item.active[href$="activity.html"]) .page-header::before { content: "JAZ / سجل النشاط"; }
body:has(.nav-item.active[href$="settings.html"]) .page-header::before { content: "JAZ / مساحة العمل"; }

[data-theme="dark"] .page-header::before {
    color: #d1aa79;
}

.page-title {
    color: #203d2d !important;
    font-size: clamp(1.7rem, 2.5vw, 2.15rem) !important;
    font-weight: 700 !important;
    letter-spacing: -0.045em !important;
    line-height: 1.35 !important;
}

.page-subtitle {
    margin-top: 5px;
    color: #7a867d !important;
    font-size: 0.9rem !important;
}

.card,
.stat-card {
    background: #fff !important;
    border: 1px solid #e7eae5 !important;
    border-radius: 15px !important;
    box-shadow: 0 3px 12px rgba(35, 54, 39, 0.035) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    animation: none !important;
}

.card {
    margin-bottom: 22px !important;
    transition: border-color 160ms ease, box-shadow 160ms ease !important;
}

.card:hover {
    border-color: #d6dfd5 !important;
    box-shadow: 0 8px 24px rgba(35, 54, 39, 0.06) !important;
}

.card-header {
    min-height: 64px;
    padding: 17px 22px !important;
    background: #fff !important;
    border-color: #edf0eb !important;
}

.card-title {
    color: #2a3c30 !important;
    font-size: 1rem !important;
    font-weight: 650 !important;
    letter-spacing: -0.01em;
}

.stats-grid {
    gap: 16px !important;
    margin-bottom: 24px !important;
}

.stat-card {
    position: relative;
    gap: 16px !important;
    min-height: 108px;
    padding: 20px !important;
    overflow: hidden;
}

.stat-card::before {
    background: linear-gradient(135deg, transparent 62%, rgba(50, 103, 71, 0.035)) !important;
}

.stat-card::after {
    display: none !important;
}

.stat-card:hover {
    transform: translateY(-2px) !important;
    border-color: #d5dfd5 !important;
    box-shadow: 0 10px 24px rgba(35, 54, 39, 0.075) !important;
}

.stat-icon {
    width: 44px !important;
    height: 44px !important;
    border: 1px solid #e3ece5;
    border-radius: 13px !important;
    background: #edf4ef !important;
    color: #326747 !important;
    box-shadow: none !important;
    font-size: 1.25rem !important;
}

.stat-icon.secondary { background: #eaf2ed !important; color: #347b58 !important; }
.stat-icon.accent { background: #f8f0e4 !important; color: #a56b26 !important; border-color: #f1e7d5; }
.stat-icon.danger { background: #f9ece9 !important; color: #b84d45 !important; border-color: #f2dfdc; }

.stat-card:hover .stat-icon {
    transform: none !important;
}

.stat-info h3 {
    color: #203d2d !important;
    font-size: 1.55rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.035em !important;
    font-variant-numeric: tabular-nums;
}

.stat-info p {
    margin-top: 3px !important;
    color: #7d8980 !important;
    font-size: 0.78rem !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

.dashboard-intro {
    position: relative;
    isolation: isolate;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 24px;
    min-height: 228px;
    margin: -2px 0 22px;
    padding: 32px 38px;
    overflow: hidden;
    border: 1px solid #294c37;
    border-radius: 20px;
    background:
        radial-gradient(ellipse at 87% 14%, rgba(201, 164, 112, 0.18), transparent 29%),
        linear-gradient(112deg, #1d3828 0%, #274a34 65%, #31583d 100%);
    color: #f3f1e9;
    box-shadow: 0 15px 34px rgba(30, 59, 39, 0.12);
}

.dashboard-intro::before {
    position: absolute;
    z-index: -1;
    top: -128px;
    right: -40px;
    width: 390px;
    height: 390px;
    border: 1px solid rgba(239, 222, 194, 0.16);
    border-radius: 50%;
    box-shadow: 0 0 0 32px rgba(239, 222, 194, 0.035), 0 0 0 78px rgba(239, 222, 194, 0.025);
    content: "";
}

.dashboard-intro::after {
    position: absolute;
    z-index: -1;
    right: 0;
    bottom: 0;
    left: 0;
    height: 45%;
    background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 28px 28px;
    content: "";
    mask-image: linear-gradient(90deg, transparent, #000 65%);
}

.dashboard-intro-copy {
    max-width: 650px;
}

.dashboard-kicker {
    display: inline-block;
    margin-bottom: 13px;
    color: #d3b58c;
    font-size: 0.67rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    direction: ltr;
}

.dashboard-intro h2 {
    margin: 0;
    color: #f8f6ef;
    font-size: clamp(1.65rem, 2.8vw, 2.45rem);
    font-weight: 650;
    letter-spacing: -0.045em;
    line-height: 1.35;
}

.dashboard-intro p {
    margin-top: 9px;
    color: #c3d0c3;
    font-size: 0.92rem;
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    align-items: center;
    z-index: 1;
}

.dashboard-action {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    min-height: 43px;
    padding: 9px 14px;
    border: 1px solid rgba(236, 228, 210, 0.28);
    border-radius: 9px;
    color: #f6f1e7;
    text-decoration: none;
    font-size: 0.81rem;
    font-weight: 600;
    transition: background 160ms ease, transform 160ms ease;
}

.dashboard-action:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.09);
}

.dashboard-action-primary {
    border-color: #dec49d;
    background: #d8c09a;
    color: #233a2b;
}

.dashboard-action-primary:hover {
    background: #ead4b0;
}

.dashboard-mark {
    position: absolute;
    top: -54px;
    right: 40%;
    z-index: -1;
    color: rgba(240, 232, 214, 0.055);
    font-family: Georgia, serif;
    font-size: 26rem;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

.main-content:has(.dashboard-intro) > .stats-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

.main-content:has(.dashboard-intro) > .stats-grid .stat-card:first-child {
    grid-column: span 2;
    border-color: #244932 !important;
    background: #274a34 !important;
    box-shadow: 0 10px 24px rgba(30, 59, 39, 0.11) !important;
}

.main-content:has(.dashboard-intro) > .stats-grid .stat-card:first-child .stat-info h3 {
    color: #fbf8ef !important;
    font-size: 1.8rem !important;
}

.main-content:has(.dashboard-intro) > .stats-grid .stat-card:first-child .stat-info p {
    color: #c7d4c8 !important;
}

.main-content:has(.dashboard-intro) > .stats-grid .stat-card:first-child .stat-icon {
    border-color: rgba(230, 211, 176, 0.2);
    background: rgba(230, 211, 176, 0.13) !important;
    color: #e8c89a !important;
}

.main-content:has(.dashboard-intro) .card-header {
    position: relative;
}

.main-content:has(.dashboard-intro) .card-header::before {
    width: 3px;
    height: 18px;
    margin-left: 9px;
    border-radius: 3px;
    background: #c89b64;
    content: "";
}

.table-container,
.table-responsive {
    max-width: 100%;
    border-radius: 0 0 15px 15px;
}

table {
    background: #fff;
}

th,
td {
    padding: 13px 16px !important;
    border-bottom: 1px solid #edf0eb !important;
    text-align: right;
}

th {
    background: #f7f8f5 !important;
    color: #657369 !important;
    font-size: 0.75rem !important;
    font-weight: 650 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    z-index: 2;
}

td {
    color: #4a584e !important;
    font-size: 0.86rem !important;
}

tbody tr:nth-child(even) {
    background: #fcfcfa !important;
}

tbody tr:hover td {
    background: #f5f8f4 !important;
}

.badge,
.action-badge,
.module-badge {
    border-radius: 7px !important;
    font-weight: 600 !important;
}

.badge-primary,
.multi-select-tag {
    background: #edf4ef !important;
    border-color: #dce9df !important;
    color: #326747 !important;
}

.badge-success,
.action-sell,
.action-login {
    background: #eaf3ed !important;
    border-color: #d8e8dc !important;
    color: #347b58 !important;
}

.badge-warning,
.action-update {
    background: #f8f1e6 !important;
    border-color: #f0e3cf !important;
    color: #9a6b30 !important;
}

.badge-danger,
.action-delete,
.action-login_failed {
    background: #f9ece9 !important;
    border-color: #f1ddda !important;
    color: #b84d45 !important;
}

.badge-secondary,
.module-badge,
.action-logout {
    background: #f0f2ef !important;
    border-color: #e5e9e3 !important;
    color: #647166 !important;
}

.action-create { background: #eaf1f5 !important; color: #426d88 !important; }
.action-upload { background: #f1edf6 !important; color: #775c91 !important; }

.btn {
    min-height: 40px;
    padding: 9px 16px !important;
    border-radius: 9px !important;
    font-family: inherit !important;
    font-size: 0.84rem !important;
    font-weight: 600 !important;
    box-shadow: none !important;
    transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease !important;
}

.btn:active {
    transform: translateY(1px) !important;
}

.btn-primary {
    background: #326747 !important;
    color: #fff !important;
}

.btn-primary:hover {
    background: #28563a !important;
    filter: none !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 5px 12px rgba(50, 103, 71, 0.16) !important;
}

.btn-secondary {
    background: #f5f7f4 !important;
    border: 1px solid #dfe6dd !important;
    color: #4b5c4e !important;
}

.btn-secondary:hover {
    background: #edf2ed !important;
    border-color: #cbd9cc !important;
    color: #254a32 !important;
    transform: translateY(-1px) !important;
}

.btn-danger {
    background: #b84d45 !important;
    color: #fff !important;
}

.btn-icon {
    border-color: #e2e8e1 !important;
    background: #f8f9f7 !important;
    color: #607066 !important;
}

.form-group {
    margin-bottom: 18px !important;
}

.form-label,
.filter-group label,
.form-group label {
    color: #536157 !important;
    font-size: 0.83rem !important;
    font-weight: 600 !important;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
textarea,
.form-control,
.multi-select-display {
    border: 1px solid #dfe5dd !important;
    border-radius: 9px !important;
    background-color: #fbfcfa !important;
    color: #28372d !important;
    box-shadow: none !important;
    font-family: 'IBM Plex Sans Arabic', 'Cairo', system-ui, sans-serif !important;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
select:focus,
textarea:focus,
.form-control:focus,
.multi-select-display:focus {
    border-color: #7da489 !important;
    background-color: #fff !important;
    box-shadow: 0 0 0 3px rgba(50, 103, 71, 0.1) !important;
    outline: none !important;
}

input::placeholder,
textarea::placeholder,
.form-control::placeholder {
    color: #9aa59b !important;
}

select option {
    background: #fff !important;
    color: #28372d !important;
}

input[type="checkbox"],
input[type="radio"] {
    accent-color: #326747;
}

.modal-overlay {
    background: rgba(27, 42, 31, 0.48) !important;
    backdrop-filter: blur(5px) !important;
    -webkit-backdrop-filter: blur(5px) !important;
}

.modal,
.modal-overlay .modal-box {
    border: 1px solid #e5eae3 !important;
    border-radius: 17px !important;
    background: #fff !important;
    color: #28372d !important;
    box-shadow: 0 24px 70px rgba(24, 42, 29, 0.2) !important;
}

.modal-header {
    border-color: #edf0eb !important;
}

.modal-title {
    color: #203d2d !important;
}

.modal-close {
    color: #7a867d !important;
}

.modal-close:hover {
    background: #f2f5f1 !important;
    color: #203d2d !important;
}

.modal-footer {
    border-color: #edf0eb !important;
    background: #fafbf9 !important;
}

.filter-section,
.filters-section {
    border: 1px solid #e5eae3 !important;
    border-radius: 12px !important;
    background: #f8f9f6 !important;
}

.filter-group input,
.filter-group select {
    border: 1px solid #dfe5dd !important;
    background: #fff !important;
    color: #28372d !important;
}

.filter-btn {
    min-height: 40px;
    padding: 9px 18px !important;
    border: 0 !important;
    border-radius: 9px !important;
    background: #326747 !important;
    color: #fff !important;
    font: inherit;
    font-weight: 600 !important;
}

.filter-btn:hover {
    background: #28563a !important;
    box-shadow: none !important;
    transform: translateY(-1px);
}

.activity-table {
    background: #fff !important;
}

.activity-table th {
    background: #f7f8f5 !important;
    color: #657369 !important;
}

.activity-table tr:hover {
    background: #f5f8f4 !important;
}

.pagination button {
    border: 1px solid #dfe6dd !important;
    background: #fff !important;
    color: #4b5c4e !important;
}

.pagination button:hover:not(:disabled) {
    background: #edf4ef !important;
    color: #28563a !important;
}

.pagination span,
.text-muted {
    color: #7d8980 !important;
}

.text-success { color: #347b58 !important; }
.text-warning { color: #a56b26 !important; }

.file-upload {
    border: 1.5px dashed #c9d7ca !important;
    border-radius: 14px !important;
    background: #fafbf9 !important;
    color: #536157;
}

.file-upload:hover,
.file-upload.dragover {
    border-color: #7da489 !important;
    background: #f2f7f3 !important;
}

.file-upload-icon {
    color: #63846c;
}

.multi-select-dropdown {
    border-color: #dfe5dd !important;
    background: #fff !important;
}

.multi-select-option:hover {
    background: #f3f6f2 !important;
}

.multi-select-option.selected {
    background: #edf4ef !important;
    color: #326747 !important;
}

.placeholder {
    color: #929e94 !important;
}

.alert-success { background: #eaf3ed !important; border-color: #d8e8dc !important; color: #347b58 !important; }
.alert-danger { background: #f9ece9 !important; border-color: #f1ddda !important; color: #b84d45 !important; }
.alert-warning { background: #f8f1e6 !important; border-color: #f0e3cf !important; color: #9a6b30 !important; }

.empty-state-title {
    color: #6d7a70 !important;
}

.empty-state-icon {
    color: #728477;
    opacity: 0.65;
}

.notif-wrapper #notifDropdown {
    border: 1px solid #e4e9e2 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 12px 32px rgba(27, 46, 33, 0.16) !important;
    backdrop-filter: none !important;
}

.notif-wrapper #notifDropdown > div:first-child {
    border-color: #edf0eb !important;
    color: #2a3c30 !important;
}

.notif-wrapper #notifList {
    color: #536157;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(50, 103, 71, 0.25);
    outline-offset: 2px;
}

button:disabled,
button[disabled],
.btn:disabled,
.btn[disabled] {
    opacity: 0.55;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

.settings-container {
    gap: 22px !important;
}

.settings-form {
    border: 1px solid #e5eae3 !important;
    border-radius: 15px !important;
    background: #fff !important;
    box-shadow: var(--shadow-sm);
    backdrop-filter: none !important;
}

.settings-preview {
    border: 1px solid #e3e7e1 !important;
    border-radius: 12px;
    box-shadow: 0 5px 18px rgba(35, 54, 39, 0.07) !important;
}

.btn-save {
    background: #326747 !important;
    border-radius: 9px !important;
}

.btn-save:hover {
    transform: none !important;
    filter: brightness(1.06);
}

/* Inventory workspace */
.inventory-tabs {
    border-bottom-color: #e3e8e1 !important;
}

.inventory-tabs .tab-btn,
.inventory-tabs button {
    color: #718075 !important;
}

.inventory-tabs .tab-btn.active,
.inventory-tabs button.active {
    border-color: #326747 !important;
    color: #28563a !important;
}

.inventory-tab {
    border-color: #e2e8e1 !important;
    background: #f7f8f5 !important;
    color: #617065 !important;
    border-radius: 9px !important;
}

.inventory-tab:hover {
    border-color: #c8d9cb !important;
    background: #f0f5f0 !important;
    color: #28563a !important;
}

.inventory-tab.active {
    border-color: #c8d9cb !important;
    background: #edf4ef !important;
    color: #28563a !important;
    box-shadow: none !important;
}

.inventory-tabs .tab-content,
.inventory-tab-content {
    color: #28372d;
}

.inventory-tabs + *,
.inventory-section {
    color: #28372d;
}

.inventory-tabs button:hover,
.inventory-tabs .tab-btn:hover {
    color: #28563a !important;
}

.profit-live-box {
    border-color: #d8e8dc !important;
    border-radius: 10px !important;
    background: #edf5ef !important;
}

.profit-live-box .p-title { color: #657369 !important; }
.profit-live-box .p-val { color: #347b58 !important; }

.inventory-tabs .active {
    color: #28563a !important;
}

.stat-card-mini {
    border: 1px solid #e7eae5 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 3px 12px rgba(35, 54, 39, 0.035) !important;
    backdrop-filter: none !important;
}

.stat-card-mini .stat-icon {
    border: 1px solid #e3ece5;
    background: #edf4ef !important;
    color: #326747 !important;
    box-shadow: none !important;
}

.stat-card-mini .stat-icon.purple { background: #f1edf6 !important; color: #775c91 !important; }
.stat-card-mini .stat-icon.success { background: #eaf3ed !important; color: #347b58 !important; }
.stat-card-mini .stat-icon.danger { background: #f9ece9 !important; color: #b84d45 !important; }
.stat-card-mini .stat-icon.warning { background: #f8f1e6 !important; color: #9a6b30 !important; }
.stat-card-mini .stat-icon.info { background: #eaf1f5 !important; color: #426d88 !important; }

.stat-card-mini .stat-info h3 {
    color: #203d2d !important;
}

.stat-card-mini .stat-info p {
    color: #7d8980 !important;
}

.stock-avail,
.price-profit-tag {
    color: #347b58 !important;
}

.price-profit-tag {
    border: 1px solid #d8e8dc;
    background: #eaf3ed !important;
}

.stock-sub {
    color: #7d8980 !important;
}

.stock-sub .dmg { color: #b84d45 !important; }
.stock-sub .ret { color: #a56b26 !important; }

.table-thumb {
    border-color: #e2e8e1 !important;
}

.table-no-img {
    border-color: #dfe5dd !important;
    background: #f6f8f5 !important;
    color: #839087;
}

.btn-act {
    border-radius: 7px !important;
}

.btn-act-primary { background: #edf4ef !important; color: #326747 !important; border-color: #dce9df !important; }
.btn-act-success { background: #eaf3ed !important; color: #347b58 !important; border-color: #d8e8dc !important; }
.btn-act-warning { background: #f8f1e6 !important; color: #9a6b30 !important; border-color: #f0e3cf !important; }
.btn-act-danger { background: #f9ece9 !important; color: #b84d45 !important; border-color: #f1ddda !important; }

.smart-select-trigger,
.smart-select-container.open .smart-select-trigger {
    border-color: #dfe5dd !important;
    background: #fbfcfa !important;
    color: #28372d !important;
}

.smart-select-trigger:hover,
.smart-select-container.open .smart-select-trigger {
    border-color: #7da489 !important;
}

.smart-select-menu {
    border-color: #dfe5dd !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: 0 12px 30px rgba(35, 54, 39, 0.14) !important;
}

.smart-select-search {
    border-color: #edf0eb !important;
}

.smart-option-item {
    color: #536157;
}

.smart-option-item:hover {
    background: #f3f6f2 !important;
    color: #28563a !important;
}

.smart-option-item.selected {
    background: #edf4ef !important;
    color: #28563a !important;
}

.smart-select-add-footer {
    border-color: #edf0eb !important;
    background: #fafbf9 !important;
}

.smart-add-btn {
    border-color: #cbd9cc !important;
    background: #f3f7f3 !important;
    color: #326747 !important;
}

.smart-add-btn:hover {
    background: #eaf3ed !important;
    color: #28563a !important;
}

/* Point of sale */
.pos-layout {
    grid-template-columns: minmax(0, 1fr) minmax(330px, 410px) !important;
    gap: 18px !important;
    height: calc(100vh - 128px) !important;
    min-height: 600px !important;
}

.pos-header-bar,
.pos-toolbar,
.pos-market-panel,
.pos-cart-panel,
.pos-order-panel,
.pos-products-panel,
.pos-cart {
    border-color: #e5eae3 !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 3px 12px rgba(35, 54, 39, 0.035);
    backdrop-filter: none !important;
}

.pos-header-bar {
    margin-bottom: 18px !important;
    padding: 14px 20px !important;
}

.pos-header-title h1 {
    background: none !important;
    color: #203d2d !important;
    -webkit-text-fill-color: currentColor !important;
    font-size: 1.25rem !important;
}

.pos-stat-pill {
    border: 1px solid #e6ebe4 !important;
    background: #f7f8f5 !important;
    color: #617065 !important;
}

.pos-clock {
    color: #326747 !important;
}

.pos-toolbar {
    padding: 15px !important;
}

.pos-search-input {
    background: #fbfcfa !important;
    border-color: #dfe5dd !important;
    color: #28372d !important;
    box-shadow: none !important;
}

.pos-search-input:focus {
    border-color: #7da489 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(50, 103, 71, 0.1) !important;
}

.pos-shortcut-badge {
    border-color: #e1e7df !important;
    background: #f4f6f2 !important;
    color: #7b897d !important;
}

.pos-category,
.pos-category-btn,
.category-pill,
.pos-filter-btn {
    border-color: #e3e9e1 !important;
    background: #f7f8f5 !important;
    color: #617065 !important;
}

.pos-category.active,
.pos-category-btn.active,
.category-pill.active,
.pos-filter-btn.active {
    border-color: #c8d9cb !important;
    background: #edf4ef !important;
    color: #28563a !important;
}

.product-card,
.pos-product-card,
.product-item {
    border: 1px solid #e6ebe4 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: none !important;
}

.product-card:hover,
.pos-product-card:hover,
.product-item:hover {
    border-color: #b8cbbd !important;
    box-shadow: 0 7px 18px rgba(35, 54, 39, 0.08) !important;
}

.pos-cart-panel,
.pos-order-panel,
.pos-cart {
    padding: 16px !important;
}

.pos-market-panel {
    overflow: hidden;
}

.pos-product-grid {
    gap: 12px !important;
}

.pos-product-card {
    border-color: #e6ebe4 !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.pos-product-card:hover {
    border-color: #b8cbbd !important;
    background: #fff !important;
    box-shadow: 0 7px 18px rgba(35, 54, 39, 0.08) !important;
}

.pos-card-img-wrap {
    border-color: #edf0eb !important;
    background: #f6f8f5 !important;
}

.pos-card-badge-cat {
    border-color: #e0e8df !important;
    background: rgba(255, 255, 255, 0.94) !important;
    color: #536157 !important;
}

.pos-card-badge-add {
    background: #326747 !important;
    box-shadow: none !important;
}

.pos-card-name {
    color: #28372d !important;
}

.pos-card-meta,
.pos-card-price small {
    color: #7d8980 !important;
}

.pos-card-price-row {
    border-color: #edf0eb !important;
}

.pos-card-price {
    color: #326747 !important;
}

.pos-stock-high {
    border-color: #d8e8dc !important;
    background: #eaf3ed !important;
    color: #347b58 !important;
}

.pos-stock-low {
    border-color: #f0e3cf !important;
    background: #f8f1e6 !important;
    color: #9a6b30 !important;
}

.pos-stock-none {
    border-color: #f1ddda !important;
    background: #f9ece9 !important;
    color: #b84d45 !important;
}

.pos-cart-header {
    border-color: #edf0eb !important;
    background: #fafbf9 !important;
}

.pos-cart-title {
    color: #203d2d !important;
}

.pos-cart-count-badge {
    background: #edf4ef !important;
    color: #326747 !important;
}

.pos-cart-clear-btn {
    color: #7d8980 !important;
}

.pos-cart-clear-btn:hover {
    background: #f9ece9 !important;
    color: #b84d45 !important;
}

.pos-cart-item {
    border-color: #e8ece6 !important;
    background: #fafbf9 !important;
}

.pos-cart-item:hover {
    border-color: #d4dfd5 !important;
    background: #f5f8f4 !important;
}

.pos-cart-item-img {
    border-color: #e2e8e1 !important;
    background: #f1f4ef !important;
}

.pos-cart-item-title {
    color: #28372d !important;
}

.pos-cart-item-price-calc {
    color: #7d8980 !important;
}

.pos-cart-item-price-calc strong {
    color: #326747 !important;
}

.pos-cart-qty-ctrl {
    border-color: #e4e9e2 !important;
    background: #f3f5f2 !important;
}

.pos-qty-btn {
    background: #fff !important;
    color: #536157 !important;
}

.pos-qty-btn:hover {
    background: #326747 !important;
    color: #fff !important;
}

.pos-qty-val {
    color: #28372d !important;
}

.pos-cart-empty {
    color: #7d8980 !important;
}

.pos-cart-footer {
    border-color: #edf0eb !important;
    background: #fafbf9 !important;
}

.pos-checkout-input {
    background: #fff !important;
    border-color: #dfe5dd !important;
    color: #28372d !important;
}

.pos-checkout-input:focus {
    border-color: #7da489 !important;
}

.pos-summary-table {
    border-color: #e5eae3 !important;
}

.pos-summary-row {
    color: #68766b !important;
}

.pos-summary-row.total {
    color: #326747 !important;
}

.pos-summary-row.total span:last-child {
    background: none !important;
    color: #326747 !important;
    -webkit-text-fill-color: currentColor !important;
}

.pos-btn-checkout {
    border-radius: 9px !important;
    background: #326747 !important;
    box-shadow: none !important;
}

.pos-btn-checkout:hover {
    background: #28563a !important;
    box-shadow: 0 5px 12px rgba(50, 103, 71, 0.16) !important;
    filter: none !important;
}

.pos-cart-panel h2,
.pos-order-panel h2,
.pos-cart h2 {
    color: #203d2d !important;
}

.pos-clear-btn {
    border-color: #f0ddda !important;
    background: #f9ece9 !important;
    color: #b84d45 !important;
}

.pos-clear-btn:hover {
    background: #b84d45 !important;
    color: #fff !important;
}

.pos-checkout-btn,
.checkout-btn {
    border-radius: 10px !important;
    background: #326747 !important;
    box-shadow: none !important;
}

.pos-checkout-btn:hover,
.checkout-btn:hover {
    background: #28563a !important;
}

/* Sign-in */
body:has(.login-container) {
    min-height: 100vh;
    background: #f4f3ef !important;
    overflow: auto !important;
    justify-content: flex-end !important;
    padding-right: clamp(32px, 8vw, 140px) !important;
    direction: ltr !important;
}

body:has(.login-container)::before {
    position: fixed !important;
    top: 0;
    right: auto;
    bottom: 0;
    left: 0;
    display: flex !important;
    align-items: center;
    width: 41%;
    padding: 8vw 6vw;
    border-right: 4px solid #c89b64;
    background:
        radial-gradient(circle at 22% 78%, rgba(201, 164, 112, 0.18), transparent 32%),
        linear-gradient(145deg, #1a3324 0%, #274a34 72%, #31583d 100%);
    color: #eee8db;
    content: "مساحة عملك\A\Aإدارة تثق بها.\Aرؤية أوضح لأعمالك.\A\Aالحسابات  •  المخزون  •  المبيعات";
    font-size: clamp(1.25rem, 2.2vw, 2rem);
    font-weight: 600;
    line-height: 1.8;
    text-align: right;
    white-space: pre-wrap;
    z-index: 0;
    animation: none !important;
}

body:has(.login-container)::after {
    position: fixed !important;
    top: 12%;
    left: 7%;
    display: block !important;
    width: 250px;
    height: 250px;
    border: 1px solid rgba(239, 222, 194, 0.14);
    border-radius: 50%;
    box-shadow: 0 0 0 28px rgba(239, 222, 194, 0.035), 0 0 0 62px rgba(239, 222, 194, 0.025);
    content: "";
    pointer-events: none;
    background: transparent !important;
    animation: none !important;
}

.login-container {
    direction: rtl;
    margin: 0 !important;
    width: min(100%, 440px) !important;
    padding: 46px 42px !important;
    border: 1px solid #e6eae4 !important;
    border-radius: 18px !important;
    background: #fff !important;
    box-shadow: 0 20px 60px rgba(31, 55, 37, 0.1) !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    animation: none !important;
}

.login-container::before {
    right: 0 !important;
    left: 0 !important;
    height: 4px !important;
    border-radius: 18px 18px 0 0 !important;
    background: #c89b64 !important;
}

.logo {
    margin-bottom: 32px !important;
}

.logo h1 {
    position: relative;
    color: #203d2d !important;
    font-size: 2rem !important;
    font-weight: 700 !important;
    background: none !important;
    animation: none !important;
    -webkit-text-fill-color: #203d2d !important;
}

.logo h1 span {
    display: block;
    margin-top: 5px;
    color: #a56f48;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.34em;
    -webkit-text-fill-color: #a56f48;
    text-transform: uppercase;
}

.logo p {
    margin-top: 8px;
    color: #7d8980 !important;
}

.login-container .form-group label {
    color: #536157 !important;
}

.login-container .form-group input {
    border: 1px solid #dfe5dd !important;
    border-radius: 9px !important;
    background: #fbfcfa !important;
    color: #28372d !important;
}

.login-container .form-group input:focus {
    border-color: #7da489 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(50, 103, 71, 0.1) !important;
}

.login-container .form-group input::placeholder {
    color: #9aa59b !important;
}

.login-btn {
    border-radius: 9px !important;
    background: #326747 !important;
    box-shadow: none !important;
}

.login-btn:hover {
    background: #28563a !important;
    box-shadow: 0 7px 16px rgba(50, 103, 71, 0.18) !important;
    filter: none !important;
}

.error-message {
    border-color: #f1ddda !important;
    border-radius: 9px !important;
    background: #f9ece9 !important;
    color: #b84d45 !important;
}

.footer-text {
    color: #929e94 !important;
}

@media (max-width: 1100px) {
    .main-content {
        padding: 28px !important;
    }

    .pos-layout {
        grid-template-columns: minmax(0, 1fr) minmax(300px, 360px) !important;
    }
}

@media (max-width: 900px) {
    .sidebar {
        width: min(300px, 86vw) !important;
        transform: translateX(100%);
        box-shadow: -16px 0 40px rgba(22, 43, 29, 0.18) !important;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        width: 100% !important;
        margin-right: 0 !important;
        padding: 82px 22px 26px !important;
    }

    .menu-toggle {
        position: fixed !important;
        top: 18px !important;
        right: 18px !important;
        display: flex !important;
        width: 43px !important;
        height: 43px !important;
        border: 1px solid #dfe5dd !important;
        border-radius: 11px !important;
        background: #fff !important;
        box-shadow: 0 4px 14px rgba(35, 54, 39, 0.08);
    }

    .hamburger,
    .hamburger::before,
    .hamburger::after {
        background: #326747 !important;
    }

    .menu-toggle.active .hamburger {
        background: transparent !important;
    }

    .page-header {
        margin-bottom: 22px !important;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .main-content:has(.dashboard-intro) > .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .stat-card {
        flex-direction: row !important;
        text-align: right !important;
    }

    .pos-layout {
        grid-template-columns: 1fr !important;
        height: auto !important;
        min-height: 0 !important;
    }

    .pos-market-panel {
        min-height: 460px;
    }

    .pos-header-bar {
        padding-right: 72px !important;
    }

    body:has(.login-container) {
        justify-content: center !important;
        padding: 20px !important;
        direction: rtl !important;
    }

    body:has(.login-container)::before,
    body:has(.login-container)::after {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .main-content {
        padding: 76px 15px 22px !important;
    }

    .page-header {
        padding-bottom: 15px;
        margin-bottom: 18px !important;
    }

    .dashboard-intro {
        grid-template-columns: minmax(0, 1fr);
        gap: 20px;
        min-height: 0;
        padding: 26px 22px;
        border-radius: 15px;
    }

    .dashboard-intro h2 {
        font-size: 1.65rem;
    }

    .dashboard-intro p {
        font-size: 0.84rem;
    }

    .dashboard-actions {
        align-items: stretch;
    }

    .dashboard-action {
        flex: 1;
    }

    .dashboard-mark {
        top: 10px;
        right: 52%;
        font-size: 15rem;
    }

    .page-title {
        font-size: 1.35rem !important;
    }

    .page-subtitle {
        font-size: 0.82rem !important;
    }

    .stats-grid {
        gap: 10px !important;
    }

    .stat-card {
        min-height: 92px;
        padding: 13px !important;
        gap: 10px !important;
    }

    .stat-icon {
        width: 36px !important;
        height: 36px !important;
        border-radius: 10px !important;
        font-size: 1.05rem !important;
    }

    .stat-info h3 {
        font-size: 1.15rem !important;
    }

    .stat-info p {
        font-size: 0.68rem !important;
    }

    .card {
        margin-bottom: 15px !important;
        border-radius: 12px !important;
    }

    .card-header {
        min-height: 56px;
        padding: 13px 15px !important;
        flex-direction: row !important;
        align-items: center !important;
        gap: 10px !important;
    }

    .card-title {
        font-size: 0.92rem !important;
    }

    th,
    td {
        padding: 10px 12px !important;
        font-size: 0.78rem !important;
    }

    .btn {
        min-height: 38px;
        padding: 8px 12px !important;
        font-size: 0.78rem !important;
    }

    .form-row,
    .settings-container {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100%;
    }

    .settings-preview {
        width: min(100%, 80mm) !important;
        margin-inline: auto;
    }

    .filters-section {
        padding: 14px !important;
        gap: 12px !important;
    }

    .filter-group {
        min-width: 100% !important;
    }

    .filter-btn {
        width: 100%;
    }

    .pos-header-bar {
        align-items: flex-start !important;
        gap: 10px !important;
        padding: 13px 68px 13px 13px !important;
    }

    .pos-header-title {
        flex-wrap: wrap;
    }

    .pos-header-title h1 {
        font-size: 1.04rem !important;
    }

    .pos-badges-group {
        flex-wrap: wrap;
        gap: 6px !important;
    }

    .pos-stat-pill {
        padding: 5px 8px !important;
        font-size: 0.72rem !important;
    }

    .pos-market-panel {
        min-height: 390px;
    }

    .login-container {
        padding: 36px 25px !important;
        border-radius: 15px !important;
    }

    .modal-overlay {
        padding: 12px !important;
        align-items: flex-end !important;
    }

    .modal,
    .modal-overlay .modal-box {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 88vh !important;
        border-radius: 16px 16px 12px 12px !important;
    }

    .modal-body {
        padding: 17px !important;
    }
}

[data-theme="dark"] {
    --bg-root: #151d17;
    --bg-canvas: #151d17;
    --bg-surface-1: #1c3022;
    --bg-surface-2: #202b23;
    --bg-surface-3: #26342a;
    --bg-elevated: #253329;
    --bg-overlay: rgba(5, 12, 7, 0.72);
    --text-primary: #edf1eb;
    --text-secondary: #c1ccc1;
    --text-tertiary: #94a294;
    --border-subtle: #2e3b30;
    --border-default: #39483b;
    --border-strong: #4a5b4b;
    --border-brand: #45684f;
}

[data-theme="dark"] body,
[data-theme="dark"] .main-content {
    background: #151d17 !important;
    color: #edf1eb !important;
}

[data-theme="dark"] .page-header {
    border-color: #2c392e;
}

[data-theme="dark"] .page-title,
[data-theme="dark"] .card-title,
[data-theme="dark"] .modal-title,
[data-theme="dark"] .stat-info h3 {
    color: #e8eee7 !important;
}

[data-theme="dark"] .page-subtitle,
[data-theme="dark"] .stat-info p,
[data-theme="dark"] .text-muted {
    color: #98a597 !important;
}

[data-theme="dark"] .card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .stat-card-mini {
    border-color: #2e3b30 !important;
    background: #202b23 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12) !important;
}

[data-theme="dark"] .card-header,
[data-theme="dark"] .pos-cart-header,
[data-theme="dark"] .pos-cart-footer {
    border-color: #2e3b30 !important;
    background: #1c261f !important;
}

[data-theme="dark"] th {
    border-color: #303d32 !important;
    background: #1c261f !important;
    color: #aab7aa !important;
}

[data-theme="dark"] td {
    border-color: #2b382d !important;
    color: #c1ccc1 !important;
}

[data-theme="dark"] tbody tr:nth-child(even) {
    background: #1e2921 !important;
}

[data-theme="dark"] tbody tr:hover td {
    background: #27362b !important;
}

[data-theme="dark"] .stat-icon {
    border-color: #344638;
    background: #293b2d !important;
    color: #a5c2aa !important;
}

[data-theme="dark"] .stat-icon.secondary,
[data-theme="dark"] .stat-card-mini .stat-icon.success {
    border-color: #354c3b;
    background: #29392e !important;
    color: #8dbb9a !important;
}

[data-theme="dark"] .stat-icon.accent,
[data-theme="dark"] .stat-card-mini .stat-icon.warning {
    border-color: #51432d;
    background: #393126 !important;
    color: #d6ad70 !important;
}

[data-theme="dark"] .stat-icon.danger,
[data-theme="dark"] .stat-card-mini .stat-icon.danger {
    border-color: #513734;
    background: #3b2b29 !important;
    color: #d88a7f !important;
}

[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] .form-control,
[data-theme="dark"] .multi-select-display,
[data-theme="dark"] .filter-group input,
[data-theme="dark"] .filter-group select,
[data-theme="dark"] .pos-search-input,
[data-theme="dark"] .pos-checkout-input,
[data-theme="dark"] .smart-select-trigger,
[data-theme="dark"] .smart-select-container.open .smart-select-trigger {
    border-color: #3b4a3e !important;
    background-color: #1b261e !important;
    color: #e5ece4 !important;
}

[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .pos-search-input:focus,
[data-theme="dark"] .pos-checkout-input:focus {
    border-color: #6f9b79 !important;
    background-color: #202d23 !important;
    box-shadow: 0 0 0 3px rgba(111, 155, 121, 0.16) !important;
}

[data-theme="dark"] .form-label,
[data-theme="dark"] .form-group label,
[data-theme="dark"] .filter-group label {
    color: #bdc9bc !important;
}

[data-theme="dark"] select option {
    background: #202b23 !important;
    color: #e5ece4 !important;
}

[data-theme="dark"] .modal,
[data-theme="dark"] .modal-overlay .modal-box {
    border-color: #39483b !important;
    background: #202b23 !important;
    color: #e5ece4 !important;
}

[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: #303d32 !important;
    background: #1c261f !important;
}

[data-theme="dark"] .filter-section,
[data-theme="dark"] .filters-section,
[data-theme="dark"] .file-upload {
    border-color: #344438 !important;
    background: #1c261f !important;
    color: #c1ccc1 !important;
}

[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .btn-icon,
[data-theme="dark"] .pagination button {
    border-color: #3a493c !important;
    background: #263329 !important;
    color: #c1ccc1 !important;
}

[data-theme="dark"] .btn-secondary:hover,
[data-theme="dark"] .pagination button:hover:not(:disabled) {
    border-color: #526753 !important;
    background: #2c3b2f !important;
    color: #edf1eb !important;
}

[data-theme="dark"] .badge-primary,
[data-theme="dark"] .multi-select-tag,
[data-theme="dark"] .inventory-tab.active,
[data-theme="dark"] .pos-category.active,
[data-theme="dark"] .pos-category-btn.active,
[data-theme="dark"] .category-pill.active,
[data-theme="dark"] .pos-filter-btn.active {
    border-color: #405b45 !important;
    background: #293b2d !important;
    color: #b7d1bb !important;
}

[data-theme="dark"] .inventory-tab,
[data-theme="dark"] .pos-category,
[data-theme="dark"] .pos-category-btn,
[data-theme="dark"] .category-pill,
[data-theme="dark"] .pos-filter-btn {
    border-color: #39483b !important;
    background: #202b23 !important;
    color: #c1ccc1 !important;
}

[data-theme="dark"] .pos-header-bar,
[data-theme="dark"] .pos-toolbar,
[data-theme="dark"] .pos-market-panel,
[data-theme="dark"] .pos-cart-panel,
[data-theme="dark"] .pos-product-card,
[data-theme="dark"] .pos-cart,
[data-theme="dark"] .pos-order-panel {
    border-color: #2e3b30 !important;
    background: #202b23 !important;
}

[data-theme="dark"] .pos-product-card:hover,
[data-theme="dark"] .pos-cart-item,
[data-theme="dark"] .smart-select-menu,
[data-theme="dark"] .multi-select-dropdown {
    border-color: #39483b !important;
    background: #1c261f !important;
}

[data-theme="dark"] .pos-card-name,
[data-theme="dark"] .pos-cart-title,
[data-theme="dark"] .pos-cart-item-title,
[data-theme="dark"] .pos-qty-val,
[data-theme="dark"] .pos-header-title h1 {
    color: #e5ece4 !important;
}

[data-theme="dark"] .pos-card-meta,
[data-theme="dark"] .pos-card-price small,
[data-theme="dark"] .pos-cart-item-price-calc,
[data-theme="dark"] .pos-summary-row,
[data-theme="dark"] .pos-cart-empty {
    color: #9eac9f !important;
}

[data-theme="dark"] .pos-card-img-wrap,
[data-theme="dark"] .pos-cart-item-img,
[data-theme="dark"] .pos-cart-qty-ctrl {
    border-color: #354437 !important;
    background: #1b261e !important;
}

[data-theme="dark"] .pos-qty-btn {
    background: #2b392e !important;
    color: #e5ece4 !important;
}

[data-theme="dark"] .activity-table th {
    background: #1c261f !important;
    color: #aab7aa !important;
}

[data-theme="dark"] .activity-table tr:hover {
    background: #27362b !important;
}

[data-theme="dark"] .badge-success,
[data-theme="dark"] .action-sell,
[data-theme="dark"] .action-login,
[data-theme="dark"] .btn-act-success {
    border-color: #3a5140 !important;
    background: #29392e !important;
    color: #9ac5a5 !important;
}

[data-theme="dark"] .badge-warning,
[data-theme="dark"] .action-update,
[data-theme="dark"] .btn-act-warning {
    border-color: #51432d !important;
    background: #393126 !important;
    color: #e3c18d !important;
}

[data-theme="dark"] .badge-danger,
[data-theme="dark"] .action-delete,
[data-theme="dark"] .action-login_failed,
[data-theme="dark"] .btn-act-danger {
    border-color: #513734 !important;
    background: #3b2b29 !important;
    color: #e4a29a !important;
}

[data-theme="dark"] .badge-secondary,
[data-theme="dark"] .module-badge,
[data-theme="dark"] .action-logout {
    border-color: #3a463b !important;
    background: #2a352c !important;
    color: #b6c1b6 !important;
}

[data-theme="dark"] .action-create,
[data-theme="dark"] .action-upload {
    border-color: #39483b !important;
    background: #29352d !important;
    color: #a9c1b0 !important;
}

[data-theme="dark"] .pos-stat-pill,
[data-theme="dark"] .pos-shortcut-badge {
    border-color: #39483b !important;
    background: #263329 !important;
    color: #bdc9bc !important;
}

[data-theme="dark"] .pos-cart-count-badge {
    background: #293b2d !important;
    color: #b7d1bb !important;
}

[data-theme="dark"] .pos-card-badge-cat {
    border-color: #39483b !important;
    background: rgba(31, 45, 35, 0.96) !important;
    color: #c1ccc1 !important;
}

[data-theme="dark"] .notif-wrapper #notifDropdown {
    border-color: #39483b !important;
    background: #202b23 !important;
}

[data-theme="dark"] .notif-wrapper #notifDropdown > div:first-child {
    border-color: #303d32 !important;
    color: #e5ece4 !important;
}

[data-theme="dark"] .notif-wrapper #notifList {
    color: #c1ccc1;
}

[data-theme="dark"] .empty-state-icon {
    color: #8da391;
}

[data-theme="dark"] button:focus-visible,
[data-theme="dark"] a:focus-visible,
[data-theme="dark"] input:focus-visible,
[data-theme="dark"] select:focus-visible,
[data-theme="dark"] textarea:focus-visible {
    outline-color: rgba(145, 181, 157, 0.5);
}

[data-theme="dark"] .settings-form {
    border-color: #2e3b30 !important;
    background: #202b23 !important;
}

[data-theme="dark"] .table-no-img,
[data-theme="dark"] .table-thumb {
    border-color: #39483b !important;
    background: #1c261f !important;
}

@media (max-width: 900px) {
    .main-content > div[style*="grid-template-columns: 1fr 1fr"],
    .main-content .stats-grid[style*="repeat(5"] {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 600px) {
    .main-content > div[style*="grid-template-columns: 1fr 1fr"],
    .main-content [style*="repeat(3, 1fr)"] {
        grid-template-columns: minmax(0, 1fr) !important;
    }
}

@media print {
    body,
    #receipt {
        background: #fff !important;
        color: #000 !important;
    }
}

/* JAZ Ledger — graphite, porcelain and a measured teal accent */
:root,
[data-theme="light"] {
    --brand-50: #e9f7f7;
    --brand-100: #c9eded;
    --brand-200: #9cdddd;
    --brand-300: #67c8ca;
    --brand-400: #35b3b8;
    --brand-500: #159da5;
    --brand-600: #117f89;
    --brand-700: #126873;
    --brand-800: #14545e;
    --brand-900: #15464f;
    --accent-400: #6bc8c7;
    --accent-500: #159da5;
    --accent-600: #117f89;
    --bg-root: #f3f5f7;
    --bg-canvas: #f3f5f7;
    --bg-surface-1: #202b3a;
    --bg-surface-2: #fff;
    --bg-surface-3: #f7f9fa;
    --bg-elevated: #fff;
    --bg-overlay: rgba(15, 23, 42, .48);
    --text-primary: #202b3a;
    --text-secondary: #526170;
    --text-tertiary: #7d8995;
    --text-brand: #117f89;
    --border-subtle: #e8edf0;
    --border-default: #d9e0e5;
    --border-strong: #c6d0d7;
    --border-brand: #b7dfe0;
    --shadow-sm: 0 1px 3px rgba(25, 39, 54, .045);
    --shadow-md: 0 6px 18px rgba(25, 39, 54, .065);
    --shadow-lg: 0 14px 36px rgba(25, 39, 54, .11);
    --shadow-xl: 0 24px 64px rgba(15, 23, 42, .2);
    --shadow-glow: 0 6px 18px rgba(21, 157, 165, .11);
    --shadow-glow-brand: 0 8px 24px rgba(21, 157, 165, .15);
    --radius-sm: 5px;
    --radius-md: 7px;
    --radius-lg: 9px;
    --radius-xl: 11px;
    --radius-2xl: 14px;
    --sidebar-width: 236px;
}

html,
body,
.main-content {
    background: #f3f5f7 !important;
    color: #263545 !important;
}

body {
    padding-top: 48px;
    font-family: var(--font-arabic) !important;
    line-height: 1.6;
}

body::before {
    display: none !important;
}

body::after {
    position: fixed;
    z-index: 68;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    height: 48px;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e6eaed;
    background: #fff;
    color: #445363;
    content: "JAZ   /   نظام إدارة الحسابات";
    font-size: .79rem;
    font-weight: 600;
    letter-spacing: .01em;
}

::selection {
    background: #159da5;
}

.sidebar {
    top: 48px !important;
    background: #202b3a !important;
    color: #e7edf3 !important;
    box-shadow: none !important;
}

.sidebar::before {
    display: none !important;
}

.sidebar-header {
    padding: 21px 17px 17px !important;
    border-color: rgba(255,255,255,.09) !important;
}

.sidebar-logo {
    gap: 9px;
    margin-bottom: 5px !important;
    color: #f3f6f9 !important;
    font-size: 1rem !important;
}

.sidebar-logo::before {
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 6px;
    background: #159da5;
    color: #fff;
    font-family: var(--font-arabic);
    font-size: 17px;
}

.sidebar-subtitle {
    padding-right: 39px;
    color: #a6b2bf !important;
    font-size: .69rem !important;
}

.sidebar-nav {
    gap: 2px !important;
    padding: 13px 10px !important;
}

.nav-item {
    min-height: 38px;
    gap: 10px !important;
    padding: 7px 10px !important;
    border-radius: 5px !important;
    color: #bdc8d3 !important;
    font-size: .81rem !important;
}

.nav-item:hover {
    background: rgba(255,255,255,.07) !important;
    color: #fff !important;
}

.nav-item.active {
    background: #159da5 !important;
    color: #fff !important;
}

.nav-item.active::before {
    display: none !important;
}

.nav-icon {
    width: 23px !important;
    height: 23px;
    border-radius: 5px;
    color: #8bd1d1 !important;
}

.nav-item.active .nav-icon {
    background: transparent !important;
    color: #fff !important;
}

.nav-item:hover .nav-icon {
    transform: none !important;
}

.sidebar-footer {
    padding: 12px !important;
    border-color: rgba(255,255,255,.09) !important;
    background: #1b2532 !important;
}

.sidebar-footer button,
.sidebar-footer .logout-btn {
    min-height: 36px;
    border-color: rgba(255,255,255,.12) !important;
    border-radius: 5px !important;
    background: rgba(255,255,255,.07) !important;
    color: #d5dee7 !important;
    font-size: .78rem;
}

.sidebar-footer button:hover {
    border-color: #159da5 !important;
    background: rgba(21,157,165,.18) !important;
    color: #fff !important;
}

.main-content {
    width: calc(100% - var(--sidebar-width)) !important;
    min-height: calc(100vh - 48px);
    margin-right: var(--sidebar-width) !important;
    padding: 20px 26px 34px !important;
}

.page-header {
    margin: -20px -26px 20px !important;
    padding: 9px 26px 10px !important;
    border: 0 !important;
    border-bottom: 1px solid #dfe5e9 !important;
    background: #e9edf0 !important;
}

.page-header::before {
    margin: 0 0 2px !important;
    color: #687786 !important;
    content: "الرئيسية   /   مساحة العمل" !important;
    font-size: .65rem !important;
    font-weight: 500 !important;
    letter-spacing: 0 !important;
}

body:has(.nav-item.active[href$="statistics.html"]) .page-header::before { content: "الرئيسية   /   الإحصائيات" !important; }
body:has(.nav-item.active[href$="agents.html"]) .page-header::before { content: "الرئيسية   /   الوكلاء" !important; }
body:has(.nav-item.active[href$="cards.html"]) .page-header::before { content: "الرئيسية   /   الكروت" !important; }
body:has(.nav-item.active[href$="reports.html"]) .page-header::before { content: "الرئيسية   /   التقارير" !important; }
body:has(.nav-item.active[href$="pos.html"]) .page-header::before { content: "الرئيسية   /   نقطة البيع" !important; }
body:has(.nav-item.active[href$="inventory.html"]) .page-header::before { content: "الرئيسية   /   المخزون" !important; }
body:has(.nav-item.active[href$="users.html"]) .page-header::before { content: "الرئيسية   /   المستخدمون" !important; }
body:has(.nav-item.active[href$="activity.html"]) .page-header::before { content: "الرئيسية   /   سجل الإجراءات" !important; }
body:has(.nav-item.active[href$="settings.html"]) .page-header::before { content: "الرئيسية   /   الإعدادات" !important; }

.page-title {
    color: #344658 !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
}

.page-subtitle {
    margin-top: 0 !important;
    color: #748291 !important;
    font-size: .72rem !important;
}

.card,
.stat-card,
.stat-card-mini {
    border: 1px solid #e3e8ec !important;
    border-radius: 7px !important;
    background: #fff !important;
    box-shadow: 0 1px 3px rgba(31,45,61,.035) !important;
    backdrop-filter: none !important;
    animation: none !important;
}

.card {
    margin-bottom: 16px !important;
}

.card:hover,
.stat-card:hover {
    border-color: #d2dce2 !important;
    box-shadow: 0 4px 12px rgba(31,45,61,.055) !important;
}

.card-header {
    min-height: 48px;
    padding: 11px 15px !important;
    border-color: #e8edf0 !important;
    background: #fff !important;
}

.card-title {
    color: #3a4b5c !important;
    font-size: .88rem !important;
    font-weight: 600 !important;
}

.stats-grid {
    gap: 12px !important;
    margin-bottom: 17px !important;
}

.stat-card {
    min-height: 86px;
    gap: 12px !important;
    padding: 14px 16px !important;
}

.stat-card::before,
.stat-card::after {
    display: none !important;
}

.stat-icon,
.stat-icon.primary,
.stat-icon.secondary,
.stat-icon.accent,
.stat-icon.danger,
.stat-card-mini .stat-icon {
    width: 36px !important;
    height: 36px !important;
    border: 1px solid #d7eff0 !important;
    border-radius: 6px !important;
    background: #eaf7f7 !important;
    color: #178b92 !important;
    box-shadow: none !important;
    font-size: 1rem !important;
}

.stat-info h3,
.stat-card-mini .stat-info h3 {
    color: #263849 !important;
    font-size: 1.28rem !important;
    font-weight: 650 !important;
    letter-spacing: -.025em !important;
}

.stat-info p,
.stat-card-mini .stat-info p {
    margin-top: 1px !important;
    color: #788694 !important;
    font-size: .71rem !important;
    font-weight: 500 !important;
    text-transform: none !important;
}

.dashboard-intro {
    min-height: 0 !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 18px !important;
    margin: 0 0 16px !important;
    padding: 10px 0 14px !important;
    overflow: visible !important;
    border: 0 !important;
    border-bottom: 1px solid #e1e6e9 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    color: #263849 !important;
}

.dashboard-intro::before,
.dashboard-intro::after,
.dashboard-mark {
    display: none !important;
}

.dashboard-kicker {
    margin-bottom: 3px !important;
    color: #159da5 !important;
    font-size: .61rem !important;
    letter-spacing: .09em !important;
}

.dashboard-intro h2 {
    color: #344658 !important;
    font-size: 1.2rem !important;
    font-weight: 600 !important;
    letter-spacing: -.02em !important;
}

.dashboard-intro p {
    margin-top: 2px !important;
    color: #748291 !important;
    font-size: .78rem !important;
}

.dashboard-actions {
    gap: 7px !important;
}

.dashboard-action {
    min-height: 34px !important;
    gap: 9px !important;
    padding: 6px 10px !important;
    border: 1px solid #d9e2e7 !important;
    border-radius: 5px !important;
    background: #fff !important;
    color: #425466 !important;
    font-size: .73rem !important;
}

.dashboard-action-primary {
    border-color: #159da5 !important;
    background: #159da5 !important;
    color: #fff !important;
}

.dashboard-action:hover {
    border-color: #159da5 !important;
    background: #edf8f8 !important;
    color: #117f89 !important;
    transform: none !important;
}

.dashboard-action-primary:hover {
    background: #117f89 !important;
    color: #fff !important;
}

.main-content:has(.dashboard-intro) > .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.main-content:has(.dashboard-intro) > .stats-grid .stat-card:first-child {
    grid-column: auto !important;
    border-color: #e3e8ec !important;
    background: #fff !important;
    box-shadow: 0 1px 3px rgba(31,45,61,.035) !important;
}

.main-content:has(.dashboard-intro) > .stats-grid .stat-card:first-child .stat-info h3 {
    color: #263849 !important;
    font-size: 1.28rem !important;
}

.main-content:has(.dashboard-intro) > .stats-grid .stat-card:first-child .stat-info p {
    color: #788694 !important;
}

.main-content:has(.dashboard-intro) > .stats-grid .stat-card:first-child .stat-icon {
    border-color: #d7eff0 !important;
    background: #eaf7f7 !important;
    color: #178b92 !important;
}

.dashboard-charts > .card {
    min-width: 0;
}

.main-content:has(.dashboard-intro) .card-header::before {
    width: 3px;
    height: 15px;
    margin-left: 7px;
    border-radius: 1px;
    background: #159da5;
}

.table-container,
.table-responsive {
    border-radius: 0 0 7px 7px !important;
}

table {
    background: #fff !important;
}

th {
    padding: 10px 12px !important;
    border-bottom: 1px solid #159da5 !important;
    background: #159da5 !important;
    color: #fff !important;
    font-size: .73rem !important;
    font-weight: 600 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}

td {
    padding: 9px 12px !important;
    border-bottom: 1px solid #e5eaed !important;
    color: #4a5967 !important;
    font-size: .78rem !important;
}

tbody tr:nth-child(even) {
    background: #f2f4f6 !important;
}

tbody tr:hover td {
    background: #e9f6f6 !important;
}

.btn {
    min-height: 34px !important;
    padding: 6px 12px !important;
    border-radius: 5px !important;
    font-size: .77rem !important;
}

.btn-primary,
.filter-btn,
.btn-save {
    border: 1px solid #159da5 !important;
    background: #159da5 !important;
    color: #fff !important;
    box-shadow: none !important;
}

.btn-primary:hover,
.filter-btn:hover,
.btn-save:hover {
    border-color: #117f89 !important;
    background: #117f89 !important;
    box-shadow: none !important;
    transform: none !important;
}

.btn-secondary,
.btn-icon {
    border: 1px solid #d9e1e6 !important;
    background: #fff !important;
    color: #516170 !important;
}

.btn-secondary:hover,
.btn-icon:hover {
    border-color: #9dcfd0 !important;
    background: #f0f8f8 !important;
    color: #117f89 !important;
}

.form-control,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
select,
textarea,
.multi-select-display,
.filter-group input,
.filter-group select {
    border: 1px solid #d7dfe4 !important;
    border-radius: 5px !important;
    background: #fff !important;
    color: #344658 !important;
    box-shadow: none !important;
}

.form-control:focus,
input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
select:focus,
textarea:focus {
    border-color: #47b4b8 !important;
    box-shadow: 0 0 0 2px rgba(21,157,165,.12) !important;
}

.form-label,
.form-group label,
.filter-group label {
    color: #506070 !important;
    font-size: .77rem !important;
    font-weight: 600 !important;
}

.badge-primary,
.multi-select-tag {
    border-color: #c7e9e9 !important;
    background: #e8f6f6 !important;
    color: #117f89 !important;
}

.modal,
.modal-overlay .modal-box {
    border: 1px solid #dfe5e9 !important;
    border-radius: 9px !important;
    background: #fff !important;
    color: #344658 !important;
    box-shadow: 0 18px 48px rgba(21,35,49,.19) !important;
}

.modal-header,
.modal-footer {
    border-color: #e7ecef !important;
    background: #fff !important;
}

.modal-title {
    color: #344658 !important;
}

.filter-section,
.filters-section {
    border: 1px solid #e3e8ec !important;
    border-radius: 6px !important;
    background: #f7f9fa !important;
}

.activity-table th {
    background: #159da5 !important;
    color: #fff !important;
}

.pagination button {
    border: 1px solid #d9e1e6 !important;
    border-radius: 5px !important;
    background: #fff !important;
    color: #516170 !important;
}

.pagination button:hover:not(:disabled) {
    background: #e8f6f6 !important;
    color: #117f89 !important;
}

.file-upload {
    border-color: #a9d8da !important;
    border-radius: 7px !important;
    background: #f7fbfb !important;
}

.file-upload:hover,
.file-upload.dragover {
    border-color: #159da5 !important;
    background: #edf8f8 !important;
}

.settings-form {
    border: 1px solid #e3e8ec !important;
    border-radius: 7px !important;
    background: #fff !important;
}

.settings-preview {
    border-radius: 4px !important;
}

.inventory-tab {
    border-color: #d9e1e6 !important;
    border-radius: 5px !important;
    background: #fff !important;
    color: #526170 !important;
}

.inventory-tab.active {
    border-color: #159da5 !important;
    background: #159da5 !important;
    color: #fff !important;
    box-shadow: none !important;
}

.pos-header-bar,
.pos-toolbar,
.pos-cart-panel,
.pos-product-card,
.pos-cart,
.pos-order-panel {
    border-color: #e0e6ea !important;
    border-radius: 7px !important;
    background: #fff !important;
    box-shadow: 0 1px 3px rgba(31,45,61,.04) !important;
    backdrop-filter: none !important;
}

.pos-header-bar {
    margin-bottom: 12px !important;
    padding: 10px 14px !important;
}

.pos-header-title h1,
.pos-cart-title,
.pos-cart-panel h2,
.pos-order-panel h2,
.pos-cart h2 {
    color: #344658 !important;
}

.pos-header-title h1 {
    font-size: 1.05rem !important;
}

.pos-stat-pill,
.pos-shortcut-badge {
    border-color: #e0e6ea !important;
    border-radius: 5px !important;
    background: #f6f8f9 !important;
    color: #637282 !important;
}

.pos-clock,
.pos-card-price,
.pos-cart-item-price-calc strong,
.pos-summary-row.total {
    color: #117f89 !important;
}

.pos-search-input,
.pos-checkout-input {
    border-color: #d7dfe4 !important;
    border-radius: 5px !important;
    background: #fff !important;
    color: #344658 !important;
    box-shadow: none !important;
}

.pos-product-card:hover {
    border-color: #9dcfd0 !important;
    box-shadow: 0 4px 12px rgba(31,45,61,.07) !important;
}

.pos-cart-header,
.pos-cart-footer {
    border-color: #e5eaed !important;
    background: #f7f9fa !important;
}

.pos-cart-item {
    border-color: #e4e9ec !important;
    border-radius: 6px !important;
    background: #fafbfc !important;
}

.pos-btn-checkout,
.pos-checkout-btn,
.checkout-btn {
    border-radius: 5px !important;
    background: #159da5 !important;
    box-shadow: none !important;
}

.pos-btn-checkout:hover,
.pos-checkout-btn:hover,
.checkout-btn:hover {
    background: #117f89 !important;
    box-shadow: none !important;
}

.menu-toggle {
    top: 7px !important;
    right: 9px !important;
    z-index: 82 !important;
    width: 34px !important;
    height: 34px !important;
    border: 0 !important;
    border-radius: 4px !important;
    background: transparent !important;
    box-shadow: none !important;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    background: #526170 !important;
}

body:has(.login-container) {
    padding-top: 0;
    justify-content: flex-end !important;
    padding-right: clamp(32px, 9vw, 150px) !important;
    background: #f3f5f7 !important;
}

body:has(.login-container)::before {
    width: 44%;
    border: 0;
    border-right: 3px solid #159da5;
    background: linear-gradient(150deg, #202b3a 0%, #293849 100%);
    color: #eef3f6;
    content: "JAZ  /  LEDGER\A\Aنظام واحد.\Aرؤية كاملة.\A\Aالحسابات • المبيعات • المخزون";
}

body:has(.login-container)::after {
    display: none !important;
}

.login-container {
    border-color: #e0e6ea !important;
    border-radius: 9px !important;
    box-shadow: 0 10px 32px rgba(31,45,61,.08) !important;
}

.login-container::before {
    background: #159da5 !important;
}

.logo h1,
.logo h1::before {
    color: #253648 !important;
    -webkit-text-fill-color: #253648 !important;
}

.logo h1 span,
.logo h1::after {
    color: #159da5 !important;
    -webkit-text-fill-color: #159da5 !important;
}

.login-btn {
    border-radius: 5px !important;
    background: #159da5 !important;
}

.login-btn:hover {
    background: #117f89 !important;
}

[data-theme="dark"] {
    --brand-500: #35b3b8;
    --brand-600: #159da5;
    --bg-root: #18212c;
    --bg-canvas: #18212c;
    --bg-surface-1: #202b3a;
    --bg-surface-2: #222e3b;
    --bg-surface-3: #263442;
    --bg-elevated: #263442;
    --text-primary: #edf2f6;
    --text-secondary: #c0cbd5;
    --text-tertiary: #94a3b2;
    --border-subtle: #303e4d;
    --border-default: #3b4b5a;
}

[data-theme="dark"] body,
[data-theme="dark"] .main-content,
[data-theme="dark"] html {
    background: #18212c !important;
    color: #edf2f6 !important;
}

[data-theme="dark"] body::after {
    border-color: #303e4d;
    background: #222e3b;
    color: #d5dfe7;
}

[data-theme="dark"] .sidebar {
    background: #202b3a !important;
}

[data-theme="dark"] .page-header {
    border-color: #364452 !important;
    background: #283542 !important;
}

[data-theme="dark"] .page-title,
[data-theme="dark"] .card-title,
[data-theme="dark"] .modal-title,
[data-theme="dark"] .dashboard-intro h2,
[data-theme="dark"] .pos-header-title h1,
[data-theme="dark"] .pos-cart-title {
    color: #e5edf3 !important;
}

[data-theme="dark"] .page-header::before,
[data-theme="dark"] .page-subtitle,
[data-theme="dark"] .dashboard-intro p {
    color: #aab8c5 !important;
}

[data-theme="dark"] .card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .stat-card-mini,
[data-theme="dark"] .pos-header-bar,
[data-theme="dark"] .pos-toolbar,
[data-theme="dark"] .pos-market-panel,
[data-theme="dark"] .pos-cart-panel,
[data-theme="dark"] .pos-product-card,
[data-theme="dark"] .settings-form {
    border-color: #303e4d !important;
    background: #222e3b !important;
}

[data-theme="dark"] .card-header,
[data-theme="dark"] .pos-cart-header,
[data-theme="dark"] .pos-cart-footer,
[data-theme="dark"] .modal-header,
[data-theme="dark"] .modal-footer {
    border-color: #303e4d !important;
    background: #202b37 !important;
}

[data-theme="dark"] th {
    background: #117f89 !important;
}

[data-theme="dark"] td {
    border-color: #303e4d !important;
    color: #c5d0da !important;
}

[data-theme="dark"] tbody tr:nth-child(even) {
    background: #263442 !important;
}

[data-theme="dark"] tbody tr:hover td {
    background: #2b3c4a !important;
}

[data-theme="dark"] .stat-info h3,
[data-theme="dark"] .stat-card-mini .stat-info h3,
[data-theme="dark"] .pos-card-name,
[data-theme="dark"] .pos-cart-item-title {
    color: #e6edf2 !important;
}

[data-theme="dark"] .stat-info p,
[data-theme="dark"] .stat-card-mini .stat-info p,
[data-theme="dark"] .text-muted {
    color: #9cabb9 !important;
}

[data-theme="dark"] .stat-icon,
[data-theme="dark"] .stat-icon.primary,
[data-theme="dark"] .stat-icon.secondary,
[data-theme="dark"] .stat-icon.accent,
[data-theme="dark"] .stat-icon.danger {
    border-color: #315157 !important;
    background: #263e45 !important;
    color: #74c8ca !important;
}

[data-theme="dark"] .dashboard-intro {
    border-color: #344352 !important;
}

[data-theme="dark"] .dashboard-action {
    border-color: #43515e !important;
    background: #222e3b !important;
    color: #d1dbe3 !important;
}

[data-theme="dark"] .dashboard-action-primary {
    border-color: #159da5 !important;
    background: #159da5 !important;
    color: #fff !important;
}

[data-theme="dark"] .form-control,
[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] .filter-group input,
[data-theme="dark"] .filter-group select,
[data-theme="dark"] .pos-search-input,
[data-theme="dark"] .pos-checkout-input {
    border-color: #40505e !important;
    background: #1d2833 !important;
    color: #e4ebf0 !important;
}

[data-theme="dark"] .form-label,
[data-theme="dark"] .form-group label,
[data-theme="dark"] .filter-group label {
    color: #c1ccd5 !important;
}

[data-theme="dark"] .modal,
[data-theme="dark"] .modal-overlay .modal-box {
    border-color: #394957 !important;
    background: #222e3b !important;
    color: #e5edf3 !important;
}

[data-theme="dark"] .filter-section,
[data-theme="dark"] .filters-section,
[data-theme="dark"] .file-upload {
    border-color: #364653 !important;
    background: #202b37 !important;
}

[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .pagination button {
    border-color: #40505e !important;
    background: #263442 !important;
    color: #d1dbe3 !important;
}

[data-theme="dark"] .pos-cart-item {
    border-color: #354351 !important;
    background: #202b37 !important;
}

[data-theme="dark"] .settings-preview {
    color: #000 !important;
    background: #fff !important;
}

@media (max-width: 900px) {
    body {
        padding-top: 48px;
    }

    body::after {
        justify-content: center;
        height: 48px;
        padding-right: 48px;
        font-size: .73rem;
    }

    .sidebar {
        top: 0 !important;
        width: min(280px, 86vw) !important;
        height: 100vh;
        transform: translateX(100%);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        width: 100% !important;
        margin-right: 0 !important;
        padding: 16px 18px 28px !important;
    }

    .page-header {
        margin: -16px -18px 18px !important;
        padding: 9px 18px 10px !important;
    }

    .main-content:has(.dashboard-intro) > .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .pos-layout {
        grid-template-columns: minmax(0, 1fr) !important;
        height: auto !important;
        min-height: 0 !important;
    }

    body:has(.login-container) {
        padding-top: 0;
        justify-content: center !important;
        padding: 20px !important;
    }

    body:has(.login-container)::before {
        display: none !important;
    }
}

@media (max-width: 600px) {
    .main-content {
        padding: 14px 12px 24px !important;
    }

    .page-header {
        margin: -14px -12px 14px !important;
        padding: 8px 12px !important;
    }

    .dashboard-intro {
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: start !important;
        gap: 11px !important;
        padding: 8px 0 12px !important;
    }

    .dashboard-intro h2 {
        font-size: 1.1rem !important;
    }

    .dashboard-actions {
        width: 100%;
    }

    .dashboard-action {
        flex: 1;
    }

    .main-content:has(.dashboard-intro) > .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .stat-card {
        min-height: 75px;
        gap: 8px !important;
        padding: 10px !important;
    }

    .stat-icon {
        width: 31px !important;
        height: 31px !important;
        font-size: .9rem !important;
    }

    .stat-info h3 {
        font-size: 1.08rem !important;
    }

    .card-header {
        min-height: 43px;
        padding: 9px 11px !important;
    }

    th,
    td {
        padding: 8px 9px !important;
        font-size: .72rem !important;
    }

    .pos-header-bar {
        padding: 10px 56px 10px 10px !important;
    }

    .login-container {
        width: 100% !important;
        max-width: 420px !important;
        padding: 36px 25px !important;
    }
}

@media print {
    body {
        padding-top: 0 !important;
    }

    body::after {
        display: none !important;
    }
}

.nav-icon::before {
    display: none !important;
    content: none !important;
}

.ui-icon {
    display: inline-block;
    width: 1.15em;
    height: 1.15em;
    flex: 0 0 auto;
    vertical-align: -0.2em;
    stroke: currentColor;
    transition: color 160ms ease, transform 160ms ease;
}

.nav-icon .ui-icon {
    width: 19px;
    height: 19px;
    color: #88d3d4;
    vertical-align: middle;
}

.nav-item.active .nav-icon .ui-icon {
    color: #fff;
}

.stat-icon .ui-icon {
    width: 1.35em;
    height: 1.35em;
    color: #117f89;
}

.btn .ui-icon,
.dashboard-action .ui-icon,
.pos-header-title .ui-icon,
.pos-cart-title .ui-icon {
    width: 1.1em;
    height: 1.1em;
    color: currentColor;
}

.empty-state-icon .ui-icon {
    width: 2.6rem;
    height: 2.6rem;
    color: #159da5;
    stroke-width: 1.5;
}

.ui-icon-chart-column,
.ui-icon-chart-trend,
.ui-icon-chart-pie,
.ui-icon-wallet-cards,
.ui-icon-credit-card {
    color: #159da5;
}

.ui-icon-users-round,
.ui-icon-user-round {
    color: #596ac2;
}

.ui-icon-folder-open,
.ui-icon-package,
.ui-icon-file-text,
.ui-icon-receipt-text {
    color: #dd9a3c;
}

.ui-icon-bell,
.ui-icon-triangle-alert {
    color: #d59235;
}

.ui-icon-circle-check {
    color: #29876f;
}

.ui-icon-circle-x,
.ui-icon-trash-2 {
    color: #c65a5d;
}

.ui-icon-settings-2,
.ui-icon-calendar-days,
.ui-icon-clipboard-list {
    color: #708298;
}

body:has(.nav-item.active[href$="inventory.html"]) input[type="text"],
body:has(.nav-item.active[href$="inventory.html"]) input[type="number"],
body:has(.nav-item.active[href$="inventory.html"]) input[type="date"],
body:has(.nav-item.active[href$="inventory.html"]) input[type="file"],
body:has(.nav-item.active[href$="inventory.html"]) select,
body:has(.nav-item.active[href$="inventory.html"]) textarea,
body:has(.nav-item.active[href$="inventory.html"]) .smart-select-trigger {
    border-color: #d7dfe4 !important;
    background: #fff !important;
    color: #344658 !important;
    box-shadow: none !important;
}

body:has(.nav-item.active[href$="inventory.html"]) input[type="text"]:focus,
body:has(.nav-item.active[href$="inventory.html"]) input[type="number"]:focus,
body:has(.nav-item.active[href$="inventory.html"]) input[type="date"]:focus,
body:has(.nav-item.active[href$="inventory.html"]) select:focus,
body:has(.nav-item.active[href$="inventory.html"]) textarea:focus,
body:has(.nav-item.active[href$="inventory.html"]) .smart-select-container.open .smart-select-trigger {
    border-color: #47b4b8 !important;
    background: #fff !important;
    box-shadow: 0 0 0 2px rgba(21, 157, 165, .12) !important;
}

body:has(.nav-item.active[href$="inventory.html"]) input::placeholder,
body:has(.nav-item.active[href$="inventory.html"]) textarea::placeholder {
    color: #8a98a5 !important;
}

body:has(.nav-item.active[href$="inventory.html"]) select option {
    background: #fff !important;
    color: #344658 !important;
}

body:has(.nav-item.active[href$="inventory.html"]) .form-group label,
body:has(.nav-item.active[href$="inventory.html"]) .profit-live-box .p-title {
    color: #506070 !important;
}

body:has(.nav-item.active[href$="inventory.html"]) .modal-overlay .modal-box {
    border-color: #d9e0e5 !important;
    background: #fff !important;
    color: #344658 !important;
    box-shadow: 0 18px 48px rgba(15, 23, 42, .2) !important;
}

body:has(.nav-item.active[href$="inventory.html"]) .modal-header {
    border-color: #e8edf0 !important;
}

body:has(.nav-item.active[href$="inventory.html"]) .modal-title {
    color: #263545 !important;
}

body:has(.nav-item.active[href$="inventory.html"]) .smart-select-menu {
    border-color: #d9e0e5 !important;
    background: #fff !important;
    box-shadow: 0 12px 28px rgba(15, 23, 42, .12) !important;
}

body:has(.nav-item.active[href$="inventory.html"]) .smart-select-search,
body:has(.nav-item.active[href$="inventory.html"]) .smart-select-add-footer {
    border-color: #e8edf0 !important;
    background: #f7f9fa !important;
}

body:has(.nav-item.active[href$="inventory.html"]) .smart-option-item:hover {
    background: #e8f6f6 !important;
    color: #117f89 !important;
}

body:has(.nav-item.active[href$="inventory.html"]) .smart-option-item.selected {
    background: #e8f6f6 !important;
    color: #117f89 !important;
}

html:not([data-theme="dark"]) .text-muted,
html:not([data-theme="dark"]) .pagination span {
    color: #657789 !important;
}

html:not([data-theme="dark"]) .page-subtitle {
    color: #526170 !important;
}

th,
.activity-table th {
    border-bottom-color: #117f89 !important;
    background: #117f89 !important;
    color: #fff !important;
}

.btn-primary,
.filter-btn,
.btn-save,
.inventory-tab.active,
.nav-item.active,
.dashboard-action-primary,
.pos-btn-checkout,
.pos-checkout-btn,
.checkout-btn,
.login-btn {
    border-color: #117f89 !important;
    background: #117f89 !important;
    color: #fff !important;
}

.btn-primary:hover,
.filter-btn:hover,
.btn-save:hover,
.inventory-tab.active:hover,
.nav-item.active:hover,
.dashboard-action-primary:hover,
.pos-btn-checkout:hover,
.pos-checkout-btn:hover,
.checkout-btn:hover,
.login-btn:hover {
    border-color: #0e6870 !important;
    background: #0e6870 !important;
    color: #fff !important;
}

body:has(.nav-item.active[href$="index.html"]) .dashboard-kicker {
    color: #117f89 !important;
}
