/* Modern POS UI overrides. Keep this file presentation-only for PHP 7.4 safety. */
:root {
    --pos-primary: #2563eb;
    --pos-primary-soft: #eff6ff;
    --pos-success: #059669;
    --pos-warning: #d97706;
    --pos-danger: #dc2626;
    --pos-info: #0284c7;
    --pos-muted: #64748b;
    --pos-text: #0f172a;
    --pos-soft-text: #475569;
    --pos-border: #e2e8f0;
    --pos-border-strong: #cbd5e1;
    --pos-bg: #f6f8fb;
    --pos-surface: #ffffff;
    --pos-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    --pos-radius: 12px;
    --pos-topbar-h: 58px;
    --pos-sidebar-w: 15.25rem;
    --pos-sidebar-mini: 5.75rem;
}

html {
    font-size: 78%;
}

body {
    color: var(--pos-text);
    background: var(--pos-bg);
    letter-spacing: 0;
}

a:hover {
    text-decoration: none;
}

#wrapper {
    background: var(--pos-bg);
}

.topbar {
    height: var(--pos-topbar-h);
    padding: 0 1rem;
    border-bottom: 1px solid var(--pos-border);
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
}

.topbar-toggle,
.topbar .nav-item.notification-bell .nav-link {
    width: 34px;
    height: 34px;
    border-radius: var(--pos-radius);
}

.topbar .img-profile {
    width: 32px;
    height: 32px;
}

.topbar .user-info {
    padding: 0.35rem 0.5rem;
    border-radius: var(--pos-radius);
}

.topbar .user-name {
    font-size: 0.84rem;
}

.topbar .user-role {
    font-size: 0.68rem;
}

.sidebar {
    top: var(--pos-topbar-h);
    height: calc(100vh - var(--pos-topbar-h));
    width: var(--pos-sidebar-w) !important;
    min-width: var(--pos-sidebar-w);
    padding: 0.55rem 0.65rem 1rem;
    border-right: 1px solid var(--pos-border);
    background: var(--pos-surface) !important;
}

.sidebar .nav-item {
    margin: 1px 0;
}

.sidebar .nav-item .nav-link {
    width: 100% !important;
    min-height: 38px;
    padding: 0.58rem 0.75rem;
    gap: 0.68rem;
    border-radius: var(--pos-radius);
    color: var(--pos-soft-text);
    line-height: 1.2;
}

.sidebar .nav-item .nav-link i {
    width: 18px;
    min-width: 18px;
    margin-right: 0;
    text-align: center;
    font-size: 0.95rem;
    color: #94a3b8;
}

.sidebar .nav-item .nav-link span {
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar .nav-item .nav-link:hover {
    background: #f1f5f9;
    color: var(--pos-text);
}

.sidebar .nav-item .nav-link:hover i {
    color: var(--pos-primary);
}

.sidebar .nav-item.active .nav-link {
    position: relative;
    background: var(--pos-primary-soft);
    color: #1d4ed8;
    box-shadow: inset 3px 0 0 var(--pos-primary);
}

.sidebar .nav-item.active .nav-link i {
    color: var(--pos-primary);
}

.sidebar .sidebar-heading {
    padding: 1.05rem 0.75rem 0.38rem;
    color: #94a3b8;
    font-size: 0.64rem;
    letter-spacing: 0;
}

.sidebar hr.sidebar-divider {
    margin: 0.6rem 0.25rem;
    border-color: #eef2f7;
}

.sidebar::-webkit-scrollbar,
.table-responsive::-webkit-scrollbar,
.card-body::-webkit-scrollbar {
    width: 5px;
    height: 7px;
}

.sidebar::-webkit-scrollbar-thumb,
.table-responsive::-webkit-scrollbar-thumb,
.card-body::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 999px;
}

#content-wrapper {
    margin-left: var(--pos-sidebar-w);
    background: var(--pos-bg);
}

.sidebar.toggled {
    width: var(--pos-sidebar-mini) !important;
    min-width: var(--pos-sidebar-mini);
    padding-left: 0.45rem;
    padding-right: 0.45rem;
}

.sidebar.toggled~#content-wrapper {
    margin-left: var(--pos-sidebar-mini);
}

.sidebar.toggled .nav-item .nav-link {
    min-height: 40px;
    padding: 0.68rem 0;
}

#content {
    padding-top: var(--pos-topbar-h);
}

#content>.container-fluid,
.container-fluid>.container-fluid {
    padding: 1.15rem;
}

.container-fluid>.container-fluid {
    padding: 0;
}

.sticky-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--pos-border);
}

.d-sm-flex.align-items-center.justify-content-between.mb-4,
.page-header-mobile {
    align-items: flex-start !important;
    gap: 0.8rem;
    margin-bottom: 1rem !important;
}

.h3.text-gray-800,
h1.h3 {
    color: var(--pos-text) !important;
    font-size: 1.28rem;
    line-height: 1.3;
}

.card {
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    box-shadow: var(--pos-shadow) !important;
    overflow: visible;
}

.card.mb-4,
.col-xl-3.mb-4,
.col-md-6.mb-4 {
    margin-bottom: 1rem !important;
}

.card-header {
    padding: 0.85rem 1rem;
    background: var(--pos-surface);
    border-bottom: 1px solid var(--pos-border);
}

.card-header.py-3 {
    padding-top: 0.85rem !important;
    padding-bottom: 0.85rem !important;
}

.card-header h6,
.card-header .h6 {
    color: var(--pos-text) !important;
    font-size: 0.9rem;
}

.card-body {
    padding: 1rem;
    overflow-x: visible;
}

.border-left-primary,
.border-left-success,
.border-left-info,
.border-left-warning,
.border-left-danger,
.border-left-secondary,
.border-left-dark,
.border-left-purple {
    border-left-width: 3px !important;
}

.card.border-left-primary,
.card.border-left-success,
.card.border-left-info,
.card.border-left-warning,
.card.border-left-danger,
.card.border-left-secondary,
.card.border-left-dark,
.card.border-left-purple {
    position: relative;
    min-height: 112px;
    border: 1px solid var(--pos-border) !important;
    background: #fff;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07) !important;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
    overflow: hidden;
}

.card.border-left-primary {
    --summary-accent: var(--pos-primary);
    --summary-soft: #eff6ff;
    --summary-border: #bfdbfe;
}

.card.border-left-success {
    --summary-accent: var(--pos-success);
    --summary-soft: #ecfdf5;
    --summary-border: #bbf7d0;
}

.card.border-left-info {
    --summary-accent: var(--pos-info);
    --summary-soft: #e0f2fe;
    --summary-border: #bae6fd;
}

.card.border-left-warning {
    --summary-accent: var(--pos-warning);
    --summary-soft: #fffbeb;
    --summary-border: #fed7aa;
}

.card.border-left-danger {
    --summary-accent: var(--pos-danger);
    --summary-soft: #fef2f2;
    --summary-border: #fecaca;
}

.card.border-left-secondary {
    --summary-accent: #64748b;
    --summary-soft: #f1f5f9;
    --summary-border: #cbd5e1;
}

.card.border-left-dark {
    --summary-accent: #334155;
    --summary-soft: #f1f5f9;
    --summary-border: #cbd5e1;
}

.card.border-left-purple {
    --summary-accent: #7c3aed;
    --summary-soft: #f5f3ff;
    --summary-border: #ddd6fe;
}

.card.border-left-primary::before,
.card.border-left-success::before,
.card.border-left-info::before,
.card.border-left-warning::before,
.card.border-left-danger::before,
.card.border-left-secondary::before,
.card.border-left-dark::before,
.card.border-left-purple::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--summary-accent);
}

.card.border-left-primary:hover,
.card.border-left-success:hover,
.card.border-left-info:hover,
.card.border-left-warning:hover,
.card.border-left-danger:hover,
.card.border-left-secondary:hover,
.card.border-left-dark:hover,
.card.border-left-purple:hover {
    transform: translateY(-2px);
    border-color: var(--summary-border) !important;
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.11) !important;
}

.card.border-left-primary .card-body,
.card.border-left-success .card-body,
.card.border-left-info .card-body,
.card.border-left-warning .card-body,
.card.border-left-danger .card-body,
.card.border-left-secondary .card-body,
.card.border-left-dark .card-body,
.card.border-left-purple .card-body {
    position: relative;
    z-index: 1;
    padding: 1.05rem 1.1rem 1.05rem 1.55rem;
}

.card.border-left-primary .row.no-gutters.align-items-center,
.card.border-left-success .row.no-gutters.align-items-center,
.card.border-left-info .row.no-gutters.align-items-center,
.card.border-left-warning .row.no-gutters.align-items-center,
.card.border-left-danger .row.no-gutters.align-items-center,
.card.border-left-secondary .row.no-gutters.align-items-center,
.card.border-left-dark .row.no-gutters.align-items-center,
.card.border-left-purple .row.no-gutters.align-items-center {
    min-height: 72px;
}

.card.border-left-primary .text-xs.font-weight-bold,
.card.border-left-success .text-xs.font-weight-bold,
.card.border-left-info .text-xs.font-weight-bold,
.card.border-left-warning .text-xs.font-weight-bold,
.card.border-left-danger .text-xs.font-weight-bold,
.card.border-left-secondary .text-xs.font-weight-bold,
.card.border-left-dark .text-xs.font-weight-bold,
.card.border-left-purple .text-xs.font-weight-bold {
    color: var(--summary-accent) !important;
    margin-bottom: 0.42rem !important;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    line-height: 1.45;
}

.card.border-left-primary .h5,
.card.border-left-success .h5,
.card.border-left-info .h5,
.card.border-left-warning .h5,
.card.border-left-danger .h5,
.card.border-left-secondary .h5,
.card.border-left-dark .h5,
.card.border-left-purple .h5 {
    color: var(--pos-text) !important;
    margin-bottom: 0.32rem !important;
    font-size: 1.1rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.card.border-left-primary .col-auto,
.card.border-left-success .col-auto,
.card.border-left-info .col-auto,
.card.border-left-warning .col-auto,
.card.border-left-danger .col-auto,
.card.border-left-secondary .col-auto,
.card.border-left-dark .col-auto,
.card.border-left-purple .col-auto {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.75rem;
    color: var(--summary-accent);
    background: var(--summary-soft);
    border: 1px solid var(--summary-border);
    border-radius: var(--pos-radius);
}

.card.border-left-primary .col-auto i,
.card.border-left-success .col-auto i,
.card.border-left-info .col-auto i,
.card.border-left-warning .col-auto i,
.card.border-left-danger .col-auto i,
.card.border-left-secondary .col-auto i,
.card.border-left-dark .col-auto i,
.card.border-left-purple .col-auto i {
    color: var(--summary-accent) !important;
    font-size: 1.12rem;
}

.card.border-left-primary small,
.card.border-left-success small,
.card.border-left-info small,
.card.border-left-warning small,
.card.border-left-danger small,
.card.border-left-secondary small,
.card.border-left-dark small,
.card.border-left-purple small {
    color: var(--pos-muted) !important;
    display: block;
    line-height: 1.45;
}

.text-xs {
    font-size: 0.68rem;
    letter-spacing: 0;
}

.h5 {
    font-size: 1rem;
}

.btn {
    border-radius: var(--pos-radius);
    border-width: 1px;
    box-shadow: none !important;
    font-weight: 600;
    line-height: 1.35;
}

.btn:not(.btn-sm):not(.btn-lg) {
    padding: 0.48rem 0.85rem;
}

.btn-sm {
    min-height: 30px;
    padding: 0.32rem 0.6rem;
}

.btn i {
    margin-right: 0.28rem;
}

.btn .fa-ellipsis-v,
.action-dropdown .btn i {
    margin-right: 0;
}

.btn-primary,
.bg-primary,
.badge-primary {
    border-color: var(--pos-primary) !important;
}

.btn-primary,
.bg-primary {
    background: var(--pos-primary) !important;
}

.btn-info {
    background: var(--pos-info);
    border-color: var(--pos-info);
}

.btn-success {
    background: var(--pos-success);
    border-color: var(--pos-success);
}

.btn-warning {
    background: #f59e0b;
    border-color: #f59e0b;
    color: #fff;
}

.btn-dark {
    background: #334155;
    border-color: #334155;
}

.btn-outline-primary,
.btn-outline-success,
.btn-outline-danger,
.btn-outline-secondary {
    background: #fff;
}

.pos-segmented,
.pos-dual-action {
    display: flex;
    align-items: center;
    min-height: 42px;
    padding: 0.25rem;
    border: 1px solid var(--pos-border);
    border-radius: 16px;
    background: #f8fafc;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.pos-price-toggle {
    width: 100%;
    gap: 0.25rem;
}

.pos-price-option {
    position: relative;
    min-height: 34px;
    padding: 0.5rem 0.85rem !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: transparent !important;
    color: var(--pos-soft-text) !important;
    transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.pos-price-option input {
    position: absolute;
    pointer-events: none;
    opacity: 0;
}

.pos-price-option:hover {
    color: var(--pos-primary) !important;
    background: #fff !important;
}

.pos-price-option.active,
.pos-price-option:active {
    color: #fff !important;
    background: var(--pos-primary) !important;
    box-shadow: 0 6px 14px rgba(37, 99, 235, 0.22) !important;
}

.pos-dual-action {
    gap: 0;
    flex: 0 0 auto;
}

.pos-icon-action {
    position: relative;
    width: 42px;
    min-width: 42px;
    min-height: 34px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    color: var(--pos-primary) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.pos-icon-action:first-child {
    border-top-left-radius: 12px !important;
    border-bottom-left-radius: 12px !important;
}

.pos-icon-action:last-child {
    border-top-right-radius: 12px !important;
    border-bottom-right-radius: 12px !important;
}

.pos-icon-action + .pos-icon-action::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--pos-border);
}

.pos-icon-action:hover,
.pos-icon-action:focus {
    color: #1d4ed8 !important;
    background: #fff !important;
}

.pos-icon-action:active {
    transform: translateY(1px);
    background: var(--pos-primary-soft) !important;
}

.pos-icon-action i,
.pos-coordinate-action i,
.pos-inline-icon-action i,
.pos-price-option i {
    margin-right: 0;
}

.pos-inline-icon-action {
    width: 34px;
    min-width: 34px;
    min-height: 34px;
    padding: 0 !important;
    border: 1px solid var(--pos-border) !important;
    border-radius: 12px !important;
    background: #f8fafc !important;
    color: var(--pos-primary) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.16s ease, background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.pos-inline-icon-action:hover,
.pos-inline-icon-action:focus {
    color: #1d4ed8 !important;
    border-color: #bfdbfe !important;
    background: #fff !important;
}

.pos-inline-icon-action:active {
    transform: translateY(1px);
    background: var(--pos-primary-soft) !important;
}

.pos-coordinate-group {
    display: flex;
    align-items: stretch;
    min-height: 42px;
    overflow: hidden;
    border: 1px solid var(--pos-border);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.pos-coordinate-group:focus-within {
    border-color: rgba(37, 99, 235, 0.42);
    box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.12);
}

.pos-coordinate-field {
    min-width: 0;
    height: auto;
    min-height: 40px;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
}

.pos-coordinate-actions {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0.25rem;
    border-left: 1px solid #eef2f7;
    background: #f8fafc;
}

.pos-coordinate-action {
    position: relative;
    width: 42px;
    min-width: 42px;
    min-height: 34px;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: transparent !important;
    color: var(--pos-primary) !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.pos-coordinate-action + .pos-coordinate-action {
    margin-left: 0.1rem;
}

.pos-coordinate-action + .pos-coordinate-action::before {
    content: "";
    position: absolute;
    left: -0.05rem;
    top: 8px;
    bottom: 8px;
    width: 1px;
    background: var(--pos-border);
}

.pos-coordinate-action:hover,
.pos-coordinate-action:focus {
    color: #1d4ed8 !important;
    background: #fff !important;
}

.pos-coordinate-action:active {
    transform: translateY(1px);
    background: var(--pos-primary-soft) !important;
}

.pos-coordinate-action.disabled,
.pos-coordinate-action:disabled {
    pointer-events: none;
    color: #94a3b8 !important;
    opacity: 0.72;
}

.badge {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    border-radius: 999px;
    padding: 0.22rem 0.58rem;
    font-size: 0.68rem;
    font-weight: 700;
    line-height: 1;
}

.badge-info {
    color: #075985;
    background: #e0f2fe;
}

.badge-dark {
    color: #f8fafc;
    background: #1e293b;
}

.badge-secondary {
    color: #475569;
    background: #e2e8f0;
}

.form-control,
.custom-select,
.select2-container--default .select2-selection--single {
    border-radius: var(--pos-radius) !important;
    border-color: var(--pos-border-strong) !important;
}

.form-control,
.custom-select {
    min-height: 36px;
    padding: 0.43rem 0.65rem;
}

.input-group-sm>.form-control,
.input-group-sm>.custom-select,
.form-control-sm,
.custom-select-sm {
    min-height: 31px;
    padding: 0.28rem 0.55rem;
}

label {
    color: var(--pos-soft-text);
    font-size: 0.8rem;
}

.table-responsive {
    border-radius: var(--pos-radius);
    overflow-x: auto !important;
    overflow-y: visible !important;
}

.table {
    margin-bottom: 0;
    color: var(--pos-text);
}

.table-bordered {
    border: 1px solid var(--pos-border);
}

.table-bordered td,
.table-bordered th {
    border-color: var(--pos-border);
}

.table thead th {
    position: relative;
    background: #f8fafc !important;
    color: #475569;
    border-bottom: 1px solid var(--pos-border) !important;
    padding: 0.65rem 0.7rem;
    font-size: 0.68rem;
    letter-spacing: 0;
}

.table tbody td {
    padding: 0.62rem 0.7rem;
    border-top: 0;
    border-bottom: 1px solid #eef2f7;
}

.table tbody tr:hover td {
    background: #f8fbff;
}

.table-borderless td,
.table-borderless th {
    border: 0;
    padding: 0.4rem 0.55rem;
    white-space: normal;
}

.table-borderless td:first-child {
    color: #64748b;
}

.table a strong,
.table a {
    color: #1d4ed8;
}

.action-dropdown {
    position: static;
}

.action-dropdown .dropdown-toggle {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 1px solid var(--pos-border);
    color: var(--pos-muted);
}

.action-dropdown .dropdown-menu,
.dropdown-menu {
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14);
}

.action-dropdown .dropdown-item,
.dropdown-item {
    gap: 0.45rem;
    padding: 0.52rem 0.85rem;
}

.card-header form,
.card-header .d-flex {
    gap: 0.45rem;
}

.card-header form.mr-3 {
    margin-right: 0.45rem !important;
}

.card-header select.form-control,
.card-header input.form-control {
    min-width: 170px;
}

.show-action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
    max-width: 100%;
}

.show-action-buttons form {
    margin: 0;
}

.show-action-buttons .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.page-action-toolbar {
    gap: 0.55rem;
    max-width: 100%;
}

.page-action-toolbar>* {
    margin: 0 !important;
}

.daily-export-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.45rem 0.55rem;
}

.daily-export-form label,
.daily-export-form input,
.daily-export-form button {
    margin: 0 !important;
}

.profile-page {
    max-width: 1180px;
    margin: 0 auto;
}

.profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.15rem;
    margin-bottom: 1rem;
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    background: var(--pos-surface);
    box-shadow: var(--pos-shadow);
}

.profile-hero-title {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.profile-hero-icon,
.profile-section-icon,
.profile-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.profile-hero-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--pos-radius);
    color: var(--pos-primary);
    background: var(--pos-primary-soft);
    border: 1px solid #bfdbfe;
    font-size: 1.2rem;
}

.profile-hero-copy {
    min-width: 0;
}

.profile-hero-copy h1 {
    margin: 0;
    color: var(--pos-text);
    font-size: 1.28rem;
    font-weight: 800;
    line-height: 1.25;
}

.profile-hero-copy p {
    margin: 0.18rem 0 0;
    color: var(--pos-muted);
    font-size: 0.8rem;
}

.profile-hero-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.45rem;
}

.profile-meta-pill,
.profile-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.36rem;
    min-height: 28px;
    padding: 0.34rem 0.68rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    line-height: 1;
}

.profile-meta-pill {
    color: #1d4ed8;
    background: var(--pos-primary-soft);
    border: 1px solid #bfdbfe;
}

.profile-meta-pill-muted {
    color: #047857;
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.profile-card {
    overflow: hidden;
}

.profile-avatar-card {
    position: relative;
}

.profile-avatar-cover {
    height: 88px;
    background:
        linear-gradient(135deg, rgba(37, 99, 235, 0.16), rgba(5, 150, 105, 0.12)),
        linear-gradient(90deg, #ffffff, #f8fafc);
    border-bottom: 1px solid var(--pos-border);
}

.profile-avatar-body {
    padding-top: 0;
    text-align: center;
}

.profile-avatar-wrapper {
    position: relative;
    display: inline-flex;
    margin-top: -48px;
    margin-bottom: 0.9rem;
}

.profile-avatar {
    width: 96px;
    height: 96px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 4px solid #fff;
    border-radius: 999px;
    background: var(--pos-primary);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.15);
}

.profile-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-avatar span {
    color: #fff;
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
}

.profile-avatar-edit {
    position: absolute;
    right: 2px;
    bottom: 2px;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    color: #fff;
    cursor: pointer;
    border: 2px solid #fff;
    border-radius: 999px;
    background: var(--pos-primary);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.18);
}

.profile-avatar-edit:hover {
    background: #1d4ed8;
}

.profile-user-name {
    margin: 0;
    color: var(--pos-text);
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.profile-user-email {
    margin: 0.28rem 0 0.7rem;
    color: var(--pos-muted);
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.profile-role-badge {
    color: #075985;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
}

.profile-avatar-form {
    margin-top: 1rem;
}

.profile-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.profile-avatar-preview {
    display: none;
    margin-top: 0.85rem;
    padding: 0.8rem;
    border: 1px dashed var(--pos-border-strong);
    border-radius: var(--pos-radius);
    background: #f8fafc;
}

.profile-avatar-preview img {
    width: 66px;
    height: 66px;
    object-fit: cover;
    border: 2px solid #fff;
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

.profile-avatar-actions {
    display: flex;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 0.65rem;
}

.profile-delete-avatar {
    margin: 0.7rem 0 0;
}

.profile-delete-avatar .btn {
    padding: 0;
    color: var(--pos-danger) !important;
    font-size: 0.76rem;
}

.profile-card-heading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.95rem 1rem;
    border-bottom: 1px solid var(--pos-border);
    background: #fff;
}

.profile-card-heading h2 {
    margin: 0;
    color: var(--pos-text);
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1.25;
}

.profile-card-heading p {
    margin: 0.16rem 0 0;
    color: var(--pos-muted);
    font-size: 0.75rem;
}

.profile-section-icon {
    width: 34px;
    height: 34px;
    border-radius: var(--pos-radius);
    font-size: 0.9rem;
}

.profile-section-icon-primary,
.profile-section-icon-info {
    color: var(--pos-primary);
    background: var(--pos-primary-soft);
}

.profile-section-icon-warning {
    color: #b45309;
    background: #fffbeb;
}

.profile-info-list {
    padding: 0.35rem 1rem 1rem;
}

.profile-info-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.72rem 0;
    border-bottom: 1px solid #eef2f7;
}

.profile-info-item:last-child {
    border-bottom: 0;
}

.profile-info-icon {
    width: 30px;
    height: 30px;
    margin-top: 0.05rem;
    color: #475569;
    background: #f1f5f9;
    border-radius: var(--pos-radius);
    font-size: 0.78rem;
}

.profile-info-label,
.profile-info-value {
    display: block;
}

.profile-info-label {
    color: var(--pos-muted);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

.profile-info-value {
    margin-top: 0.18rem;
    color: var(--pos-text);
    font-size: 0.84rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.profile-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.profile-form-full {
    grid-column: 1 / -1;
}

.profile-form-card .form-group {
    margin-bottom: 0;
}

.profile-form-card label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    color: var(--pos-text);
    font-size: 0.78rem;
    font-weight: 800;
}

.profile-readonly-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.16rem 0.42rem;
    color: #64748b;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    font-size: 0.64rem;
    font-weight: 800;
}

.profile-readonly-control {
    color: var(--pos-muted) !important;
    cursor: not-allowed;
    background: #f8fafc !important;
}

.profile-form-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.profile-password-field .form-control {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.profile-password-toggle {
    min-width: 42px;
    border-color: var(--pos-border-strong) !important;
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
}

.profile-password-toggle i {
    margin-right: 0;
}

.profile-alert {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    border: 1px solid;
    border-radius: var(--pos-radius);
}

.profile-alert-success {
    color: #065f46;
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.profile-alert-danger {
    color: #7f1d1d;
    background: #fef2f2;
    border-color: #fecaca;
}

.page-header-mobile {
    padding: 0.9rem 1rem;
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    background: var(--pos-surface);
    box-shadow: var(--pos-shadow);
}

.page-header-mobile h1 {
    min-width: 220px;
    padding-top: 0.15rem;
}

.detail-title-block {
    min-width: 220px;
}

.detail-title-block h1 {
    min-width: 0;
}

.detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
}

.detail-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.32rem;
    max-width: 100%;
    min-width: 0;
    padding: 0.28rem 0.52rem;
    border: 1px solid var(--pos-border);
    border-radius: 999px;
    background: #f8fafc;
    color: var(--pos-soft-text);
    font-size: 0.73rem;
    line-height: 1.2;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-meta-item strong,
.detail-meta-item span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.detail-meta-item i {
    color: #94a3b8;
    font-size: 0.72rem;
}

.detail-meta-item strong {
    color: var(--pos-text);
    font-weight: 700;
}

.desktop-product-table .table-product-grid,
.table-product-grid,
#items-table.table-product-grid {
    border-radius: var(--pos-radius);
    overflow: hidden;
}

.show-product-card,
.product-card-mobile {
    border: 1px solid var(--pos-border);
    border-radius: var(--pos-radius);
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.05);
}

.show-product-card .item-name {
    color: var(--pos-text);
}

.show-product-card .item-total,
.product-card-mobile .item-total {
    border-top: 1px solid var(--pos-border);
}

.modal-content {
    border-radius: var(--pos-radius);
}

.alert {
    border-radius: var(--pos-radius);
    border: 1px solid transparent;
}

.pagination {
    flex-wrap: wrap;
    gap: 0.25rem;
}

.pagination .page-link {
    border-radius: var(--pos-radius) !important;
}

@media (min-width: 769px) {
    .card-header.d-flex {
        gap: 0.75rem;
    }

    .card-header.d-flex>div,
    .card-header.d-flex>form {
        flex-wrap: wrap;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    #content>.container-fluid {
        padding: 1rem;
    }

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

    .show-action-buttons {
        justify-content: flex-start;
    }

    .show-action-buttons .btn {
        min-width: 0;
    }

    .card-header.d-flex {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .card-header .d-flex,
    .card-header form {
        width: 100%;
        flex-wrap: wrap;
    }

    .card-header .input-group,
    .card-header select.form-control,
    .card-header input.form-control {
        min-width: 220px;
    }

    .table-responsive .table {
        min-width: 860px;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        width: 14rem !important;
        min-width: 14rem;
    }

    .card[class*="border-left-"] .card-body {
        padding: 1.05rem 1rem 1.05rem 1.75rem;
    }

    .card[class*="border-left-"] .text-xs.font-weight-bold {
        font-size: 0.72rem;
        line-height: 1.5;
    }

    .card[class*="border-left-"] .h5 {
        font-size: 1.08rem;
        line-height: 1.4;
    }

    .card[class*="border-left-"] small {
        font-size: 0.78rem;
        line-height: 1.5;
    }
}

@media (max-width: 768px) {
    :root {
        --pos-topbar-h: 56px;
    }

    html {
        font-size: 82%;
    }

    .topbar {
        padding: 0 0.75rem;
    }

    .topbar .notification-dropdown {
        width: calc(100vw - 1rem);
        min-width: 0;
        max-width: calc(100vw - 1rem);
        right: -0.25rem;
    }

    .notification-dropdown .notification-item {
        align-items: flex-start;
    }

    .notification-dropdown .notification-meta {
        max-width: 38%;
    }

    .notification-dropdown .notification-amount {
        max-width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .sidebar,
    .sidebar.toggled {
        top: 0;
        height: 100vh;
        width: min(284px, 86vw) !important;
        min-width: min(284px, 86vw) !important;
        padding: 0 0.65rem 1rem !important;
    }

    #content>.container-fluid {
        padding: 0.8rem;
    }

    .pos-segmented,
    .pos-dual-action,
    .pos-coordinate-group {
        min-height: 40px;
        border-radius: 14px;
    }

    .pos-icon-action,
    .pos-coordinate-action {
        width: 40px;
        min-width: 40px;
        min-height: 32px;
    }

    .pos-price-option {
        min-height: 32px;
        padding: 0.45rem 0.7rem !important;
    }

    .pos-coordinate-field {
        min-height: 38px;
    }

    .d-sm-flex.align-items-center.justify-content-between.mb-4,
    .page-header-mobile {
        flex-direction: column;
        align-items: stretch !important;
    }

    .d-sm-flex.align-items-center.justify-content-between.mb-4>.btn,
    .d-sm-flex.align-items-center.justify-content-between.mb-4>a.btn,
    .d-sm-flex.align-items-center.justify-content-between.mb-4>form {
        width: 100%;
    }

    .d-sm-flex.align-items-center.justify-content-between.mb-4>.page-action-toolbar {
        width: 100%;
        align-items: stretch !important;
        justify-content: flex-start !important;
    }

    .page-action-toolbar {
        flex-direction: column;
    }

    .page-action-toolbar>a.btn {
        width: 100%;
    }

    .daily-export-form {
        width: 100%;
        display: grid;
        grid-template-columns: max-content minmax(0, 1fr);
        gap: 0.45rem 0.6rem;
    }

    .daily-export-form input.form-control {
        width: 100% !important;
        min-width: 0;
    }

    .daily-export-form .btn {
        grid-column: 1 / -1;
        width: 100%;
        margin-top: 0.2rem !important;
    }

    .page-header-mobile {
        padding: 0.8rem;
    }

    .page-header-mobile h1 {
        min-width: 0;
        font-size: 1.1rem !important;
    }

    .detail-title-block {
        min-width: 0;
    }

    .detail-meta {
        gap: 0.3rem;
    }

    .detail-meta-item {
        flex: 1 1 100%;
        justify-content: flex-start;
    }

    .show-action-buttons {
        justify-content: flex-start;
        gap: 0.35rem;
    }

    .show-action-buttons .btn,
    .show-action-buttons form {
        flex: 1 1 auto;
    }

    .show-action-buttons .btn {
        min-width: 120px;
    }

    .card-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 0.6rem;
    }

    .card-header .d-flex,
    .card-header form {
        width: 100%;
        flex-wrap: wrap;
    }

    .card-header .d-flex>*,
    .card-header form>* {
        min-width: 0;
    }

    .card-header select.form-control,
    .card-header input.form-control,
    .card-header .input-group {
        width: 100% !important;
        min-width: 0;
    }

    .card-body {
        padding: 0.85rem;
    }

    .card[class*="border-left-"] {
        min-height: 100px;
    }

    .card[class*="border-left-"] .card-body {
        padding: 1.05rem 0.95rem 1.05rem 1.85rem;
    }

    .card[class*="border-left-"] .row.no-gutters.align-items-center {
        min-height: 62px;
    }

    .card[class*="border-left-"] .h5 {
        font-size: 1.08rem;
    }

    .card[class*="border-left-"] .col-auto {
        width: 38px;
        height: 38px;
        margin-left: 0.55rem;
    }

    .card[class*="border-left-"] .col-auto i {
        font-size: 1rem;
    }

    .profile-hero {
        flex-direction: column;
        align-items: stretch;
        padding: 0.9rem;
    }

    .profile-hero-title {
        align-items: flex-start;
    }

    .profile-hero-meta {
        justify-content: flex-start;
    }

    .profile-hero-copy h1 {
        font-size: 1.12rem;
    }

    .profile-hero-copy p,
    .profile-card-heading p {
        font-size: 0.72rem;
    }

    .profile-avatar-cover {
        height: 76px;
    }

    .profile-avatar {
        width: 88px;
        height: 88px;
    }

    .profile-avatar-wrapper {
        margin-top: -44px;
    }

    .profile-card-heading {
        align-items: flex-start;
        padding: 0.85rem;
    }

    .profile-info-list {
        padding: 0.25rem 0.85rem 0.85rem;
    }

    .profile-form-grid {
        grid-template-columns: 1fr;
        gap: 0.85rem;
    }

    .profile-form-full {
        grid-column: auto;
    }

    .profile-form-actions .btn {
        width: 100%;
    }

    .profile-alert {
        align-items: flex-start;
    }

    .table-responsive .table {
        min-width: 760px;
    }

    .table-responsive {
        max-width: 100% !important;
    }

    .desktop-product-table {
        display: none !important;
    }

    .mobile-product-cards {
        display: block !important;
    }

    .table-borderless {
        min-width: 0 !important;
    }

    .table-borderless tr {
        display: grid;
        grid-template-columns: minmax(110px, 38%) 1fr;
        gap: 0.35rem;
        padding: 0.25rem 0;
    }

    .table-borderless td {
        display: block;
        padding: 0.2rem 0;
    }

    .table-borderless td:nth-child(2):not(:last-child) {
        display: none;
    }

    .table-borderless td:last-child {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .table-borderless .badge {
        white-space: normal;
        text-align: left;
    }

    .modal-dialog {
        margin: 0.75rem;
    }

    .modal-footer {
        gap: 0.45rem;
    }

    .modal-footer .btn,
    .modal-footer form {
        flex: 1 1 auto;
    }
}

@media (max-width: 420px) {
    .show-action-buttons .btn {
        min-width: 100%;
    }

    .daily-export-form {
        grid-template-columns: 1fr;
    }

    .profile-hero-title {
        flex-direction: column;
        gap: 0.6rem;
    }

    .profile-meta-pill {
        width: 100%;
        justify-content: center;
    }

    .profile-avatar-actions {
        flex-direction: column;
    }

    .profile-avatar-actions .btn {
        width: 100%;
    }

    .card[class*="border-left-"] .row.no-gutters.align-items-center {
        align-items: flex-start !important;
    }

    .card[class*="border-left-"] .col-auto {
        width: 34px;
        height: 34px;
        margin-left: 0.4rem;
    }

    .card[class*="border-left-"] .card-body {
        padding-left: 1.75rem;
    }

    .h3.text-gray-800,
    h1.h3 {
        font-size: 1.05rem !important;
    }
}
