:root {
    --dm-primary: #0f766e;
    --dm-primary-dark: #0b5f59;
    --dm-primary-soft: #e8f6f4;
    --dm-ink: #172a35;
    --dm-muted: #71808a;
    --dm-border: #e6edf0;
    --dm-bg: #f5f8f9;
    --dm-sidebar: #102b36;
    --dm-shadow: 0 12px 35px rgba(16, 43, 54, .07);
    --dm-radius: 16px;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--dm-bg); color: var(--dm-ink); font-family: "DM Sans", sans-serif; font-size: 14px; }
h1, h2, h3, h4, h5, h6, .brand-name, .topbar-title { font-family: "Plus Jakarta Sans", sans-serif; }
a { color: var(--dm-primary); text-decoration: none; }
a:hover { color: var(--dm-primary-dark); }
.app-shell { display: flex; min-height: 100vh; }
.sidebar { width: 262px; flex: 0 0 262px; background: var(--dm-sidebar); color: #dcebee; min-height: 100vh; display: flex; flex-direction: column; position: sticky; top: 0; z-index: 1035; }
.sidebar-brand { display: flex; align-items: center; gap: 11px; padding: 27px 23px 23px; min-height: 88px; }
.sidebar-brand-link { min-width: 0; display: flex; align-items: center; gap: 11px; color: inherit; }
.sidebar-brand-link:hover { color: inherit; }
.brand-logo { width: 42px; height: 42px; flex: 0 0 42px; display: grid; place-items: center; padding: 4px; overflow: hidden; border-radius: 12px; background: #fff; box-shadow: 0 8px 20px rgba(0,0,0,.18); }
.brand-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.brand-logo-xl { width: 66px; height: 66px; flex-basis: 66px; padding: 5px; border-radius: 18px; }
.brand-copy { min-width: 0; display: block; }
.brand-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(145deg, #33c9b7, #0f766e); color: #fff; box-shadow: 0 8px 20px rgba(15,118,110,.3); }
.brand-icon-xl { width: 52px; height: 52px; border-radius: 16px; font-size: 23px; }
.brand-name { font-weight: 800; letter-spacing: .04em; font-size: 14px; line-height: 1.05; color: #fff; }
.brand-name span { color: #74d6cb; }
.brand-name-xl { font-size: 19px; margin-left: 12px; }
.brand-caption { color: #7fa2a9; font-size: 8px; letter-spacing: .18em; margin-top: 6px; }
.sidebar-close { margin-left: auto; color: #dcebee; }
.sidebar-user { margin: 4px 16px 19px; padding: 13px; border-radius: 14px; background: rgba(255,255,255,.07); display: flex; gap: 10px; align-items: center; }
.sidebar-user strong { display: block; color: #fff; font-size: 12px; max-width: 142px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user span { display: block; color: #8bb1b4; font-size: 11px; margin-top: 4px; }
.status-online { color: #5be1a2; font-size: 7px; vertical-align: middle; margin-right: 4px; }
.avatar { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: 0 0 auto; color: var(--dm-primary-dark); background: #d7f3ee; font-weight: 800; font-size: 13px; }
.avatar-lg { width: 39px; height: 39px; border-radius: 12px; }
.sidebar-nav { padding: 0 12px; overflow-y: auto; }
.nav-label { color: #6c9299; font-size: 9px; letter-spacing: .16em; font-weight: 700; padding: 0 12px 9px; }
.nav-label-spaced { padding-top: 20px; }
.nav-item { color: #a8c2c6; display: flex; align-items: center; gap: 12px; border-radius: 11px; padding: 11px 12px; margin-bottom: 3px; transition: .2s ease; position: relative; }
.nav-item i { width: 18px; text-align: center; font-size: 14px; color: #82a8ac; }
.nav-item span { font-size: 12px; font-weight: 500; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.07); }
.nav-item.active { color: #fff; background: linear-gradient(90deg, rgba(49, 193, 174, .25), rgba(49, 193, 174, .08)); box-shadow: inset 3px 0 0 #49c9b7; }
.nav-item.active i { color: #6ee2d2; }
.nav-count { margin-left: auto; background: #f6ba59; color: #533900; min-width: 20px; text-align: center; border-radius: 10px; padding: 2px 5px; font-size: 10px; }
.nav-logout { color: #c4d4d5; }
.nav-logout i { color: #a9c3c4; }
.sidebar-footer { padding: 16px; margin-top: auto; }
.support-card { display: flex; align-items: center; gap: 10px; border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 10px; color: #a5c0c3; }
.support-card > i { font-size: 17px; color: #6dd6ca; }
.support-card strong { color: #e5f4f3; display: block; font-size: 11px; }
.support-card small { display: block; font-size: 10px; margin-top: 2px; }
.version { color: #6a8c92; display: block; text-align: center; margin-top: 12px; font-size: 10px; }
.app-main { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.topbar { min-height: 88px; background: #fff; border-bottom: 1px solid var(--dm-border); display: flex; align-items: center; justify-content: space-between; padding: 17px 32px; }
.eyebrow { text-transform: uppercase; color: #8a9aa0; letter-spacing: .12em; font-size: 9px; font-weight: 700; margin-bottom: 5px; }
.topbar-title { font-size: 22px; letter-spacing: -.03em; font-weight: 800; color: var(--dm-ink); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.btn-icon { width: 37px; height: 37px; display: inline-grid; place-items: center; padding: 0; border: 1px solid var(--dm-border); color: #71818a; border-radius: 11px; background: #fff; }
.btn-icon:hover { border-color: #abdcd5; color: var(--dm-primary); background: var(--dm-primary-soft); }
.user-menu { border: 0; background: transparent; display: flex; align-items: center; padding: 0 0 0 8px; color: var(--dm-ink); }
.user-meta strong, .user-meta small { display: block; text-align: left; }
.user-meta strong { font-size: 12px; }
.user-meta small { font-size: 10px; color: var(--dm-muted); margin-top: 3px; }
.content-area { flex: 1; padding: 29px 32px 35px; max-width: 1700px; width: 100%; margin: 0 auto; }
.app-footer { border-top: 1px solid var(--dm-border); padding: 15px 32px; color: #91a0a5; font-size: 11px; display: flex; justify-content: space-between; }
.app-alert { border: 0; border-radius: 12px; box-shadow: var(--dm-shadow); font-size: 13px; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.page-heading h2 { font-size: 18px; margin: 0; letter-spacing: -.02em; }
.page-heading p { color: var(--dm-muted); margin: 7px 0 0; font-size: 12px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn { border-radius: 10px; font-weight: 600; font-size: 12px; padding: 9px 15px; }
.btn-lg { padding: 12px 17px; }
.btn-primary { --bs-btn-bg: var(--dm-primary); --bs-btn-border-color: var(--dm-primary); --bs-btn-hover-bg: var(--dm-primary-dark); --bs-btn-hover-border-color: var(--dm-primary-dark); --bs-btn-active-bg: var(--dm-primary-dark); --bs-btn-active-border-color: var(--dm-primary-dark); }
.btn-outline-primary { --bs-btn-color: var(--dm-primary); --bs-btn-border-color: #9ed7d1; --bs-btn-hover-bg: var(--dm-primary); --bs-btn-hover-border-color: var(--dm-primary); }
.btn-light { border-color: var(--dm-border); color: #52636b; }
.btn-danger { --bs-btn-bg: #dc5b69; --bs-btn-border-color: #dc5b69; }
.card { border: 1px solid var(--dm-border); border-radius: var(--dm-radius); box-shadow: 0 5px 22px rgba(16,43,54,.035); }
.card-header { background: #fff; border-bottom: 1px solid var(--dm-border); padding: 17px 20px; border-radius: var(--dm-radius) var(--dm-radius) 0 0 !important; }
.card-body { padding: 20px; }
.card-title { font-size: 13px; font-weight: 700; margin: 0; }
.card-subtitle { color: var(--dm-muted); font-size: 11px; margin-top: 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 19px; }
.stat-card { padding: 18px; border: 1px solid var(--dm-border); border-radius: var(--dm-radius); background: #fff; display: flex; align-items: flex-start; justify-content: space-between; min-height: 122px; position: relative; overflow: hidden; }
.stat-card::after { content: ""; width: 90px; height: 90px; border-radius: 50%; background: var(--stat-soft, var(--dm-primary-soft)); position: absolute; right: -33px; bottom: -37px; opacity: .65; }
.stat-card .stat-label { color: var(--dm-muted); font-size: 11px; font-weight: 600; margin-bottom: 10px; }
.stat-card .stat-value { font-family: "Plus Jakarta Sans"; color: var(--dm-ink); font-weight: 800; font-size: 21px; letter-spacing: -.03em; }
.stat-card .stat-note { color: #8c9ba0; font-size: 10px; margin-top: 8px; }
.stat-icon { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: var(--stat-soft, var(--dm-primary-soft)); color: var(--stat-color, var(--dm-primary)); font-size: 17px; z-index: 1; }
.stat-teal { --stat-soft: #e4f6f3; --stat-color: #0f766e; }
.stat-amber { --stat-soft: #fff4dd; --stat-color: #bd7a12; }
.stat-blue { --stat-soft: #eaf0ff; --stat-color: #4e6fc2; }
.stat-violet { --stat-soft: #f1eaff; --stat-color: #7b55b7; }
.stat-rose { --stat-soft: #ffebef; --stat-color: #ca5c71; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(300px, 1fr); gap: 19px; margin-bottom: 19px; }
.chart-wrap { height: 260px; position: relative; }
.legend-row { display: flex; gap: 18px; flex-wrap: wrap; color: var(--dm-muted); font-size: 11px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.stock-summary { display: flex; align-items: center; gap: 22px; }
.donut-wrap { width: 145px; height: 145px; position: relative; flex: 0 0 auto; }
.donut-wrap canvas { width: 100% !important; height: 100% !important; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-center strong { font-family: "Plus Jakarta Sans"; font-size: 22px; }
.donut-center span { color: var(--dm-muted); font-size: 10px; }
.stock-legend { flex: 1; display: grid; gap: 13px; }
.stock-legend-item { display: flex; align-items: center; justify-content: space-between; color: var(--dm-muted); font-size: 11px; }
.stock-legend-item strong { color: var(--dm-ink); font-size: 13px; }
.stock-legend-label { display: flex; align-items: center; gap: 7px; }
.recent-table td, .recent-table th { white-space: nowrap; }
.table-card .card-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; flex-wrap: wrap; }
.search-box { position: relative; min-width: 220px; }
.search-box i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #95a5aa; font-size: 12px; }
.search-box input { padding-left: 35px; }
.form-control, .form-select { border-radius: 9px; border-color: #dfe8eb; font-size: 12px; padding: 9px 11px; color: var(--dm-ink); }
.form-control:focus, .form-select:focus { border-color: #6fc8bf; box-shadow: 0 0 0 .2rem rgba(15,118,110,.12); }
.form-label { font-size: 11px; font-weight: 700; color: #53656c; margin-bottom: 6px; }
.input-group-text { border-color: #dfe8eb; background: #f8fbfb; font-size: 12px; color: #87969a; }
.table { margin-bottom: 0; font-size: 12px; vertical-align: middle; }
.table > :not(caption) > * > * { padding: 13px 12px; border-bottom-color: #edf2f3; }
.table thead th { color: #819197; font-size: 10px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; background: #fbfcfc; white-space: nowrap; }
.table tbody tr:hover { background: #fbfefe; }
.table .primary-cell { font-weight: 700; color: var(--dm-ink); }
.table .secondary-cell { color: var(--dm-muted); font-size: 11px; }
.table-responsive { border-radius: 10px; }
.badge { font-size: 10px; font-weight: 700; padding: 6px 8px; border-radius: 7px; }
.text-bg-warning { color: #754c00 !important; background: #fff0c9 !important; }
.text-bg-success { color: #116248 !important; background: #daf5e9 !important; }
.text-bg-danger { color: #a72f43 !important; background: #ffe2e7 !important; }
.text-bg-info { color: #206182 !important; background: #dff3fb !important; }
.text-bg-secondary { color: #56666c !important; background: #edf2f3 !important; }
.action-btns { display: flex; gap: 5px; justify-content: flex-end; }
.action-btn { width: 30px; height: 30px; border: 1px solid var(--dm-border); border-radius: 8px; background: #fff; color: #7f9095; display: inline-grid; place-items: center; font-size: 11px; }
.action-btn:hover { color: var(--dm-primary); border-color: #a6d8d3; background: var(--dm-primary-soft); }
.action-btn.delete:hover { color: #c13f52; border-color: #f2bdc5; background: #fff1f3; }
.empty-state { text-align: center; padding: 42px 20px; color: var(--dm-muted); }
.empty-state .empty-icon { width: 56px; height: 56px; border-radius: 18px; display: grid; place-items: center; background: var(--dm-primary-soft); color: var(--dm-primary); margin: 0 auto 13px; font-size: 20px; }
.empty-state h4 { font-size: 14px; margin-bottom: 6px; color: var(--dm-ink); }
.empty-state p { font-size: 12px; margin: 0; }
.pagination .page-link { border: 0; border-radius: 8px !important; margin: 0 2px; font-size: 11px; color: var(--dm-muted); }
.pagination .active .page-link { background: var(--dm-primary); color: #fff; }
.modal-content { border: 0; border-radius: 17px; box-shadow: 0 20px 65px rgba(16,43,54,.18); }
.modal-header { border-bottom-color: var(--dm-border); padding: 18px 21px; }
.modal-title { font-size: 15px; }
.modal-body { padding: 20px 21px; }
.modal-footer { padding: 15px 21px; border-top-color: var(--dm-border); }
/*
 * Bootstrap's scrollable modal expects the header/body/footer to be direct
 * flex children of .modal-content. The application wraps them in a form, so
 * make that form the flex container as well; otherwise the modal body grows
 * beyond the viewport and the page itself is locked by Bootstrap.
 */
.modal-dialog-scrollable { height: calc(100% - 1rem); height: calc(100vh - 1rem); height: calc(100dvh - 1rem); max-height: calc(100% - 1rem); max-height: calc(100dvh - 1rem); margin-top: .5rem; margin-bottom: .5rem; }
.modal-dialog-scrollable .modal-content { display: flex; flex-direction: column; height: 100%; max-height: 100%; overflow: hidden; }
.modal-dialog-scrollable > .modal-content > form { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.modal-dialog-scrollable .modal-header, .modal-dialog-scrollable .modal-footer { flex: 0 0 auto; }
.modal-dialog-scrollable .modal-body { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.modal-dialog:not(.modal-dialog-scrollable) .modal-body { max-height: calc(100vh - 170px); max-height: calc(100dvh - 170px); overflow-y: auto; -webkit-overflow-scrolling: touch; }
.form-hint { color: #8c9aa0; font-size: 10px; margin-top: 5px; }
.filter-strip { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-strip .form-control, .filter-strip .form-select { min-width: 125px; }
.info-banner { display: flex; align-items: flex-start; gap: 11px; background: #edf9f7; border: 1px solid #d1efeb; color: #36736c; border-radius: 12px; padding: 12px 14px; font-size: 12px; }
.info-banner i { margin-top: 2px; }
.medicine-table { min-width: 1060px; }
.medicine-table .profit-cell { min-width: 145px; }
.profit-positive { color: #11765f !important; }
.profit-negative { color: #bf3e53 !important; }
.profit-neutral { color: var(--dm-ink) !important; }
.profit-summary { border: 1px solid #cfe9e5; border-radius: 12px; background: linear-gradient(135deg, #f7fdfc, #eef9f7); padding: 14px 16px; }
.profit-summary-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--dm-primary-dark); font-size: 12px; font-weight: 800; }
.profit-summary-heading small { color: var(--dm-muted); font-size: 10px; font-weight: 500; }
.profit-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 13px; }
.profit-summary-grid > div { border: 1px solid rgba(15,118,110,.12); border-radius: 9px; background: rgba(255,255,255,.75); padding: 10px 11px; }
.profit-summary-grid span { display: block; color: var(--dm-muted); font-size: 10px; }
.profit-summary-grid span small { font-size: 9px; }
.profit-summary-grid strong { display: block; margin-top: 5px; color: var(--dm-ink); font-size: 14px; font-family: "Plus Jakarta Sans"; }
.quick-action { border: 1px solid var(--dm-border); border-radius: 13px; padding: 16px; display: flex; align-items: center; gap: 12px; color: var(--dm-ink); background: #fff; transition: .2s ease; }
.quick-action:hover { border-color: #a3d8d2; background: #f7fdfc; transform: translateY(-2px); box-shadow: var(--dm-shadow); }
.quick-action-icon { width: 37px; height: 37px; border-radius: 11px; display: grid; place-items: center; background: var(--dm-primary-soft); color: var(--dm-primary); }
.quick-action strong { display: block; font-size: 12px; }
.quick-action small { display: block; color: var(--dm-muted); font-size: 10px; margin-top: 3px; }
.pos-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(360px, .9fr); gap: 19px; align-items: start; }
.pos-products, .pos-cart { min-height: 610px; }
.pos-search { position: relative; }
.pos-search input { height: 47px; padding-left: 43px; font-size: 13px; }
.pos-search > i { position: absolute; left: 16px; top: 16px; color: #8da0a3; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-top: 15px; max-height: 475px; overflow-y: auto; padding-right: 3px; }
.product-item { border: 1px solid var(--dm-border); border-radius: 12px; padding: 13px; background: #fff; cursor: pointer; transition: .18s ease; min-height: 124px; display: flex; flex-direction: column; justify-content: space-between; }
.product-item:hover { border-color: #83cdc4; box-shadow: 0 7px 18px rgba(15,118,110,.1); transform: translateY(-1px); }
.product-item.disabled { opacity: .55; cursor: not-allowed; }
.product-item .product-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 9px; color: var(--dm-primary); background: var(--dm-primary-soft); margin-bottom: 8px; }
.product-item strong { display: block; line-height: 1.3; font-size: 11px; }
.product-item .product-code { color: #9aa7aa; font-size: 9px; margin-top: 3px; }
.product-item .product-bottom { display: flex; justify-content: space-between; align-items: end; gap: 5px; margin-top: 12px; }
.product-item .price { color: var(--dm-primary); font-weight: 800; font-size: 11px; }
.product-item .stock { color: #8c9ba0; font-size: 9px; }
.cart-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 15px; }
.cart-head h3 { font-size: 15px; margin: 0; }
.cart-list { min-height: 240px; max-height: 288px; overflow-y: auto; border-top: 1px solid var(--dm-border); border-bottom: 1px solid var(--dm-border); }
.cart-empty { min-height: 240px; display: grid; place-content: center; text-align: center; color: #99a8ad; }
.cart-empty i { font-size: 28px; color: #c9d8da; margin-bottom: 10px; }
.cart-empty p { margin: 0; font-size: 11px; }
.cart-row { display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 10px; padding: 13px 2px; border-bottom: 1px solid #edf2f3; }
.cart-row:last-child { border-bottom: 0; }
.cart-item-name { font-size: 11px; font-weight: 700; line-height: 1.35; }
.cart-item-meta { color: #94a0a4; font-size: 10px; margin-top: 3px; }
.cart-row-right { text-align: right; }
.cart-row-subtotal { font-size: 11px; font-weight: 800; color: var(--dm-ink); }
.qty-control { display: inline-flex; align-items: center; border: 1px solid #dfe8eb; border-radius: 7px; margin-top: 6px; overflow: hidden; }
.qty-control button { width: 23px; height: 23px; border: 0; background: #f7fafb; color: #667a80; font-size: 11px; }
.qty-control button:hover { background: var(--dm-primary-soft); color: var(--dm-primary); }
.qty-control span { min-width: 25px; text-align: center; font-size: 10px; font-weight: 700; }
.cart-remove { border: 0; background: transparent; color: #c5ced0; font-size: 10px; padding: 0 0 0 7px; }
.cart-remove:hover { color: #d4495c; }
.totals { padding-top: 16px; }
.total-line { display: flex; justify-content: space-between; align-items: center; margin-bottom: 11px; color: #6e7e84; font-size: 11px; }
.total-line strong { color: var(--dm-ink); font-size: 12px; }
.total-line.grand { border-top: 1px dashed #dce6e7; padding-top: 15px; margin-top: 5px; color: var(--dm-ink); font-weight: 700; }
.total-line.grand strong { color: var(--dm-primary); font-family: "Plus Jakarta Sans"; font-size: 21px; }
.receipt-paper { background: #fff; max-width: 390px; margin: 0 auto; padding: 27px 24px; font-family: "Courier New", monospace; color: #202b2f; box-shadow: var(--dm-shadow); }
.receipt-logo { display: block; width: 52px; height: 52px; object-fit: contain; margin: 0 auto 7px; }
.receipt-paper .receipt-brand { text-align: center; font-family: "Plus Jakarta Sans"; font-size: 15px; font-weight: 800; }
.receipt-paper .receipt-muted { color: #68777b; font-size: 10px; }
.receipt-paper hr { border: 0; border-top: 1px dashed #9ca8a9; opacity: 1; margin: 14px 0; }
.receipt-line { display: flex; justify-content: space-between; gap: 12px; font-size: 11px; margin: 6px 0; }
.receipt-line span:last-child { text-align: right; white-space: nowrap; }
.receipt-total { font-weight: 700; }
.receipt-footer { text-align: center; margin-top: 18px; font-size: 10px; color: #68777b; }
.report-kpi { padding: 17px 18px; background: #f9fcfc; border: 1px solid var(--dm-border); border-radius: 12px; }
.report-kpi small { display: block; color: var(--dm-muted); font-size: 10px; }
.report-kpi strong { display: block; margin-top: 5px; font-family: "Plus Jakarta Sans"; font-size: 20px; }
.settings-nav .list-group-item { border: 0; border-radius: 9px; color: #607179; font-size: 12px; margin-bottom: 3px; }
.settings-nav .list-group-item.active { background: var(--dm-primary-soft); color: var(--dm-primary-dark); font-weight: 700; }
.logo-preview { width: 132px; height: 132px; padding: 10px; border-radius: 20px; display: grid; place-items: center; background: #fff; border: 1px solid var(--dm-border); box-shadow: 0 8px 22px rgba(16,43,54,.08); }
.logo-preview img { display: block; width: 100%; height: 100%; object-fit: contain; }
.loading { opacity: .55; pointer-events: none; position: relative; }
.loading::after { content: ""; position: absolute; inset: 0; background: rgba(255,255,255,.5) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24'%3E%3Cpath fill='%230f766e' d='M12 2a10 10 0 1 0 10 10h-2a8 8 0 1 1-8-8z'/%3E%3C/svg%3E") no-repeat center; }
.error-page { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: var(--dm-bg); }
.error-card { text-align: center; max-width: 420px; background: #fff; border: 1px solid var(--dm-border); border-radius: 20px; padding: 42px 32px; box-shadow: var(--dm-shadow); }
.error-card .brand-mark { width: 82px; height: 82px; padding: 7px; border-radius: 22px; background: #fff; border: 1px solid var(--dm-border); display: grid; place-items: center; margin: 0 auto 18px; box-shadow: 0 8px 22px rgba(16,43,54,.08); overflow: hidden; }
.error-card .brand-mark img { display: block; width: 100%; height: 100%; object-fit: contain; }
.error-card h1 { font-size: 54px; color: var(--dm-primary); margin: 0; line-height: 1; }
.error-card h2 { font-size: 18px; margin: 10px 0 7px; }
.error-card p { color: var(--dm-muted); font-size: 12px; margin-bottom: 22px; }
.login-page { min-height: 100vh; background: #f4f9f8; overflow-x: hidden; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(360px, 1.05fr) minmax(420px, .95fr); }
.login-visual { background: linear-gradient(150deg, #0c4c52 0%, #0e6e6d 50%, #18a493 100%); color: #fff; position: relative; overflow: hidden; display: flex; align-items: center; padding: 70px clamp(34px, 8vw, 115px); }
.visual-content { position: relative; z-index: 2; max-width: 510px; }
.brand-lockup { display: flex; align-items: center; margin-bottom: 54px; }
.login-visual .brand-name { font-size: 20px; margin-left: 13px; }
.login-visual h1 { font-size: clamp(30px, 4vw, 49px); line-height: 1.17; letter-spacing: -.05em; margin-bottom: 21px; }
.login-visual h1 em { color: #8ce4d7; font-style: normal; }
.login-visual p { max-width: 390px; color: #d1f2ee; font-size: 14px; line-height: 1.7; }
.visual-pills { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 31px; }
.visual-pills span { border: 1px solid rgba(255,255,255,.21); background: rgba(255,255,255,.1); border-radius: 30px; padding: 8px 12px; font-size: 11px; }
.visual-pills i { color: #8ce4d7; margin-right: 6px; }
.visual-pattern, .visual-pattern::before, .visual-pattern::after { position: absolute; border-radius: 50%; border: 1px solid rgba(255,255,255,.13); }
.visual-pattern { width: 550px; height: 550px; right: -190px; bottom: -210px; }
.visual-pattern::before { content: ""; width: 420px; height: 420px; right: 54px; bottom: 54px; }
.visual-pattern::after { content: ""; width: 290px; height: 290px; right: 119px; bottom: 119px; }
.login-decoration { position: fixed; border-radius: 50%; background: rgba(76, 204, 185, .11); pointer-events: none; }
.decoration-one { width: 220px; height: 220px; top: -105px; right: -60px; }
.decoration-two { width: 150px; height: 150px; bottom: -60px; left: 26%; }
.login-panel { display: grid; place-items: center; padding: 40px 25px; }
.login-card { max-width: 390px; width: 100%; }
.login-mobile-brand { display: none; align-items: center; margin-bottom: 37px; }
.login-mobile-brand .brand-name { margin-left: 11px; }
.login-heading { margin-bottom: 30px; }
.login-heading h2 { font-size: 24px; letter-spacing: -.04em; margin: 0 0 8px; }
.login-heading p { color: var(--dm-muted); font-size: 12px; margin: 0; }
.input-icon { position: relative; }
.input-icon > i { position: absolute; left: 13px; top: 12px; color: #9cacb0; font-size: 13px; z-index: 2; }
.input-icon .form-control { padding-left: 37px; height: 43px; }
.password-toggle { position: absolute; right: 7px; top: 5px; height: 33px; width: 32px; border: 0; background: transparent; color: #9cacb0; }
.login-help { display: flex; align-items: flex-start; gap: 8px; color: #89999d; background: #f4f9f8; border-radius: 10px; padding: 11px 12px; font-size: 10px; margin-top: 18px; }
.login-help i { color: var(--dm-primary); margin-top: 1px; }
.login-copyright { color: #a1adb0; font-size: 10px; text-align: center; margin-top: 32px; }
.offcanvas-backdrop.show { opacity: .5; }
.sidebar-overlay { display: none; }
.dropdown-menu { font-size: 12px; border-radius: 11px; padding: 7px; }
.dropdown-item { border-radius: 7px; padding: 8px 10px; }
.dropdown-item:active { background: var(--dm-primary); }
.toast { border: 0; border-radius: 11px; box-shadow: 0 12px 30px rgba(16,43,54,.16); font-size: 12px; }
.toast .toast-body { padding: 12px 14px; }
.print-only { display: none; }

@media (max-width: 1200px) {
    .sidebar { width: 234px; flex-basis: 234px; }
    .content-area, .topbar { padding-left: 23px; padding-right: 23px; }
    .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .pos-layout { grid-template-columns: minmax(0, 1.1fr) minmax(330px, .9fr); }
}
@media (max-width: 991.98px) {
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-102%); transition: transform .25s ease; box-shadow: 12px 0 35px rgba(16,43,54,.18); }
    body.sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-overlay { position: fixed; inset: 0; background: rgba(12, 33, 39, .45); z-index: 1030; }
    body.sidebar-open .sidebar-overlay { display: block; }
    .topbar { min-height: 76px; }
    .topbar-title { font-size: 19px; }
    .dashboard-grid, .pos-layout { grid-template-columns: 1fr; }
    .pos-products, .pos-cart { min-height: auto; }
    .product-grid { max-height: none; }
}
@media (max-width: 767.98px) {
    .content-area { padding: 22px 15px 28px; }
    .topbar { padding: 14px 15px; }
    .app-footer { padding: 13px 15px; }
    .page-heading { align-items: flex-start; flex-direction: column; margin-bottom: 18px; }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; }
    .stat-grid { gap: 10px; }
    .stat-card { padding: 14px; min-height: 110px; }
    .stat-card .stat-value { font-size: 18px; }
    .stat-icon { width: 35px; height: 35px; font-size: 14px; }
    .card-body { padding: 15px; }
    .card-header { padding: 14px 15px; }
    .table-toolbar { align-items: stretch; }
    .search-box { width: 100%; min-width: 0; }
    .filter-strip { width: 100%; }
    .filter-strip .form-control, .filter-strip .form-select { flex: 1; min-width: 0; }
    .stock-summary { flex-direction: column; }
    .product-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
    .profit-summary-heading { align-items: flex-start; flex-direction: column; gap: 3px; }
    .profit-summary-grid { grid-template-columns: 1fr; }
    .pos-cart { min-height: 0; }
    .login-layout { display: block; }
    .login-visual { display: none; }
    .login-panel { min-height: 100vh; padding: 35px 22px; }
    .login-mobile-brand { display: flex; }
    .topbar-actions .user-menu .avatar { width: 31px; height: 31px; }
}
@media print {
    body { background: #fff; }
    .sidebar, .topbar, .app-footer, .no-print, .btn, .app-alert, .page-heading { display: none !important; }
    .app-main, .content-area { padding: 0; margin: 0; width: 100%; }
    .receipt-paper { box-shadow: none; margin: 0 auto; }
    .print-only { display: block; }
    @page { margin: 8mm; }
}
