html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  margin-bottom: 60px;
  background: #f5f7fa;
  color: #17212f;
  overflow-x: hidden;
}

body:has(.app-shell) {
  margin-bottom: 0;
  background: #eef3f5;
}

a {
  color: #2f766a;
  text-decoration: none;
}

a:hover {
  color: #265f56;
}

.btn {
  min-height: 44px;
  border-radius: 8px;
  font-weight: 800;
}

.btn-primary {
  border: 0;
  background: #2f766a;
}

.btn-primary:hover,
.btn-primary:focus {
  background: #265f56;
}

.app-shell {
  width: 100%;
  max-width: 100vw;
  height: 100vh;
  min-height: 100vh;
  display: grid;
  background: #eef3f5;
  overflow: hidden;
}

.app-sidebar,
.app-sidebar.offcanvas,
.app-sidebar.offcanvas-lg {
  --bs-offcanvas-bg: #17332f;
  --bs-offcanvas-color: #ffffff;
  --bs-offcanvas-width: min(290px, 82vw);
  background: #17332f !important;
  background-color: #17332f !important;
  color: #ffffff !important;
}

.app-sidebar .offcanvas-header {
  min-height: 64px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.app-sidebar .btn-close {
  filter: invert(1) grayscale(1) brightness(2);
}

.app-sidebar .offcanvas-body {
  min-height: 0;
  max-height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1rem;
  overflow-y: auto;
  background: #17332f;
  color: #ffffff;
}

.sidebar-brand {
  display: none;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: #ffffff;
}

.sidebar-logo strong {
  color: #ffffff;
}

.sidebar-logo:hover {
  color: #ffffff;
}

.sidebar-logo-mark {
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f2b85b;
  color: #17332f;
  font-size: 1.2rem;
  font-weight: 900;
}

.sidebar-logo strong,
.sidebar-logo small {
  display: block;
  line-height: 1.15;
}

.sidebar-logo small {
  max-width: 170px;
  margin-top: 0.18rem;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.68);
  font-size: 0.78rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-nav {
  display: grid;
  gap: 1rem;
}

.sidebar-section h2 {
  margin: 0 0 0.45rem;
  color: #d99d48;
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.sidebar-section ul {
  display: grid;
  gap: 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sidebar-link {
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.86) !important;
  font-weight: 760;
}

.sidebar-link:hover,
.sidebar-link.active {
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff !important;
  text-decoration: none;
}

.sidebar-link-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
}

.sidebar-link.active .sidebar-link-dot {
  background: #f2b85b;
}

.sidebar-user {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.sidebar-user span {
  overflow: hidden;
  color: #ffffff;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user form {
  margin: 0;
}

.sidebar-user button {
  min-height: 42px;
  width: 100%;
  border: 0;
  border-radius: 8px;
  background: #f2b85b;
  color: #17332f;
  font-weight: 900;
}

.app-content {
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
}

.app-topbar,
.public-topbar {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid #d7dde6;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.icon-button {
  width: 46px;
  height: 46px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  border: 1px solid #cbd6df;
  border-radius: 8px;
  background: #ffffff;
}

.icon-button span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #17332f;
}

.app-topbar-title {
  min-width: 0;
  display: grid;
  margin-right: auto;
}

.app-topbar-title span {
  color: #697789;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.app-topbar-title strong {
  overflow: hidden;
  color: #17212f;
  font-size: 1rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-action,
.public-brand {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #17332f;
  font-weight: 900;
}

.topbar-action {
  padding: 0 0.85rem;
  background: #e4ece9;
}

.public-brand {
  font-size: 1.15rem;
}

.app-main {
  min-width: 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 1rem;
}

.public-main {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 1.5rem 1rem;
}

.dashboard-page {
  display: grid;
  gap: 1rem;
}

.dashboard-header {
  display: grid;
  gap: 1rem;
}

.dashboard-header h1 {
  margin: 0;
  color: #17212f;
  font-size: 1.85rem;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.1;
}

.dashboard-header p:not(.auth-eyebrow) {
  margin: 0.4rem 0 0;
  color: #697789;
  font-weight: 650;
}

.dashboard-filter {
  min-width: 0;
  display: grid;
  gap: 0.75rem;
}

.date-inputs {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(170px, 1fr) minmax(170px, 1fr);
  gap: 0.65rem;
  overflow-x: auto;
  padding-bottom: 0.1rem;
}

.date-inputs label {
  display: grid;
  gap: 0.35rem;
  min-width: 170px;
  margin: 0;
}

.date-inputs span {
  color: #526173;
  font-size: 0.82rem;
  font-weight: 800;
}

.date-inputs input {
  min-height: 48px;
  width: 100%;
  border: 1px solid #cbd6df;
  border-radius: 8px;
  background: #ffffff;
  color: #17212f;
  padding: 0 0.75rem;
  font: inherit;
  font-weight: 700;
}

.segmented-control {
  min-width: 0;
  min-height: 48px;
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  gap: 0.25rem;
  overflow-x: auto;
  padding: 0.25rem;
  border: 1px solid #cbd6df;
  border-radius: 8px;
  background: #ffffff;
}

.segmented-control input {
  position: absolute;
  min-height: 0;
  width: auto;
  opacity: 0;
  pointer-events: none;
}

.segmented-control label {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  border-radius: 6px;
  color: #526173;
  font-weight: 900;
  cursor: pointer;
}

.segmented-control input:checked + label {
  background: #2f766a;
  color: #ffffff;
}

.dashboard-apply {
  width: 100%;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
}

.metric-card,
.chart-panel,
.dashboard-intro,
.error-panel {
  border: 1px solid #d7dde6;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(23, 33, 47, 0.07);
}

.metric-card {
  min-height: 118px;
  display: grid;
  align-content: space-between;
  gap: 0.8rem;
  padding: 1rem;
}

.metric-card span {
  color: #697789;
  font-size: 0.82rem;
  font-weight: 850;
  text-transform: uppercase;
}

.metric-card strong {
  color: #17212f;
  font-size: clamp(1.45rem, 8vw, 2rem);
  font-weight: 950;
  line-height: 1;
}

.chart-grid {
  display: grid;
  gap: 0.75rem;
}

.chart-panel {
  min-width: 0;
  padding: 1rem;
}

.chart-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.chart-heading h2 {
  margin: 0;
  color: #17212f;
  font-size: 1rem;
  font-weight: 900;
}

.chart-heading span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #e4ece9;
  color: #2f766a;
  padding: 0.28rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 900;
}

.chart-canvas-wrap {
  position: relative;
  height: 260px;
}

.chart-panel-wide .chart-canvas-wrap {
  height: 300px;
}

.module-page {
  display: grid;
  gap: 1rem;
}

.module-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.module-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
}

.module-header h1 {
  margin: 0;
  color: #17212f;
  font-size: 1.8rem;
  font-weight: 950;
  letter-spacing: 0;
}

.module-header p:not(.auth-eyebrow) {
  margin: 0.35rem 0 0;
  color: #697789;
  font-weight: 650;
}

.module-action,
.module-link-button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  border: 0;
  border-radius: 8px;
  background: #e4ece9;
  color: #17332f;
  padding: 0 0.85rem;
  font-weight: 900;
}

.module-link-button {
  min-height: 36px;
  background: #f3e4cc;
  color: #7b4c12;
}

.module-link-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.module-panel {
  min-width: 0;
  border: 1px solid #d7dde6;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(23, 33, 47, 0.07);
  padding: 1rem;
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.panel-heading h2 {
  margin: 0;
  color: #17212f;
  font-size: 1rem;
  font-weight: 900;
}

.panel-heading span {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #e4ece9;
  color: #2f766a;
  padding: 0.28rem 0.55rem;
  font-size: 0.75rem;
  font-weight: 900;
}

.status-banner,
.warning-banner {
  border-radius: 8px;
  padding: 0.85rem 1rem;
  font-weight: 800;
}

.status-banner {
  border: 1px solid #b8d8cf;
  background: #e4f2ee;
  color: #1f5b50;
}

.warning-banner {
  border: 1px solid #e9c98e;
  background: #fff4dc;
  color: #7b4c12;
}

.warning-banner a {
  color: #17332f;
  font-weight: 950;
  text-decoration: underline;
}

.module-validation {
  margin: 0;
}

.module-form,
.pos-form-grid,
.product-picker,
.stock-filter {
  display: grid;
  gap: 0.85rem;
}

.module-form label,
.pos-form-grid label,
.product-picker label,
.stock-filter label {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}

.module-form label span,
.pos-form-grid label span,
.product-picker label span,
.stock-filter label span {
  color: #526173;
  font-size: 0.82rem;
  font-weight: 850;
}

.module-form input,
.module-form select,
.pos-form-grid input,
.pos-form-grid select,
.product-picker input,
.stock-filter input {
  min-height: 50px;
  width: 100%;
  border: 1px solid #cbd6df;
  border-radius: 8px;
  background: #ffffff;
  color: #17212f;
  padding: 0 0.75rem;
  font: inherit;
  font-weight: 700;
}

.module-form .segmented-control input,
.pos-form-grid .segmented-control input {
  min-height: 0;
  width: auto;
  padding: 0;
}

.registry-layout,
.stock-layout,
.pos-workspace {
  display: grid;
  gap: 1rem;
}

.registry-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.registry-summary div,
.registry-history article,
.stock-card,
.insight-list article {
  border: 1px solid #d7dde6;
  border-radius: 8px;
  background: #f8fafb;
}

.registry-summary div {
  display: grid;
  gap: 0.3rem;
  padding: 0.85rem;
}

.registry-summary span,
.registry-history span,
.stock-card span,
.insight-list span {
  color: #697789;
  font-size: 0.82rem;
  font-weight: 750;
}

.registry-summary strong {
  color: #17212f;
  font-size: 1.05rem;
  font-weight: 950;
}

.registry-history {
  display: grid;
  gap: 0.75rem;
}

.registry-history article {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem;
}

.registry-history strong {
  color: #17212f;
  font-size: 1.1rem;
  font-weight: 950;
}

.registry-history small {
  color: #697789;
  font-weight: 700;
}

.responsive-table {
  overflow-x: auto;
}

.responsive-table table {
  width: 100%;
  min-width: 680px;
  border-collapse: separate;
  border-spacing: 0;
}

.responsive-table th,
.responsive-table td {
  border-bottom: 1px solid #e3e8ee;
  padding: 0.75rem;
  color: #243246;
  vertical-align: middle;
}

.responsive-table th {
  color: #697789;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.empty-cell,
.empty-text {
  color: #697789;
  font-weight: 750;
  text-align: center;
}

.pos-workspace {
  align-items: start;
}

.pos-tax-options {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.85rem;
}

.toggle-row {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 0;
  color: #3d4b5d;
  font-weight: 850;
}

.toggle-row input {
  width: 1.2rem;
  height: 1.2rem;
}

.pos-vat-mode {
  grid-template-columns: repeat(2, minmax(110px, 1fr));
}

.product-results {
  display: grid;
  gap: 0.45rem;
  max-height: 320px;
  overflow-y: auto;
}

.product-results button {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid #d7dde6;
  border-radius: 8px;
  background: #f8fafb;
  color: #17212f;
  padding: 0.65rem 0.75rem;
  text-align: left;
}

.product-results button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.product-results strong,
.product-results small,
.product-results span {
  display: block;
}

.product-results small {
  margin-top: 0.1rem;
  color: #697789;
  font-weight: 700;
}

.pos-lines-table input {
  width: 96px;
  min-height: 42px;
  border: 1px solid #cbd6df;
  border-radius: 8px;
  padding: 0 0.55rem;
  font: inherit;
  font-weight: 700;
}

.pos-lines-table td strong,
.pos-lines-table td small {
  display: block;
}

.pos-lines-table td small {
  margin-top: 0.15rem;
  color: #697789;
  font-size: 0.78rem;
  font-weight: 750;
}

.pos-lines-picker {
  margin-bottom: 0.85rem;
}

.pos-lines-scroll {
  max-height: min(54vh, 520px);
  overflow-y: auto;
  border: 1px solid #e3e8ee;
  border-radius: 8px;
}

.pos-lines-scroll .responsive-table {
  overflow-x: auto;
}

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

.line-remove {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 8px;
  background: #f3d6d1;
  color: #9a3412;
  font-weight: 950;
}

.pos-summary-panel {
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.summary-list {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1rem;
}

.summary-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.summary-list dt {
  color: #697789;
  font-weight: 800;
}

.summary-list dd {
  margin: 0;
  color: #17212f;
  font-weight: 900;
}

.summary-total {
  border-top: 1px solid #d7dde6;
  padding-top: 0.7rem;
}

.summary-total dd {
  font-size: 1.5rem;
}

.pos-save-button {
  width: 100%;
}

.stock-filter {
  grid-template-columns: 1fr;
}

.stock-card-list,
.insight-list {
  display: grid;
  gap: 0.75rem;
}

.stock-card {
  display: grid;
  gap: 0.85rem;
  padding: 0.9rem;
}

.stock-card.low-stock,
.low-stock-row td {
  background: #fff7e8;
}

.stock-card strong {
  color: #17212f;
  font-size: 1rem;
  font-weight: 950;
}

.stock-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
}

.stock-card dl div {
  display: grid;
  gap: 0.1rem;
}

.stock-card dt {
  color: #697789;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.stock-card dd {
  margin: 0;
  color: #17212f;
  font-weight: 900;
}

.stock-table {
  display: none;
}

.stock-insights {
  display: grid;
  gap: 1rem;
}

.stock-adjustment-panel {
  margin-top: 1rem;
}

.stock-adjustment-form {
  grid-template-columns: 1fr;
}

.detail-summary-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin: 0;
}

.detail-summary-grid div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid #edf1f5;
  padding-bottom: 0.65rem;
}

.detail-summary-grid dt {
  color: #697789;
  font-weight: 850;
}

.detail-summary-grid dd {
  margin: 0;
  color: #17212f;
  font-weight: 950;
}

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

.management-wide,
.management-submit {
  grid-column: 1 / -1;
}

.management-card-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}

.management-card {
  display: grid;
  gap: 0.85rem;
  padding: 0.9rem;
  border: 1px solid #d7dde6;
  border-radius: 8px;
  background: #f8fafb;
}

.management-card strong,
.management-card span {
  display: block;
}

.management-card strong {
  color: #17212f;
  font-weight: 950;
}

.management-card span {
  margin-top: 0.15rem;
  color: #697789;
  font-size: 0.82rem;
  font-weight: 750;
}

.management-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
}

.management-card dt {
  color: #697789;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.management-card dd {
  margin: 0;
  color: #17212f;
  font-weight: 900;
}

.management-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.management-actions form {
  margin: 0;
}

.danger-action {
  background: #f3d6d1;
  color: #9a3412;
}

.user-management-form {
  align-items: start;
}

.permission-fieldset {
  display: grid;
  gap: 0.8rem;
  margin: 0;
  padding: 0.85rem;
  border: 1px solid #d7dde6;
  border-radius: 8px;
  background: #f8fafb;
}

.permission-fieldset legend {
  width: auto;
  margin: 0;
  padding: 0 0.35rem;
  color: #17212f;
  font-size: 0.86rem;
  font-weight: 950;
}

.permission-grid,
.permission-groups,
.permission-objects {
  display: grid;
  gap: 0.55rem;
}

.permission-group {
  display: grid;
  gap: 0.7rem;
  padding: 0.75rem;
  border: 1px solid #e1e6ed;
  border-radius: 8px;
  background: #ffffff;
}

.permission-group h3 {
  margin: 0;
  color: #d9962c;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.permission-menu {
  display: grid;
  gap: 0.45rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid #edf1f5;
}

.permission-menu:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.permission-option {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  min-height: 2rem;
  margin: 0;
  color: #17212f;
  font-weight: 850;
}

.permission-option input {
  width: 1rem;
  height: 1rem;
  margin: 0;
  accent-color: #2f7d70;
}

.permission-option span {
  min-width: 0;
}

.menu-option {
  font-weight: 950;
}

.compact-option {
  color: #4f6074;
  font-size: 0.83rem;
}

.balance-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
  padding: 0.75rem;
  border: 1px solid #d7dde6;
  border-radius: 8px;
  background: #f8fafb;
}

.balance-preview div {
  display: grid;
  gap: 0.15rem;
}

.balance-preview span {
  color: #697789;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.balance-preview strong {
  color: #17212f;
  font-size: 0.95rem;
  font-weight: 950;
}

.purchase-form,
.purchase-layout,
.purchase-picker,
.purchase-lines {
  display: grid;
  gap: 1rem;
}

.purchase-header-grid {
  margin-bottom: 1rem;
}

.purchase-picker,
.purchase-lines,
.purchase-summary {
  min-width: 0;
  padding: 0.85rem;
  border: 1px solid #d7dde6;
  border-radius: 8px;
  background: #f8fafb;
}

.purchase-picker h3 {
  margin: 0;
  color: #17212f;
  font-size: 1rem;
  font-weight: 950;
}

.purchase-line-inputs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.65rem;
}

.purchase-picker label,
.purchase-line-inputs label {
  display: grid;
  gap: 0.35rem;
  margin: 0;
}

.purchase-picker label span,
.purchase-line-inputs label span {
  color: #526173;
  font-size: 0.82rem;
  font-weight: 850;
}

.purchase-picker input,
.purchase-picker select,
.purchase-line-inputs input {
  min-height: 48px;
  width: 100%;
  border: 1px solid #cbd6df;
  border-radius: 8px;
  background: #ffffff;
  color: #17212f;
  padding: 0 0.75rem;
  font: inherit;
  font-weight: 700;
}

.purchase-lines-scroll {
  max-height: min(52vh, 430px);
  overflow: auto;
}

.purchase-lines-scroll table {
  min-width: 720px;
}

.purchase-summary {
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.pos-customer-balance,
.pos-debit-warning {
  grid-column: 1 / -1;
}

.management-table {
  display: none;
  margin-top: 1rem;
}

.management-table small {
  color: #697789;
  font-weight: 700;
}

.is-hidden {
  display: none !important;
}

.insight-list article {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem;
}

.insight-list strong {
  color: #17212f;
  font-weight: 900;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
  color: var(--bs-secondary-color);
  text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
  text-align: start;
}

.auth-page {
  min-height: 100vh;
  margin: 0;
  background: #edf2f0;
}

.auth-page::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(237, 242, 240, 0.78)),
    repeating-linear-gradient(90deg, rgba(42, 90, 81, 0.08) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(42, 90, 81, 0.06) 0 1px, transparent 1px 72px);
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
}

.auth-panel {
  width: 100%;
  display: grid;
  grid-template-rows: auto 1fr;
  background: #ffffff;
}

.auth-brand-panel {
  display: grid;
  gap: 1.25rem;
  padding: 1.25rem;
  background: #17332f;
  color: #ffffff;
}

.auth-brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  width: fit-content;
  font-weight: 800;
}

.auth-logo-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f2b85b;
  color: #17332f;
  font-size: 1.25rem;
  line-height: 1;
}

.auth-logo-text {
  font-size: 1.1rem;
}

.auth-copy {
  max-width: 430px;
}

.auth-copy h1,
.auth-form-heading h2 {
  margin: 0;
  color: inherit;
  line-height: 1.08;
  letter-spacing: 0;
}

.auth-copy h1 {
  font-size: 2rem;
  font-weight: 800;
}

.auth-copy p:not(.auth-eyebrow) {
  margin: 0.75rem 0 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 1rem;
}

.auth-eyebrow {
  margin: 0 0 0.55rem;
  color: #d99d48;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.auth-visual {
  min-height: 118px;
  display: grid;
  grid-template-columns: 1fr 88px;
  gap: 0.8rem;
  align-items: stretch;
}

.auth-visual-compact {
  grid-template-columns: 1fr;
}

.auth-register-screen,
.auth-register-grid,
.auth-receipt-strip {
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-register-screen {
  display: grid;
  align-content: center;
  gap: 0.7rem;
  padding: 1rem;
}

.auth-register-screen span {
  display: block;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.26);
}

.auth-register-screen span:first-child {
  width: 72%;
  background: #86b6aa;
}

.auth-register-screen span:nth-child(2) {
  width: 48%;
}

.auth-register-screen span:nth-child(3) {
  width: 62%;
}

.auth-register-grid {
  display: none;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.45rem;
  padding: 0.6rem;
}

.auth-register-grid span {
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.18);
}

.auth-receipt-strip {
  display: grid;
  gap: 0.45rem;
  padding: 0.75rem;
}

.auth-receipt-strip span {
  height: 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.24);
}

.auth-receipt-strip span:nth-child(2) {
  width: 72%;
}

.auth-receipt-strip span:nth-child(3) {
  width: 46%;
  background: #f2b85b;
}

.auth-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: 1.5rem 1.25rem 2rem;
}

.auth-form-heading {
  margin-bottom: 0.25rem;
}

.auth-form-heading h2 {
  color: #17212f;
  font-size: 1.65rem;
  font-weight: 800;
}

.auth-field {
  display: grid;
  gap: 0.4rem;
}

.auth-field .form-label {
  margin: 0;
  color: #3d4b5d;
  font-size: 0.92rem;
  font-weight: 700;
}

.auth-field .form-control,
.auth-field .form-select {
  min-height: 54px;
  border: 1px solid #cbd6df;
  border-radius: 8px;
  background-color: #f9fbfc;
  color: #17212f;
  font-size: 1rem;
}

.auth-field .form-control::placeholder {
  color: #8491a1;
}

.auth-field .form-control:focus,
.auth-field .form-select:focus {
  border-color: #2f766a;
  background-color: #ffffff;
  box-shadow: 0 0 0 0.22rem rgba(47, 118, 106, 0.18);
}

.auth-check {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0;
  padding-left: 0;
}

.auth-check .form-check-input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
}

.auth-check .form-check-input:checked {
  border-color: #2f766a;
  background-color: #2f766a;
}

.auth-check .form-check-label {
  color: #3d4b5d;
  font-weight: 600;
}

.auth-submit {
  min-height: 54px;
  border: 0;
  border-radius: 8px;
  background: #2f766a;
  font-weight: 800;
  box-shadow: 0 12px 28px rgba(47, 118, 106, 0.24);
}

.auth-submit:hover,
.auth-submit:focus {
  background: #265f56;
}

.auth-meta {
  color: #697789;
  font-size: 0.88rem;
  text-align: center;
}

.auth-panel-narrow {
  width: min(100%, 520px);
  align-self: center;
  grid-template-rows: 1fr;
  margin: 1rem;
  overflow: hidden;
  border: 1px solid #d7dde6;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgba(23, 33, 47, 0.12);
}

.auth-panel-narrow .auth-copy {
  max-width: none;
  padding: 1.5rem;
  background: #17332f;
}

.dashboard-intro {
  padding: 2rem;
}

.dashboard-intro h1 {
  margin-bottom: 0.75rem;
  color: #122033;
}

@media (min-width: 560px) {
  .auth-shell {
    align-items: center;
    padding: 1.5rem;
  }

  .auth-panel {
    width: min(100%, 560px);
    overflow: hidden;
    border: 1px solid #d7dde6;
    border-radius: 8px;
    box-shadow: 0 24px 60px rgba(23, 33, 47, 0.14);
  }

  .auth-brand-panel {
    padding: 1.5rem;
  }
}

@media (min-width: 768px) {
  .app-main {
    padding: 1.25rem;
  }

  .dashboard-page {
    gap: 1.25rem;
  }

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

  .dashboard-filter {
    grid-template-columns: minmax(0, 1fr);
    align-items: end;
  }

  .dashboard-apply {
    width: auto;
    min-width: 108px;
  }

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

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

  .chart-panel-wide {
    grid-column: 1 / -1;
  }

  .module-page {
    gap: 1.25rem;
  }

  .module-header h1 {
    font-size: 2.15rem;
  }

  .registry-layout {
    grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  }

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

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

  .stock-adjustment-form {
    grid-template-columns: minmax(220px, 1fr) minmax(160px, 0.45fr) minmax(240px, 1fr) auto;
    align-items: end;
  }

  .detail-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .permission-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .stock-filter {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .stock-card-list {
    display: none;
  }

  .stock-table {
    display: block;
  }

  .management-card-list {
    display: none;
  }

  .management-table {
    display: block;
  }

  .auth-panel {
    width: min(100%, 1040px);
    min-height: 640px;
    grid-template-rows: none;
    grid-template-columns: minmax(380px, 1.05fr) minmax(360px, 0.95fr);
  }

  .auth-brand-panel {
    min-height: 640px;
    align-content: space-between;
    padding: clamp(2rem, 4vw, 3.5rem);
  }

  .auth-copy h1 {
    font-size: clamp(2.65rem, 5vw, 4.75rem);
    max-width: 560px;
  }

  .auth-copy p:not(.auth-eyebrow) {
    font-size: 1.08rem;
  }

  .auth-form {
    padding: clamp(2rem, 5vw, 4rem);
  }

  .auth-register-grid {
    display: grid;
  }

  .auth-visual {
    min-height: 220px;
  }
}

@media (min-width: 1100px) {
  .app-shell {
    grid-template-columns: 280px minmax(0, 1fr);
  }

  .app-sidebar,
  .app-sidebar.offcanvas-lg {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 280px;
    max-width: 280px;
    border-right: 1px solid rgba(255, 255, 255, 0.14);
    transform: none !important;
    visibility: visible !important;
  }

  .app-sidebar .offcanvas-header {
    display: none;
  }

  .app-sidebar .offcanvas-body {
    height: 100vh;
    max-height: 100vh;
    padding: 1.2rem;
  }

  .sidebar-user {
    margin-top: auto;
  }

  .sidebar-brand {
    display: block;
  }

  .app-menu-button {
    display: none;
  }

  .app-topbar {
    padding-right: 1.5rem;
    padding-left: 1.5rem;
  }

  .app-main {
    padding: 1.5rem;
  }

  .metric-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .chart-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .chart-panel-wide {
    grid-column: span 2;
  }

  .pos-workspace {
    grid-template-columns: minmax(330px, 0.78fr) minmax(0, 1.35fr) minmax(280px, 0.55fr);
  }

  .purchase-layout {
    grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.4fr) minmax(260px, 0.5fr);
    align-items: start;
  }

  .receiving-layout {
    grid-template-columns: minmax(260px, 0.65fr) minmax(0, 1.35fr);
  }

  .purchase-summary {
    top: 1rem;
    bottom: auto;
  }

  .pos-summary-panel {
    top: 1rem;
    bottom: auto;
  }

  .stock-layout {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
  }

  .auth-panel {
    min-height: 680px;
  }

  .auth-brand-panel {
    min-height: 680px;
  }

  .auth-form-heading h2 {
    font-size: 1.9rem;
  }
}

@media (min-width: 1500px) {
  .dashboard-header {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    align-items: end;
  }

  .dashboard-filter {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.75fr) auto;
  }
}

@media (min-width: 768px) and (max-width: 1499.98px) {
  .date-inputs,
  .segmented-control {
    overflow-x: visible;
  }
}
