:root {
    --brand-950: #0c302a;
    --brand-900: #123f36;
    --brand-800: #123f36;
    --brand-700: #218f7a;
    --brand-600: #218f7a;
    --brand-500: #47ad97;
    --brand-100: #ddf3e9;
    --brand-accent: #d7a95b;
    --app-bg: #f5f8f7;
    --surface: #ffffff;
    --surface-soft: #f8faf9;
    --text-primary: #172b2a;
    --text-secondary: #465b56;
    --text-muted: #586b66;
    --border-color: #e4ebe8;
    --table-head-bg: #f6f8f7;
    --table-row-bg: #ffffff;
    --table-row-hover: #f2f8f6;
    --input-bg: #ffffff;
    --input-border: #d9e3df;
    --shadow-soft: 0 8px 24px rgba(27, 57, 52, 0.06);
    --shadow-card: 0 14px 36px rgba(27, 57, 52, 0.075);
}

[data-theme="dark"] {
    --brand-950: #081e1a;
    --brand-900: #123f36;
    --brand-800: #174e43;
    --brand-700: #218f7a;
    --brand-600: #218f7a;
    --brand-500: #4ab49e;
    --brand-100: #193a34;
    --brand-accent: #e0b766;
    --app-bg: #101b1c;
    --surface: #182627;
    --surface-soft: #1d2d2e;
    --text-primary: #e8f0ed;
    --text-secondary: #c8d5d0;
    --text-muted: #adbbb6;
    --border-color: #2b3d3c;
    --table-head-bg: #203130;
    --table-row-bg: #182627;
    --table-row-hover: #203432;
    --input-bg: #142121;
    --input-border: #344847;
    --shadow-soft: 0 8px 24px rgba(0, 0, 0, 0.18);
    --shadow-card: 0 14px 36px rgba(0, 0, 0, 0.2);
}

html,
body {
    color: var(--text-primary);
    font-family: "Figtree", "Segoe UI", Tahoma, Arial, sans-serif;
}

body:not(.pos-mode):not(.login-page) {
    background:
        radial-gradient(ellipse at 92% 0%, rgba(66, 180, 158, 0.075), transparent 34rem),
        var(--app-bg);
}

::selection {
    color: #fff;
    background: var(--brand-700);
}

a {
    color: var(--brand-700);
    transition: color 0.2s ease;
}

a:hover {
    color: var(--brand-800);
}

.main-content {
    min-width: 0;
    padding-block: 1.15rem 0.75rem;
    background: transparent;
}

.app-header {
    z-index: 1020;
    margin: 0 0 0.5rem;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.app-header.card {
    overflow: visible;
}

.topbar {
    margin-bottom: 0 !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-soft) !important;
}

.topbar .card-body {
    min-height: 70px;
    padding: 0.8rem 1.2rem;
    border-radius: inherit;
    background: transparent;
}

.topbar-brand,
.header-eyebrow,
.card-eyebrow {
    margin: 0 0 0.25rem;
    color: var(--brand-700);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.topbar-brand {
    color: var(--text-primary);
    font-size: 1rem;
    letter-spacing: 0;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.app-header.card {
    display: flex;
    min-height: 84px;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.85rem 1.1rem;
    border: 1px solid var(--border-color);
    border-radius: 18px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
}

.header-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-weight: 750;
    line-height: 1.35;
}

.header-subtitle {
    margin: 0.2rem 0 0;
    color: var(--text-muted);
    font-size: 0.8rem;
}

.user-chip {
    gap: 0.65rem;
    padding: 0.4rem 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--surface-soft);
    box-shadow: none;
}

.user-avatar {
    width: 38px;
    height: 38px;
    background: linear-gradient(145deg, #dcf4ea, #b5e3d3);
    color: var(--brand-800);
}

.user-name,
.user-email {
    color: var(--text-primary);
}

.user-email {
    color: var(--text-muted);
}

.locale-pill {
    display: inline-flex;
    min-width: 38px;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    background: var(--surface);
    font-size: 0.72rem;
    font-weight: 800;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    background: var(--surface);
    box-shadow: none;
}

.btn-icon:hover {
    border-color: var(--brand-500);
    color: var(--brand-700);
    background: var(--brand-100);
}

.app-body {
    min-width: 0;
    padding: 0.75rem 0 1.25rem;
    scrollbar-color: #b7c9c2 transparent;
    scrollbar-width: thin;
}

@keyframes content-enter {
    from {
        opacity: 0;
        transform: translateY(7px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-container {
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.content-container > .card-body {
    padding: 0.35rem 0 0;
}

.page-header {
    gap: 1rem;
    margin-bottom: 1.35rem !important;
    padding: 0 0 1rem;
    border-bottom: 1px solid var(--border-color);
}

.page-header h1,
.page-header h2,
.page-header h3,
.page-header h5,
.page-title {
    color: var(--text-primary);
    font-weight: 750;
}

.page-header .text-muted,
.page-header p {
    color: var(--text-muted) !important;
}

.sidebar {
    z-index: 1030;
    box-sizing: border-box;
    min-height: 100vh;
    padding: 0;
    border-inline-end: 1px solid var(--border-color);
    background: var(--surface);
    box-shadow: 5px 0 24px rgba(27, 57, 52, 0.045);
    scrollbar-width: thin;
}

.sidebar-inner {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    gap: 1.45rem;
    padding: 1.25rem 0.9rem 1rem;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.2rem 0.35rem 1.1rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-brand > div:last-child {
    min-width: 0;
}

.sidebar .brand-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(145deg, var(--brand-600), var(--brand-800));
    box-shadow: 0 7px 16px rgba(36, 115, 106, 0.2);
}

.sidebar .brand-icon i {
    font-size: 1rem;
}

.sidebar .brand-title {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 800;
}

.sidebar .brand-subtitle {
    display: block;
    margin-top: 0.15rem;
    color: var(--text-muted);
    font-size: 0.67rem;
}

.sidebar-section {
    min-width: 0;
}

.sidebar-section-label {
    margin: 0 0 0.55rem;
    padding-inline: 0.65rem;
    color: var(--text-muted);
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.sidebar-links {
    display: grid;
    gap: 0.2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.sidebar .sidebar-link,
#sidebar .nav-link {
    display: flex;
    width: 100%;
    min-height: 43px;
    align-items: center;
    gap: 0.7rem;
    padding: 0.45rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 11px;
    color: var(--text-secondary);
    background: transparent;
    font-size: 0.82rem;
    font-weight: 650;
    text-decoration: none;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}

.sidebar .sidebar-link:hover,
#sidebar .nav-link:hover:not(.active) {
    border-color: var(--border-color);
    color: var(--brand-800);
    background: var(--surface-soft);
    transform: translateX(-2px);
}

.sidebar .sidebar-link.active,
#sidebar .nav > .nav-item > .nav-link.active {
    border-color: rgba(46, 149, 133, 0.13);
    color: var(--brand-800);
    background: var(--brand-100);
    box-shadow: inset 3px 0 0 var(--brand-600);
}

.sidebar .sidebar-link-icon,
#sidebar .nav-link > i {
    display: inline-flex;
    width: 30px;
    height: 30px;
    flex: 0 0 30px;
    align-items: center;
    justify-content: center;
    margin: 0 !important;
    border-radius: 9px;
    color: var(--brand-700);
    background: var(--surface-soft);
    font-size: 0.82rem;
    transition: inherit;
}

.sidebar .sidebar-link.active .sidebar-link-icon,
#sidebar .nav-link.active > i {
    color: #fff;
    background: var(--brand-600);
}

.sidebar-link-text {
    display: grid;
    min-width: 0;
    flex: 1;
    gap: 0.08rem;
}

.sidebar-link-text small {
    color: var(--text-muted);
    font-size: 0.64rem;
    font-weight: 500;
}

.sidebar-badge {
    padding: 0.15rem 0.45rem;
    border-radius: 99px;
    color: var(--brand-800);
    background: var(--brand-100);
    font-size: 0.65rem;
    font-weight: 800;
}

.sidebar-footer {
    margin-top: auto;
    padding: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--surface-soft);
}

.sidebar-footer-title {
    margin: 0 0 0.25rem;
    color: var(--text-primary);
    font-size: 0.76rem;
    font-weight: 750;
}

.sidebar-footer-text {
    margin: 0 0 0.7rem;
    color: var(--text-muted);
    font-size: 0.67rem;
    line-height: 1.55;
}

.sidebar-languages {
    display: flex;
    gap: 0.4rem;
}

.sidebar-language-link {
    padding: 0.25rem 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    background: var(--surface);
    font-size: 0.68rem;
    font-weight: 700;
    text-decoration: none;
}

.sidebar-language-link:hover {
    border-color: var(--brand-500);
    color: var(--brand-700);
}

#sidebar .ps-3 .nav-link,
#sidebar .nav .collapse > .nav > .nav-item > .nav-link {
    min-height: 37px;
    padding: 0.35rem 0.55rem;
    border-radius: 9px;
    background: transparent;
    font-size: 0.77rem;
}

#sidebar .nav-link.active {
    border-color: rgba(46, 149, 133, 0.13);
    color: var(--brand-800);
    background: var(--brand-100);
    box-shadow: none;
}

#sidebar .nav-link.active > i {
    color: var(--brand-700);
    background: rgba(46, 149, 133, 0.11);
}

.sidebar .text-center h4 {
    color: var(--text-primary) !important;
    font-weight: 750;
}

.sidebar-backdrop {
    z-index: 1025;
}

.card {
    border: 1px solid var(--border-color);
    border-radius: 16px;
    color: var(--text-primary);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.card-header {
    padding: 1rem 1.15rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    background: transparent;
}

.card-body {
    color: var(--text-primary);
}

.glass-panel {
    overflow: hidden;
    border-color: var(--border-color);
    background: var(--surface);
}

.glass-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--surface);
}

.card-eyebrow {
    font-size: 0.64rem;
    letter-spacing: 0.1em;
}

.card-title {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 750;
}

.btn {
    border-radius: 10px;
    font-weight: 650;
    transition: transform 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, background 0.18s ease;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
}

.btn-primary {
    border-color: var(--brand-700);
    color: #fff;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
    box-shadow: 0 5px 12px rgba(36, 115, 106, 0.16);
}

.btn-primary:hover,
.btn-primary:focus {
    border-color: var(--brand-800);
    color: #fff;
    background: var(--brand-800);
    box-shadow: 0 8px 18px rgba(36, 115, 106, 0.22);
}

.btn-outline-primary {
    border-color: rgba(36, 115, 106, 0.28);
    color: var(--brand-700);
}

.btn-outline-primary:hover {
    border-color: var(--brand-700);
    color: #fff;
    background: var(--brand-700);
}

[dir="rtl"] .table .btn-group {
    flex-wrap: nowrap;
    gap: 0;
}

[dir="rtl"] .table .btn-group > :not(.btn-check:first-child) + .btn {
    margin-right: calc(var(--bs-border-width, 1px) * -1);
    margin-left: 0;
}

[dir="rtl"] .table .btn-group > .btn:first-child:not(:last-child) {
    border-radius: 0 10px 10px 0;
}

[dir="rtl"] .table .btn-group > .btn:not(:first-child):not(:last-child) {
    border-radius: 0;
}

[dir="rtl"] .table .btn-group > .btn:last-child:not(:first-child) {
    border-radius: 10px 0 0 10px;
}

.btn-info {
    color: #fff;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
}

.btn-light {
    border-color: var(--border-color);
    color: var(--text-secondary);
    background: var(--surface);
}

.btn-light:hover {
    border-color: var(--brand-500);
    color: var(--brand-700);
    background: var(--brand-100);
}

.form-control,
.form-select,
.input-group-text,
.select2-container--default .select2-selection--single {
    min-height: 42px;
    border-color: var(--input-border);
    border-radius: 10px;
    color: var(--text-primary);
    background-color: var(--input-bg);
}

.form-control,
.form-select {
    padding: 0.55rem 0.8rem;
}

.input-group-text {
    color: var(--text-muted);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--brand-500);
    color: var(--text-primary);
    background-color: var(--input-bg);
    box-shadow: 0 0 0 0.2rem rgba(46, 149, 133, 0.13);
}

.form-control::placeholder,
textarea.form-control::placeholder {
    color: var(--text-muted);
    opacity: 0.8;
}

.form-label,
label {
    color: var(--text-secondary);
    font-weight: 600;
}

.table {
    --bs-table-color: var(--text-primary);
    --bs-table-bg: var(--table-row-bg);
    --bs-table-border-color: var(--border-color);
    --bs-table-hover-bg: var(--table-row-hover);
    margin-bottom: 0;
    vertical-align: middle;
}

.table > :not(caption) > * > * {
    padding: 0.8rem 0.75rem;
    border-bottom-color: var(--border-color);
}

.table thead th {
    border-bottom: 1px solid var(--border-color);
    color: var(--text-muted);
    background: var(--table-head-bg);
    font-size: 0.69rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table tbody tr {
    transition: background-color 0.16s ease;
}

.table tbody tr:hover {
    --bs-table-bg: var(--table-row-hover);
}

.table td {
    color: var(--text-secondary);
    font-size: 0.84rem;
}

.table td a {
    color: var(--brand-700);
    font-weight: 650;
}

.badge {
    border-radius: 7px;
    padding: 0.4em 0.65em;
    font-weight: 700;
}

.dropdown-menu {
    padding: 0.4rem;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-primary);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.dropdown-item {
    border-radius: 8px;
    color: var(--text-secondary);
}

.dropdown-item:hover,
.dropdown-item:focus {
    color: var(--brand-800);
    background: var(--brand-100);
}

.pagination {
    gap: 0.25rem;
}

.page-link {
    border-color: var(--border-color);
    border-radius: 8px !important;
    color: var(--brand-700);
    background: var(--surface);
}

.page-item.active .page-link {
    border-color: var(--brand-700);
    color: #fff;
    background: var(--brand-700);
}

.stats-card {
    position: relative;
    min-height: 145px;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.35rem;
    border: 1px solid var(--border-color);
    border-radius: 17px;
    color: var(--text-primary);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
    animation: content-enter 0.42s ease both;
}

.row.g-3 > [class*="col-"]:nth-child(2) .stats-card {
    animation-delay: 45ms;
}

.row.g-3 > [class*="col-"]:nth-child(3) .stats-card {
    animation-delay: 90ms;
}

.row.g-3 > [class*="col-"]:nth-child(4) .stats-card {
    animation-delay: 135ms;
}

.stats-card:hover {
    border-color: rgba(46, 149, 133, 0.32);
    box-shadow: var(--shadow-card);
    transform: translateY(-3px);
}

.stats-label {
    margin: 0 0 0.55rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 750;
}

.stats-value {
    margin: 0;
    color: var(--text-primary);
    font-size: clamp(1.3rem, 2vw, 1.8rem);
    font-weight: 800;
    letter-spacing: -0.035em;
}

.stats-hint {
    margin: 0.35rem 0 0;
    color: var(--text-muted);
    font-size: 0.71rem;
}

.stats-icon {
    display: grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    border-radius: 14px;
    color: var(--brand-700);
    background: var(--brand-100);
    font-size: 1.15rem;
}

.stats-card.gradient-primary .stats-icon {
    color: #287e72;
    background: #e3f4ee;
}

.stats-card.gradient-secondary .stats-icon {
    color: #4c73b7;
    background: #eaf0fc;
}

.stats-card.gradient-tertiary .stats-icon {
    color: #855cc0;
    background: #f2ebfb;
}

.stats-card.gradient-warning .stats-icon {
    color: #b77929;
    background: #fbf1df;
}

.stats-card.gradient-low-stock .stats-icon {
    color: #b42318;
    background: #fff0f0;
}

.empty-state {
    display: flex;
    min-height: 190px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 1.5rem;
    color: var(--text-muted);
    text-align: center;
}

.empty-state p {
    margin: 0.35rem 0 0;
    color: var(--text-primary);
    font-weight: 700;
}

.empty-icon {
    margin-bottom: 0.35rem;
    color: var(--brand-500);
    font-size: 1.8rem;
}

.action-tile {
    display: flex;
    min-height: 78px;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 13px;
    color: var(--text-primary);
    background: var(--surface-soft);
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.action-tile:hover {
    border-color: rgba(46, 149, 133, 0.36);
    color: var(--brand-800);
    box-shadow: var(--shadow-soft);
    transform: translateY(-2px);
}

.action-tile > i {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 10px;
    color: var(--brand-700);
    background: var(--brand-100);
}

.app-footer,
.footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0.2rem 0.2rem;
    border-top: 1px solid var(--border-color);
    color: var(--text-muted);
}

.footer-brand {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 800;
}

.footer-subtitle,
.footer-meta {
    color: var(--text-muted);
    font-size: 0.69rem;
}

.topbar-language-switcher {
    border-color: var(--border-color);
    background: var(--surface-soft);
}

.topbar-language-switcher a {
    color: var(--text-secondary);
}

.topbar-language-switcher a.active {
    background: var(--brand-800);
    box-shadow: 0 3px 9px rgba(29, 81, 77, 0.2);
}

.user-dropdown-menu {
    border-color: var(--border-color);
    background: var(--surface);
    box-shadow: var(--shadow-card);
}

.user-name-text {
    color: var(--text-primary);
}

.alert {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: var(--shadow-soft);
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    padding-top: 0.25rem;
    color: var(--text-primary);
}

.select2-dropdown {
    border-color: var(--border-color);
    color: var(--text-primary);
    background: var(--surface);
}

[data-theme="dark"] .sidebar {
    border-inline-end-color: var(--border-color);
    background: #142322;
    box-shadow: 5px 0 24px rgba(0, 0, 0, 0.14);
}

[data-theme="dark"] .sidebar .brand-title,
[data-theme="dark"] .sidebar .text-center h4,
[data-theme="dark"] .sidebar-footer-title {
    color: var(--text-primary) !important;
}

[data-theme="dark"] .sidebar .sidebar-link,
[data-theme="dark"] #sidebar .nav-link {
    color: var(--text-secondary);
}

[data-theme="dark"] .sidebar .sidebar-link:hover,
[data-theme="dark"] #sidebar .nav-link:hover:not(.active) {
    border-color: var(--border-color);
    color: #e7f6f0;
    background: var(--surface-soft);
}

[data-theme="dark"] .sidebar .sidebar-link.active,
[data-theme="dark"] #sidebar .nav-link.active {
    color: #b7ebdb;
    background: #1d3d37;
}

[data-theme="dark"] .sidebar .sidebar-link-icon,
[data-theme="dark"] #sidebar .nav-link > i {
    color: #8bcdb9;
    background: #203533;
}

[data-theme="dark"] .sidebar .sidebar-link.active .sidebar-link-icon,
[data-theme="dark"] #sidebar .nav-link.active > i {
    color: #e7fff5;
    background: var(--brand-700);
}

[data-theme="dark"] .sidebar .brand-icon {
    color: #e7fff5;
}

[data-theme="dark"] .app-header.card,
[data-theme="dark"] .topbar,
[data-theme="dark"] .user-chip {
    border-color: var(--border-color) !important;
    background: var(--surface);
}

[data-theme="dark"] .user-name,
[data-theme="dark"] .user-email,
[data-theme="dark"] .header-title,
[data-theme="dark"] .topbar-brand,
[data-theme="dark"] .card-title,
[data-theme="dark"] .page-header h1,
[data-theme="dark"] .page-header h2,
[data-theme="dark"] .page-header h3,
[data-theme="dark"] .page-header h5 {
    color: var(--text-primary);
}

[data-theme="dark"] .stats-card,
[data-theme="dark"] .glass-panel,
[data-theme="dark"] .glass-header {
    border-color: var(--border-color);
    color: var(--text-primary);
    background: var(--surface);
}

[data-theme="dark"] .stats-value,
[data-theme="dark"] .empty-state p,
[data-theme="dark"] .action-tile {
    color: var(--text-primary);
}

[data-theme="dark"] .action-tile {
    border-color: var(--border-color);
    background: var(--surface-soft);
}

[data-theme="dark"] .table {
    --bs-table-color: var(--text-primary);
    --bs-table-bg: var(--table-row-bg);
    --bs-table-border-color: var(--border-color);
    --bs-table-hover-bg: var(--table-row-hover);
}

[data-theme="dark"] .table thead th {
    color: var(--text-muted);
    background: var(--table-head-bg);
}

[data-theme="dark"] .table td,
[data-theme="dark"] .list-group-item {
    color: var(--text-secondary);
    background: var(--surface);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] .input-group-text,
[data-theme="dark"] .select2-container--default .select2-selection--single {
    border-color: var(--input-border);
    color: var(--text-primary);
    background-color: var(--input-bg);
}

[data-theme="dark"] .btn-light,
[data-theme="dark"] .locale-pill {
    border-color: var(--border-color);
    color: var(--text-secondary);
    background: var(--surface-soft);
}

[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .select2-dropdown {
    border-color: var(--border-color);
    color: var(--text-primary);
    background: var(--surface);
}

body.pos-mode {
    color: #172b2a;
    background: var(--app-bg);
}

body.pos-mode .pos-workspace {
    padding: clamp(10px, 1.5vw, 22px);
}

body.pos-mode .pos-screen {
    gap: 14px;
}

body.pos-mode .pos-topbar,
body.pos-mode .pos-catalog,
body.pos-mode .pos-order {
    border-color: #e1eae6;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(28, 62, 54, 0.065);
}

body.pos-mode .pos-topbar {
    min-height: 64px;
    padding: 10px 16px;
}

body.pos-mode .pos-nav-link,
body.pos-mode .pos-meta-pill {
    min-height: 40px;
    border-color: #e3ebe7;
    border-radius: 11px;
    color: #526561;
    background: #fff;
}

body.pos-mode .pos-nav-link:hover,
body.pos-mode .pos-theme-toggle:hover {
    border-color: #afd8c9;
    color: var(--brand-700);
    background: #f1f9f5;
}

body.pos-mode .pos-nav-link--primary {
    border-color: var(--brand-900);
    color: #fff;
    background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
    box-shadow: 0 5px 13px rgba(36, 115, 106, 0.18);
}

body.pos-mode .pos-nav-link--primary:hover {
    color: #fff;
    background: var(--brand-900);
}

body.pos-mode .pos-brand,
body.pos-mode .pos-product-price,
body.pos-mode .pos-add-label,
body.pos-mode .pos-grand-total strong {
    color: var(--brand-700);
}

body.pos-mode .pos-catalog {
    padding: clamp(14px, 1.8vw, 24px);
}

body.pos-mode .pos-search,
body.pos-mode .pos-customer-select,
body.pos-mode .pos-field {
    border-color: #dce7e2;
    border-radius: 11px;
}

body.pos-mode .pos-search:focus,
body.pos-mode .pos-customer-select:focus,
body.pos-mode .pos-field:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 3px rgba(33, 143, 122, 0.13);
}

body.pos-mode .pos-category.active {
    border-color: var(--brand-700);
    color: #fff;
    background: var(--brand-700);
}

body.pos-mode .pos-product-card {
    border-color: #e4ece8;
    border-radius: 14px;
    box-shadow: 0 3px 9px rgba(28, 62, 54, 0.045);
}

body.pos-mode .pos-product-card:hover {
    border-color: #8ecbb8;
    box-shadow: 0 12px 24px rgba(28, 62, 54, 0.12);
    transform: translateY(-3px);
}

body.pos-mode .pos-order-heading,
body.pos-mode .pos-customer,
body.pos-mode .pos-checkout {
    border-color: #e8eeeb;
}

body.pos-mode .pos-order-icon {
    color: var(--brand-700);
    background: var(--brand-100);
}

body.pos-mode .pos-submit {
    border-color: var(--brand-900);
    border-radius: 11px;
    color: #fff;
    background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
    box-shadow: 0 7px 16px rgba(36, 115, 106, 0.2);
}

body.pos-mode .pos-submit:hover:not(:disabled) {
    background: var(--brand-900);
    transform: translateY(-1px);
}

[data-theme="dark"] body.pos-mode {
    color: #e8f0ed;
    background: var(--app-bg);
}

[data-theme="dark"] body.pos-mode .pos-topbar,
[data-theme="dark"] body.pos-mode .pos-catalog,
[data-theme="dark"] body.pos-mode .pos-order {
    border-color: #2b3d3c;
    color: #e8f0ed;
    background: #182627;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] body.pos-mode .pos-nav-link,
[data-theme="dark"] body.pos-mode .pos-meta-pill,
[data-theme="dark"] body.pos-mode .pos-category,
[data-theme="dark"] body.pos-mode .pos-product-card,
[data-theme="dark"] body.pos-mode .pos-cart-item,
[data-theme="dark"] body.pos-mode .pos-customer-select,
[data-theme="dark"] body.pos-mode .pos-field,
[data-theme="dark"] body.pos-mode .pos-search {
    border-color: #344847;
    color: #d9e5e0;
    background: #1d2d2e;
}

[data-theme="dark"] body.pos-mode .pos-product-name,
[data-theme="dark"] body.pos-mode .pos-cart-item-name,
[data-theme="dark"] body.pos-mode .pos-quantity-value,
[data-theme="dark"] body.pos-mode .pos-summary-row strong,
[data-theme="dark"] body.pos-mode .pos-order-title,
[data-theme="dark"] body.pos-mode .pos-grand-total {
    color: #e8f0ed;
}

[data-theme="dark"] body.pos-mode .pos-checkout {
    border-color: #2b3d3c;
    background: #182627;
}

[data-theme="dark"] body.pos-mode .pos-category.active {
    border-color: var(--brand-700);
    color: #fff;
    background: var(--brand-700);
}

.login-shell {
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 24px;
    box-shadow: 0 28px 80px rgba(4, 25, 28, 0.35);
}

.login-visual {
    background:
        radial-gradient(circle at 12% 12%, rgba(215, 169, 91, 0.22), transparent 34%),
        linear-gradient(150deg, rgba(16, 43, 42, 0.97), rgba(29, 81, 77, 0.96));
}

.visual-badge {
    border-color: rgba(255, 255, 255, 0.18);
    color: #eaf8f1;
    background: rgba(255, 255, 255, 0.09);
}

.visual-image-wrap {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.06);
}

.brand-icon {
    color: #fff;
    background: linear-gradient(145deg, var(--brand-700), var(--brand-900));
    box-shadow: 0 9px 22px rgba(36, 115, 106, 0.24);
}

.login-brand h3 {
    color: var(--brand-900);
    font-weight: 800;
}

.login-form .form-control {
    min-height: 46px;
}

.btn-login {
    background: linear-gradient(135deg, var(--brand-700), var(--brand-900));
    box-shadow: 0 7px 17px rgba(36, 115, 106, 0.2);
}

.btn-login:hover {
    background: var(--brand-900);
    box-shadow: 0 11px 22px rgba(36, 115, 106, 0.26);
}

[dir="rtl"] .sidebar .sidebar-link.active {
    box-shadow: inset -3px 0 0 var(--brand-600);
}

@media (max-width: 991px) {
    .main-content {
        padding: 0.75rem 0.85rem;
    }

    .sidebar {
        position: fixed;
        inset-block: 0;
        inset-inline-start: 0;
        width: min(292px, 86vw);
        min-height: 100dvh;
        height: 100dvh;
        overflow-y: auto;
    }

    .sidebar-inner {
        min-height: 100%;
    }

    .app-body {
        padding-top: 0.65rem;
    }
}

@media (max-width: 767px) {
    .main-content {
        padding-inline: 0.65rem;
    }

    .app-header.card {
        min-height: 70px;
        flex-wrap: wrap;
        padding: 0.7rem 0.8rem;
    }

    .header-left {
        gap: 0.65rem;
    }

    .header-subtitle {
        max-width: 50vw;
        font-size: 0.72rem;
    }

    .user-chip {
        padding: 0.25rem;
    }

    .user-chip > div:nth-child(2),
    .locale-pill {
        display: none;
    }

    .page-header {
        align-items: flex-start !important;
        flex-direction: column;
    }

    .page-actions,
    .header-actions {
        display: flex;
        width: 100%;
        flex-wrap: wrap;
        gap: 0.5rem;
    }

    .app-footer,
    .footer {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.35rem;
    }

    .stats-card {
        min-height: 120px;
        padding: 1rem;
    }

    body.pos-mode .pos-workspace {
        padding: 8px;
    }

    body.pos-mode .pos-topbar {
        flex-wrap: wrap;
    }

    body.pos-mode .pos-nav {
        gap: 6px;
    }

    body.pos-mode .pos-nav-link {
        padding-inline: 9px;
        font-size: 0.74rem;
    }

    body.pos-mode .pos-meta {
        gap: 6px;
    }

    body.pos-mode .pos-meta-pill {
        min-height: 34px;
        padding-inline: 9px;
        font-size: 0.7rem;
    }
}

@media (max-width: 575px) {
    .topbar .card-body {
        align-items: flex-start !important;
        padding: 0.75rem;
    }

    .topbar-right {
        width: 100%;
        justify-content: space-between;
        gap: 0.4rem !important;
    }

    .header-title {
        font-size: 0.95rem;
    }

    .header-subtitle {
        display: none;
    }

    .table > :not(caption) > * > * {
        padding: 0.65rem 0.55rem;
    }

    .login-shell {
        border-radius: 18px;
    }

    .login-visual {
        min-height: 210px;
    }

    .visual-image-wrap {
        display: none;
    }
}

@media (max-width: 991px) {
    .sidebar,
    .sidebar.show,
    .sidebar.collapse.show {
        position: fixed;
        top: 0;
        bottom: 0;
        left: auto;
        right: auto;
        width: min(280px, calc(100vw - 1rem));
        min-width: min(280px, calc(100vw - 1rem));
        max-width: min(280px, calc(100vw - 1rem));
        height: 100dvh;
        min-height: 100dvh;
        padding: 0.75rem;
        overflow-x: hidden;
        overflow-y: auto;
        transition: transform 0.28s ease;
    }

    .sidebar,
    .sidebar.collapse:not(.show) {
        left: -100%;
        right: auto;
        transform: translateX(-100%);
    }

    .sidebar.show,
    .sidebar.collapse.show {
        left: 0;
        right: auto;
        transform: translateX(0);
    }

    [dir="rtl"] .sidebar,
    [dir="rtl"] .sidebar.collapse:not(.show) {
        right: -100%;
        left: auto;
        transform: translateX(100%);
    }

    [dir="rtl"] .sidebar.show,
    [dir="rtl"] .sidebar.collapse.show {
        right: 0;
        left: auto;
        transform: translateX(0);
    }

    .sidebar .position-sticky {
        min-height: 100%;
        padding: 1rem 0.65rem;
    }

    .sidebar.collapse:not(.show) .sidebar-brand,
    .sidebar.collapse:not(.show) .nav-link {
        justify-content: flex-start;
        font-size: 0.81rem;
    }

    .sidebar.collapse:not(.show) .nav-link > i {
        margin: 0 !important;
    }

    .sidebar.collapse:not(.show) .dropdown-toggle::after,
    .sidebar.collapse:not(.show) .nav .collapse {
        display: initial !important;
    }

    .main-content {
        padding-inline: 0.85rem !important;
    }

    .sidebar-backdrop {
        z-index: 1040;
    }
}

@media (max-width: 575px) {
    .main-content {
        padding-inline: 0.6rem !important;
    }
}

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

body:not(.pos-mode):not(.login-page) {
    background:
        radial-gradient(ellipse at 82% 4%, rgba(71, 191, 157, 0.1), transparent 31rem),
        radial-gradient(ellipse at 12% 90%, rgba(213, 169, 91, 0.055), transparent 28rem),
        var(--app-bg);
}

.sidebar {
    width: 258px;
    flex: 0 0 258px;
    overflow: hidden auto;
    border: 0;
    background:
        radial-gradient(ellipse at 8% 0%, rgba(68, 173, 148, 0.16), transparent 18rem),
        linear-gradient(180deg, #102d2b 0%, #142624 56%, #10211f 100%);
    box-shadow: 8px 0 36px rgba(13, 36, 34, 0.17);
}

.sidebar .position-sticky {
    min-height: 100vh;
    padding: 1.15rem 0.9rem 1rem;
}

.sidebar-brand {
    position: relative;
    display: flex;
    min-height: 68px;
    align-items: center;
    gap: 0.8rem;
    margin: 0 0 1.2rem;
    padding: 0.35rem 0.25rem 1.15rem;
    border-bottom: 1px solid rgba(226, 245, 237, 0.11);
    text-decoration: none;
}

.sidebar-brand:hover .brand-icon {
    transform: rotate(-7deg) scale(1.05);
}

.sidebar .brand-icon {
    position: relative;
    z-index: 1;
    width: 45px;
    height: 45px;
    flex-basis: 45px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 15px;
    color: #123631;
    background: linear-gradient(145deg, #bcebd7 0%, #6cc5a5 100%);
    box-shadow: 0 7px 20px rgba(60, 176, 139, 0.24), inset 0 1px 0 rgba(255, 255, 255, 0.72);
    transition: transform 0.25s ease;
}

.brand-copy {
    display: grid;
    min-width: 0;
    flex: 1;
    gap: 0.2rem;
}

.brand-copy strong {
    overflow: hidden;
    color: #f0f8f4;
    font-size: 0.83rem;
    font-weight: 780;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.brand-copy small {
    color: #91aaa1;
    font-size: 0.65rem;
    letter-spacing: 0.025em;
}

.brand-status {
    position: absolute;
    inset-inline-end: 0.1rem;
    top: 0.65rem;
    width: 7px;
    height: 7px;
    border: 1px solid #163b30;
    border-radius: 50%;
    background: #64d5a5;
    box-shadow: 0 0 0 4px rgba(100, 213, 165, 0.12), 0 0 13px rgba(100, 213, 165, 0.6);
}

#sidebar .nav {
    gap: 0.28rem;
}

#sidebar .nav-item {
    margin: 0;
}

#sidebar .nav-link {
    position: relative;
    min-height: 45px;
    padding: 0.45rem 0.65rem;
    border: 1px solid transparent;
    border-radius: 11px;
    color: #adc0b9;
    font-size: 0.81rem;
    font-weight: 620;
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

#sidebar .nav-link > i {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
    border-radius: 9px;
    color: #8cb4a7;
    background: rgba(235, 250, 243, 0.07);
}

#sidebar .nav-link:hover:not(.active) {
    border-color: rgba(233, 250, 241, 0.09);
    color: #f4fbf7;
    background: rgba(229, 248, 239, 0.07);
    transform: translateX(-2px);
}

#sidebar .nav-link.active,
#sidebar .nav > .nav-item > .nav-link.active {
    border-color: rgba(112, 211, 171, 0.18);
    color: #e6fff3;
    background: linear-gradient(100deg, rgba(55, 144, 113, 0.29), rgba(54, 117, 97, 0.14));
    box-shadow: inset 3px 0 0 #75d5ad, 0 5px 16px rgba(4, 17, 15, 0.12);
}

#sidebar .nav-link.active > i {
    color: #15372f;
    background: linear-gradient(145deg, #b5ebd2, #6cc5a5);
}

#sidebar .nav-link.dropdown-toggle::after {
    border-top-color: #78968a;
}

#sidebar .nav .collapse > .nav,
#sidebar .nav .collapsing > .nav {
    gap: 0.16rem;
    margin-top: 0.25rem;
    padding-inline-start: 0.85rem !important;
}

#sidebar .nav .collapse > .nav::before,
#sidebar .nav .collapsing > .nav::before {
    border-inline-start-color: rgba(210, 235, 222, 0.16);
}

#sidebar .ps-3 .nav-link,
#sidebar .nav .collapse > .nav > .nav-item > .nav-link {
    min-height: 37px;
    padding: 0.3rem 0.55rem;
    color: #9ab2a8;
    font-size: 0.76rem;
}

#sidebar .ps-3 .nav-link > i,
#sidebar .nav .collapse > .nav > .nav-item > .nav-link > i {
    width: 26px;
    height: 26px;
    flex-basis: 26px;
    color: #87aa9d;
    background: rgba(235, 250, 243, 0.045);
    font-size: 0.72rem;
}

#sidebar .ps-3 .nav-link.active,
#sidebar .nav .collapse > .nav > .nav-item > .nav-link.active {
    border-color: rgba(112, 211, 171, 0.12);
    color: #d3f4e4;
    background: rgba(58, 139, 109, 0.17);
    box-shadow: none;
}

#sidebar .ps-3 .nav-link.active > i,
#sidebar .nav .collapse > .nav > .nav-item > .nav-link.active > i {
    color: #b6ebd0;
    background: rgba(99, 194, 150, 0.14);
}

#sidebar .text-center {
    display: none;
}

[data-theme="dark"] .sidebar {
    background:
        radial-gradient(ellipse at 8% 0%, rgba(68, 173, 148, 0.16), transparent 18rem),
        linear-gradient(180deg, #102d2b 0%, #142624 56%, #10211f 100%);
}

[data-theme="dark"] #sidebar .nav-link {
    color: #adc0b9;
}

[data-theme="dark"] #sidebar .nav-link.active {
    color: #e6fff3;
    background: linear-gradient(100deg, rgba(55, 144, 113, 0.29), rgba(54, 117, 97, 0.14));
}

.main-content {
    position: relative;
    padding: 1.15rem clamp(1.1rem, 2.2vw, 2rem) 0.75rem;
}

.topbar {
    position: relative;
    overflow: visible;
    border-radius: 17px;
    box-shadow: 0 8px 30px rgba(20, 52, 45, 0.065) !important;
}

.topbar .card-body {
    min-height: 76px;
    padding: 0.7rem 1rem;
}

.topbar-left {
    gap: 0.75rem !important;
}

.topbar-mark {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border: 1px solid rgba(55, 144, 113, 0.1);
    border-radius: 13px;
    color: #287c68;
    background: linear-gradient(145deg, #e7f7ef, #d6f0e4);
    font-size: 0.98rem;
}

.topbar-brand {
    margin-bottom: 0.1rem;
    font-size: 0.9rem;
    font-weight: 800;
}

.topbar-context {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text-muted);
    font-size: 0.68rem;
}

.topbar-context-dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #8eaaa0;
}

.topbar-pos-button {
    min-height: 39px;
    padding-inline: 0.9rem;
    border-radius: 10px;
}

[data-theme="dark"] .topbar-mark {
    color: #a7e8ce;
    background: #203d35;
}

.app-body-dashboard > .content-container > .card-body > .page-header {
    display: none !important;
}

.dashboard-page {
    display: grid;
    gap: 0;
}

.dashboard-hero {
    position: relative;
    display: flex;
    min-height: 224px;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    isolation: isolate;
    overflow: hidden;
    margin-bottom: 1.8rem;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    border: 1px solid rgba(213, 242, 229, 0.15);
    border-radius: 22px;
    color: #f2faf6;
    background:
        radial-gradient(ellipse at 82% 15%, rgba(108, 197, 165, 0.3), transparent 21rem),
        radial-gradient(ellipse at 10% 110%, rgba(217, 171, 98, 0.16), transparent 19rem),
        linear-gradient(112deg, #102c29 0%, #17443b 52%, #216351 100%);
    box-shadow: 0 18px 42px rgba(17, 58, 47, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: content-enter 0.52s cubic-bezier(0.2, 0.75, 0.25, 1) both;
}

.dashboard-hero::before,
.dashboard-hero::after {
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(229, 250, 239, 0.12);
    border-radius: 50%;
    content: "";
    pointer-events: none;
}

.dashboard-hero::before {
    inset-inline-end: 8%;
    top: -105px;
    width: 330px;
    height: 330px;
}

.dashboard-hero::after {
    inset-inline-end: 5%;
    bottom: -240px;
    width: 420px;
    height: 420px;
    border-color: rgba(229, 250, 239, 0.075);
}

.dashboard-hero-copy {
    position: relative;
    z-index: 2;
    max-width: 590px;
}

.dashboard-hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin-bottom: 0.85rem;
    color: #a7dfc5;
    font-size: 0.68rem;
    font-weight: 760;
    letter-spacing: 0.075em;
    text-transform: uppercase;
}

.dashboard-hero-kicker i {
    color: #e6bd77;
}

.dashboard-hero h2 {
    margin: 0;
    color: #f4fbf7;
    font-size: clamp(1.45rem, 2.8vw, 2.2rem);
    font-weight: 780;
    letter-spacing: -0.035em;
}

.dashboard-hero h2 span {
    color: #a7dfc5;
}

.dashboard-hero-copy > p {
    max-width: 450px;
    margin: 0.55rem 0 1.05rem;
    color: rgba(232, 247, 239, 0.72);
    font-size: 0.85rem;
    line-height: 1.7;
}

.dashboard-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.dashboard-hero-meta > span {
    display: inline-flex;
    min-height: 29px;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.6rem;
    border: 1px solid rgba(222, 246, 232, 0.16);
    border-radius: 99px;
    color: rgba(234, 248, 240, 0.82);
    background: rgba(8, 31, 26, 0.18);
    font-size: 0.68rem;
}

.dashboard-live i {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #72dcaa;
    box-shadow: 0 0 0 3px rgba(114, 220, 170, 0.14), 0 0 10px rgba(114, 220, 170, 0.65);
    animation: live-pulse 1.8s ease-in-out infinite;
}

@keyframes live-pulse {
    50% { box-shadow: 0 0 0 6px rgba(114, 220, 170, 0.04), 0 0 15px rgba(114, 220, 170, 0.4); }
}

.dashboard-hero-actions {
    position: relative;
    z-index: 3;
    display: grid;
    min-width: 168px;
    gap: 0.6rem;
}

.dashboard-report-link,
.dashboard-sale-link {
    display: flex;
    min-height: 45px;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.65rem 0.9rem;
    border: 1px solid rgba(232, 250, 240, 0.2);
    border-radius: 11px;
    color: #edf9f2;
    background: rgba(227, 246, 236, 0.09);
    font-size: 0.77rem;
    font-weight: 700;
    text-decoration: none;
    backdrop-filter: blur(8px);
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-report-link:hover,
.dashboard-sale-link:hover {
    color: #fff;
    background: rgba(227, 246, 236, 0.16);
    transform: translateY(-2px);
}

.dashboard-sale-link {
    justify-content: space-between;
    border-color: #d1e8c1;
    color: #173a30;
    background: linear-gradient(120deg, #d6efc5, #9fdbb5);
    box-shadow: 0 8px 20px rgba(7, 32, 24, 0.16);
}

.dashboard-sale-link:hover {
    color: #102d26;
    background: linear-gradient(120deg, #e4f6d8, #b0e5c4);
    box-shadow: 0 12px 25px rgba(7, 32, 24, 0.23);
}

.dashboard-sale-arrow {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 8px;
    color: #e8f7ed;
    background: rgba(19, 62, 47, 0.8);
}

.dashboard-hero-orb {
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
}

.dashboard-hero-orb-one {
    inset-inline-end: 27%;
    top: -4rem;
    width: 10rem;
    height: 10rem;
    background: rgba(96, 193, 148, 0.08);
    filter: blur(1px);
}

.dashboard-hero-orb-two {
    inset-inline-end: 39%;
    bottom: -6rem;
    width: 12rem;
    height: 12rem;
    background: rgba(218, 179, 105, 0.07);
}

.dashboard-hero-grid {
    position: absolute;
    z-index: -1;
    inset: 0;
    opacity: 0.16;
    background-image: linear-gradient(rgba(230, 250, 239, 0.12) 1px, transparent 1px), linear-gradient(90deg, rgba(230, 250, 239, 0.12) 1px, transparent 1px);
    background-position: center;
    background-size: 32px 32px;
    mask-image: linear-gradient(90deg, transparent 28%, #000 100%);
    pointer-events: none;
}

.dashboard-hero-art {
    position: absolute;
    z-index: 1;
    inset-inline-end: 29%;
    top: 50%;
    width: 164px;
    height: 164px;
    transform: translateY(-50%);
    pointer-events: none;
}

.dashboard-art-ring {
    position: absolute;
    inset: 0;
    border: 1px solid rgba(216, 248, 229, 0.26);
    border-radius: 50%;
    box-shadow: 0 0 30px rgba(138, 220, 177, 0.08), inset 0 0 28px rgba(138, 220, 177, 0.045);
}

.dashboard-art-ring-one {
    animation: orbit 19s linear infinite;
}

.dashboard-art-ring-one::before,
.dashboard-art-ring-two::after {
    position: absolute;
    top: 17%;
    inset-inline-start: 11%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #d0efbd;
    box-shadow: 0 0 13px rgba(208, 239, 189, 0.9);
    content: "";
}

.dashboard-art-ring-two {
    inset: 17px;
    border-style: dashed;
    border-color: rgba(216, 248, 229, 0.2);
    animation: orbit 28s linear infinite reverse;
}

.dashboard-art-ring-two::after {
    top: auto;
    inset-inline-start: auto;
    right: 12%;
    bottom: 11%;
    width: 5px;
    height: 5px;
    background: #e5bd75;
    box-shadow: 0 0 11px rgba(229, 189, 117, 0.8);
}

@keyframes orbit {
    to { transform: rotate(360deg); }
}

.dashboard-art-core {
    position: absolute;
    inset: 35px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(226, 249, 235, 0.28);
    border-radius: 30px;
    color: #dcf4d0;
    background: linear-gradient(145deg, rgba(193, 236, 197, 0.22), rgba(104, 190, 152, 0.14));
    box-shadow: 0 10px 28px rgba(8, 26, 22, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    font-size: 2rem;
    transform: rotate(-8deg);
    backdrop-filter: blur(6px);
}

.dashboard-art-spark {
    position: absolute;
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border: 1px solid rgba(240, 252, 245, 0.23);
    border-radius: 10px;
    color: #d5efc4;
    background: rgba(222, 246, 230, 0.12);
    box-shadow: 0 7px 14px rgba(7, 25, 20, 0.16);
    backdrop-filter: blur(8px);
    animation: float-soft 4s ease-in-out infinite;
}

.dashboard-art-spark-one {
    top: 10px;
    inset-inline-end: 2px;
}

.dashboard-art-spark-two {
    inset-inline-start: 2px;
    bottom: 11px;
    color: #f0d093;
    animation-delay: -1.6s;
}

@keyframes float-soft {
    50% { transform: translateY(-6px); }
}

.dashboard-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
    margin: 0 0 1rem;
}

.dashboard-section-kicker {
    color: #63877a;
    font-size: 0.64rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.dashboard-section-heading h2 {
    margin: 0.18rem 0 0;
    color: var(--text-primary);
    font-size: 1.05rem;
    font-weight: 780;
}

.dashboard-period {
    display: inline-flex;
    min-height: 33px;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border: 1px solid var(--border-color);
    border-radius: 9px;
    color: var(--text-secondary);
    background: var(--surface);
    font-size: 0.69rem;
    font-weight: 680;
}

.dashboard-filter-card {
    margin-bottom: 1.2rem !important;
    border-radius: 14px;
}

.dashboard-filter-card .card-body {
    padding: 1rem 1.15rem;
}

.dashboard-stats-row {
    margin-bottom: 0.45rem;
}

.dashboard-stats-row > [class*="col-"] {
    display: flex;
}

.dashboard-stats-row .stats-card {
    width: 100%;
    min-height: 148px;
    align-self: stretch;
    overflow: hidden;
    border-radius: 16px;
    background: var(--surface);
}

.dashboard-stats-row .stats-card::before {
    position: absolute;
    inset-inline-start: 0;
    top: 0;
    width: 100%;
    height: 3px;
    background: var(--stat-accent, #54b894);
    content: "";
}

.dashboard-stats-row .stats-card::after {
    position: absolute;
    inset-inline-end: -40px;
    bottom: -63px;
    width: 145px;
    height: 145px;
    border: 1px solid color-mix(in srgb, var(--stat-accent, #54b894) 15%, transparent);
    border-radius: 50%;
    box-shadow: 0 0 0 15px color-mix(in srgb, var(--stat-accent, #54b894) 4%, transparent), 0 0 0 31px color-mix(in srgb, var(--stat-accent, #54b894) 3%, transparent);
    content: "";
    pointer-events: none;
}

.dashboard-stats-row .stats-sales { --stat-accent: #38a982; }
.dashboard-stats-row .stats-transactions { --stat-accent: #5d8cdb; }
.dashboard-stats-row .stats-customers { --stat-accent: #9570ce; }
.dashboard-stats-row .stats-low-stock { --stat-accent: #dc2626; }

[data-theme="dark"] .dashboard-stats-row .stats-sales,
[data-theme="dark"] .dashboard-stats-row .stats-transactions,
[data-theme="dark"] .dashboard-stats-row .stats-customers,
[data-theme="dark"] .dashboard-stats-row .stats-low-stock {
    border-color: var(--border-color);
    color: var(--text-primary);
    background: var(--surface);
}

.dashboard-stats-row .stats-card .card-body {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    padding: 1.1rem 1.2rem;
}

.dashboard-stats-row .stats-card .row {
    width: 100%;
    flex-wrap: nowrap;
    align-items: center;
    margin: 0;
}

.dashboard-stats-row .stats-card .row > .col {
    min-width: 0;
    padding: 0;
}

.dashboard-stats-row .stats-card .row > .col-auto {
    padding: 0;
}

.dashboard-stats-row .stats-card .h6 {
    margin-bottom: 0.55rem !important;
    color: var(--text-muted);
    font-size: 0.69rem;
    font-weight: 730;
    letter-spacing: 0;
    text-transform: none;
}

.dashboard-stats-row .stats-card .h4 {
    overflow-wrap: anywhere;
    color: var(--text-primary);
    font-size: clamp(1.1rem, 1.7vw, 1.55rem);
    font-weight: 820;
    letter-spacing: -0.04em;
}

.dashboard-stats-row .stats-card .stat-icon {
    width: 46px;
    height: 46px;
    margin: 0;
    border: 1px solid color-mix(in srgb, var(--stat-accent) 15%, transparent);
    border-radius: 14px;
    color: var(--stat-accent);
    background: color-mix(in srgb, var(--stat-accent) 11%, white);
    box-shadow: 0 6px 16px color-mix(in srgb, var(--stat-accent) 12%, transparent);
    font-size: 1.05rem !important;
}

[data-theme="dark"] .dashboard-stats-row .stats-card .stat-icon {
    background: color-mix(in srgb, var(--stat-accent) 15%, var(--surface));
}

[data-theme="dark"] .dashboard-stats-row .stats-card .h6 {
    color: var(--text-muted);
}

[data-theme="dark"] .dashboard-stats-row .stats-card .h4 {
    color: var(--text-primary);
}

.dashboard-activity-heading {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.dashboard-activity-row > [class*="col-"] {
    display: flex;
}

.dashboard-panel {
    width: 100%;
    overflow: hidden;
    border-radius: 16px;
}

.dashboard-panel-header {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 1rem;
    border-bottom: 1px solid var(--border-color);
    background: linear-gradient(180deg, var(--surface), var(--surface-soft));
}

.dashboard-panel-title {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.65rem;
}

.dashboard-panel-title > div {
    min-width: 0;
}

.dashboard-panel-title small {
    display: block;
    margin-bottom: 0.15rem;
    color: var(--text-muted);
    font-size: 0.62rem;
}

.dashboard-panel-title h6 {
    margin: 0;
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 760;
}

.dashboard-panel-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    place-items: center;
    border-radius: 12px;
}

.dashboard-sales-icon {
    color: #31916f;
    background: #e7f5ed;
}

.dashboard-stock-icon {
    color: #b42318;
    background: #fff0f0;
}

.dashboard-panel-link {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    color: var(--brand-700);
    font-size: 0.69rem;
    font-weight: 730;
    text-decoration: none;
}

.dashboard-panel-link i {
    font-size: 0.62rem;
    transform: rotate(45deg);
}

.dashboard-panel-link:hover {
    color: var(--brand-900);
}

.dashboard-sales-panel .card-body,
.dashboard-inventory-panel .card-body {
    padding: 0.45rem 0.9rem 0.9rem;
}

.dashboard-sales-panel .table thead th {
    border-top: 0;
    background: transparent;
}

.dashboard-sales-panel .table > :not(caption) > * > * {
    padding-inline: 0.65rem;
}

.dashboard-inventory-panel .list-group-item {
    padding: 0.85rem 0.1rem;
    border-bottom: 1px solid var(--border-color) !important;
    background: transparent;
}

.dashboard-inventory-panel .list-group-item:last-child {
    border-bottom: 0 !important;
}

.dashboard-inventory-panel .list-group-item h6 {
    color: var(--text-primary);
    font-size: 0.78rem;
    font-weight: 700;
}

.dashboard-inventory-panel .list-group-item small {
    color: var(--text-muted);
    font-size: 0.65rem;
}

.dashboard-inventory-panel .badge.bg-danger {
    border: 1px solid #f1c2c2;
    color: #a61b1b !important;
    background: #fff0f0 !important;
}

.dashboard-actions-heading {
    margin: 0.35rem 0 0.8rem;
}

.dashboard-actions-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.85rem;
    margin-bottom: 0.75rem;
}

.dashboard-action {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 92px;
    align-items: center;
    gap: 0.75rem;
    overflow: hidden;
    padding: 0.9rem;
    border: 1px solid var(--border-color);
    border-radius: 14px;
    color: var(--text-primary);
    background: var(--surface);
    box-shadow: 0 5px 16px rgba(24, 56, 47, 0.035);
    text-decoration: none;
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.dashboard-action::after {
    position: absolute;
    inset-inline-end: -22px;
    bottom: -46px;
    width: 90px;
    height: 90px;
    border: 1px solid rgba(69, 158, 125, 0.1);
    border-radius: 50%;
    box-shadow: 0 0 0 10px rgba(69, 158, 125, 0.025);
    content: "";
}

.dashboard-action:hover {
    border-color: rgba(59, 151, 117, 0.32);
    color: var(--text-primary);
    box-shadow: 0 12px 25px rgba(24, 56, 47, 0.09);
    transform: translateY(-3px);
}

.dashboard-action-icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border: 1px solid rgba(57, 153, 117, 0.12);
    border-radius: 13px;
    color: #318b6d;
    background: #eaf6ef;
    font-size: 1rem;
    transition: transform 0.2s ease;
}

.dashboard-action:hover .dashboard-action-icon {
    transform: rotate(-6deg) scale(1.06);
}

.dashboard-action > span:nth-child(2) {
    display: grid;
    min-width: 0;
    flex: 1;
    gap: 0.22rem;
}

.dashboard-action strong {
    overflow: hidden;
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 760;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-action small {
    overflow: hidden;
    color: var(--text-muted);
    font-size: 0.63rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dashboard-action-arrow {
    align-self: flex-start;
    color: #a2b3ad;
    font-size: 0.65rem;
    transform: rotate(45deg);
    transition: color 0.2s ease, transform 0.2s ease;
}

.dashboard-action:hover .dashboard-action-arrow {
    color: var(--brand-700);
    transform: rotate(45deg) translate(2px, -2px);
}

.dashboard-action-products .dashboard-action-icon {
    color: #617fc0;
    background: #edf1fa;
}

.dashboard-action-customers .dashboard-action-icon {
    color: #9369b7;
    background: #f3edfa;
}

.dashboard-action-reports .dashboard-action-icon {
    color: #b1813d;
    background: #fbf2e4;
}

[data-theme="dark"] .dashboard-section-kicker {
    color: #86bca5;
}

[data-theme="dark"] .dashboard-panel-header {
    background: linear-gradient(180deg, var(--surface), var(--surface-soft));
}

[data-theme="dark"] .dashboard-sales-icon {
    color: #8de0b0;
    background: #203c31;
}

[data-theme="dark"] .dashboard-stock-icon {
    color: #ffb4b4;
    background: #4a2528;
}

[data-theme="dark"] .dashboard-action {
    border-color: var(--border-color);
    background: var(--surface);
    box-shadow: none;
}

[data-theme="dark"] .dashboard-action-icon {
    color: #98ddba;
    background: #203c31;
}

[data-theme="dark"] .dashboard-action-products .dashboard-action-icon {
    color: #a5baf0;
    background: #273149;
}

[data-theme="dark"] .dashboard-action-customers .dashboard-action-icon {
    color: #d0a6ea;
    background: #362d42;
}

[data-theme="dark"] .dashboard-action-reports .dashboard-action-icon {
    color: #e7bd77;
    background: #3b3426;
}

[data-theme="dark"] .dashboard-inventory-panel .badge.bg-danger {
    border-color: #71383b;
    color: #ffb4b4 !important;
    background: #4a2528 !important;
}

[dir="rtl"] .dashboard-hero-grid {
    mask-image: linear-gradient(270deg, transparent 28%, #000 100%);
}

@media (min-width: 992px) {
    .sidebar {
        position: sticky;
        top: 0;
        height: 100vh;
    }

    .main-content {
        max-height: 100vh;
    }
}

@media (max-width: 991px) {
    .container-fluid > .row.h-100 {
        flex-wrap: wrap;
    }

    .sidebar {
        width: min(292px, 86vw);
        flex: 0 0 min(292px, 86vw);
        min-height: 100dvh;
        height: 100dvh;
    }

    .sidebar .position-sticky {
        min-height: 100%;
    }

    .dashboard-hero-art {
        inset-inline-end: 31%;
        opacity: 0.66;
        transform: translateY(-50%) scale(0.84);
    }

    .dashboard-actions-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .topbar-mark {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .topbar-context {
        font-size: 0.62rem;
    }

    .dashboard-hero {
        min-height: auto;
        flex-wrap: wrap;
        gap: 1.2rem;
        margin-bottom: 1.4rem;
        padding: 1.45rem;
    }

    .dashboard-hero-copy {
        max-width: 100%;
    }

    .dashboard-hero-copy > p {
        max-width: 370px;
    }

    .dashboard-hero-actions {
        display: flex;
        width: 100%;
    }

    .dashboard-report-link,
    .dashboard-sale-link {
        flex: 1;
    }

    .dashboard-hero-art {
        inset-inline-end: 3%;
        top: 22%;
        opacity: 0.24;
        transform: scale(0.75);
    }

    .dashboard-hero-grid {
        opacity: 0.09;
    }

    .dashboard-section-heading {
        margin-bottom: 0.8rem;
    }

    .dashboard-section-heading h2 {
        font-size: 0.95rem;
    }

    .dashboard-stats-row .stats-card {
        min-height: 125px;
    }

    .dashboard-stats-row .stats-card .card-body {
        padding: 0.9rem;
    }

    .dashboard-stats-row .stats-card .stat-icon {
        width: 38px;
        height: 38px;
        border-radius: 11px;
        font-size: 0.9rem !important;
    }
}

@media (max-width: 575px) {
    .main-content {
        padding-inline: 0.6rem;
    }

    .topbar .card-body {
        flex-wrap: nowrap !important;
        align-items: center !important;
    }

    .topbar-left {
        min-width: 0;
        flex: 1;
    }

    .topbar-context {
        overflow: hidden;
        max-width: 48vw;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .topbar-right {
        width: auto;
        flex: 0 0 auto;
    }

    .topbar-right > .dropdown {
        display: none;
    }

    .dashboard-hero {
        gap: 1rem;
        padding: 1.15rem;
        border-radius: 17px;
    }

    .dashboard-hero h2 {
        max-width: 100%;
        font-size: 1.35rem;
    }

    .dashboard-hero-copy > p {
        max-width: 100%;
        font-size: 0.76rem;
    }

    .dashboard-hero-actions {
        gap: 0.45rem;
    }

    .dashboard-report-link,
    .dashboard-sale-link {
        min-height: 41px;
        gap: 0.35rem;
        padding-inline: 0.55rem;
        font-size: 0.69rem;
    }

    .dashboard-hero-art {
        inset-inline-end: -27px;
        top: 8%;
        opacity: 0.14;
    }

    .dashboard-period {
        min-height: 29px;
        padding-inline: 0.5rem;
        font-size: 0.63rem;
    }

    .dashboard-stats-row > [class*="col-"] {
        margin-bottom: 0.75rem !important;
    }

    .dashboard-stats-row .stats-card {
        min-height: 116px;
    }

    .dashboard-activity-row > [class*="col-"] {
        margin-bottom: 0.8rem !important;
    }

    .dashboard-panel-header {
        min-height: 68px;
        padding-inline: 0.8rem;
    }

    .dashboard-panel-title h6 {
        font-size: 0.78rem;
    }

    .dashboard-panel-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
    }

    .dashboard-actions-grid {
        gap: 0.55rem;
    }

    .dashboard-action {
        min-height: 78px;
        gap: 0.5rem;
        padding: 0.7rem 0.55rem;
    }

    .dashboard-action-icon {
        width: 34px;
        height: 34px;
        flex-basis: 34px;
        border-radius: 10px;
        font-size: 0.85rem;
    }

    .dashboard-action strong {
        font-size: 0.68rem;
    }

    .dashboard-action small {
        font-size: 0.57rem;
    }
}

.text-muted,
.text-body-secondary {
    color: var(--text-muted) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

#sidebar .nav-link > i {
    border: 1px solid rgba(220, 245, 231, 0.11);
    color: #b7d8ca;
    background: rgba(235, 250, 243, 0.1);
    font-size: 0.9rem;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.16);
}

#sidebar .ps-3 .nav-link > i,
#sidebar .nav .collapse > .nav > .nav-item > .nav-link > i {
    border-color: rgba(220, 245, 231, 0.08);
    color: #a9cbbd;
    background: rgba(235, 250, 243, 0.075);
    font-size: 0.8rem;
}

#sidebar .nav-link.active > i,
#sidebar .ps-3 .nav-link.active > i,
#sidebar .nav .collapse > .nav > .nav-item > .nav-link.active > i {
    border-color: rgba(226, 255, 239, 0.38);
    color: #12392e;
    background: linear-gradient(145deg, #c5f1d8, #79d0ad);
}

.brand-copy small {
    color: #b3c9bf;
    font-size: 0.69rem;
}

.topbar-mark {
    border-color: rgba(46, 149, 133, 0.24);
    color: #176653;
    background: linear-gradient(145deg, #e1f4e9, #c8ead8);
    box-shadow: 0 5px 13px rgba(30, 108, 81, 0.12), inset 0 1px 0 #fff;
    font-size: 1.1rem;
}

.topbar-context {
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 550;
}

.topbar-context-dot {
    background: #68857a;
}

.dashboard-hero-kicker {
    color: #c5efd8;
    font-size: 0.72rem;
}

.dashboard-hero-kicker i {
    font-size: 0.86rem;
}

.dashboard-hero h2 span {
    color: #c5efd8;
}

.dashboard-hero-copy > p {
    color: #d7e8df;
}

.dashboard-hero-meta > span {
    color: #edf6f0;
}

.dashboard-section-kicker {
    color: #496d5f;
    font-size: 0.69rem;
}

.dashboard-period {
    color: var(--text-secondary);
}

.dashboard-stats-row .stats-card .h6 {
    color: var(--text-secondary);
    font-size: 0.73rem;
}

.dashboard-stats-row .stats-card .h4 {
    color: #142a24;
}

[data-theme="dark"] .dashboard-stats-row .stats-card .h4 {
    color: #f0f7f3;
}

.dashboard-panel-title small {
    color: var(--text-secondary);
    font-size: 0.69rem;
    font-weight: 550;
}

.dashboard-panel-title h6 {
    color: var(--text-primary);
}

.dashboard-panel-link {
    color: #216e5d;
}

.dashboard-inventory-panel .list-group-item small {
    color: var(--text-secondary);
    font-size: 0.69rem;
}

.dashboard-action strong {
    color: var(--text-primary);
    font-size: 0.78rem;
}

.dashboard-action small {
    color: var(--text-secondary);
    font-size: 0.68rem;
    font-weight: 500;
}

.dashboard-action-arrow {
    color: #5a7067;
    font-size: 0.75rem;
}

.dashboard-action-icon {
    border-color: rgba(57, 153, 117, 0.2);
    box-shadow: 0 4px 11px rgba(40, 107, 79, 0.1);
    font-size: 1.05rem;
}

.dashboard-action-products .dashboard-action-icon {
    border-color: rgba(97, 127, 192, 0.2);
}

.dashboard-action-customers .dashboard-action-icon {
    border-color: rgba(147, 105, 183, 0.2);
}

.dashboard-action-reports .dashboard-action-icon {
    border-color: rgba(177, 129, 61, 0.22);
}

.dashboard-art-core {
    color: #f0ffde;
    text-shadow: 0 2px 10px rgba(15, 54, 38, 0.35);
}

.dashboard-art-spark {
    border-color: rgba(240, 252, 245, 0.34);
    color: #efffe5;
    font-size: 0.95rem;
}

.dashboard-art-spark-two {
    color: #ffe2a5;
}

[data-theme="dark"] .dashboard-section-kicker {
    color: #a7d8bd;
}

[data-theme="dark"] .dashboard-panel-title small,
[data-theme="dark"] .dashboard-inventory-panel .list-group-item small,
[data-theme="dark"] .dashboard-action small {
    color: #b5c5bf;
}

[data-theme="dark"] .dashboard-panel-link {
    color: #8ed3b4;
}

[data-theme="dark"] .dashboard-action-arrow {
    color: #a8bdb3;
}

[data-theme="dark"] .dashboard-action strong {
    color: #edf5f1;
}

[data-theme="dark"] .topbar-context {
    color: #bdcbc5;
}

[data-theme="dark"] .brand-copy small {
    color: #b3c9bf;
}

@media (max-width: 575px) {
    .dashboard-action small {
        font-size: 0.65rem;
    }

    .dashboard-panel-title small,
    .dashboard-inventory-panel .list-group-item small {
        font-size: 0.66rem;
    }
}

html[data-theme="light"] .sidebar {
    border-inline-end: 1px solid #dfe9e4;
    background:
        radial-gradient(ellipse at 8% 0%, rgba(68, 173, 148, 0.08), transparent 18rem),
        linear-gradient(180deg, #ffffff 0%, #f8fbf9 100%);
    box-shadow: 5px 0 24px rgba(27, 57, 52, 0.07);
}

html[data-theme="light"] .sidebar-brand {
    border-bottom-color: #e1eae6;
}

html[data-theme="light"] .brand-copy strong {
    color: #172b2a;
}

html[data-theme="light"] .brand-copy small {
    color: #586b66;
}

html[data-theme="light"] #sidebar .nav-link {
    color: #40564f;
    font-size: 0.86rem;
    font-weight: 650;
}

html[data-theme="light"] #sidebar .nav-link > i {
    border-color: #dceae4;
    color: var(--brand-700);
    background: #edf5f1;
    text-shadow: none;
}

html[data-theme="light"] #sidebar .nav-link:hover:not(.active) {
    border-color: #d5e6de;
    color: #173b39;
    background: #eef6f2;
}

html[data-theme="light"] #sidebar .nav-link.active,
html[data-theme="light"] #sidebar .nav > .nav-item > .nav-link.active {
    border-color: #b7dfd0;
    color: var(--brand-900);
    background: var(--brand-100);
    box-shadow: inset 3px 0 0 var(--brand-700);
}

html[data-theme="light"] #sidebar .nav-link.active > i {
    border-color: var(--brand-700);
    color: #ffffff;
    background: var(--brand-700);
}

html[data-theme="light"] #sidebar .nav-link.dropdown-toggle::after {
    border-top-color: #526a61;
}

html[data-theme="light"] #sidebar .nav .collapse > .nav::before,
html[data-theme="light"] #sidebar .nav .collapsing > .nav::before {
    border-inline-start-color: #d8e5df;
}

html[data-theme="light"] #sidebar .ps-3 .nav-link,
html[data-theme="light"] #sidebar .nav .collapse > .nav > .nav-item > .nav-link {
    color: #40564f;
    font-size: 0.81rem;
}

html[data-theme="light"] #sidebar .ps-3 .nav-link > i,
html[data-theme="light"] #sidebar .nav .collapse > .nav > .nav-item > .nav-link > i {
    border-color: #e1ebe6;
    color: #397c6d;
    background: #f0f6f3;
}

html[data-theme="light"] #sidebar .ps-3 .nav-link.active,
html[data-theme="light"] #sidebar .nav .collapse > .nav > .nav-item > .nav-link.active {
    color: #173b39;
    background: #e6f3ed;
}

html[data-theme="light"] #sidebar .ps-3 .nav-link.active > i,
html[data-theme="light"] #sidebar .nav .collapse > .nav > .nav-item > .nav-link.active > i {
    color: var(--brand-700);
    background: var(--brand-100);
}

.settings-page .card-header {
    border-bottom-color: var(--border-color);
    background: var(--surface-soft);
}

.settings-page .card-header .text-primary {
    color: var(--brand-800) !important;
}

.settings-page .card-header i {
    color: var(--brand-700);
}

.settings-page .list-group-item {
    border-color: var(--border-color);
    color: var(--text-secondary);
    background: var(--surface);
}

.settings-page .list-group-item:hover,
.settings-page .list-group-item:focus {
    color: var(--brand-800);
    background: var(--brand-100);
}

.settings-page .list-group-item.active {
    z-index: 1;
    border-color: rgba(46, 149, 133, 0.24);
    color: var(--brand-800);
    background: var(--brand-100);
}

.settings-page .list-group-item.active i {
    color: var(--brand-700);
}

.settings-page .nav-tabs {
    gap: 0.35rem;
    border-bottom-color: var(--border-color);
}

.settings-page .nav-tabs .nav-link {
    border-color: transparent;
    border-radius: 10px 10px 0 0;
    color: var(--text-secondary);
    font-weight: 650;
}

.settings-page .nav-tabs .nav-link:hover,
.settings-page .nav-tabs .nav-link:focus {
    border-color: var(--border-color) var(--border-color) transparent;
    color: var(--brand-800);
    background: var(--surface-soft);
}

.settings-page .nav-tabs .nav-link.active {
    border-color: var(--border-color) var(--border-color) var(--surface);
    color: var(--brand-800);
    background: var(--surface);
}

.settings-page .form-text {
    color: var(--text-muted);
}

.settings-page .form-check-input:checked {
    border-color: var(--brand-700);
    background-color: var(--brand-700);
}

.settings-page .form-check-input:focus {
    border-color: var(--brand-500);
    box-shadow: 0 0 0 0.2rem rgba(46, 149, 133, 0.18);
}

.settings-page .btn-success {
    border-color: var(--brand-700);
    color: #fff;
    background: linear-gradient(135deg, var(--brand-600), var(--brand-800));
}

.settings-page .btn-success:hover,
.settings-page .btn-success:focus {
    border-color: var(--brand-800);
    color: #fff;
    background: var(--brand-800);
}

.settings-page .btn-warning {
    border-color: #bf8731;
    color: #33220a;
    background: #edc577;
}

.settings-page .btn-outline-warning {
    border-color: #bd812a;
    color: #875713;
}

.settings-page .btn-outline-warning:hover,
.settings-page .btn-outline-warning:focus {
    border-color: #bd812a;
    color: #fff;
    background: #a56c1d;
}

.settings-page .alert-info {
    border-color: rgba(46, 149, 133, 0.24);
    color: var(--brand-900);
    background: var(--brand-100);
}

.settings-page .alert-success {
    border-color: #bdddc7;
    color: #245c39;
    background: #edf7ef;
}

.settings-page .alert-warning {
    border-color: #ead4a6;
    color: #6a4b16;
    background: #fff7e6;
}

.settings-page .alert-danger {
    border-color: #e7c2c2;
    color: #762f2f;
    background: #fff0f0;
}

[data-theme="dark"] .settings-page .card-header .text-primary,
[data-theme="dark"] .settings-page .list-group-item.active,
[data-theme="dark"] .settings-page .nav-tabs .nav-link.active,
[data-theme="dark"] .settings-page .nav-tabs .nav-link:hover,
[data-theme="dark"] .settings-page .nav-tabs .nav-link:focus {
    color: #b7ebdb;
}

[data-theme="dark"] .settings-page .card-header .text-primary {
    color: #b7ebdb !important;
}

[data-theme="dark"] .settings-page .list-group-item:hover,
[data-theme="dark"] .settings-page .list-group-item:focus,
[data-theme="dark"] .settings-page .list-group-item.active {
    border-color: #365b51;
    background: #1d3d37;
}

[data-theme="dark"] .settings-page .nav-tabs .nav-link:hover,
[data-theme="dark"] .settings-page .nav-tabs .nav-link:focus {
    border-color: var(--border-color) var(--border-color) transparent;
    background: var(--surface-soft);
}

[data-theme="dark"] .settings-page .nav-tabs .nav-link.active {
    border-color: var(--border-color) var(--border-color) var(--surface);
    background: var(--surface);
}

[data-theme="dark"] .settings-page .btn-warning {
    border-color: #d0a356;
    color: #261b09;
    background: #e0b766;
}

[data-theme="dark"] .settings-page .btn-outline-warning {
    border-color: #d0a356;
    color: #e8c77e;
}

[data-theme="dark"] .settings-page .btn-outline-warning:hover,
[data-theme="dark"] .settings-page .btn-outline-warning:focus {
    color: #261b09;
    background: #e0b766;
}

[data-theme="dark"] .settings-page .alert-info {
    border-color: #315a50;
    color: #c8e8dc;
    background: #1a3731;
}

[data-theme="dark"] .settings-page .alert-success {
    border-color: #315b43;
    color: #bce3c7;
    background: #1b3325;
}

[data-theme="dark"] .settings-page .alert-warning {
    border-color: #65512d;
    color: #ead09a;
    background: #382e1b;
}

[data-theme="dark"] .settings-page .alert-danger {
    border-color: #623b3b;
    color: #efbcbc;
    background: #382323;
}

@media (max-width: 991px) {
    .sidebar,
    .sidebar.show,
    .sidebar.collapse.show,
    .sidebar.collapse:not(.show),
    .sidebar.collapsing {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        right: auto;
        z-index: 1050;
        width: 68px;
        min-width: 68px;
        max-width: 68px;
        height: 100vh;
        height: 100dvh;
        min-height: 0;
        padding: 0.5rem 0.3rem;
        overflow-x: hidden;
        overflow-y: auto;
        transform: none;
        transition: width 0.25s ease, box-shadow 0.25s ease;
    }

    .sidebar.collapse:not(.show),
    .sidebar.collapsing {
        display: block;
    }

    .sidebar.show,
    .sidebar.collapse.show {
        width: min(280px, calc(100vw - 1rem));
        min-width: min(280px, calc(100vw - 1rem));
        max-width: min(280px, calc(100vw - 1rem));
        box-shadow: 8px 0 36px rgba(13, 36, 34, 0.24);
    }

    .sidebar.collapsing {
        height: 100vh !important;
        height: 100dvh !important;
        transition: none;
    }

    .sidebar .position-sticky {
        min-height: 100%;
        padding: 0.75rem 0.2rem 1rem;
    }

    .sidebar.collapse:not(.show) .sidebar-brand {
        justify-content: center;
        gap: 0;
        margin-inline: 0;
        padding-inline: 0;
    }

    .sidebar.collapse:not(.show) .brand-copy,
    .sidebar.collapse:not(.show) .brand-status {
        display: none;
    }

    #sidebar.collapse:not(.show) .nav-link {
        justify-content: center;
        padding-inline: 0.25rem;
        font-size: 0;
    }

    .sidebar.collapse:not(.show) .nav-link > i {
        margin: 0 !important;
    }

    .sidebar.collapse:not(.show) .dropdown-toggle::after,
    .sidebar.collapse:not(.show) .nav .collapse {
        display: none !important;
    }

    .sidebar.show .nav .collapse,
    .sidebar.collapse.show .nav .collapse {
        display: block;
    }

    .sidebar.collapsing .position-sticky {
        display: none;
    }

    [dir="rtl"] .sidebar,
    [dir="rtl"] .sidebar.show,
    [dir="rtl"] .sidebar.collapse.show,
    [dir="rtl"] .sidebar.collapse:not(.show),
    [dir="rtl"] .sidebar.collapsing {
        right: 0;
        left: auto;
        transform: none;
    }

    .main-content {
        box-sizing: border-box;
        flex: 0 0 100%;
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding-inline: 76px 0.5rem !important;
    }

    .sidebar-backdrop {
        z-index: 1040;
    }
}

@media (max-width: 575px) {
    .main-content {
        padding-inline: 76px 0.5rem !important;
    }
}

#sidebar .nav-link {
    font-size: 0.89rem;
    font-weight: 650;
    transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

#sidebar .ps-3 .nav-link,
#sidebar .nav .collapse > .nav > .nav-item > .nav-link {
    font-size: 0.83rem;
}

html[data-theme="light"] #sidebar .nav-link {
    font-size: 0.89rem;
}

html[data-theme="light"] #sidebar .ps-3 .nav-link,
html[data-theme="light"] #sidebar .nav .collapse > .nav > .nav-item > .nav-link {
    font-size: 0.83rem;
}

#sidebar .nav-link:hover:not(.active) {
    border-color: rgba(46, 149, 133, 0.3);
    color: var(--brand-900);
    background: linear-gradient(100deg, var(--brand-100), #f1f8f4);
    box-shadow: 0 5px 14px rgba(24, 91, 69, 0.1);
    transform: translateY(-1px);
}

html[data-theme="light"] #sidebar .nav-link:hover:not(.active) {
    border-color: rgba(46, 149, 133, 0.3);
    color: var(--brand-900);
    background: linear-gradient(100deg, var(--brand-100), #f1f8f4);
    box-shadow: 0 5px 14px rgba(24, 91, 69, 0.1);
}

#sidebar .nav-link:hover:not(.active) > i {
    border-color: rgba(46, 149, 133, 0.34);
    color: #176d58;
    background: #d7eee3;
}

html[data-theme="light"] #sidebar .nav-link:hover:not(.active) > i {
    border-color: rgba(46, 149, 133, 0.34);
    color: #176d58;
    background: #d7eee3;
}

#sidebar .nav-link.active,
#sidebar .nav > .nav-item > .nav-link.active {
    border-color: rgba(46, 149, 133, 0.3);
    border-inline-start: 3px solid var(--brand-700);
    color: var(--brand-900);
    background: var(--brand-100);
    box-shadow: 0 6px 18px rgba(24, 91, 69, 0.14);
    font-weight: 750;
}

html[data-theme="light"] #sidebar .nav-link.active,
html[data-theme="light"] #sidebar .nav > .nav-item > .nav-link.active {
    border-color: rgba(46, 149, 133, 0.3);
    border-inline-start: 3px solid var(--brand-700);
    color: var(--brand-900);
    background: var(--brand-100);
    box-shadow: 0 6px 18px rgba(24, 91, 69, 0.14);
    font-weight: 750;
}

#sidebar .nav-link.active > i {
    border-color: var(--brand-700);
    color: #fff;
    background: linear-gradient(145deg, var(--brand-700), var(--brand-900));
    box-shadow: 0 3px 9px rgba(23, 109, 88, 0.22);
}

html[data-theme="light"] #sidebar .nav-link.active > i {
    border-color: var(--brand-700);
    color: #fff;
    background: linear-gradient(145deg, var(--brand-700), var(--brand-900));
    box-shadow: 0 3px 9px rgba(23, 109, 88, 0.22);
}

#sidebar .ps-3 .nav-link.active,
#sidebar .nav .collapse > .nav > .nav-item > .nav-link.active {
    border-inline-start-width: 2px;
    color: var(--brand-900);
    background: linear-gradient(105deg, var(--brand-100) 0%, #eef7f1 100%);
    box-shadow: 0 3px 10px rgba(24, 91, 69, 0.09);
}

html[data-theme="light"] #sidebar .ps-3 .nav-link.active,
html[data-theme="light"] #sidebar .nav .collapse > .nav > .nav-item > .nav-link.active {
    border-inline-start-width: 2px;
    color: var(--brand-900);
    background: linear-gradient(105deg, var(--brand-100) 0%, #eef7f1 100%);
    box-shadow: 0 3px 10px rgba(24, 91, 69, 0.09);
}

#sidebar .ps-3 .nav-link.active > i,
#sidebar .nav .collapse > .nav > .nav-item > .nav-link.active > i {
    border-color: #a8d7c5;
    color: var(--brand-700);
    background: var(--brand-100);
    box-shadow: none;
}

html[data-theme="light"] #sidebar .ps-3 .nav-link.active > i,
html[data-theme="light"] #sidebar .nav .collapse > .nav > .nav-item > .nav-link.active > i {
    border-color: #a8d7c5;
    color: var(--brand-700);
    background: var(--brand-100);
}

[dir="rtl"] #sidebar .nav-link.active,
[dir="rtl"] #sidebar .nav > .nav-item > .nav-link.active,
[dir="rtl"] #sidebar .ps-3 .nav-link.active,
[dir="rtl"] #sidebar .nav .collapse > .nav > .nav-item > .nav-link.active {
    border-inline-start-color: #218566;
}

[data-theme="dark"] #sidebar .nav-link:hover:not(.active) {
    border-color: rgba(122, 216, 177, 0.32);
    color: #f0fff7;
    background: linear-gradient(100deg, rgba(53, 142, 108, 0.34), rgba(38, 91, 73, 0.24));
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.16);
}

[data-theme="dark"] #sidebar .nav-link:hover:not(.active) > i {
    border-color: rgba(144, 226, 190, 0.38);
    color: #d8ffeb;
    background: rgba(73, 157, 121, 0.38);
}

[data-theme="dark"] #sidebar .nav-link.active,
[data-theme="dark"] #sidebar .nav > .nav-item > .nav-link.active {
    border-color: rgba(136, 224, 184, 0.42);
    border-inline-start-color: #7de0b0;
    color: #f1fff7;
    background: linear-gradient(105deg, #245c49 0%, #1c4238 100%);
    box-shadow: 0 7px 20px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] #sidebar .nav-link.active > i {
    border-color: rgba(196, 255, 222, 0.62);
    color: #14392e;
    background: linear-gradient(145deg, #a9edc9, #67c99c);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] #sidebar .ps-3 .nav-link.active,
[data-theme="dark"] #sidebar .nav .collapse > .nav > .nav-item > .nav-link.active {
    color: #e5fff0;
    background: linear-gradient(105deg, #204d3d 0%, #1b3c33 100%);
}

[data-theme="dark"] #sidebar .ps-3 .nav-link.active > i,
[data-theme="dark"] #sidebar .nav .collapse > .nav > .nav-item > .nav-link.active > i {
    border-color: rgba(135, 214, 172, 0.35);
    color: #a7e8c1;
    background: rgba(90, 163, 121, 0.2);
    box-shadow: none;
}
