:root {
  --navy: #07164a;
  --navy-dark: #040b2d;
  --blue: #0b2d73;
  --blue-soft: #f3f6ff;
  --blue-soft-2: #f8faff;
  --red: #c8102e;
  --red-dark: #9f0d24;
  --white: #ffffff;
  --charcoal: #1f2933;
  --muted: #667085;
  --line: #dbe3f0;
  --bg: #f5f7fc;
  --success: #16a34a;
  --success-dark: #15803d;
  --danger: #d92d20;
  --warning: #f79009;
  --shadow: 0 22px 60px rgba(7, 22, 74, 0.14);
  --shadow-soft: 0 10px 30px rgba(7, 22, 74, 0.08);
  --radius: 22px;
  --radius-sm: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-family:
    Inter,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  color: var(--charcoal);
  background: var(--bg);
}
a {
  color: inherit;
  text-decoration: none;
}
img {
  display: block;
  max-width: 100%;
}

.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  margin-bottom: 7px;
  color: var(--navy);
  font-weight: 700;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  font: inherit;
  font-size: 15px;
  transition: 0.2s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(11, 45, 115, 0.12);
}
.form-group input[readonly] {
  background: #f3f7f6;
  color: var(--muted);
  cursor: not-allowed;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 18px;
  border: 0;
  border-radius: 12px;
  font: inherit;
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.2s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--navy);
  color: #fff;
}
.btn-primary:hover {
  background: var(--blue);
}
.btn-light-outline {
  background: #fff;
  color: var(--navy);
  border: 1px solid var(--line);
}
.btn-light-outline:hover {
  border-color: var(--blue);
  color: var(--blue);
}
.btn-whatsapp {
  background: #1fa855;
  color: #fff;
  border: 1px solid #1fa855;
}
.btn-whatsapp:hover {
  background: #168244;
  border-color: #168244;
  color: #fff;
}
.full-btn {
  width: 100%;
}
.danger-btn {
  background: var(--danger);
  color: #fff;
}
.danger-btn:hover {
  background: #b42318;
}

.alert {
  margin-bottom: 18px;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 700;
}
.alert-error {
  background: #fff2f2;
  color: var(--danger);
  border: 1px solid #ffd4d4;
}
.alert-success {
  background: #ecfdf3;
  color: var(--success-dark);
  border: 1px solid rgba(22, 163, 74, 0.28);
}

.remove-item-btn {
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: #fff2f2;
  color: var(--danger);
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}
.remove-item-btn:hover {
  background: var(--danger);
  color: #fff;
}

/* Application layout */

.app-layout {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 10;
  display: flex;
  width: 270px;
  flex-direction: column;
  padding: 22px 18px;
  overflow-y: auto;
  background: linear-gradient(180deg, var(--navy), var(--navy-dark));
  color: #fff;
}
.sidebar::-webkit-scrollbar {
  width: 6px;
}
.sidebar::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}
.sidebar::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(200, 16, 46, 0.55);
}
.sidebar-logo {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(200, 16, 46, 0.35);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.08);
}
.sidebar-logo img {
  width: 100%;
  max-height: 80px;
  object-fit: contain;
}
.sidebar-section-title {
  margin: 18px 10px 6px;
  color: rgba(255, 255, 255, 0.45);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sidebar-nav {
  display: grid;
  gap: 8px;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 13px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 14px;
  font-weight: 700;
  transition: 0.2s ease;
}
.sidebar-nav a span,
.sidebar-nav a i {
  color: var(--red);
}
.sidebar-nav a:hover,
.sidebar-nav a.active {
  background: rgba(200, 16, 46, 0.18);
  color: #fff;
}
.sidebar-footer {
  margin-top: auto;
  padding: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}
.sidebar-footer p {
  margin: 0 0 4px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 13px;
}
.sidebar-footer strong {
  display: block;
  font-size: 15px;
}
.sidebar-footer small {
  color: var(--red);
  font-weight: 800;
}

.sidebar-group {
  display: grid;
  gap: 6px;
}
.sidebar-group + .sidebar-group {
  margin-top: 10px;
}
.sidebar-group-toggle {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  padding: 11px 13px;
  border: 0;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.76);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: 0.2s ease;
}
.sidebar-group-toggle:hover,
.sidebar-group.open .sidebar-group-toggle {
  background: rgba(200, 16, 46, 0.16);
  color: #fff;
}
.sidebar-group-toggle strong,
.sidebar-group-toggle i {
  color: var(--red);
  font-size: 15px;
  line-height: 1;
  transition: 0.2s ease;
}
.sidebar-submenu {
  display: none;
  gap: 6px;
  padding-left: 6px;
}
.sidebar-group.open .sidebar-submenu {
  display: grid;
}
.sidebar-group.open .sidebar-group-toggle strong,
.sidebar-group.open .sidebar-group-toggle .submenu-arrow {
  transform: rotate(180deg);
}
.sidebar-submenu a {
  padding-left: 16px;
}

.mobile-appbar,
.sidebar-overlay {
  display: none;
}
.main-content {
  width: calc(100% - 270px);
  margin-left: 270px;
  padding: 28px;
}
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.topbar h1 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 30px;
}
.topbar p {
  margin: 0;
  color: var(--muted);
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.user-pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--navy);
  font-weight: 800;
}
.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 15px;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-weight: 800;
}
.logout-btn:hover {
  background: var(--blue);
}

/* Dashboard */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
  margin-bottom: 26px;
}
.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.stat-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-weight: 900;
}
.stat-icon i {
  line-height: 1;
  font-size: 1.08rem;
}

.stat-icon.stat-sales {
  background: var(--navy);
}

.stat-icon.stat-profit {
  background: var(--red);
}

.stat-icon.stat-products {
  background: var(--blue);
}

.stat-icon.stat-stock {
  background: var(--danger);
}

.stat-icon.stat-expiry {
  background: var(--warning);
}
.stat-card p {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.stat-card h2 {
  margin: 0;
  color: var(--navy);
  font-size: 22px;
}
.stat-link {
  transition: 0.2s ease;
}
.stat-link:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
.dashboard-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.dashboard-card.wide {
  grid-column: 1/-1;
}
.expiry-stats {
  grid-template-columns: repeat(5, 1fr);
}
.small-muted {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.card-header-title {
  display: flex;
  align-items: center;
  gap: 11px;
}

.card-header-title h3 {
  margin: 0;
}

.card-header-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  font-size: 0.88rem;
}

.card-header-icon.navy {
  background: var(--blue-soft);
  color: var(--navy);
}

.card-header-icon.danger {
  background: #fff2f2;
  color: var(--danger);
}

.card-header-icon.warning {
  background: #fff7ed;
  color: var(--warning);
}

.card-header a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.card-header a i {
  font-size: 0.72rem;
  transition: transform 0.2s ease;
}

.card-header a:hover i {
  transform: translateX(3px);
}

.dashboard-empty {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  border: 1px dashed rgba(11, 45, 115, 0.24);
  border-radius: 16px;
  background: var(--blue-soft-2);
}

.dashboard-empty > i {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 1.05rem;
}

.dashboard-empty strong {
  display: block;
  margin-bottom: 3px;
  color: var(--navy);
  font-size: 0.94rem;
}

.dashboard-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}
.search-form {
  display: flex;
  flex: 1;
  gap: 10px;
}
.search-form input {
  width: min(520px, 100%);
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  font: inherit;
  font-size: 14px;
}
.search-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(11, 45, 115, 0.12);
}
.record-count {
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th {
  padding: 13px 12px;
  background: var(--blue-soft);
  color: var(--navy);
  font-size: 13px;
  text-align: left;
}
td {
  padding: 13px 12px;
  border-bottom: 1px solid var(--line);
  color: #344054;
  font-size: 14px;
}
.table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.table-actions a {
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
}
.table-actions a:hover {
  color: var(--navy);
}
.table-actions .danger-link {
  color: var(--danger);
}

.badge {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}
.badge.good {
  background: #ecfdf3;
  color: var(--success-dark);
}
.badge.warning {
  background: #fff7ed;
  color: var(--warning);
}
.badge.danger {
  background: #fff2f2;
  color: var(--danger);
}
.empty-text {
  margin: 0;
  color: var(--muted);
}

/* Forms */

.form-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.app-form {
  margin-top: 8px;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.full-span {
  grid-column: 1/-1;
}
.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}
.field-note {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.consent-box {
  padding: 16px;
  border: 1px solid rgba(11, 45, 115, 0.16);
  border-radius: 16px;
  background: var(--blue-soft);
}
.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}
.checkbox-label input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 2px;
  accent-color: var(--blue);
}
.checkbox-label span {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.checkbox-label strong {
  display: block;
  margin-bottom: 3px;
  color: var(--navy);
}

.batch-management-note {
  margin-top: 22px;
  padding: 18px;
  border: 1px solid rgba(11, 45, 115, 0.16);
  border-radius: 18px;
  background: var(--blue-soft);
}
.batch-management-note strong {
  display: block;
  margin-bottom: 6px;
  color: var(--navy);
}
.batch-management-note p {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

/* Sales and POS */

.sale-summary-box {
  display: grid;
  grid-template-columns: 260px 1fr;
  align-items: end;
  gap: 18px;
  margin-top: 22px;
}
.sale-customer-shell {
  margin-bottom: 22px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background:
    radial-gradient(
      circle at top right,
      rgba(11, 45, 115, 0.1),
      transparent 34%
    ),
    #fff;
}
.sale-customer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}
.sale-customer-header h4 {
  margin: 0 0 5px;
  color: var(--navy);
  font-size: 20px;
}
.sale-customer-header p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.sale-customer-search-box {
  position: relative;
}
.sale-customer-search-box input {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  outline: none;
  background: var(--blue-soft);
  color: var(--navy);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  transition: 0.2s ease;
}
.sale-customer-search-box input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(11, 45, 115, 0.12);
}
.sale-customer-search-results {
  display: grid;
  max-height: 290px;
  gap: 10px;
  margin-top: 12px;
  overflow-y: auto;
}
.sale-customer-search-result {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
}
.sale-customer-search-result:hover {
  transform: translateY(-1px);
  border-color: rgba(11, 45, 115, 0.45);
  background: var(--blue-soft-2);
  box-shadow: 0 10px 22px rgba(7, 22, 74, 0.07);
}
.sale-customer-search-result strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
}
.sale-customer-search-result small {
  color: var(--muted);
  font-weight: 700;
}
.sale-customer-search-result em {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}
.sale-customer-search-empty {
  padding: 14px;
  border: 1px dashed rgba(11, 45, 115, 0.28);
  border-radius: 15px;
  background: var(--blue-soft);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.sale-selected-customer {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 15px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  color: #fff;
}
.sale-selected-customer.show {
  display: flex;
}
.sale-selected-customer span {
  display: block;
  margin-bottom: 5px;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.sale-selected-customer h4 {
  margin: 0 0 4px;
  color: #fff;
  font-size: 18px;
}
.sale-selected-customer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  font-weight: 700;
}
.sale-walkin-note {
  display: none;
  gap: 3px;
  margin-top: 15px;
  padding: 14px;
  border: 1px dashed rgba(11, 45, 115, 0.28);
  border-radius: 15px;
  background: var(--blue-soft);
}
.sale-walkin-note.show {
  display: grid;
}
.sale-walkin-note strong {
  color: var(--navy);
}
.sale-walkin-note span {
  color: var(--muted);
  font-size: 13px;
}

.pos-shell {
  display: grid;
  gap: 22px;
}
.pos-hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 22px;
  padding: 26px;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(
      circle at top right,
      rgba(11, 45, 115, 0.18),
      transparent 28%
    ),
    linear-gradient(135deg, var(--navy), var(--navy-dark));
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.pos-kicker {
  display: inline-flex;
  margin-bottom: 10px;
  padding: 6px 10px;
  border: 1px solid rgba(200, 16, 46, 0.4);
  border-radius: 999px;
  background: rgba(200, 16, 46, 0.18);
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.pos-hero h3 {
  margin: 0 0 6px;
  font-size: 28px;
  line-height: 1.15;
}
.pos-hero p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
}
.pos-live-total {
  min-width: 230px;
  padding: 20px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  text-align: right;
}
.pos-live-total span {
  display: block;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 13px;
  font-weight: 800;
}
.pos-live-total strong {
  color: #fff;
  font-size: 32px;
  line-height: 1;
}
.pos-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.25fr;
  align-items: start;
  gap: 22px;
}
.pos-search-panel,
.pos-cart-panel {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.pos-cart-panel {
  position: sticky;
  top: 24px;
}
.pos-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.pos-panel-header h4 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 18px;
}
.pos-panel-header p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.pos-search-box {
  position: relative;
}
.pos-search-box input {
  width: 100%;
  padding: 16px 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  outline: none;
  background: var(--blue-soft);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
}
.pos-search-box input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(11, 45, 115, 0.12);
}

.search-results {
  display: grid;
  max-height: 430px;
  gap: 10px;
  margin-top: 14px;
  padding-right: 4px;
  overflow-y: auto;
}
.search-result-item {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
}
.search-result-item:hover {
  transform: translateY(-1px);
  border-color: rgba(11, 45, 115, 0.45);
  background: var(--blue-soft-2);
  box-shadow: 0 10px 22px rgba(7, 22, 74, 0.07);
}
.search-result-item strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
}
.search-result-item small {
  color: var(--muted);
  font-weight: 700;
}
.search-result-item em {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}
.search-empty,
.empty-cart-box {
  padding: 22px;
  border: 1px dashed rgba(11, 45, 115, 0.28);
  border-radius: 18px;
  background: var(--blue-soft);
  color: var(--muted);
  font-weight: 700;
}
.empty-cart-box {
  display: grid;
  min-height: 170px;
  place-items: center;
  text-align: center;
}
.empty-cart-box strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
  font-size: 17px;
}
.empty-cart-box span {
  display: block;
  color: var(--muted);
  font-size: 14px;
}

.cart-items {
  display: grid;
  gap: 12px;
}
.cart-row {
  display: grid;
  grid-template-columns: 1.4fr 115px 90px 120px auto;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(7, 22, 74, 0.04);
}
.cart-product strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
}
.cart-product span,
.cart-price span,
.cart-qty-wrap span,
.cart-total-wrap span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.cart-price strong,
.cart-total-wrap strong {
  color: var(--navy);
  font-size: 14px;
}
.cart-qty {
  width: 100%;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  font: inherit;
  font-size: 14px;
  font-weight: 800;
}
.cart-qty:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(11, 45, 115, 0.12);
}
.pos-remove-btn {
  align-self: center;
}
.pos-payment-box {
  grid-template-columns: 320px;
  align-items: start;
}

/* Purchases */

.purchase-product-shell,
.purchase-details-shell {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
}
.purchase-product-shell {
  margin-bottom: 20px;
  background:
    radial-gradient(
      circle at top right,
      rgba(11, 45, 115, 0.1),
      transparent 34%
    ),
    #fff;
}
.purchase-details-shell {
  margin-top: 20px;
}
.purchase-product-header,
.purchase-details-heading {
  margin-bottom: 16px;
}
.purchase-kicker {
  display: inline-flex;
  margin-bottom: 7px;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.purchase-product-header h4,
.purchase-details-heading h4 {
  margin: 0 0 5px;
  color: var(--navy);
  font-size: 20px;
}
.purchase-product-header p,
.purchase-details-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.purchase-search-box {
  position: relative;
}
.purchase-search-box input {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  outline: none;
  background: var(--blue-soft);
  color: var(--navy);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  transition: 0.2s ease;
}
.purchase-search-box input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(11, 45, 115, 0.12);
}
.purchase-search-results {
  display: grid;
  max-height: 330px;
  gap: 10px;
  margin-top: 12px;
  overflow-y: auto;
}
.purchase-search-result {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  transition: 0.2s ease;
}
.purchase-search-result:hover {
  transform: translateY(-1px);
  border-color: rgba(11, 45, 115, 0.45);
  background: var(--blue-soft-2);
  box-shadow: 0 10px 22px rgba(7, 22, 74, 0.07);
}
.purchase-search-result strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
}
.purchase-search-result small {
  color: var(--muted);
  font-weight: 700;
}
.purchase-search-result em {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}
.purchase-search-empty {
  padding: 14px;
  border: 1px dashed rgba(11, 45, 115, 0.28);
  border-radius: 15px;
  background: var(--blue-soft);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}
.purchase-selected-product {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 17px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  color: #fff;
}
.purchase-selected-product.show {
  display: flex;
}
.purchase-selected-main span {
  display: block;
  margin-bottom: 5px;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.purchase-selected-main h4 {
  margin: 0 0 5px;
  color: #fff;
  font-size: 19px;
}
.purchase-selected-main p {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 13px;
  font-weight: 700;
}
.purchase-selected-main strong {
  color: #fff;
}

/* Profiles and settings */

.profile-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.8fr;
  gap: 22px;
  margin-bottom: 24px;
}
.profile-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.profile-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}
.profile-label {
  margin: 0 0 8px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.profile-header h2 {
  margin: 0;
  color: var(--navy);
  font-size: 30px;
}
.user-reset-box {
  margin-bottom: 20px;
  padding: 18px;
  border: 1px solid rgba(11, 45, 115, 0.16);
  border-radius: 16px;
  background: var(--blue-soft);
}
.user-reset-box h3 {
  margin: 4px 0;
  color: var(--navy);
}
.user-reset-box p {
  margin: 4px 0;
  color: var(--muted);
}
.muted-action {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.current-user-label {
  display: inline-flex;
  margin-left: 7px;
  padding: 3px 7px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.detail-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}
.detail-list div,
.summary-stack div {
  padding: 16px;
  border: 1px solid rgba(11, 45, 115, 0.14);
  border-radius: 16px;
  background: var(--blue-soft);
}
.detail-list span,
.summary-stack span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}
.detail-list strong,
.summary-stack strong {
  color: var(--navy);
  font-size: 16px;
}
.summary-stack {
  display: grid;
  gap: 14px;
}

/* Exports */

.export-notice {
  margin-bottom: 20px;
  padding: 15px;
  border: 1px solid rgba(247, 144, 9, 0.22);
  border-radius: 16px;
  background: #fff7ed;
}
.export-notice strong {
  display: block;
  margin-bottom: 5px;
  color: #9a5b00;
}
.export-notice p {
  margin: 0;
  color: #9a5b00;
  font-size: 13px;
  line-height: 1.6;
}
.export-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.export-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border: 1px solid rgba(11, 45, 115, 0.16);
  border-radius: 18px;
  background: var(--blue-soft);
  transition: 0.2s ease;
}
.export-card:hover {
  transform: translateY(-2px);
  border-color: var(--blue);
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.export-card span {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 14px;
  background: var(--navy);
  color: #fff;
  font-weight: 900;
}
.export-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
}
.export-card small {
  color: var(--muted);
  font-weight: 700;
}

/* Receipts */

.receipt-customer-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 820px;
  margin: 0 auto 16px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--navy), var(--navy-dark));
  color: #fff;
}
.receipt-customer-banner span {
  display: block;
  margin-bottom: 4px;
  color: var(--red);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.receipt-customer-banner strong {
  display: block;
  margin-bottom: 3px;
  color: #fff;
  font-size: 18px;
}
.receipt-customer-banner small {
  color: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}
.receipt-share-note {
  max-width: 820px;
  margin: 0 auto 16px;
  padding: 15px;
  border: 1px solid rgba(247, 144, 9, 0.22);
  border-radius: 16px;
  background: #fff7ed;
}
.receipt-share-note strong {
  display: block;
  margin-bottom: 4px;
  color: #9a5b00;
}
.receipt-share-note p {
  margin: 0;
  color: #9a5b00;
  font-size: 13px;
  line-height: 1.6;
}
.receipt-card {
  max-width: 820px;
  margin: 0 auto;
  padding: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-soft);
}
.receipt-header {
  margin-bottom: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
  text-align: center;
}
.receipt-header img {
  width: 220px;
  margin: 0 auto 14px;
}
.receipt-header h2 {
  margin: 0 0 8px;
  color: var(--navy);
}
.receipt-header p {
  margin: 3px 0;
  color: var(--muted);
  font-size: 14px;
}
.receipt-meta {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.receipt-meta div {
  padding: 14px;
  border-radius: 14px;
  background: var(--blue-soft);
}
.receipt-meta span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.receipt-meta strong {
  color: var(--navy);
  font-size: 14px;
}
.receipt-total {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  margin-top: 22px;
  padding: 18px;
  border-radius: 16px;
  background: var(--navy);
  color: #fff;
}
.receipt-total span {
  font-weight: 800;
}
.receipt-total strong {
  font-size: 24px;
}
.receipt-footer {
  margin-top: 24px;
  color: var(--muted);
  text-align: center;
}
.receipt-footer p {
  margin: 0 0 4px;
  color: var(--navy);
  font-weight: 800;
}

/* Messages and modals */

.flash-message {
  margin: -10px 0 22px;
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 800;
  box-shadow: var(--shadow-soft);
}
.flash-success {
  background: #ecfdf3;
  color: var(--success-dark);
  border: 1px solid rgba(22, 163, 74, 0.28);
}
.flash-error {
  background: #fff2f2;
  color: var(--danger);
  border: 1px solid #ffd4d4;
}

.checkout-modal,
.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(4, 11, 45, 0.66);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.checkout-modal.show,
.confirm-modal.show {
  display: grid;
}
.checkout-modal-card,
.confirm-modal-card {
  padding: 30px;
  border-radius: 26px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(4, 11, 45, 0.28);
  animation: modalPop 0.22s ease;
}
.checkout-modal-card {
  width: min(520px, 100%);
  border: 1px solid rgba(11, 45, 115, 0.18);
}
.confirm-modal-card {
  width: min(500px, 100%);
  border: 1px solid rgba(217, 45, 32, 0.14);
}
.checkout-modal-icon,
.confirm-modal-icon {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  margin-bottom: 18px;
  border-radius: 18px;
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}
.checkout-modal-icon {
  background: var(--navy);
  box-shadow: 0 14px 28px rgba(11, 45, 115, 0.24);
}
.confirm-modal-icon {
  background: var(--danger);
  box-shadow: 0 14px 28px rgba(217, 45, 32, 0.24);
}
.checkout-modal-header span,
.confirm-modal-header span {
  display: inline-flex;
  margin-bottom: 8px;
  color: var(--red);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.checkout-modal-header h3,
.confirm-modal-header h3 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 28px;
}
.checkout-modal-header p,
.confirm-modal-header p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}
.checkout-summary {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin: 22px 0;
}
.checkout-summary div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px;
  border: 1px solid rgba(11, 45, 115, 0.14);
  border-radius: 16px;
  background: var(--blue-soft);
}
.checkout-summary span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.checkout-summary strong {
  color: var(--navy);
  font-size: 17px;
}
.checkout-warning {
  margin-bottom: 22px;
  padding: 14px 15px;
  border: 1px solid rgba(247, 144, 9, 0.22);
  border-radius: 16px;
  background: #fff7ed;
  color: #9a5b00;
  font-size: 13px;
  font-weight: 800;
}
.checkout-actions,
.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}
.checkout-actions {
  margin-top: 0;
}
.confirm-actions {
  margin-top: 24px;
}
.checkout-actions .btn {
  min-width: 150px;
}

@keyframes modalPop {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Compact login */

.login-body {
  display: grid;
  min-height: 100vh;
  min-height: 100svh;
  place-items: center;
  margin: 0;
  padding: 20px;
  overflow: hidden;
  background:
    radial-gradient(circle at 8% 10%, rgba(200, 16, 46, 0.07), transparent 24%),
    radial-gradient(circle at 92% 90%, rgba(11, 45, 115, 0.1), transparent 28%),
    linear-gradient(135deg, #fff, var(--blue-soft));
}
.login-page {
  width: min(980px, 100%);
}
.login-shell {
  display: grid;
  width: 100%;
  min-height: 520px;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 0.88fr);
  overflow: hidden;
  border: 1px solid rgba(7, 22, 74, 0.12);
  border-radius: 26px;
  background: var(--white);
  box-shadow: 0 24px 70px rgba(7, 22, 74, 0.16);
}
.login-brand-panel {
  position: relative;
  isolation: isolate;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: space-between;
  padding: 36px 40px;
  overflow: hidden;
  background:
    radial-gradient(circle at 94% 8%, rgba(200, 16, 46, 0.24), transparent 25%),
    linear-gradient(145deg, var(--navy), var(--navy-dark));
  color: #fff;
}
.login-brand-panel::after {
  position: absolute;
  right: -100px;
  bottom: -130px;
  z-index: -1;
  width: 280px;
  height: 280px;
  border: 1px solid rgba(200, 16, 46, 0.28);
  border-radius: 50%;
  content: "";
}
.login-brand-logo {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: center;
}
.login-brand-logo img {
  width: 230px;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  object-fit: contain;
}
.login-brand-content {
  max-width: 470px;
  padding: 28px 0;
}
.login-system-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.login-system-label i {
  color: var(--red);
  font-size: 0.88rem;
}
.login-brand-content h1 {
  max-width: 460px;
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(2rem, 3.4vw, 3rem);
  font-weight: 850;
  letter-spacing: -0.04em;
  line-height: 1.08;
}
.login-brand-description {
  max-width: 440px;
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
  line-height: 1.7;
}
.login-capabilities {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.login-capability {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  padding: 9px 13px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.86);
  font-size: 0.78rem;
  font-weight: 750;
}
.login-capability i {
  color: var(--red);
  font-size: 0.92rem;
}
.login-security-note {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 0.74rem;
  font-weight: 700;
}
.login-security-note i {
  color: #4ade80;
}
.login-form-panel {
  display: grid;
  min-width: 0;
  place-items: center;
  padding: 38px 42px;
  background:
    radial-gradient(
      circle at 100% 0%,
      rgba(11, 45, 115, 0.05),
      transparent 30%
    ),
    #fff;
}
.login-form-wrapper {
  width: min(360px, 100%);
}
.login-header {
  margin: 0 0 24px;
  text-align: left;
}
.login-eyebrow {
  margin: 0 0 7px;
  color: var(--red);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.login-header h2 {
  margin: 0 0 8px;
  color: var(--navy);
  font-size: 2rem;
  font-weight: 850;
  letter-spacing: -0.035em;
  line-height: 1.1;
}
.login-header p:not(.login-eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}
.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 18px;
  padding: 12px 14px;
  border: 1px solid rgba(217, 45, 32, 0.18);
  border-radius: 12px;
  background: #fff3f2;
  color: var(--danger);
  font-size: 0.82rem;
  line-height: 1.5;
}
.login-alert i {
  margin-top: 2px;
}
.login-form-group {
  margin-bottom: 17px;
}
.login-form-group label {
  display: block;
  margin-bottom: 7px;
  color: var(--navy);
  font-size: 0.82rem;
  font-weight: 800;
}
.login-input-shell {
  position: relative;
}
.login-input-shell > i {
  position: absolute;
  top: 50%;
  left: 15px;
  z-index: 1;
  transform: translateY(-50%);
  color: #98a2b3;
  font-size: 0.9rem;
  pointer-events: none;
}
.login-input-shell input {
  width: 100%;
  min-height: 50px;
  padding: 13px 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: var(--blue-soft-2);
  color: var(--charcoal);
  font: inherit;
  font-size: 0.9rem;
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}
.login-input-shell input::placeholder {
  color: #98a2b3;
}
.login-input-shell input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(11, 45, 115, 0.09);
}
.login-input-shell:focus-within > i {
  color: var(--blue);
}
.password-field input {
  padding-right: 50px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 7px;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
}
.password-toggle:hover {
  background: var(--blue-soft);
  color: var(--red);
}
.login-submit {
  display: inline-flex;
  width: 100%;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 2px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: #fff;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 11px 24px rgba(7, 22, 74, 0.17);
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}
.login-submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(7, 22, 74, 0.22);
}
.login-submit i {
  font-size: 0.88rem;
}
.login-submit:focus-visible,
.password-toggle:focus-visible {
  outline: 3px solid rgba(200, 16, 46, 0.24);
  outline-offset: 3px;
}
.login-help {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--blue-soft-2);
}
.login-help i {
  margin-top: 2px;
  color: var(--blue);
  font-size: 0.86rem;
}
.login-help p {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.5;
}
.login-note {
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  line-height: 1.5;
  text-align: center;
}
.login-note span {
  margin: 0 5px;
  color: var(--red);
}

/* Responsive */

@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 900px) {
  .mobile-appbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    height: 72px;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    background: linear-gradient(135deg, var(--navy), var(--navy-dark));
    color: #fff;
    box-shadow: 0 12px 28px rgba(4, 11, 45, 0.18);
  }
  .mobile-menu-btn {
    display: grid;
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    place-items: center;
    padding: 10px;
    border: 1px solid rgba(200, 16, 46, 0.35);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
  }
  .mobile-menu-btn span {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 999px;
    background: #fff;
  }
  .mobile-appbar-brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
  }
  .mobile-appbar-brand img {
    width: 38px;
    height: 38px;
    padding: 5px;
    border-radius: 12px;
    background: #fff;
    object-fit: contain;
  }
  .mobile-appbar-brand strong {
    display: block;
    font-size: 15px;
    line-height: 1.1;
  }
  .mobile-appbar-brand small {
    display: block;
    margin-top: 2px;
    color: rgba(255, 255, 255, 0.68);
    font-size: 12px;
  }
  .sidebar {
    top: 0;
    bottom: 0;
    left: 0;
    width: min(82vw, 310px);
    transform: translateX(-105%);
    border-radius: 0 24px 24px 0;
    transition: transform 0.25s ease;
  }
  .sidebar.mobile-open {
    transform: translateX(0);
  }
  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1090;
    background: rgba(4, 11, 45, 0.58);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
  }
  .sidebar-overlay.show {
    display: block;
  }
  .app-layout {
    display: block;
  }
  .main-content {
    width: 100%;
    margin-left: 0;
    padding: 18px;
  }
  .stats-grid,
  .dashboard-grid,
  .expiry-stats {
    grid-template-columns: 1fr;
  }
  .dashboard-card.wide {
    grid-column: auto;
  }
  .topbar {
    display: grid;
  }
  .topbar-actions {
    flex-wrap: wrap;
  }
  .page-actions,
  .search-form,
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .staff-notes {
    margin: 0;
    color: var(--muted);
    line-height: 1.7;
  }
  .staff-profile-link {
    color: var(--blue);
    font-weight: 800;
  }
  .staff-profile-link:hover {
    color: var(--navy);
  }
  .profile-grid,
  .detail-list,
  .sale-summary-box,
  .receipt-meta {
    grid-template-columns: 1fr;
  }
  .pos-hero,
  .pos-layout,
  .cart-row,
  .pos-payment-box {
    grid-template-columns: 1fr;
  }
  .pos-live-total {
    min-width: 0;
    text-align: left;
  }
  .pos-cart-panel {
    position: static;
  }
  .checkout-actions,
  .confirm-actions {
    flex-direction: column;
  }
  .checkout-actions .btn,
  .confirm-actions .btn {
    width: 100%;
  }
  .export-grid {
    grid-template-columns: 1fr;
  }
  .purchase-selected-product,
  .sale-customer-header,
  .sale-selected-customer,
  .receipt-customer-banner {
    align-items: stretch;
    flex-direction: column;
  }
  .purchase-selected-product .btn,
  .sale-customer-header .btn,
  .sale-selected-customer .btn,
  .receipt-customer-banner .btn {
    width: 100%;
  }
}

@media (min-width: 861px) and (max-height: 700px) {
  .login-body {
    padding: 12px;
  }
  .login-shell {
    height: calc(100svh - 24px);
    min-height: 0;
  }
  .login-brand-panel {
    padding: 28px 34px;
  }
  .login-brand-logo img {
    width: 195px;
  }
  .login-brand-content {
    padding: 16px 0;
  }
  .login-brand-content h1 {
    font-size: 2.25rem;
  }
  .login-capabilities {
    margin-top: 18px;
  }
  .login-form-panel {
    padding: 28px 38px;
  }
  .login-header {
    margin-bottom: 18px;
  }
  .login-help {
    margin-top: 16px;
  }
  .login-note {
    margin-top: 14px;
  }
}

@media (max-width: 860px) {
  .login-body {
    padding: 20px;
    overflow-y: auto;
  }
  .login-shell {
    grid-template-columns: 1fr;
  }
  .login-brand-panel {
    padding: 30px 34px;
  }
  .login-brand-logo img {
    width: 210px;
  }
  .login-brand-content {
    padding: 26px 0 22px;
  }
  .login-brand-content h1 {
    max-width: 650px;
    font-size: 2.25rem;
  }
  .login-brand-description {
    max-width: 650px;
  }
  .login-form-panel {
    padding: 38px 34px;
  }
}

@media (max-width: 600px) {
  .login-body {
    display: block;
    padding: 0;
    background: #fff;
  }
  .login-page {
    width: 100%;
  }
  .login-shell {
    min-height: 100svh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .login-brand-panel {
    padding: 26px 20px;
  }
  .login-brand-logo img {
    width: 190px;
  }
  .login-brand-content {
    padding: 24px 0 18px;
  }
  .login-brand-content h1 {
    font-size: 1.9rem;
  }
  .login-brand-description {
    font-size: 0.86rem;
  }
  .login-capabilities {
    margin-top: 18px;
  }
  .login-capability {
    padding: 8px 11px;
  }
  .login-security-note {
    margin-top: 6px;
  }
  .login-form-panel {
    padding: 34px 20px 40px;
  }
}

@media (max-width: 420px) {
  .login-capabilities {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }
  .login-capability {
    display: grid;
    min-width: 0;
    justify-items: center;
    gap: 5px;
    padding: 9px 5px;
    text-align: center;
  }
  .login-capability span {
    font-size: 0.68rem;
  }
  .login-note {
    display: grid;
    gap: 2px;
  }
  .login-note span {
    display: none;
  }
}

@media print {
  body {
    background: #fff;
  }
  .sidebar,
  .topbar,
  .page-actions,
  .no-print {
    display: none !important;
  }
  .app-layout {
    display: block;
    min-height: 0;
  }
  .main-content {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
  }
  .receipt-card {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
  .receipt-table {
    overflow: visible;
  }
  table {
    page-break-inside: auto;
  }
  tr {
    page-break-after: auto;
    page-break-inside: avoid;
  }
}

body.menu-open {
  overflow: hidden;
}

/* =========================================================
   Shared Navigation Icon Refinements
========================================================= */

.sidebar-logo {
  padding: 10px 12px;
  background: transparent;
}

.sidebar-logo img {
  width: 100%;
  max-height: 94px;
  object-fit: contain;
}

.sidebar-nav a i {
  width: 18px;
  flex: 0 0 18px;
  color: var(--red);
  text-align: center;
  font-size: 0.92rem;
}

.sidebar-nav a span {
  color: inherit;
}

.sidebar-group-toggle .submenu-arrow {
  color: var(--red);
  font-size: 0.75rem;
}

.sidebar-group.open .submenu-arrow {
  transform: rotate(180deg);
}

.sidebar-footer p {
  display: flex;
  align-items: center;
  gap: 7px;
}

.sidebar-footer p i {
  color: var(--red);
}

.mobile-menu-btn {
  color: #fff;
  font-size: 1.15rem;
}

.mobile-menu-btn i {
  line-height: 1;
}

.mobile-appbar-brand img {
  width: 44px;
  height: 44px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  object-fit: contain;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.user-pill i {
  color: var(--blue);
  font-size: 1rem;
}

.logout-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.flash-message {
  display: flex;
  align-items: center;
  gap: 10px;
}

.flash-message i {
  flex: 0 0 auto;
  font-size: 1rem;
}

.confirm-modal-icon i {
  line-height: 1;
}

/* =========================================================
   JavaScript-Generated Icon Refinements
========================================================= */

.remove-item-btn {
  display: grid;
  place-items: center;
}

.remove-item-btn i {
  font-size: 0.92rem;
  line-height: 1;
}

.search-result-item em,
.sale-customer-search-result em,
.purchase-search-result em {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.search-result-item:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.72;
  transform: none;
}

.checkout-modal-icon i,
.confirm-modal-icon i {
  line-height: 1;
}

/* =========================================================
   Products Directory
========================================================= */

.product-page-actions {
  align-items: stretch;
}

.product-search-form {
  min-width: 0;
}

.search-input-wrap {
  position: relative;
  width: min(560px, 100%);
}

.search-input-wrap > i {
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  color: #98a2b3;
  font-size: 0.88rem;
  pointer-events: none;
}

.search-input-wrap input {
  width: 100%;
  padding-left: 42px;
}

.search-input-wrap:focus-within > i {
  color: var(--blue);
}

.product-directory-card {
  overflow: hidden;
}

.product-directory-header {
  align-items: flex-start;
}

.product-directory-header .card-header-title {
  align-items: flex-start;
}

.record-count {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.record-count i {
  font-size: 0.78rem;
}

.product-table {
  min-width: 1180px;
}

.product-table th {
  white-space: nowrap;
}

.product-name-cell {
  min-width: 190px;
}

.product-name-wrap {
  display: flex;
  align-items: center;
  gap: 11px;
}

.product-table-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.86rem;
}

.product-name-wrap strong {
  display: block;
  color: var(--navy);
  line-height: 1.35;
}

.product-name-wrap small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
}

.money-cell {
  white-space: nowrap;
  font-weight: 700;
}

.quantity-value {
  color: var(--navy);
}

.inactive-row {
  background: #fafafa;
}

.inactive-row td {
  color: #7b8491;
}

.inactive-row .product-table-icon {
  background: #f2f4f7;
  color: #98a2b3;
}

.product-actions {
  flex-wrap: nowrap;
}

.table-action-btn {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--navy) !important;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}

.table-action-btn:hover {
  transform: translateY(-2px);
}

.table-action-btn.view-action:hover {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue) !important;
}

.table-action-btn.edit-action:hover {
  border-color: var(--navy);
  background: var(--navy);
  color: #fff !important;
}

.table-action-btn.activate-action:hover {
  border-color: var(--success);
  background: var(--success);
  color: #fff !important;
}

.table-action-btn.danger-action {
  color: var(--danger) !important;
}

.table-action-btn.danger-action:hover {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff !important;
}

.table-action-btn i {
  font-size: 0.78rem;
  line-height: 1;
}

.product-empty-state {
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 30px;
  text-align: left;
  border: 1px dashed rgba(11, 45, 115, 0.24);
  border-radius: 18px;
  background: var(--blue-soft-2);
}

.product-empty-state > span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 17px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 1.2rem;
}

.product-empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
}

.product-empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.product-empty-state .btn {
  margin-left: 10px;
}

@media (max-width: 900px) {
  .product-page-actions {
    display: grid;
  }

  .product-search-form {
    display: grid;
    grid-template-columns: 1fr auto auto;
  }

  .search-input-wrap {
    width: 100%;
  }

  .product-directory-header {
    display: grid;
  }

  .product-empty-state {
    flex-direction: column;
    text-align: center;
  }

  .product-empty-state .btn {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 620px) {
  .product-search-form {
    grid-template-columns: 1fr;
  }

  .product-search-form .btn {
    width: 100%;
  }
}

/* =========================================================
   Product Forms and Product Profile
========================================================= */

.product-form-page-actions {
  justify-content: space-between;
}

.product-form-card {
  overflow: hidden;
}

.product-form-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.product-form-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
}

.product-form-alert i {
  margin-top: 2px;
}

.product-form {
  display: grid;
  gap: 22px;
}

.form-section {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--blue-soft-2);
}

.form-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin-bottom: 20px;
}

.form-section-heading > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  background: var(--navy);
  color: #fff;
}

.form-section-heading h4 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 1rem;
}

.form-section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.form-group label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.form-group label i {
  width: 15px;
  color: var(--blue);
  font-size: 0.78rem;
  text-align: center;
}

.product-information-note {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.information-note-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  background: var(--navy);
  color: #fff;
}

.product-information-note > div {
  flex: 1;
}

.product-information-note .btn {
  margin-top: 3px;
}

.inactive-product-note {
  border-color: rgba(217, 45, 32, 0.18);
  background: #fff7f6;
}

.inactive-product-note .information-note-icon {
  background: var(--danger);
}

.product-form-actions {
  padding-top: 4px;
}

.product-profile-actions {
  align-items: flex-start;
}

.product-profile-action-buttons {
  margin-top: 0;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.profile-danger-button {
  border-color: rgba(217, 45, 32, 0.28);
  color: var(--danger);
}

.profile-danger-button:hover {
  border-color: var(--danger);
  background: var(--danger);
  color: #fff;
}

.profile-activate-button {
  border-color: rgba(22, 163, 74, 0.28);
  color: var(--success-dark);
}

.profile-activate-button:hover {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.product-profile-heading {
  display: flex;
  align-items: center;
  gap: 15px;
}

.product-profile-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 17px;
  background: var(--navy);
  color: #fff;
  font-size: 1.25rem;
}

.product-status-badges {
  justify-content: flex-end;
}

.product-detail-list div {
  position: relative;
}

.product-detail-list span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.product-detail-list span i {
  color: var(--blue);
  font-size: 0.75rem;
}

.profile-card-heading {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.profile-card-heading > span {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  background: var(--red);
  color: #fff;
}

.profile-card-heading h3 {
  margin: 0;
  color: var(--navy);
}

.profile-card-heading .profile-label {
  margin-bottom: 2px;
}

.product-record-card {
  margin-top: 22px;
}

.product-record-header {
  align-items: flex-start;
}

.product-record-header .card-header-title {
  align-items: flex-start;
}

.product-batch-table {
  min-width: 1180px;
}

.product-record-empty {
  min-height: 150px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  border: 1px dashed rgba(11, 45, 115, 0.24);
  border-radius: 16px;
  background: var(--blue-soft-2);
}

.product-record-empty > i {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
}

.product-record-empty strong {
  display: block;
  margin-bottom: 3px;
  color: var(--navy);
}

.product-record-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .product-form-page-actions,
  .product-profile-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .product-form-page-actions .btn,
  .product-profile-actions > .btn {
    width: 100%;
  }

  .product-profile-action-buttons {
    display: grid;
    width: 100%;
  }

  .product-profile-action-buttons .btn {
    width: 100%;
  }

  .product-form-header,
  .product-record-header {
    display: grid;
  }

  .product-information-note {
    display: flex;
  }
}

@media (max-width: 600px) {
  .form-section {
    padding: 18px;
  }

  .form-section-heading {
    align-items: center;
  }

  .product-form-actions {
    display: grid;
  }

  .product-form-actions .btn {
    width: 100%;
  }

  .profile-header {
    display: grid;
  }

  .product-profile-heading {
    align-items: flex-start;
  }

  .product-status-badges {
    justify-content: flex-start;
  }

  .product-record-empty {
    flex-direction: column;
    text-align: center;
  }
}

/* =========================================================
   Stock Adjustments
========================================================= */

.stock-adjustment-page-actions {
  align-items: stretch;
}

.stock-adjustment-search {
  min-width: 0;
}

.stock-adjustment-directory {
  overflow: hidden;
}

.stock-adjustment-header {
  align-items: flex-start;
}

.stock-adjustment-header .card-header-title {
  align-items: flex-start;
}

.stock-adjustment-table {
  min-width: 1280px;
}

.stock-adjustment-table th {
  white-space: nowrap;
}

.adjustment-date-cell {
  min-width: 175px;
  white-space: nowrap;
}

.adjustment-date-cell i {
  margin-right: 6px;
  color: var(--muted);
  font-size: 0.76rem;
}

.adjustment-product-cell {
  min-width: 180px;
}

.adjustment-product-cell a {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
}

.adjustment-product-cell a > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.78rem;
}

.adjustment-product-cell a:hover strong {
  color: var(--blue);
}

.batch-reference,
.batch-action-label,
.adjusted-by {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.batch-reference i,
.batch-action-label i,
.adjusted-by i {
  color: var(--blue);
  font-size: 0.75rem;
}

.stock-adjustment-table .badge {
  align-items: center;
  gap: 6px;
}

.stock-adjustment-table .badge i {
  font-size: 0.65rem;
}

.quantity-increase {
  color: var(--success-dark);
}

.quantity-decrease {
  color: var(--warning);
}

.adjustment-notes-cell {
  min-width: 180px;
  max-width: 270px;
  white-space: normal;
  line-height: 1.5;
}

.stock-adjustment-empty {
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 28px;
  border: 1px dashed rgba(11, 45, 115, 0.24);
  border-radius: 18px;
  background: var(--blue-soft-2);
}

.stock-adjustment-empty > span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 16px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 1.1rem;
}

.stock-adjustment-empty strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
}

.stock-adjustment-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

/* Adjustment form */

.stock-adjustment-form-actions {
  justify-content: space-between;
}

.adjustment-product-grid {
  margin-bottom: 22px;
}

.adjustment-rule-card {
  height: fit-content;
}

.adjustment-rule-list {
  display: grid;
  gap: 13px;
}

.adjustment-rule {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--blue-soft-2);
}

.adjustment-rule > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  color: #fff;
  font-size: 0.74rem;
}

.increase-rule > span {
  background: var(--success);
}

.decrease-rule > span {
  background: var(--warning);
}

.adjustment-rule strong {
  display: block;
  margin-bottom: 3px;
  color: var(--navy);
  font-size: 0.86rem;
}

.adjustment-rule p {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.5;
}

.stock-adjustment-form-card {
  overflow: hidden;
}

.stock-adjustment-form-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.stock-adjustment-form {
  display: grid;
  gap: 22px;
}

.adjustment-batch-section {
  margin-top: 0;
}

.adjustment-batch-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
}

.adjustment-batch-heading > span {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--navy);
  color: #fff;
  font-size: 0.82rem;
}

.adjustment-batch-heading strong {
  margin-bottom: 4px;
}

.adjustment-batch-heading p {
  margin-bottom: 0;
}

.adjustment-batch-section .form-group {
  margin-bottom: 0;
}

.danger-field-note {
  color: var(--danger);
  font-weight: 700;
}

.adjustment-notes-group {
  margin-bottom: 0;
}

.adjustment-notes-group textarea {
  min-height: 120px;
  resize: vertical;
}

.audit-reminder-note {
  margin-top: 0;
}

@media (max-width: 900px) {
  .stock-adjustment-page-actions,
  .stock-adjustment-form-actions {
    display: grid;
  }

  .stock-adjustment-search {
    display: grid;
    grid-template-columns: 1fr auto auto;
  }

  .stock-adjustment-page-actions > .btn,
  .stock-adjustment-form-actions .btn {
    width: 100%;
  }

  .stock-adjustment-header,
  .stock-adjustment-form-header {
    display: grid;
  }

  .stock-adjustment-empty {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 620px) {
  .stock-adjustment-search {
    grid-template-columns: 1fr;
  }

  .stock-adjustment-search .btn {
    width: 100%;
  }

  .adjustment-rule {
    align-items: center;
  }
}

/* =========================================================
   Suppliers
========================================================= */

.supplier-page-actions {
  align-items: stretch;
}

.supplier-search-form {
  min-width: 0;
}

.supplier-directory-card {
  overflow: hidden;
}

.supplier-directory-header {
  align-items: flex-start;
}

.supplier-directory-header .card-header-title {
  align-items: flex-start;
}

.supplier-table {
  min-width: 1180px;
}

.supplier-table th {
  white-space: nowrap;
}

.supplier-name-cell {
  min-width: 210px;
}

.supplier-name-wrap {
  display: flex;
  align-items: center;
  gap: 11px;
}

.supplier-table-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.84rem;
}

.supplier-name-wrap strong {
  display: block;
  color: var(--navy);
  line-height: 1.35;
}

.supplier-name-wrap small {
  display: block;
  margin-top: 3px;
  color: var(--success-dark);
  font-size: 0.68rem;
  font-weight: 700;
}

.supplier-detail-value {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 120px;
}

.supplier-detail-value i {
  width: 14px;
  color: var(--blue);
  font-size: 0.72rem;
  text-align: center;
}

.supplier-email-cell {
  min-width: 190px;
}

.supplier-long-text {
  min-width: 190px;
  max-width: 260px;
  white-space: normal;
  line-height: 1.5;
}

.supplier-actions {
  flex-wrap: nowrap;
}

.supplier-view-only {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.supplier-view-only i {
  color: var(--muted);
  font-size: 0.72rem;
}

.supplier-empty-state {
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 30px;
  border: 1px dashed rgba(11, 45, 115, 0.24);
  border-radius: 18px;
  background: var(--blue-soft-2);
}

.supplier-empty-state > span {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 17px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 1.2rem;
}

.supplier-empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
}

.supplier-empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.supplier-empty-state .btn {
  margin-left: 10px;
}

/* Supplier forms */

.supplier-form-page-actions {
  justify-content: space-between;
}

.supplier-form-card {
  overflow: hidden;
}

.supplier-form-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.supplier-form {
  display: grid;
  gap: 22px;
}

.supplier-notes-group {
  margin-bottom: 0;
}

.supplier-notes-group textarea {
  min-height: 120px;
  resize: vertical;
}

.supplier-information-note {
  margin-top: 0;
}

.supplier-form-page-actions .badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

@media (max-width: 900px) {
  .supplier-page-actions,
  .supplier-form-page-actions {
    display: grid;
  }

  .supplier-search-form {
    display: grid;
    grid-template-columns: 1fr auto auto;
  }

  .supplier-page-actions > .btn,
  .supplier-form-page-actions > .btn {
    width: 100%;
  }

  .supplier-directory-header,
  .supplier-form-header {
    display: grid;
  }

  .supplier-empty-state {
    flex-direction: column;
    text-align: center;
  }

  .supplier-empty-state .btn {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 620px) {
  .supplier-search-form {
    grid-template-columns: 1fr;
  }

  .supplier-search-form .btn {
    width: 100%;
  }
}

/* =========================================================
   Customers
========================================================= */

.customer-page-actions {
  align-items: stretch;
}

.customer-search-form {
  min-width: 0;
}

.customer-directory-card {
  overflow: hidden;
}

.customer-directory-header {
  align-items: flex-start;
}

.customer-directory-header .card-header-title {
  align-items: flex-start;
}

.customer-table {
  min-width: 1240px;
}

.customer-table th {
  white-space: nowrap;
}

.customer-name-cell {
  min-width: 210px;
}

.customer-name-wrap {
  display: flex;
  align-items: center;
  gap: 11px;
}

.customer-table-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.86rem;
}

.customer-name-wrap strong {
  display: block;
  color: var(--navy);
  line-height: 1.35;
}

.customer-name-wrap small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.customer-contact-value,
.receipt-method-label,
.payment-method-label,
.customer-invoice {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.customer-contact-value i,
.receipt-method-label i,
.payment-method-label i,
.customer-invoice i {
  width: 14px;
  color: var(--blue);
  font-size: 0.72rem;
  text-align: center;
}

.customer-email-cell {
  min-width: 190px;
}

.customer-table .badge {
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.customer-table .badge i {
  font-size: 0.64rem;
}

.customer-actions {
  flex-wrap: nowrap;
}

.customer-empty-state {
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 30px;
  border: 1px dashed rgba(11, 45, 115, 0.24);
  border-radius: 18px;
  background: var(--blue-soft-2);
}

.customer-empty-state > span {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 17px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 1.2rem;
}

.customer-empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
}

.customer-empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.customer-empty-state .btn {
  margin-left: 10px;
}

/* Customer forms */

.customer-form-page-actions {
  justify-content: space-between;
}

.customer-form-page-actions .badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.customer-form-card {
  overflow: hidden;
}

.customer-form-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.customer-form {
  display: grid;
  gap: 22px;
}

.customer-consent-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.customer-consent-box {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.customer-consent-box .checkbox-label {
  min-height: 130px;
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  cursor: pointer;
}

.customer-consent-box input[type="checkbox"] {
  margin-top: 11px;
}

.customer-consent-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue);
}

.customer-consent-box strong {
  display: block;
  margin-bottom: 5px;
  color: var(--navy);
}

.customer-notes-group {
  margin-bottom: 0;
}

.customer-notes-group textarea {
  min-height: 120px;
  resize: vertical;
}

.sensitive-data-note {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  color: var(--danger);
}

.sensitive-data-note i {
  margin-top: 2px;
  color: var(--danger);
}

/* Customer profile */

.customer-profile-actions {
  align-items: flex-start;
}

.customer-profile-action-buttons {
  margin-top: 0;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.customer-profile-heading {
  display: flex;
  align-items: center;
  gap: 15px;
}

.customer-profile-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 17px;
  background: var(--navy);
  color: #fff;
  font-size: 1.2rem;
}

.customer-detail-list span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.customer-detail-list span i {
  color: var(--blue);
  font-size: 0.74rem;
}

.customer-consent-summary {
  display: grid;
  gap: 13px;
}

.customer-consent-summary > div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.customer-consent-summary > div > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
}

.customer-consent-summary small {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
}

.customer-consent-summary strong {
  display: block;
  color: var(--navy);
}

.customer-consent-summary .consent-granted {
  border-color: rgba(22, 163, 74, 0.2);
  background: #f4fff7;
}

.customer-consent-summary .consent-granted > span {
  background: var(--success);
  color: #fff;
}

.customer-consent-summary .consent-not-granted {
  border-color: rgba(245, 158, 11, 0.2);
  background: #fffaf0;
}

.customer-consent-summary .consent-not-granted > span {
  background: var(--warning);
  color: #fff;
}

.customer-information-grid {
  margin-top: 22px;
}

.customer-notes-display {
  min-height: 80px;
  margin-bottom: 0;
  line-height: 1.7;
}

.customer-stats-grid {
  margin-top: 22px;
}

.customer-sales-card {
  margin-top: 22px;
  overflow: hidden;
}

.customer-sales-header {
  align-items: flex-start;
}

.customer-sales-header .card-header-title {
  align-items: flex-start;
}

.customer-sales-table {
  min-width: 900px;
}

.customer-sales-empty {
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 24px;
  border: 1px dashed rgba(11, 45, 115, 0.24);
  border-radius: 16px;
  background: var(--blue-soft-2);
}

.customer-sales-empty > i {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue);
}

.customer-sales-empty strong {
  display: block;
  margin-bottom: 3px;
  color: var(--navy);
}

.customer-sales-empty p {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

@media (max-width: 900px) {
  .customer-page-actions,
  .customer-form-page-actions,
  .customer-profile-actions {
    display: grid;
  }

  .customer-search-form {
    display: grid;
    grid-template-columns: 1fr auto auto;
  }

  .customer-page-actions > .btn,
  .customer-form-page-actions > .btn,
  .customer-profile-actions > .btn {
    width: 100%;
  }

  .customer-directory-header,
  .customer-form-header,
  .customer-sales-header {
    display: grid;
  }

  .customer-consent-grid {
    grid-template-columns: 1fr;
  }

  .customer-profile-action-buttons {
    display: grid;
    width: 100%;
  }

  .customer-profile-action-buttons .btn {
    width: 100%;
  }

  .customer-empty-state {
    flex-direction: column;
    text-align: center;
  }

  .customer-empty-state .btn {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 620px) {
  .customer-search-form {
    grid-template-columns: 1fr;
  }

  .customer-search-form .btn {
    width: 100%;
  }

  .customer-consent-box .checkbox-label {
    grid-template-columns: auto 1fr;
  }

  .customer-consent-icon {
    display: none;
  }

  .customer-profile-heading {
    align-items: flex-start;
  }

  .customer-sales-empty {
    flex-direction: column;
    text-align: center;
  }
}

/* =========================================================
   Purchases and Restocking
========================================================= */

.purchase-page-actions {
  align-items: stretch;
}

.purchase-search-form {
  min-width: 0;
}

.purchase-directory-card {
  overflow: hidden;
}

.purchase-directory-header {
  align-items: flex-start;
}

.purchase-directory-header .card-header-title {
  align-items: flex-start;
}

.purchase-table {
  min-width: 1480px;
}

.purchase-table th {
  white-space: nowrap;
}

.purchase-date-cell {
  min-width: 130px;
  white-space: nowrap;
}

.purchase-date-cell i {
  margin-right: 7px;
  color: var(--muted);
  font-size: 0.75rem;
}

.purchase-product-cell {
  min-width: 190px;
}

.purchase-product-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.purchase-product-wrap > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.8rem;
}

.purchase-product-wrap strong {
  color: var(--navy);
}

.purchase-detail-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 110px;
}

.purchase-detail-label i {
  width: 14px;
  color: var(--blue);
  font-size: 0.72rem;
  text-align: center;
}

.purchase-table .badge {
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.purchase-table .badge i {
  font-size: 0.63rem;
}

.purchase-unavailable {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.purchase-empty-state {
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 30px;
  border: 1px dashed rgba(11, 45, 115, 0.24);
  border-radius: 18px;
  background: var(--blue-soft-2);
}

.purchase-empty-state > span {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 17px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 1.2rem;
}

.purchase-empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
}

.purchase-empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.purchase-empty-state .btn {
  margin-left: 10px;
}

/* Purchase form */

.purchase-form-page-actions {
  justify-content: space-between;
}

.purchase-form-card {
  overflow: visible;
}

.purchase-form-header {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.purchase-form {
  display: grid;
  gap: 22px;
}

.purchase-product-shell,
.purchase-details-shell {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--blue-soft-2);
}

.purchase-section-heading {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 20px;
}

.purchase-step-number {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  background: var(--navy);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 800;
}

.purchase-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--red);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.purchase-section-heading h4 {
  margin: 0 0 4px;
  color: var(--navy);
  font-size: 1rem;
}

.purchase-section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.purchase-search-box {
  position: relative;
}

.purchase-search-input-wrap {
  position: relative;
}

.purchase-search-input-wrap > i {
  position: absolute;
  top: 50%;
  left: 16px;
  z-index: 2;
  transform: translateY(-50%);
  color: var(--blue);
  pointer-events: none;
}

.purchase-search-input-wrap input {
  width: 100%;
  min-height: 52px;
  padding-left: 45px;
  padding-right: 125px;
  border-color: rgba(11, 45, 115, 0.22);
  background: #fff;
}

.purchase-search-input-wrap input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(11, 45, 115, 0.1);
}

.purchase-search-hint {
  position: absolute;
  top: 50%;
  right: 13px;
  transform: translateY(-50%);
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.65rem;
  font-weight: 800;
  pointer-events: none;
}

.purchase-search-results {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  z-index: 30;
  max-height: 330px;
  overflow-y: auto;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(9, 30, 66, 0.18);
}

.purchase-search-results:empty {
  display: none;
}

.purchase-search-result {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 15px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.purchase-search-result:last-child {
  border-bottom: 0;
}

.purchase-search-result:hover,
.purchase-search-result:focus {
  background: var(--blue-soft-2);
}

.purchase-selected-product {
  display: none;
  align-items: center;
  gap: 14px;
  margin-top: 18px;
  padding: 17px;
  border: 1px solid rgba(22, 163, 74, 0.22);
  border-radius: 16px;
  background: #f4fff7;
}

.purchase-selected-product.show {
  display: flex;
}

.purchase-selected-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 14px;
  background: var(--success);
  color: #fff;
  font-size: 1rem;
}

.purchase-selected-main {
  flex: 1;
  min-width: 0;
}

.purchase-selected-main > span {
  display: block;
  margin-bottom: 2px;
  color: var(--success-dark);
  font-size: 0.67rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.purchase-selected-main h4 {
  margin: 0 0 3px;
  color: var(--navy);
}

.purchase-selected-main p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.purchase-selected-main p strong {
  color: var(--navy);
}

.purchase-batch-note {
  margin-top: 0;
}

@media (max-width: 900px) {
  .purchase-page-actions,
  .purchase-form-page-actions {
    display: grid;
  }

  .purchase-search-form {
    display: grid;
    grid-template-columns: 1fr auto auto;
  }

  .purchase-page-actions > .btn,
  .purchase-form-page-actions > .btn {
    width: 100%;
  }

  .purchase-directory-header,
  .purchase-form-header {
    display: grid;
  }

  .purchase-empty-state {
    flex-direction: column;
    text-align: center;
  }

  .purchase-empty-state .btn {
    width: 100%;
    margin-left: 0;
  }
}

@media (max-width: 620px) {
  .purchase-search-form {
    grid-template-columns: 1fr;
  }

  .purchase-search-form .btn {
    width: 100%;
  }

  .purchase-product-shell,
  .purchase-details-shell {
    padding: 18px;
  }

  .purchase-search-hint {
    display: none;
  }

  .purchase-search-input-wrap input {
    padding-right: 14px;
  }

  .purchase-selected-product {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .purchase-selected-product .btn {
    width: 100%;
  }
}

/* =========================================================
   SALES / POS REDESIGN
   Append this entire section to the bottom of styles.css
========================================================= */

/* =========================================================
   Sales history
========================================================= */

.sales-page-actions,
.pos-page-actions,
.receipt-page-actions {
  align-items: stretch;
}

.sales-search-form {
  min-width: 0;
}

.sales-history-card,
.receipt-card-shell {
  overflow: hidden;
}

.sales-history-header,
.receipt-card-header {
  align-items: flex-start;
}

.sales-history-header .card-header-title,
.receipt-card-header .card-header-title {
  align-items: flex-start;
}

.sales-history-table {
  min-width: 930px;
}

.sales-history-table th {
  white-space: nowrap;
}

.sales-invoice {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--navy);
}

.sales-invoice > span {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.76rem;
}

.sales-date,
.sales-user {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}

.sales-date i,
.sales-user i {
  color: var(--blue);
  font-size: 0.72rem;
}

.sales-history-table .money-cell {
  white-space: nowrap;
  color: var(--navy);
  font-weight: 800;
}

.sales-history-table .profit-cell {
  color: var(--success-dark);
}

.sales-history-table .badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.sales-empty-state {
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 17px;
  padding: 28px;
  border: 1px dashed rgba(11, 45, 115, 0.24);
  border-radius: 18px;
  background: var(--blue-soft-2);
}

.sales-empty-state > span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 16px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 1.12rem;
}

.sales-empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy);
}

.sales-empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.55;
}

/* =========================================================
   Compact POS workspace
========================================================= */

.pos-page-actions {
  justify-content: space-between;
}

.pos-page-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--success-dark);
}

.pos-error-alert {
  margin-bottom: 18px;
}

.pos-form {
  display: grid;
  gap: 16px;
}

.pos-customer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.pos-customer-current {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pos-customer-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  background: var(--navy);
  color: #fff;
  font-size: 0.9rem;
}

.pos-customer-label {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sale-walkin-note,
.sale-selected-customer {
  display: none;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.sale-walkin-note.show,
.sale-selected-customer.show {
  display: block;
}

.sale-walkin-note strong,
.sale-selected-customer > strong {
  display: block;
  overflow: hidden;
  color: var(--navy);
  font-size: 0.94rem;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sale-walkin-note small,
.sale-selected-customer > small {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sale-selected-customer .pos-customer-receipt {
  color: var(--blue);
  font-weight: 700;
}

.pos-customer-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex: 0 0 auto;
}

.pos-customer-actions .btn {
  min-height: 40px;
  padding: 10px 13px;
  font-size: 0.76rem;
}

.pos-customer-search-panel {
  display: none;
  padding: 16px;
  border: 1px solid rgba(11, 45, 115, 0.18);
  border-radius: 17px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.pos-customer-search-panel.show {
  display: block;
}

.pos-inline-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.pos-inline-panel-heading strong {
  display: block;
  margin-bottom: 2px;
  color: var(--navy);
  font-size: 0.88rem;
}

.pos-inline-panel-heading span {
  color: var(--muted);
  font-size: 0.74rem;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--navy);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--red);
  color: var(--red);
}

.sale-customer-search-box {
  position: relative;
}

.sale-customer-search-box > i {
  position: absolute;
  top: 16px;
  left: 15px;
  z-index: 2;
  color: var(--blue);
  pointer-events: none;
}

.sale-customer-search-box > input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px 12px 43px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--blue-soft-2);
  color: var(--charcoal);
  font: inherit;
  outline: none;
}

.sale-customer-search-box > input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(11, 45, 115, 0.1);
}

.sale-customer-search-results {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  z-index: 80;
  max-height: 330px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(7, 22, 74, 0.18);
}

.sale-customer-search-results:empty {
  display: none;
}

.customer-search-result {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--charcoal);
  text-align: left;
  cursor: pointer;
}

.customer-search-result:last-child {
  border-bottom: 0;
}

.customer-search-result:hover,
.customer-search-result:focus-visible {
  background: var(--blue-soft-2);
  outline: none;
}

.customer-search-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--blue);
}

.customer-search-copy {
  min-width: 0;
}

.customer-search-copy strong,
.customer-search-copy small,
.customer-search-copy em {
  display: block;
}

.customer-search-copy strong {
  color: var(--navy);
  font-size: 0.82rem;
}

.customer-search-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.7rem;
}

.customer-search-copy em {
  margin-top: 3px;
  color: var(--blue);
  font-size: 0.66rem;
  font-style: normal;
  font-weight: 700;
}

.customer-search-select {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
}

.pos-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
  gap: 16px;
  align-items: start;
}

.pos-product-panel,
.pos-checkout-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.pos-product-panel {
  min-height: 350px;
  padding: 18px;
}

.pos-checkout-panel {
  position: sticky;
  top: 16px;
  overflow: hidden;
}

.pos-panel-title {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 15px;
}

.pos-panel-title > span {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--blue);
}

.pos-panel-title h3,
.pos-cart-header h3 {
  margin: 0 0 3px;
  color: var(--navy);
  font-size: 1rem;
}

.pos-panel-title p {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.pos-search-box {
  position: relative;
}

.pos-search-box > i {
  position: absolute;
  top: 17px;
  left: 16px;
  z-index: 2;
  color: var(--blue);
  pointer-events: none;
}

.pos-search-box > input {
  width: 100%;
  min-height: 50px;
  padding: 12px 104px 12px 45px;
  border: 1px solid rgba(11, 45, 115, 0.2);
  border-radius: 14px;
  background: var(--blue-soft-2);
  color: var(--charcoal);
  font: inherit;
  font-weight: 700;
  outline: none;
}

.pos-search-box > input:focus {
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(11, 45, 115, 0.1);
}

.pos-search-shortcut {
  position: absolute;
  top: 14px;
  right: 12px;
  z-index: 2;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 0.64rem;
  font-weight: 800;
  pointer-events: none;
}

.search-results {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  z-index: 70;
  max-height: 365px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 20px 48px rgba(7, 22, 74, 0.2);
}

.search-results:empty {
  display: none;
}

.search-result-item {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: #fff;
  color: var(--charcoal);
  text-align: left;
  cursor: pointer;
}

.search-result-item:last-child {
  border-bottom: 0;
}

.search-result-item:hover,
.search-result-item:focus-visible {
  background: var(--blue-soft-2);
  outline: none;
}

.search-result-product-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--blue-soft);
  color: var(--blue);
}

.search-result-copy {
  min-width: 0;
}

.search-result-copy strong {
  display: block;
  overflow: hidden;
  color: var(--navy);
  font-size: 0.82rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.search-result-copy small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
}

.search-result-item em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 0.67rem;
  font-style: normal;
  font-weight: 800;
}

.search-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 64px;
  padding: 14px;
  color: var(--muted);
  font-size: 0.76rem;
  text-align: center;
}

.search-empty.error {
  color: var(--danger);
}

.pos-product-help {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 13px;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--blue-soft-2);
  color: var(--muted);
  font-size: 0.71rem;
  line-height: 1.5;
}

.pos-product-help i {
  margin-top: 2px;
  color: var(--blue);
}

.pos-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 17px;
  border-bottom: 1px solid var(--line);
  background: var(--blue-soft-2);
}

.pos-cart-kicker {
  display: block;
  margin-bottom: 1px;
  color: var(--red);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.pos-cart-count {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--navy);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  white-space: nowrap;
}

.cart-items {
  min-height: 180px;
  max-height: calc(100vh - 470px);
  overflow-y: auto;
  padding: 8px 14px;
}

.empty-cart-box {
  min-height: 165px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 22px;
  color: var(--muted);
  text-align: center;
}

.empty-cart-box > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 3px;
  border-radius: 15px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 1rem;
}

.empty-cart-box strong {
  color: var(--navy);
  font-size: 0.86rem;
}

.empty-cart-box small {
  font-size: 0.71rem;
}

.cart-row {
  display: grid;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  transition:
    background 0.2s ease,
    transform 0.2s ease;
}

.cart-row:last-child {
  border-bottom: 0;
}

.cart-row-highlight {
  background: rgba(11, 45, 115, 0.06);
  transform: scale(1.01);
}

.cart-product {
  min-width: 0;
}

.cart-product strong {
  display: block;
  overflow: hidden;
  color: var(--navy);
  font-size: 0.8rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-product span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.67rem;
}

.cart-row-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.cart-quantity-stepper {
  display: grid;
  grid-template-columns: 30px 42px 30px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.cart-qty-button {
  width: 30px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  background: var(--blue-soft-2);
  color: var(--navy);
  font-size: 0.64rem;
  cursor: pointer;
}

.cart-qty-button:hover {
  background: var(--navy);
  color: #fff;
}

.cart-qty {
  width: 42px !important;
  height: 32px;
  padding: 0 !important;
  border: 0 !important;
  border-right: 1px solid var(--line) !important;
  border-left: 1px solid var(--line) !important;
  border-radius: 0 !important;
  background: #fff !important;
  color: var(--navy);
  font-size: 0.76rem !important;
  font-weight: 800;
  text-align: center;
  box-shadow: none !important;
  -moz-appearance: textfield;
  appearance: textfield;
}

.cart-qty::-webkit-inner-spin-button,
.cart-qty::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

.cart-line-total {
  color: var(--navy);
  font-size: 0.83rem;
  text-align: right;
  white-space: nowrap;
}

.pos-remove-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 10px;
  background: #fff1f3;
  color: var(--red);
  font-size: 0.72rem;
  cursor: pointer;
}

.pos-remove-btn:hover {
  background: var(--red);
  color: #fff;
}

.pos-cart-footer {
  display: grid;
  gap: 12px;
  padding: 15px 17px 17px;
  border-top: 1px solid var(--line);
  background: #fff;
}

.pos-payment-group {
  margin: 0;
}

.pos-payment-group label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  font-size: 0.73rem;
}

.pos-payment-group label i {
  color: var(--blue);
}

.pos-payment-group select {
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 11px;
  font-size: 0.78rem;
}

.pos-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 13px;
  border-radius: 13px;
  background: var(--navy);
  color: #fff;
}

.pos-total-row span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.7rem;
  font-weight: 700;
}

.pos-total-row strong {
  font-size: 1.18rem;
  line-height: 1;
  white-space: nowrap;
}

.pos-complete-sale-btn {
  width: 100%;
  min-height: 46px;
  justify-content: center;
}

.pos-secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pos-secondary-actions .btn {
  width: 100%;
  min-height: 40px;
  justify-content: center;
  padding: 9px 10px;
  font-size: 0.71rem;
}

.pos-secondary-actions .btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pos-mobile-cart-bar {
  position: fixed;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  border: 0;
  border-radius: 15px;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 18px 45px rgba(7, 22, 74, 0.32);
  cursor: pointer;
}

.pos-mobile-cart-bar > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pos-mobile-cart-bar > span:last-child {
  font-size: 0.9rem;
  font-weight: 800;
}

/* =========================================================
   Checkout modal
========================================================= */

.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(4, 11, 45, 0.68);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.checkout-modal.show {
  display: grid;
}

.checkout-modal-card {
  width: min(480px, 100%);
  padding: 24px;
  border: 1px solid rgba(11, 45, 115, 0.16);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(4, 11, 45, 0.32);
  animation: posModalIn 0.2s ease;
}

@keyframes posModalIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.checkout-modal-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 15px;
  background: var(--navy);
  color: #fff;
  font-size: 1rem;
}

.checkout-modal-header > span {
  display: block;
  margin-bottom: 3px;
  color: var(--red);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.checkout-modal-header h3 {
  margin: 0 0 6px;
  color: var(--navy);
  font-size: 1.25rem;
}

.checkout-modal-header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.checkout-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 17px;
}

.checkout-summary > div {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--blue-soft-2);
}

.checkout-summary span,
.checkout-summary strong {
  display: block;
}

.checkout-summary span {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
}

.checkout-summary strong {
  color: var(--navy);
  font-size: 0.78rem;
}

.checkout-summary .checkout-total-summary {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-color: var(--navy);
  background: var(--navy);
}

.checkout-summary .checkout-total-summary span {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.checkout-summary .checkout-total-summary strong {
  color: #fff;
  font-size: 1.05rem;
}

.checkout-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 13px;
  padding: 10px 11px;
  border-radius: 11px;
  background: #fff8eb;
  color: #8a4b00;
  font-size: 0.7rem;
  line-height: 1.45;
}

.checkout-warning i {
  margin-top: 2px;
  color: var(--warning);
}

.checkout-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 16px;
}

.checkout-actions .btn {
  width: 100%;
  justify-content: center;
}

body.modal-open {
  overflow: hidden;
}

/* =========================================================
   Receipt page
========================================================= */

.receipt-page-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
}

.receipt-page-actions .btn {
  min-height: 40px;
}

.receipt-customer-banner,
.receipt-share-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: #fff;
}

.receipt-customer-details {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.receipt-customer-icon {
  width: 40px;
  height: 40px;
  display: grid !important;
  place-items: center;
  flex: 0 0 auto;
  margin: 0 !important;
  border-radius: 12px;
  background: var(--blue-soft);
  color: var(--blue) !important;
  font-size: 0.86rem !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

.receipt-customer-details > div {
  min-width: 0;
}

.receipt-customer-details small {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.receipt-customer-details strong {
  display: block;
  overflow: hidden;
  color: var(--navy);
  font-size: 0.86rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.receipt-customer-details > div > span {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: normal;
  line-height: 1.45;
  text-overflow: ellipsis;
  text-transform: none;
  white-space: nowrap;
}

.receipt-share-note {
  justify-content: flex-start;
  border-color: rgba(247, 144, 9, 0.25);
  background: #fffaf1;
}

.receipt-share-note > i {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: #fff0d1;
  color: var(--warning);
}

.receipt-share-note > div {
  min-width: 0;
}

.receipt-share-note strong {
  display: block;
  color: var(--navy);
  font-size: 0.84rem;
}

.receipt-share-note p {
  display: block;
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.receipt-card {
  width: min(900px, 100%);
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #fff;
  box-shadow: var(--shadow-soft);
}

.receipt-header {
  padding: 24px 24px 18px;
  border-bottom: 3px solid var(--red);
  background: var(--navy);
  color: #fff;
  text-align: center;
}

.receipt-header img {
  width: min(230px, 75%);
  max-height: 78px;
  margin: 0 auto 10px;
  object-fit: contain;
}

.receipt-document-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 7px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.receipt-header h2 {
  margin: 0 0 7px;
  color: #fff;
  font-size: 1.22rem;
}

.receipt-header p {
  margin: 3px 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.74rem;
}

.receipt-meta {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.receipt-meta > div {
  min-width: 0;
  padding: 14px 15px;
  border-right: 1px solid var(--line);
}

.receipt-meta > div:last-child {
  border-right: 0;
}

.receipt-meta span,
.receipt-meta strong {
  display: block;
}

.receipt-meta span {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
}

.receipt-meta span i {
  margin-right: 4px;
  color: var(--blue);
}

.receipt-meta strong {
  overflow-wrap: anywhere;
  color: var(--navy);
  font-size: 0.74rem;
  line-height: 1.4;
}

.receipt-table {
  margin: 0;
  padding: 18px 20px 0;
}

.receipt-table table {
  min-width: 620px;
}

.receipt-table th {
  background: var(--navy);
  color: #fff;
}

.receipt-table td strong {
  color: var(--navy);
}

.receipt-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 18px 20px 0;
  padding: 15px 17px;
  border-radius: 14px;
  background: var(--blue-soft);
}

.receipt-total span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.receipt-total strong {
  color: var(--navy);
  font-size: 1.35rem;
}

.receipt-footer {
  padding: 20px;
  text-align: center;
}

.receipt-footer p {
  margin: 0 0 5px;
  color: var(--navy);
  font-weight: 800;
}

.receipt-footer small {
  color: var(--muted);
  font-size: 0.68rem;
}

/* =========================================================
   Responsive layout
========================================================= */

@media (max-width: 1100px) {
  .pos-workspace {
    grid-template-columns: minmax(0, 1fr) 360px;
  }

  .receipt-meta {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .receipt-meta > div:nth-child(3) {
    border-right: 0;
  }

  .receipt-meta > div:nth-child(n + 4) {
    border-top: 1px solid var(--line);
  }
}

@media (max-width: 900px) {
  .sales-page-actions,
  .pos-page-actions {
    display: grid;
  }

  .sales-search-form {
    display: grid;
    grid-template-columns: 1fr auto auto;
  }

  .sales-page-actions > .btn,
  .pos-page-actions > .btn {
    width: 100%;
  }

  .sales-history-header {
    display: grid;
  }

  .sales-empty-state {
    flex-direction: column;
    text-align: center;
  }

  .sales-empty-state .btn {
    width: 100%;
  }

  .pos-workspace {
    grid-template-columns: 1fr;
  }

  .pos-checkout-panel {
    position: static;
  }

  .cart-items {
    max-height: none;
  }

  .pos-mobile-cart-bar.show {
    display: flex;
  }

  .receipt-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .receipt-meta > div,
  .receipt-meta > div:nth-child(3) {
    border-top: 1px solid var(--line);
    border-right: 1px solid var(--line);
  }

  .receipt-meta > div:nth-child(-n + 2) {
    border-top: 0;
  }

  .receipt-meta > div:nth-child(even) {
    border-right: 0;
  }
}

@media (max-width: 680px) {
  .sales-search-form {
    grid-template-columns: 1fr;
  }

  .sales-search-form .btn {
    width: 100%;
  }

  .pos-customer-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .pos-customer-current,
  .pos-customer-actions {
    width: 100%;
  }

  .pos-customer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .pos-customer-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .pos-product-panel {
    min-height: 310px;
    padding: 15px;
  }

  .pos-search-shortcut {
    display: none;
  }

  .pos-search-box > input {
    padding-right: 14px;
  }

  .cart-row-controls {
    grid-template-columns: auto 1fr auto;
  }

  .checkout-summary,
  .checkout-actions {
    grid-template-columns: 1fr;
  }

  .checkout-summary .checkout-total-summary {
    grid-column: auto;
  }

  .receipt-page-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .receipt-page-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .receipt-customer-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .receipt-customer-banner .btn {
    width: 100%;
    justify-content: center;
  }

  .receipt-customer-details {
    width: 100%;
  }

  .receipt-meta {
    grid-template-columns: 1fr;
  }

  .receipt-meta > div,
  .receipt-meta > div:nth-child(3),
  .receipt-meta > div:nth-child(even) {
    border-top: 1px solid var(--line);
    border-right: 0;
  }

  .receipt-meta > div:first-child {
    border-top: 0;
  }

  .receipt-total {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 460px) {
  .pos-customer-actions,
  .pos-secondary-actions,
  .receipt-page-actions {
    grid-template-columns: 1fr;
  }

  .customer-search-result {
    grid-template-columns: auto 1fr;
  }

  .customer-search-select {
    display: none;
  }

  .search-result-item {
    grid-template-columns: auto 1fr;
  }

  .search-result-item em {
    grid-column: 1 / -1;
    justify-content: center;
  }

  .cart-row-controls {
    grid-template-columns: auto 1fr;
  }

  .pos-remove-btn {
    grid-column: 1 / -1;
    width: 100%;
  }
}

/* =========================================================
   Print receipt
========================================================= */

@media print {
  .sidebar,
  .topbar,
  .page-actions,
  .receipt-customer-banner,
  .receipt-share-note,
  .app-mobile-bar,
  .sidebar-overlay,
  .no-print {
    display: none !important;
  }

  body,
  .app-layout,
  .main-content {
    margin: 0 !important;
    padding: 0 !important;
    background: #fff !important;
  }

  .receipt-card {
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .receipt-header {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .receipt-table th,
  .receipt-total {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* =========================================================
   FINAL POS WORKSPACE OVERRIDES
   Temporary block — append to the bottom of styles.css
========================================================= */

/* =========================================================
   POS page structure
========================================================= */

.pos-page-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.pos-ready-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--success-dark, #166534);
}

.pos-ready-status i {
  color: var(--success, #16a34a);
}

.pos-error-alert {
  margin-bottom: 16px;
}

.pos-form {
  display: grid;
  gap: 16px;
}

/* =========================================================
   Customer bar
========================================================= */

.pos-customer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-soft, 0 8px 24px rgba(7, 22, 74, 0.06));
}

.pos-customer-current {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.pos-customer-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--navy, #07164a);
  color: #ffffff;
  font-size: 0.9rem;
}

.pos-customer-label {
  display: block;
  margin-bottom: 2px;
  color: var(--muted, #667085);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.sale-walkin-note,
.sale-selected-customer {
  display: none;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.sale-walkin-note.show,
.sale-selected-customer.show {
  display: block;
}

.sale-walkin-note strong,
.sale-selected-customer > strong {
  display: block;
  overflow: hidden;
  color: var(--navy, #07164a);
  font-size: 0.9rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sale-walkin-note small,
.sale-selected-customer > small {
  display: block;
  overflow: hidden;
  margin-top: 2px;
  color: var(--muted, #667085);
  font-size: 0.7rem;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sale-selected-customer .pos-customer-receipt {
  color: var(--blue, #164c96);
  font-weight: 700;
}

.pos-customer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.pos-customer-actions .btn {
  min-height: 39px;
  padding: 9px 12px;
  font-size: 0.73rem;
}

/* =========================================================
   Customer search panel
========================================================= */

.pos-customer-search-panel {
  display: none;
  padding: 15px;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: var(--shadow-soft, 0 8px 24px rgba(7, 22, 74, 0.06));
}

.pos-customer-search-panel.show {
  display: block;
}

.pos-inline-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 11px;
}

.pos-inline-panel-heading strong {
  display: block;
  margin-bottom: 2px;
  color: var(--navy, #07164a);
  font-size: 0.85rem;
}

.pos-inline-panel-heading span {
  color: var(--muted, #667085);
  font-size: 0.72rem;
}

.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 10px;
  background: #ffffff;
  color: var(--navy, #07164a);
  cursor: pointer;
}

.icon-button:hover {
  border-color: var(--red, #c8102e);
  color: var(--red, #c8102e);
}

.sale-customer-search-box {
  position: relative;
}

.sale-customer-search-box > i {
  position: absolute;
  top: 50%;
  left: 15px;
  z-index: 2;
  transform: translateY(-50%);
  color: var(--blue, #164c96);
  pointer-events: none;
}

.sale-customer-search-box > input {
  width: 100%;
  min-height: 46px;
  padding: 11px 14px 11px 43px;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 12px;
  background: var(--blue-soft-2, #f7f9fd);
  color: var(--charcoal, #263238);
  font: inherit;
  outline: none;
}

.sale-customer-search-box > input:focus {
  border-color: var(--blue, #164c96);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(22, 76, 150, 0.1);
}

.sale-customer-search-results {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  left: 0;
  z-index: 100;
  max-height: 320px;
  overflow-y: auto;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 13px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(7, 22, 74, 0.18);
}

.sale-customer-search-results:empty {
  display: none;
}

.customer-search-result {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid var(--line, #dbe3f0);
  background: #ffffff;
  color: var(--charcoal, #263238);
  text-align: left;
  cursor: pointer;
}

.customer-search-result:last-child {
  border-bottom: 0;
}

.customer-search-result:hover,
.customer-search-result:focus-visible {
  background: var(--blue-soft-2, #f7f9fd);
  outline: none;
}

.customer-search-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
}

.customer-search-copy {
  min-width: 0;
}

.customer-search-copy strong,
.customer-search-copy small,
.customer-search-copy em {
  display: block;
}

.customer-search-copy strong {
  overflow: hidden;
  color: var(--navy, #07164a);
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-search-copy small {
  margin-top: 2px;
  color: var(--muted, #667085);
  font-size: 0.68rem;
}

.customer-search-copy em {
  margin-top: 3px;
  color: var(--blue, #164c96);
  font-size: 0.64rem;
  font-style: normal;
  font-weight: 700;
}

.customer-search-select {
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--navy, #07164a);
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 800;
}

/* =========================================================
   True 50 / 50 POS workspace
========================================================= */

.pos-workspace,
.pos-workspace-balanced {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}

.pos-medicine-panel,
.pos-cart-panel {
  min-width: 0;
  min-height: clamp(520px, 64vh, 680px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft, 0 8px 24px rgba(7, 22, 74, 0.06));
}

/* Disable old sticky cart behavior */
.pos-cart-panel,
.pos-checkout-panel {
  position: static;
  top: auto;
}

/* =========================================================
   Shared panel heading
========================================================= */

.pos-panel-heading {
  min-height: 82px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 17px;
  border-bottom: 1px solid var(--line, #dbe3f0);
  background: var(--blue-soft-2, #f7f9fd);
}

.pos-panel-heading > div {
  min-width: 0;
}

.pos-panel-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--red, #c8102e);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.pos-panel-heading h3 {
  margin: 0 0 3px;
  color: var(--navy, #07164a);
  font-size: 0.98rem;
}

.pos-panel-heading p {
  margin: 0;
  color: var(--muted, #667085);
  font-size: 0.7rem;
  line-height: 1.45;
}

.pos-medicine-count,
.pos-cart-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: var(--navy, #07164a);
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 800;
  white-space: nowrap;
}

/* =========================================================
   Medicine browser
========================================================= */

.pos-medicine-search {
  position: relative;
  padding: 14px 15px;
  border-bottom: 1px solid var(--line, #dbe3f0);
  background: #ffffff;
}

.pos-medicine-search > i {
  position: absolute;
  top: 50%;
  left: 31px;
  z-index: 2;
  transform: translateY(-50%);
  color: var(--blue, #164c96);
  pointer-events: none;
}

.pos-medicine-search input {
  width: 100%;
  min-height: 46px;
  padding: 11px 42px 11px 43px;
  border: 1px solid rgba(22, 76, 150, 0.22);
  border-radius: 12px;
  background: var(--blue-soft-2, #f7f9fd);
  color: var(--charcoal, #263238);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 700;
  outline: none;
}

.pos-medicine-search input:focus {
  border-color: var(--blue, #164c96);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(22, 76, 150, 0.1);
}

.pos-search-clear {
  position: absolute;
  top: 50%;
  right: 27px;
  width: 30px;
  height: 30px;
  display: none;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted, #667085);
  cursor: pointer;
}

.pos-search-clear.show {
  display: grid;
}

.pos-search-clear:hover {
  background: #fff0f2;
  color: var(--red, #c8102e);
}

.pos-medicine-list {
  min-height: 0;
  flex: 1;
  overflow-y: auto;
  background: #ffffff;
}

.pos-medicine-list::-webkit-scrollbar {
  width: 7px;
}

.pos-medicine-list::-webkit-scrollbar-track {
  background: transparent;
}

.pos-medicine-list::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--blue-soft, #eaf0fb);
}

.pos-medicine-row {
  width: 100%;
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    84px
    90px
    70px;
  align-items: center;
  gap: 10px;
  padding: 11px 15px;
  border: 0;
  border-bottom: 1px solid var(--line, #dbe3f0);
  background: #ffffff;
  color: var(--charcoal, #263238);
  text-align: left;
  cursor: pointer;
  transition:
    background 0.15s ease,
    box-shadow 0.15s ease;
}

.pos-medicine-row:last-child {
  border-bottom: 0;
}

.pos-medicine-row:hover,
.pos-medicine-row:focus-visible {
  background: var(--blue-soft-2, #f7f9fd);
  box-shadow: inset 3px 0 0 var(--blue, #164c96);
  outline: none;
}

.pos-medicine-row.added {
  background: #f0fff5;
  box-shadow: inset 3px 0 0 var(--success, #16a34a);
}

.pos-medicine-name {
  min-width: 0;
}

.pos-medicine-name strong {
  display: block;
  overflow: hidden;
  color: var(--navy, #07164a);
  font-size: 0.77rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pos-medicine-stock {
  color: var(--muted, #667085);
  font-size: 0.66rem;
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
}

.pos-medicine-price {
  color: var(--navy, #07164a);
  font-size: 0.72rem;
  text-align: right;
  white-space: nowrap;
}

.pos-medicine-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  padding: 6px 9px;
  border-radius: 9px;
  background: var(--navy, #07164a);
  color: #ffffff;
  font-size: 0.64rem;
  font-weight: 800;
  white-space: nowrap;
}

.pos-medicine-row.added .pos-medicine-add {
  background: var(--success, #16a34a);
}

.pos-list-message {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 24px;
  color: var(--muted, #667085);
  font-size: 0.75rem;
  text-align: center;
}

.pos-list-message i {
  color: var(--blue, #164c96);
}

.pos-list-message.error,
.pos-list-message.error i {
  color: var(--danger, #b42318);
}

/* =========================================================
   Cart column headings
========================================================= */

.pos-cart-column-headings {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    104px
    82px
    88px
    32px;
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-bottom: 1px solid var(--line, #dbe3f0);
  background: #ffffff;
  color: var(--muted, #667085);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pos-cart-column-headings span:nth-child(n + 2) {
  text-align: center;
}

.pos-cart-column-headings span:nth-child(4) {
  text-align: right;
}

/* =========================================================
   One-row-per-medicine cart
========================================================= */

.pos-cart-items,
.cart-items {
  min-height: 0;
  max-height: none;
  flex: 1;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 13px;
}

.pos-cart-items::-webkit-scrollbar,
.cart-items::-webkit-scrollbar {
  width: 7px;
}

.pos-medicine-list::-webkit-scrollbar-track {
  background: transparent;
}

.pos-cart-items::-webkit-scrollbar-thumb,
.cart-items::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: var(--blue-soft, #eaf0fb);
}

.empty-cart-box {
  min-height: 220px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 6px;
  padding: 24px;
  color: var(--muted, #667085);
  text-align: center;
}

.empty-cart-box > span {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 3px;
  border-radius: 14px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
  font-size: 1rem;
}

.empty-cart-box strong {
  color: var(--navy, #07164a);
  font-size: 0.84rem;
}

.empty-cart-box small {
  color: var(--muted, #667085);
  font-size: 0.68rem;
}

.cart-row {
  width: 100%;
  min-height: 56px;
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    104px
    82px
    88px
    32px;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line, #dbe3f0);
  background: #ffffff;
  transition:
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.cart-row:last-child {
  border-bottom: 0;
}

.cart-row-highlight {
  background: var(--blue-soft-2, #f7f9fd);
  box-shadow: inset 3px 0 0 var(--blue, #164c96);
}

.cart-product {
  min-width: 0;
  padding-left: 4px;
}

.cart-product strong {
  display: block;
  overflow: hidden;
  color: var(--navy, #07164a);
  font-size: 0.72rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-quantity-stepper {
  width: 104px;
  display: grid;
  grid-template-columns: 30px 42px 30px;
  align-items: center;
  justify-self: center;
  overflow: hidden;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 9px;
  background: #ffffff;
}

.cart-qty-button {
  width: 30px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 0;
  background: var(--blue-soft-2, #f7f9fd);
  color: var(--navy, #07164a);
  font-size: 0.61rem;
  cursor: pointer;
}

.cart-qty-button:hover {
  background: var(--navy, #07164a);
  color: #ffffff;
}

.cart-qty {
  width: 42px !important;
  height: 31px;
  padding: 0 !important;
  border: 0 !important;
  border-right: 1px solid var(--line, #dbe3f0) !important;
  border-left: 1px solid var(--line, #dbe3f0) !important;
  border-radius: 0 !important;
  background: #ffffff !important;
  color: var(--navy, #07164a);
  font-size: 0.72rem !important;
  font-weight: 800;
  text-align: center;
  box-shadow: none !important;
  -moz-appearance: textfield;
  appearance: textfield;
}

.cart-qty::-webkit-inner-spin-button,
.cart-qty::-webkit-outer-spin-button {
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
}

.cart-unit-price,
.cart-line-total {
  display: block;
  color: var(--navy, #07164a);
  font-size: 0.69rem;
  text-align: right;
  white-space: nowrap;
}

.cart-line-total {
  font-weight: 800;
}

.pos-remove-btn {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  justify-self: end;
  border: 0;
  border-radius: 9px;
  background: #fff0f2;
  color: var(--red, #c8102e);
  font-size: 0.68rem;
  cursor: pointer;
}

.pos-remove-btn:hover {
  background: var(--red, #c8102e);
  color: #ffffff;
}

/* =========================================================
   Cart footer
========================================================= */

.pos-cart-footer {
  display: grid;
  gap: 10px;
  padding: 13px 15px 15px;
  border-top: 1px solid var(--line, #dbe3f0);
  background: #ffffff;
}

.pos-payment-group {
  margin: 0;
}

.pos-payment-group label {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 6px;
  color: var(--navy, #07164a);
  font-size: 0.7rem;
  font-weight: 700;
}

.pos-payment-group label i {
  color: var(--blue, #164c96);
}

.pos-payment-group select {
  min-height: 40px;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 0.75rem;
}

.pos-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 13px;
  border-radius: 12px;
  background: var(--navy, #07164a);
  color: #ffffff;
}

.pos-total-row span {
  color: rgba(255, 255, 255, 0.74);
  font-size: 0.68rem;
  font-weight: 700;
}

.pos-total-row strong {
  color: #ffffff;
  font-size: 1.12rem;
  white-space: nowrap;
}

.pos-complete-sale-btn {
  width: 100%;
  min-height: 44px;
  justify-content: center;
}

.pos-secondary-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.pos-secondary-actions .btn {
  width: 100%;
  min-height: 38px;
  justify-content: center;
  padding: 8px 10px;
  font-size: 0.69rem;
}

.pos-secondary-actions .btn:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

/* =========================================================
   Mobile cart shortcut
========================================================= */

.pos-mobile-cart-bar {
  position: fixed;
  right: 14px;
  bottom: 14px;
  left: 14px;
  z-index: 90;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 15px;
  border: 0;
  border-radius: 14px;
  background: var(--navy, #07164a);
  color: #ffffff;
  box-shadow: 0 18px 45px rgba(7, 22, 74, 0.32);
  cursor: pointer;
}

.pos-mobile-cart-bar > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.pos-mobile-cart-bar > span:last-child {
  font-size: 0.88rem;
  font-weight: 800;
}

/* =========================================================
   Empty-cart and checkout modals
========================================================= */

.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  place-items: center;
  padding: 20px;
  background: rgba(4, 11, 45, 0.68);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
}

.checkout-modal.show {
  display: grid;
}

.checkout-modal-card {
  width: min(480px, 100%);
  padding: 24px;
  border: 1px solid rgba(22, 76, 150, 0.16);
  border-radius: 21px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(4, 11, 45, 0.32);
  animation: posModalOpen 0.2s ease;
}

@keyframes posModalOpen {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.checkout-modal-icon {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  border-radius: 15px;
  background: var(--navy, #07164a);
  color: #ffffff;
  font-size: 1rem;
}

.empty-cart-modal-icon {
  background: var(--red, #c8102e);
}

.checkout-modal-header > span {
  display: block;
  margin-bottom: 3px;
  color: var(--red, #c8102e);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.checkout-modal-header h3 {
  margin: 0 0 6px;
  color: var(--navy, #07164a);
  font-size: 1.2rem;
}

.checkout-modal-header p {
  margin: 0;
  color: var(--muted, #667085);
  font-size: 0.76rem;
  line-height: 1.55;
}

.empty-cart-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.empty-cart-modal-actions .btn {
  min-width: 190px;
  justify-content: center;
}

.checkout-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 17px;
}

.checkout-summary > div {
  padding: 11px 12px;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 12px;
  background: var(--blue-soft-2, #f7f9fd);
}

.checkout-summary span,
.checkout-summary strong {
  display: block;
}

.checkout-summary span {
  margin-bottom: 3px;
  color: var(--muted, #667085);
  font-size: 0.62rem;
  font-weight: 700;
}

.checkout-summary strong {
  color: var(--navy, #07164a);
  font-size: 0.76rem;
}

.checkout-summary .checkout-total-summary {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-color: var(--navy, #07164a);
  background: var(--navy, #07164a);
}

.checkout-summary .checkout-total-summary span {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
}

.checkout-summary .checkout-total-summary strong {
  color: #ffffff;
  font-size: 1.03rem;
}

.checkout-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 13px;
  padding: 10px 11px;
  border-radius: 11px;
  background: #fff8eb;
  color: #8a4b00;
  font-size: 0.68rem;
  line-height: 1.45;
}

.checkout-warning i {
  margin-top: 2px;
  color: var(--warning, #f79009);
}

.checkout-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 16px;
}

.checkout-actions .btn {
  width: 100%;
  justify-content: center;
}

body.modal-open {
  overflow: hidden;
}

/* =========================================================
   Responsive POS
========================================================= */

@media (max-width: 1200px) {
  .pos-medicine-row {
    grid-template-columns:
      minmax(0, 1fr)
      76px
      82px
      64px;
    gap: 7px;
  }

  .pos-cart-column-headings,
  .cart-row {
    grid-template-columns:
      minmax(0, 1fr)
      98px
      75px
      80px
      31px;
    gap: 6px;
  }

  .cart-quantity-stepper {
    width: 98px;
    grid-template-columns: 28px 40px 28px;
  }

  .cart-qty-button {
    width: 28px;
  }

  .cart-qty {
    width: 40px !important;
  }
}

@media (max-width: 1020px) {
  .pos-workspace,
  .pos-workspace-balanced {
    grid-template-columns: 1fr;
  }

  .pos-medicine-panel,
  .pos-cart-panel {
    min-height: 520px;
  }

  .pos-cart-panel {
    min-height: unset;
  }

  .pos-cart-items,
  .cart-items {
    max-height: 420px;
  }

  .pos-mobile-cart-bar.show {
    display: flex;
  }
}

@media (max-width: 760px) {
  .pos-page-actions {
    display: grid;
  }

  .pos-page-actions > .btn {
    width: 100%;
  }

  .pos-customer-bar {
    align-items: flex-start;
    flex-direction: column;
  }

  .pos-customer-current,
  .pos-customer-actions {
    width: 100%;
  }

  .pos-customer-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .pos-customer-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .pos-medicine-panel,
  .pos-cart-panel {
    border-radius: 15px;
  }

  .pos-panel-heading {
    min-height: unset;
  }

  .pos-cart-column-headings {
    display: none;
  }

  .cart-row {
    grid-template-columns:
      minmax(0, 1fr)
      auto
      32px;
    gap: 8px;
    padding: 12px 2px;
  }

  .cart-product {
    grid-column: 1 / -1;
    padding-left: 0;
  }

  .cart-product strong {
    font-size: 0.76rem;
  }

  .cart-quantity-stepper {
    grid-column: 1;
    grid-row: 2;
    justify-self: start;
  }

  .cart-unit-price {
    display: none;
  }

  .cart-line-total {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    font-size: 0.76rem;
  }

  .pos-remove-btn {
    grid-column: 3;
    grid-row: 2;
  }

  .checkout-summary,
  .checkout-actions {
    grid-template-columns: 1fr;
  }

  .checkout-summary .checkout-total-summary {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .pos-customer-actions,
  .pos-secondary-actions {
    grid-template-columns: 1fr;
  }

  .customer-search-result {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .customer-search-select {
    display: none;
  }

  .pos-medicine-row {
    grid-template-columns:
      minmax(0, 1fr)
      auto;
    gap: 5px 10px;
    padding: 11px 13px;
  }

  .pos-medicine-name {
    grid-column: 1;
    grid-row: 1;
  }

  .pos-medicine-stock {
    grid-column: 1;
    grid-row: 2;
    text-align: left;
  }

  .pos-medicine-price {
    grid-column: 2;
    grid-row: 1;
  }

  .pos-medicine-add {
    grid-column: 2;
    grid-row: 2;
  }

  .empty-cart-modal-actions .btn {
    width: 100%;
    min-width: 0;
  }
}

/* =========================================================
   MOBILE SIDEBAR BLUR FIX
========================================================= */

@media (max-width: 900px) {
  .sidebar {
    position: fixed;
    z-index: 1200;
  }

  .sidebar-overlay {
    position: fixed;
    inset: 0;
    z-index: 1100;

    /* Dim the background without blurring it */
    background: rgba(4, 11, 45, 0.55);
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .sidebar.mobile-open {
    z-index: 1200;
    filter: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  body.menu-open .app-layout,
  body.menu-open .main-content,
  body.menu-open .topbar,
  body.menu-open .sidebar {
    filter: none !important;
  }
}

/* =========================================================
   REPORTS MODULE
   Temporary consolidated block before full CSS cleanup
========================================================= */

/* =========================================================
   Report navigation
========================================================= */

.report-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  padding: 6px;
  overflow-x: auto;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 15px;
  background: #ffffff;
  box-shadow: var(--shadow-soft, 0 8px 24px rgba(7, 22, 74, 0.06));
}

.pos-medicine-list::-webkit-scrollbar {
  width: 7px;
}

.report-nav-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  flex: 0 0 auto;
  padding: 9px 12px;
  border-radius: 10px;
  color: var(--muted, #667085);
  font-size: 0.72rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.16s ease,
    color 0.16s ease,
    transform 0.16s ease;
}

.report-nav-link i {
  color: var(--blue, #164c96);
  font-size: 0.7rem;
}

.report-nav-link:hover {
  background: var(--blue-soft-2, #f7f9fd);
  color: var(--navy, #07164a);
}

.report-nav-link.active {
  background: var(--navy, #07164a);
  color: #ffffff;
  box-shadow: 0 7px 18px rgba(7, 22, 74, 0.18);
}

.report-nav-link.active i {
  color: #ffffff;
}

/* =========================================================
   Report toolbar and filters
========================================================= */

.report-toolbar {
  align-items: stretch;
  margin-bottom: 16px;
}

.report-filter-form {
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex-wrap: wrap;
}

.report-search-field,
.report-date-field,
.report-select-field {
  position: relative;
  min-width: 0;
}

.report-search-field {
  width: min(430px, 100%);
  flex: 1 1 300px;
}

.report-date-field {
  flex: 0 1 190px;
}

.report-select-field {
  flex: 0 1 190px;
}

.report-search-field > i,
.report-date-field > i,
.report-select-field > i {
  position: absolute;
  top: 50%;
  left: 13px;
  z-index: 2;
  transform: translateY(-50%);
  color: var(--blue, #164c96);
  font-size: 0.72rem;
  pointer-events: none;
}

.report-search-field input,
.report-date-field input,
.report-select-field select {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px 9px 38px;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 11px;
  background: #ffffff;
  color: var(--charcoal, #263238);
  font: inherit;
  font-size: 0.74rem;
  outline: none;
}

.report-search-field input:focus,
.report-date-field input:focus,
.report-select-field select:focus {
  border-color: var(--blue, #164c96);
  box-shadow: 0 0 0 3px rgba(22, 76, 150, 0.09);
}

.report-range-form {
  flex: 1;
}

/* =========================================================
   Report period banner
========================================================= */

.report-period-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 13px 15px;
  border: 1px solid rgba(22, 76, 150, 0.16);
  border-radius: 15px;
  background: var(--blue-soft-2, #f7f9fd);
}

.report-period-banner > div {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 11px;
}

.report-period-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--navy, #07164a);
  color: #ffffff;
  font-size: 0.82rem;
}

.report-period-banner small,
.report-period-banner strong {
  display: block;
}

.report-period-banner small {
  margin-bottom: 2px;
  color: var(--muted, #667085);
  font-size: 0.63rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.report-period-banner strong {
  color: var(--navy, #07164a);
  font-size: 0.84rem;
}

.report-gross-label {
  padding: 6px 9px;
  border-radius: 999px;
  background: #fff3db;
  color: #9a5700;
  font-size: 0.64rem;
  font-weight: 800;
  white-space: nowrap;
}

/* =========================================================
   Report statistics
========================================================= */

.report-stats-grid {
  margin-bottom: 16px;
}

.report-stats-six {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-stats-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.report-stats-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-stat-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  text-decoration: none;
}

.report-stat-card::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -32px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(22, 76, 150, 0.04);
  pointer-events: none;
}

.report-stat-card h2 {
  overflow-wrap: anywhere;
  font-size: clamp(1rem, 1.5vw, 1.3rem);
}

.report-stat-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted, #667085);
  font-size: 0.62rem;
  line-height: 1.4;
}

.report-stat-card.active {
  border-color: var(--navy, #07164a);
  box-shadow:
    0 0 0 2px rgba(7, 22, 74, 0.08),
    var(--shadow-soft, 0 8px 24px rgba(7, 22, 74, 0.06));
}

.report-stat-card.danger-card {
  border-color: rgba(200, 16, 46, 0.14);
}

.report-stat-card.warning-card {
  border-color: rgba(247, 144, 9, 0.2);
}

.report-stat-card.success-card {
  border-color: rgba(22, 163, 74, 0.17);
}

/* =========================================================
   Report cards
========================================================= */

.report-card {
  min-width: 0;
  overflow: hidden;
}

.report-card-header {
  align-items: flex-start;
}

.report-card-title {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.report-card-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
  font-size: 0.78rem;
}

.report-card-title h3 {
  margin-bottom: 3px;
}

.report-insight-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1.12fr);
  gap: 16px;
  margin-bottom: 16px;
}

/* =========================================================
   Report tables
========================================================= */

.report-table-wrap {
  margin: 0;
}

.report-table {
  min-width: 780px;
}

.report-table th {
  white-space: nowrap;
}

.report-table td {
  vertical-align: middle;
}

.report-table-wrap.compact .report-table {
  min-width: 540px;
}

.compact-report-table th,
.compact-report-table td {
  padding-top: 11px;
  padding-bottom: 11px;
}

.report-primary-cell {
  min-width: 170px;
  display: flex;
  align-items: center;
  gap: 9px;
}

.report-cell-icon {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
  font-size: 0.68rem;
}

.report-primary-cell > div {
  min-width: 0;
}

.report-primary-cell strong,
.report-primary-cell small {
  display: block;
}

.report-primary-cell strong {
  color: var(--navy, #07164a);
  font-size: 0.76rem;
}

.report-primary-cell small {
  margin-top: 2px;
  color: var(--muted, #667085);
  font-size: 0.61rem;
}

.report-code {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--blue-soft-2, #f7f9fd);
  color: var(--navy, #07164a);
  font-size: 0.67rem;
  font-weight: 800;
  white-space: nowrap;
}

.report-date,
.report-user {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.report-date i,
.report-user i {
  color: var(--blue, #164c96);
  font-size: 0.65rem;
}

.report-money {
  color: var(--navy, #07164a);
  font-weight: 800;
  white-space: nowrap;
}

.report-profit {
  color: var(--success-dark, #166534);
  font-weight: 800;
  white-space: nowrap;
}

.report-quantity {
  color: var(--navy, #07164a);
  font-size: 0.78rem;
}

.report-rank {
  width: 34px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 9px;
  background: var(--blue-soft-2, #f7f9fd);
  color: var(--navy, #07164a);
  font-size: 0.67rem;
  font-weight: 900;
}

.report-rank.top {
  background: #fff3d3;
  color: #946000;
}

.expiry-days {
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.expiry-days.danger {
  color: var(--red, #c8102e);
}

.expiry-days.warning {
  color: #a35d00;
}

.expiry-days.good {
  color: var(--success-dark, #166534);
}

.stock-number {
  min-width: 34px;
  display: inline-grid;
  place-items: center;
  padding: 5px 7px;
  border-radius: 8px;
}

.stock-number.danger {
  background: #fff0f2;
  color: var(--red, #c8102e);
}

.stock-number.warning {
  background: #fff7e8;
  color: #a35d00;
}

.stock-shortage {
  color: var(--red, #c8102e);
  font-weight: 800;
}

.suggested-action {
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.suggested-action.danger {
  color: var(--red, #c8102e);
}

.suggested-action.warning {
  color: #a35d00;
}

.report-row-danger {
  background: rgba(200, 16, 46, 0.012);
}

.report-row-warning {
  background: rgba(247, 144, 9, 0.015);
}

/* =========================================================
   Report actions
========================================================= */

.table-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 8px;
  background: #ffffff;
  color: var(--navy, #07164a);
  font-size: 0.64rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.table-action-link:hover {
  border-color: var(--blue, #164c96);
  background: var(--blue-soft-2, #f7f9fd);
  color: var(--blue, #164c96);
}

.table-action-link.primary {
  border-color: var(--navy, #07164a);
  background: var(--navy, #07164a);
  color: #ffffff;
}

.table-action-link.primary:hover {
  background: var(--blue, #164c96);
  color: #ffffff;
}

/* =========================================================
   Summary lists
========================================================= */

.report-summary-list {
  display: grid;
  padding: 4px 16px 16px;
}

.report-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line, #dbe3f0);
}

.report-summary-row:last-child {
  border-bottom: 0;
}

.report-summary-row.highlighted {
  margin-top: 5px;
  padding: 12px;
  border: 0;
  border-radius: 11px;
  background: var(--navy, #07164a);
  color: #ffffff;
}

.report-summary-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--navy, #07164a);
  font-size: 0.72rem;
  font-weight: 800;
}

.report-summary-label i {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
  font-size: 0.61rem;
}

.report-summary-row > div {
  text-align: right;
}

.report-summary-row small,
.report-summary-row strong {
  display: block;
}

.report-summary-row small {
  margin-bottom: 2px;
  color: var(--muted, #667085);
  font-size: 0.6rem;
}

.report-summary-row strong {
  color: var(--navy, #07164a);
  font-size: 0.76rem;
}

.report-summary-row.highlighted .report-summary-label,
.report-summary-row.highlighted strong {
  color: #ffffff;
}

.report-summary-row.highlighted .report-summary-label i {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

/* =========================================================
   Information note
========================================================= */

.report-information-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 16px 16px;
  padding: 11px 12px;
  border-radius: 11px;
  background: #fff8eb;
  color: #8a4b00;
}

.report-information-note i {
  margin-top: 2px;
  color: var(--warning, #f79009);
}

.report-information-note p {
  margin: 0;
  font-size: 0.67rem;
  line-height: 1.5;
}

/* =========================================================
   Empty states
========================================================= */

.report-empty-state {
  min-height: 190px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 28px;
  text-align: left;
}

.report-empty-state > span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 15px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
  font-size: 1rem;
}

.report-empty-state.success > span {
  background: #eaf8ef;
  color: var(--success-dark, #166534);
}

.report-empty-state > div {
  max-width: 430px;
}

.report-empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy, #07164a);
  font-size: 0.86rem;
}

.report-empty-state p {
  margin: 0;
  color: var(--muted, #667085);
  font-size: 0.72rem;
  line-height: 1.5;
}

.report-mini-empty {
  min-height: 165px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 22px;
  color: var(--muted, #667085);
  font-size: 0.72rem;
  text-align: center;
}

.report-mini-empty i {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
}

/* =========================================================
   Responsive reports
========================================================= */

@media (max-width: 1250px) {
  .report-stats-five {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .report-stats-six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .report-stats-four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .report-insight-grid {
    grid-template-columns: 1fr;
  }

  .report-toolbar {
    display: grid;
  }

  .report-toolbar > .btn {
    width: 100%;
  }

  .report-filter-form {
    width: 100%;
  }

  .report-search-field {
    width: auto;
  }
}

@media (max-width: 760px) {
  .report-nav {
    border-radius: 12px;
  }

  .report-nav-link {
    min-height: 36px;
    padding: 8px 10px;
  }

  .report-period-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .report-stats-five,
  .report-stats-six,
  .report-stats-four {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-filter-form,
  .report-range-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .report-search-field,
  .report-date-field,
  .report-select-field {
    width: 100%;
    flex: auto;
  }

  .report-search-field {
    grid-column: 1 / -1;
  }

  .report-card-header {
    display: grid;
  }

  .report-empty-state {
    align-items: center;
    flex-direction: column;
    text-align: center;
  }

  .report-empty-state .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 520px) {
  .report-stats-five,
  .report-stats-six,
  .report-stats-four {
    grid-template-columns: 1fr;
  }

  .report-filter-form,
  .report-range-form {
    grid-template-columns: 1fr;
  }

  .report-search-field {
    grid-column: auto;
  }

  .report-filter-form .btn {
    width: 100%;
    justify-content: center;
  }

  .report-period-banner .record-count,
  .report-gross-label {
    width: 100%;
    text-align: center;
  }

  .report-card-title {
    align-items: center;
  }

  .report-summary-row {
    align-items: flex-start;
  }
}

/* =========================================================
   USERS ADMINISTRATION MODULE
========================================================= */

/* =========================================================
   Administration navigation
========================================================= */

.administration-nav {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  align-items: stretch;
  gap: 9px;
  margin-bottom: 16px;
  padding: 8px;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 15px;
  background: #ffffff;
  box-shadow: var(--shadow-soft, 0 8px 24px rgba(7, 22, 74, 0.06));
}

.administration-nav-link {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 13px;
  border-radius: 10px;
  background: var(--blue-soft-2, #f7f9fd);
  color: var(--muted, #667085);
  font-size: 0.73rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.administration-nav-link i {
  color: var(--blue, #164c96);
}

.administration-nav-link:hover {
  background: var(--blue-soft, #eaf0fb);
  color: var(--navy, #07164a);
}

.administration-nav-link.active {
  background: var(--navy, #07164a);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(7, 22, 74, 0.18);
}

.administration-nav-link.active i {
  color: #ffffff;
}

/* =========================================================
   User summary cards
========================================================= */

.users-stats-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
}

.user-stat-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.user-stat-card::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -34px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(22, 76, 150, 0.04);
  pointer-events: none;
}

.user-stat-card h2 {
  font-size: clamp(1.05rem, 1.5vw, 1.35rem);
}

.user-stat-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted, #667085);
  font-size: 0.61rem;
  line-height: 1.4;
}

.user-stat-card.success-card {
  border-color: rgba(22, 163, 74, 0.16);
}

.user-stat-card.danger-card {
  border-color: rgba(200, 16, 46, 0.15);
}

.user-stat-card.admin-card {
  border-color: rgba(7, 22, 74, 0.18);
}

/* =========================================================
   Users toolbar
========================================================= */

.users-toolbar {
  align-items: stretch;
  margin-bottom: 16px;
}

.users-search-form {
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex: 1;
}

.users-search-field {
  position: relative;
  width: min(450px, 100%);
  min-width: 230px;
}

.users-search-field > i {
  position: absolute;
  top: 50%;
  left: 14px;
  z-index: 2;
  transform: translateY(-50%);
  color: var(--blue, #164c96);
  pointer-events: none;
}

.users-search-field input {
  width: 100%;
  min-height: 42px;
  padding: 9px 13px 9px 39px;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 11px;
  background: #ffffff;
  color: var(--charcoal, #263238);
  font: inherit;
  font-size: 0.75rem;
  outline: none;
}

.users-search-field input:focus {
  border-color: var(--blue, #164c96);
  box-shadow: 0 0 0 3px rgba(22, 76, 150, 0.09);
}

/* =========================================================
   Users card and table
========================================================= */

.users-card {
  overflow: hidden;
}

.users-card-header {
  align-items: flex-start;
}

.users-card-title {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.users-card-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
  font-size: 0.8rem;
}

.users-table-wrap {
  margin: 0;
}

.users-table {
  min-width: 880px;
}

.users-table th {
  white-space: nowrap;
}

.users-table td {
  vertical-align: middle;
}

.current-user-row {
  background: rgba(22, 76, 150, 0.025);
}

.user-primary-cell {
  min-width: 190px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--navy, #07164a);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.user-primary-details {
  min-width: 0;
}

.user-name-row {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}

.user-name-row strong {
  overflow: hidden;
  color: var(--navy, #07164a);
  font-size: 0.77rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-primary-details small {
  display: block;
  margin-top: 3px;
  color: var(--muted, #667085);
  font-size: 0.61rem;
}

.current-user-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 999px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
  font-size: 0.57rem;
  font-weight: 900;
  white-space: nowrap;
}

.username-label,
.user-created-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.username-label {
  color: var(--navy, #07164a);
  font-weight: 700;
}

.username-label i,
.user-created-date i {
  color: var(--blue, #164c96);
  font-size: 0.65rem;
}

.user-table-actions {
  flex-wrap: nowrap;
}

.user-action-link {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 8px;
  background: #ffffff;
  color: var(--navy, #07164a);
  font-size: 0.62rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.user-action-link:hover {
  border-color: var(--blue, #164c96);
  background: var(--blue-soft-2, #f7f9fd);
  color: var(--blue, #164c96);
}

.user-action-link.danger {
  border-color: rgba(200, 16, 46, 0.2);
  background: #fff4f5;
  color: var(--red, #c8102e);
}

.user-action-link.danger:hover {
  background: var(--red, #c8102e);
  color: #ffffff;
}

.user-action-link.success {
  border-color: rgba(22, 163, 74, 0.22);
  background: #f0fff5;
  color: var(--success-dark, #166534);
}

.user-action-link.success:hover {
  background: var(--success-dark, #166534);
  color: #ffffff;
}

.user-current-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--blue-soft-2, #f7f9fd);
  font-size: 0.61rem;
  font-weight: 800;
  white-space: nowrap;
}

/* =========================================================
   Users empty state
========================================================= */

.users-empty-state {
  min-height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 28px;
}

.users-empty-state > span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 15px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
  font-size: 1rem;
}

.users-empty-state > div {
  max-width: 400px;
}

.users-empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy, #07164a);
}

.users-empty-state p {
  margin: 0;
  color: var(--muted, #667085);
  font-size: 0.72rem;
}

/* =========================================================
   User forms
========================================================= */

.users-form-actions-top {
  margin-bottom: 16px;
}

.users-form-alert {
  margin-bottom: 16px;
}

.user-form-layout,
.password-reset-layout {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(260px, 320px);
  align-items: start;
  gap: 16px;
}

.user-form-card {
  min-width: 0;
  overflow: hidden;
}

.user-form-card-header {
  align-items: flex-start;
}

.user-management-form {
  display: grid;
  gap: 16px;
  padding-top: 0;
}

.user-form-section {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 14px;
  background: #ffffff;
}

.user-form-section legend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 7px;
  color: var(--navy, #07164a);
  font-size: 0.75rem;
  font-weight: 900;
}

.user-form-section legend > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
  font-size: 0.64rem;
}

.user-management-form .form-group label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.user-management-form .form-group label i {
  color: var(--blue, #164c96);
  font-size: 0.68rem;
}

.user-form-submit-row {
  margin-top: 0;
}

/* =========================================================
   Guidance and account cards
========================================================= */

.user-guidance-card,
.user-account-card,
.password-user-summary {
  padding: 20px;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 17px;
  background: #ffffff;
  box-shadow: var(--shadow-soft, 0 8px 24px rgba(7, 22, 74, 0.06));
}

.user-guidance-icon,
.user-account-avatar,
.password-user-avatar {
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  margin-bottom: 13px;
  border-radius: 15px;
  background: var(--navy, #07164a);
  color: #ffffff;
  font-size: 1rem;
}

.user-guidance-card h3,
.user-account-card h3,
.password-user-summary h3 {
  margin: 0 0 5px;
  color: var(--navy, #07164a);
  font-size: 1rem;
}

.user-guidance-list {
  display: grid;
  margin-top: 16px;
}

.user-guidance-list > div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line, #dbe3f0);
}

.user-guidance-list > div:last-child {
  border-bottom: 0;
}

.user-guidance-list > div > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
  font-size: 0.68rem;
}

.user-guidance-list strong {
  display: block;
  margin-bottom: 3px;
  color: var(--navy, #07164a);
  font-size: 0.73rem;
}

.user-guidance-list p {
  margin: 0;
  color: var(--muted, #667085);
  font-size: 0.66rem;
  line-height: 1.5;
}

.user-security-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding: 11px;
  border-radius: 11px;
  background: #fff8eb;
  color: #8a4b00;
}

.user-security-note i {
  margin-top: 2px;
  color: var(--warning, #f79009);
}

.user-security-note p {
  margin: 0;
  font-size: 0.65rem;
  line-height: 1.5;
}

.user-account-card,
.password-user-summary {
  text-align: center;
}

.user-account-avatar,
.password-user-avatar {
  margin-right: auto;
  margin-left: auto;
}

.user-account-card > small,
.password-user-summary > small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted, #667085);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.user-account-card > p,
.password-user-summary > p {
  margin: 0;
  color: var(--blue, #164c96);
  font-size: 0.72rem;
  font-weight: 800;
}

.user-account-card > .btn {
  width: 100%;
  margin-top: 14px;
  justify-content: center;
}

.user-account-facts,
.password-user-meta {
  display: grid;
  gap: 0;
  margin-top: 16px;
  text-align: left;
}

.user-account-facts > div,
.password-user-meta > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line, #dbe3f0);
}

.user-account-facts > div:last-child,
.password-user-meta > div:last-child {
  border-bottom: 0;
}

.user-account-facts span,
.password-user-meta > div > span:first-child {
  color: var(--muted, #667085);
  font-size: 0.67rem;
  font-weight: 700;
}

.user-account-facts strong,
.password-user-meta strong {
  color: var(--navy, #07164a);
  font-size: 0.7rem;
}

/* =========================================================
   Self-edit and password notices
========================================================= */

.user-self-edit-note,
.user-password-warning {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px;
  border-radius: 13px;
}

.user-self-edit-note {
  border: 1px solid rgba(22, 76, 150, 0.15);
  background: var(--blue-soft-2, #f7f9fd);
}

.user-password-warning {
  border: 1px solid rgba(247, 144, 9, 0.2);
  background: #fff8eb;
}

.user-self-edit-note > span,
.user-password-warning > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
}

.user-self-edit-note > span {
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
}

.user-password-warning > span {
  background: #ffebbd;
  color: #9a5700;
}

.user-self-edit-note strong,
.user-password-warning strong {
  display: block;
  margin-bottom: 3px;
  color: var(--navy, #07164a);
  font-size: 0.75rem;
}

.user-self-edit-note p,
.user-password-warning p {
  margin: 0;
  color: var(--muted, #667085);
  font-size: 0.67rem;
  line-height: 1.5;
}

/* =========================================================
   Responsive users administration
========================================================= */

@media (max-width: 1250px) {
  .users-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  .user-form-layout,
  .password-reset-layout {
    grid-template-columns: 1fr;
  }

  .user-guidance-card,
  .user-account-card,
  .password-user-summary {
    order: -1;
  }

  .user-account-card,
  .password-user-summary {
    text-align: left;
  }

  .user-account-avatar,
  .password-user-avatar {
    margin-right: 0;
    margin-left: 0;
  }
}

@media (max-width: 760px) {
  .administration-nav {
    display: flex;
    align-items: stretch;
    overflow-x: auto;
  }

  .administration-nav-link {
    min-width: 155px;
    flex: 0 0 auto;
  }

  .users-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .users-toolbar {
    display: grid;
  }

  .users-search-form {
    display: grid;
    grid-template-columns: 1fr auto auto;
  }

  .users-search-field {
    width: 100%;
    min-width: 0;
  }

  .users-toolbar > .btn {
    width: 100%;
  }

  .users-card-header {
    display: grid;
  }

  .users-empty-state {
    align-items: center;
    flex-direction: column;
    text-align: center;
  }

  .users-empty-state .btn {
    width: 100%;
    justify-content: center;
  }

  .users-form-actions-top {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .users-form-actions-top .btn {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 560px) {
  .users-stats-grid {
    grid-template-columns: 1fr;
  }

  .users-search-form {
    grid-template-columns: 1fr;
  }

  .users-search-form .btn {
    width: 100%;
    justify-content: center;
  }

  .users-form-actions-top {
    grid-template-columns: 1fr;
  }

  .user-form-section {
    padding: 13px;
  }

  .user-form-submit-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .user-form-submit-row .btn {
    width: 100%;
    justify-content: center;
  }
}

/* =========================================================
   STAFF ADMINISTRATION MODULE
========================================================= */

/* =========================================================
   Staff statistics
========================================================= */

.staff-stats-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 16px;
}

.staff-stat-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
}

.staff-stat-card::after {
  content: "";
  position: absolute;
  right: -28px;
  bottom: -35px;
  width: 94px;
  height: 94px;
  border-radius: 50%;
  background: rgba(22, 76, 150, 0.04);
  pointer-events: none;
}

.staff-stat-card h2 {
  overflow-wrap: anywhere;
  font-size: clamp(1rem, 1.5vw, 1.32rem);
}

.staff-stat-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted, #667085);
  font-size: 0.61rem;
  line-height: 1.4;
}

.staff-stat-card.success-card {
  border-color: rgba(22, 163, 74, 0.17);
}

.staff-stat-card.warning-card {
  border-color: rgba(247, 144, 9, 0.2);
}

.staff-stat-card.danger-card {
  border-color: rgba(200, 16, 46, 0.16);
}

/* =========================================================
   Staff directory toolbar
========================================================= */

.staff-toolbar {
  align-items: stretch;
  margin-bottom: 16px;
}

.staff-search-form {
  min-width: 0;
  display: flex;
  align-items: stretch;
  gap: 8px;
  flex: 1;
}

.staff-search-field {
  position: relative;
  width: min(540px, 100%);
  min-width: 240px;
}

.staff-search-field > i {
  position: absolute;
  top: 50%;
  left: 14px;
  z-index: 2;
  transform: translateY(-50%);
  color: var(--blue, #164c96);
  font-size: 0.72rem;
  pointer-events: none;
}

.staff-search-field input {
  width: 100%;
  min-height: 42px;
  padding: 9px 13px 9px 39px;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 11px;
  background: #ffffff;
  color: var(--charcoal, #263238);
  font: inherit;
  font-size: 0.75rem;
  outline: none;
}

.staff-search-field input:focus {
  border-color: var(--blue, #164c96);
  box-shadow: 0 0 0 3px rgba(22, 76, 150, 0.09);
}

/* =========================================================
   Staff directory card and table
========================================================= */

.staff-directory-card,
.staff-recent-sales-card {
  min-width: 0;
  overflow: hidden;
}

.staff-card-header {
  align-items: flex-start;
}

.staff-card-title {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.staff-card-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
  font-size: 0.8rem;
}

.staff-card-title h3 {
  margin-bottom: 3px;
}

.staff-table-wrap {
  margin: 0;
}

.staff-directory-table {
  min-width: 1120px;
}

.staff-sales-table {
  min-width: 760px;
}

.staff-directory-table th,
.staff-sales-table th {
  white-space: nowrap;
}

.staff-directory-table td,
.staff-sales-table td {
  vertical-align: middle;
}

.inactive-staff-row {
  background: rgba(200, 16, 46, 0.012);
}

.staff-primary-cell {
  min-width: 210px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.staff-avatar {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--navy, #07164a);
  color: #ffffff;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.staff-primary-cell > div {
  min-width: 0;
}

.staff-primary-cell strong,
.staff-primary-cell small {
  display: block;
}

.staff-primary-cell strong {
  overflow: hidden;
  color: var(--navy, #07164a);
  font-size: 0.76rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-primary-cell small {
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted, #667085);
  font-size: 0.61rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-primary-cell small i {
  margin-right: 4px;
  color: var(--blue, #164c96);
}

.staff-job-title {
  color: var(--navy, #07164a);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.employment-label,
.staff-contact-link,
.staff-date-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.employment-label {
  color: var(--charcoal, #263238);
  font-size: 0.7rem;
  font-weight: 700;
}

.employment-label i,
.staff-contact-link i,
.staff-date-label i {
  color: var(--blue, #164c96);
  font-size: 0.65rem;
}

.staff-contact-link {
  color: var(--navy, #07164a);
  font-size: 0.7rem;
  font-weight: 700;
  text-decoration: none;
}

.staff-contact-link:hover {
  color: var(--blue, #164c96);
}

.staff-muted-value {
  color: var(--muted, #667085);
  font-size: 0.68rem;
}

.staff-login-cell {
  display: grid;
  justify-items: start;
  gap: 4px;
}

.staff-login-cell small {
  color: var(--muted, #667085);
  font-size: 0.6rem;
  white-space: nowrap;
}

.staff-table-actions {
  flex-wrap: nowrap;
}

.staff-action-link {
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 6px 8px;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 8px;
  background: #ffffff;
  color: var(--navy, #07164a);
  font-size: 0.62rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.staff-action-link:hover {
  border-color: var(--blue, #164c96);
  background: var(--blue-soft-2, #f7f9fd);
  color: var(--blue, #164c96);
}

.staff-action-link.danger {
  border-color: rgba(200, 16, 46, 0.2);
  background: #fff4f5;
  color: var(--red, #c8102e);
}

.staff-action-link.danger:hover {
  background: var(--red, #c8102e);
  color: #ffffff;
}

.staff-action-link.success {
  border-color: rgba(22, 163, 74, 0.22);
  background: #f0fff5;
  color: var(--success-dark, #166534);
}

.staff-action-link.success:hover {
  background: var(--success-dark, #166534);
  color: #ffffff;
}

/* =========================================================
   Staff empty states
========================================================= */

.staff-empty-state {
  min-height: 215px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  padding: 28px;
}

.staff-empty-state > span {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 15px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
  font-size: 1rem;
}

.staff-empty-state > div {
  max-width: 430px;
}

.staff-empty-state strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy, #07164a);
  font-size: 0.85rem;
}

.staff-empty-state p {
  margin: 0;
  color: var(--muted, #667085);
  font-size: 0.71rem;
  line-height: 1.5;
}

.staff-mini-empty {
  min-height: 170px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 9px;
  padding: 24px;
  color: var(--muted, #667085);
  font-size: 0.72rem;
  text-align: center;
}

.staff-mini-empty i {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
}

/* =========================================================
   Staff forms
========================================================= */

.staff-form-actions-top,
.staff-profile-actions {
  margin-bottom: 16px;
}

.staff-form-alert {
  margin-bottom: 16px;
}

.staff-form-layout {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(270px, 325px);
  align-items: start;
  gap: 16px;
}

.staff-form-card {
  min-width: 0;
  overflow: hidden;
}

.staff-form-card-header {
  align-items: flex-start;
}

.staff-management-form {
  display: grid;
  gap: 16px;
  padding-top: 0;
}

.staff-form-section {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 14px;
  background: #ffffff;
}

.staff-form-section legend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 7px;
  color: var(--navy, #07164a);
  font-size: 0.75rem;
  font-weight: 900;
}

.staff-form-section legend > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
  font-size: 0.64rem;
}

.staff-management-form .form-group label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.staff-management-form .form-group label i {
  color: var(--blue, #164c96);
  font-size: 0.68rem;
}

.staff-management-form input[type="date"] {
  cursor: pointer;
}

.staff-form-submit-row {
  margin-top: 0;
}

.staff-inline-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 11px;
  background: var(--blue-soft-2, #f7f9fd);
  color: var(--navy, #07164a);
}

.staff-inline-note i {
  margin-top: 2px;
  color: var(--blue, #164c96);
}

.staff-inline-note p {
  margin: 0;
  font-size: 0.66rem;
  line-height: 1.5;
}

/* =========================================================
   Staff guidance and edit summary
========================================================= */

.staff-guidance-card,
.staff-account-summary {
  padding: 20px;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 17px;
  background: #ffffff;
  box-shadow: var(--shadow-soft, 0 8px 24px rgba(7, 22, 74, 0.06));
}

.staff-guidance-icon,
.staff-profile-avatar-large {
  width: 51px;
  height: 51px;
  display: grid;
  place-items: center;
  margin-bottom: 13px;
  border-radius: 15px;
  background: var(--navy, #07164a);
  color: #ffffff;
  font-size: 1rem;
}

.staff-guidance-card h3,
.staff-account-summary h3 {
  margin: 0 0 5px;
  color: var(--navy, #07164a);
  font-size: 1rem;
}

.staff-guidance-intro {
  margin: 0;
  color: var(--muted, #667085);
  font-size: 0.69rem;
  line-height: 1.5;
}

.staff-guidance-list {
  display: grid;
  margin-top: 15px;
}

.staff-guidance-list > div {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line, #dbe3f0);
}

.staff-guidance-list > div:last-child {
  border-bottom: 0;
}

.staff-guidance-list > div > span {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
  font-size: 0.68rem;
}

.staff-guidance-list strong {
  display: block;
  margin-bottom: 3px;
  color: var(--navy, #07164a);
  font-size: 0.73rem;
}

.staff-guidance-list p {
  margin: 0;
  color: var(--muted, #667085);
  font-size: 0.66rem;
  line-height: 1.5;
}

.staff-security-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding: 11px;
  border-radius: 11px;
  background: #fff8eb;
  color: #8a4b00;
}

.staff-security-note i {
  margin-top: 2px;
  color: var(--warning, #f79009);
}

.staff-security-note p {
  margin: 0;
  font-size: 0.65rem;
  line-height: 1.5;
}

.staff-available-logins {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
  padding: 12px;
  border-radius: 11px;
  background: var(--blue-soft-2, #f7f9fd);
}

.staff-available-logins span {
  color: var(--muted, #667085);
  font-size: 0.66rem;
  font-weight: 800;
}

.staff-available-logins strong {
  color: var(--navy, #07164a);
  font-size: 1rem;
}

.staff-account-summary {
  text-align: center;
}

.staff-profile-avatar-large {
  margin-right: auto;
  margin-left: auto;
}

.staff-account-summary > small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted, #667085);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.staff-account-summary > p {
  margin: 0;
  color: var(--blue, #164c96);
  font-size: 0.72rem;
  font-weight: 800;
}

.staff-account-summary > .btn {
  width: 100%;
  margin-top: 14px;
  justify-content: center;
}

.staff-account-facts {
  display: grid;
  margin-top: 16px;
  text-align: left;
}

.staff-account-facts > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line, #dbe3f0);
}

.staff-account-facts > div:last-child {
  border-bottom: 0;
}

.staff-account-facts span {
  color: var(--muted, #667085);
  font-size: 0.67rem;
  font-weight: 700;
}

.staff-account-facts strong {
  color: var(--navy, #07164a);
  font-size: 0.7rem;
}

/* =========================================================
   Staff profile view
========================================================= */

.staff-profile-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: 20px;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    var(--navy, #07164a),
    var(--blue, #164c96)
  );
  color: #ffffff;
  box-shadow: 0 13px 30px rgba(7, 22, 74, 0.16);
}

.staff-profile-identity {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.staff-profile-initials {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.staff-profile-label {
  display: block;
  margin-bottom: 3px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.staff-profile-identity h2 {
  margin: 0 0 4px;
  color: #ffffff;
  font-size: clamp(1.2rem, 2.2vw, 1.65rem);
}

.staff-profile-identity p {
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.74rem;
}

.staff-profile-hero-status {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.staff-profile-hero-status small {
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.64rem;
  font-weight: 700;
}

.staff-profile-grid {
  display: grid;
  grid-template-columns:
    minmax(0, 1.25fr)
    minmax(300px, 0.75fr);
  gap: 16px;
  margin-bottom: 16px;
}

.staff-profile-grid.secondary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.staff-profile-card {
  min-width: 0;
  overflow: hidden;
}

.staff-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 4px 16px 16px;
}

.staff-detail-list.compact {
  grid-template-columns: 1fr;
}

.staff-detail-list > div {
  min-width: 0;
  padding: 13px 12px;
  border-bottom: 1px solid var(--line, #dbe3f0);
}

.staff-detail-list > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.staff-detail-list.compact > div:nth-last-child(-n + 2) {
  border-bottom: 1px solid var(--line, #dbe3f0);
}

.staff-detail-list.compact > div:last-child {
  border-bottom: 0;
}

.staff-detail-list .full-detail-row {
  grid-column: 1 / -1;
}

.staff-detail-list span,
.staff-detail-list strong {
  display: block;
}

.staff-detail-list > div > span:first-child {
  margin-bottom: 5px;
  color: var(--muted, #667085);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.staff-detail-list > div > span:first-child i {
  width: 16px;
  color: var(--blue, #164c96);
}

.staff-detail-list strong {
  color: var(--navy, #07164a);
  font-size: 0.72rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.staff-detail-list strong a {
  color: var(--navy, #07164a);
  text-decoration: none;
}

.staff-detail-list strong a:hover {
  color: var(--blue, #164c96);
}

.staff-login-profile {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 0 16px 8px;
  padding: 13px;
  border-radius: 12px;
  background: var(--blue-soft-2, #f7f9fd);
}

.staff-login-profile-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--navy, #07164a);
  color: #ffffff;
  font-size: 0.75rem;
}

.staff-login-profile small,
.staff-login-profile strong {
  display: block;
}

.staff-login-profile small {
  margin-bottom: 2px;
  color: var(--muted, #667085);
  font-size: 0.6rem;
  font-weight: 800;
}

.staff-login-profile strong {
  color: var(--navy, #07164a);
  font-size: 0.78rem;
}

.staff-login-action {
  margin: 0 16px 16px;
}

.staff-no-login-state {
  min-height: 245px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 8px;
  padding: 25px;
  text-align: center;
}

.staff-no-login-state > span {
  width: 49px;
  height: 49px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
}

.staff-no-login-state strong {
  color: var(--navy, #07164a);
  font-size: 0.82rem;
}

.staff-no-login-state p {
  max-width: 310px;
  margin: 0;
  color: var(--muted, #667085);
  font-size: 0.68rem;
  line-height: 1.5;
}

.staff-notes-box {
  min-height: 125px;
  padding: 16px;
  color: var(--charcoal, #263238);
  font-size: 0.71rem;
  line-height: 1.7;
  white-space: normal;
}

.staff-performance-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.staff-invoice-code {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 8px;
  background: var(--blue-soft-2, #f7f9fd);
  color: var(--navy, #07164a);
  font-size: 0.67rem;
  font-weight: 800;
  white-space: nowrap;
}

.staff-money-value {
  color: var(--navy, #07164a);
  font-weight: 800;
  white-space: nowrap;
}

/* =========================================================
   Responsive staff administration
========================================================= */

@media (max-width: 1250px) {
  .staff-stats-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1050px) {
  .staff-form-layout {
    grid-template-columns: 1fr;
  }

  .staff-guidance-card,
  .staff-account-summary {
    order: -1;
  }

  .staff-account-summary {
    text-align: left;
  }

  .staff-profile-avatar-large {
    margin-right: 0;
    margin-left: 0;
  }

  .staff-profile-grid {
    grid-template-columns: 1fr;
  }

  .staff-profile-grid.secondary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .staff-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .staff-toolbar {
    display: grid;
  }

  .staff-search-form {
    display: grid;
    grid-template-columns: 1fr auto auto;
  }

  .staff-search-field {
    width: 100%;
    min-width: 0;
  }

  .staff-toolbar > .btn {
    width: 100%;
    justify-content: center;
  }

  .staff-card-header {
    display: grid;
  }

  .staff-form-actions-top,
  .staff-profile-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .staff-form-actions-top .btn,
  .staff-profile-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .staff-empty-state {
    align-items: center;
    flex-direction: column;
    text-align: center;
  }

  .staff-empty-state .btn {
    width: 100%;
    justify-content: center;
  }

  .staff-profile-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .staff-profile-hero-status {
    width: 100%;
    justify-items: start;
  }

  .staff-profile-grid.secondary {
    grid-template-columns: 1fr;
  }

  .staff-detail-list {
    grid-template-columns: 1fr;
  }

  .staff-detail-list .full-detail-row {
    grid-column: auto;
  }

  .staff-detail-list > div,
  .staff-detail-list > div:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--line, #dbe3f0);
  }

  .staff-detail-list > div:last-child {
    border-bottom: 0;
  }

  .staff-performance-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .staff-stats-grid {
    grid-template-columns: 1fr;
  }

  .staff-search-form {
    grid-template-columns: 1fr;
  }

  .staff-search-form .btn {
    width: 100%;
    justify-content: center;
  }

  .staff-form-actions-top,
  .staff-profile-actions {
    grid-template-columns: 1fr;
  }

  .staff-form-section {
    padding: 13px;
  }

  .staff-form-submit-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .staff-form-submit-row .btn {
    width: 100%;
    justify-content: center;
  }

  .staff-profile-identity {
    align-items: flex-start;
  }

  .staff-profile-initials {
    width: 52px;
    height: 52px;
    border-radius: 15px;
  }
}

/* =========================================================
   SYSTEM SETTINGS MODULE
========================================================= */

/* =========================================================
   Settings layout
========================================================= */

.settings-top-actions,
.settings-alert {
  margin-bottom: 16px;
}

.settings-layout {
  display: grid;
  grid-template-columns:
    minmax(0, 1fr)
    minmax(285px, 340px);
  align-items: start;
  gap: 16px;
}

.settings-form-card {
  min-width: 0;
  overflow: hidden;
}

.settings-card-header {
  align-items: flex-start;
}

.settings-card-title {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.settings-card-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
  font-size: 0.8rem;
}

.settings-card-title h3 {
  margin-bottom: 3px;
}

/* =========================================================
   Settings form
========================================================= */

.settings-management-form {
  display: grid;
  gap: 16px;
  padding-top: 0;
}

.settings-form-section {
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 14px;
  background: #ffffff;
}

.settings-form-section legend {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 7px;
  color: var(--navy, #07164a);
  font-size: 0.75rem;
  font-weight: 900;
}

.settings-form-section legend > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
  font-size: 0.64rem;
}

.settings-management-form .form-group label {
  display: flex;
  align-items: center;
  gap: 7px;
}

.settings-management-form .form-group label i {
  color: var(--blue, #164c96);
  font-size: 0.68rem;
}

.settings-submit-row {
  margin-top: 0;
}

.settings-inline-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
  padding: 11px 12px;
  border-radius: 11px;
  background: var(--blue-soft-2, #f7f9fd);
  color: var(--navy, #07164a);
}

.settings-inline-note i {
  margin-top: 2px;
  color: var(--blue, #164c96);
}

.settings-inline-note p {
  margin: 0;
  font-size: 0.66rem;
  line-height: 1.5;
}

/* =========================================================
   Settings sidebar
========================================================= */

.settings-sidebar {
  position: sticky;
  top: 18px;
  display: grid;
  gap: 16px;
}

.settings-overview-card,
.receipt-preview-card {
  padding: 20px;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 17px;
  background: #ffffff;
  box-shadow: var(--shadow-soft, 0 8px 24px rgba(7, 22, 74, 0.06));
}

.settings-overview-icon {
  width: 51px;
  height: 51px;
  display: grid;
  place-items: center;
  margin-bottom: 13px;
  border-radius: 15px;
  background: var(--navy, #07164a);
  color: #ffffff;
  font-size: 1rem;
}

.settings-overview-card > small {
  display: block;
  margin-bottom: 4px;
  color: var(--muted, #667085);
  font-size: 0.61rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.settings-overview-card h3 {
  margin: 0 0 5px;
  color: var(--navy, #07164a);
  font-size: 1rem;
}

.settings-overview-card > p {
  margin: 0;
  color: var(--blue, #164c96);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.5;
}

.settings-overview-list {
  display: grid;
  margin-top: 16px;
}

.settings-overview-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line, #dbe3f0);
}

.settings-overview-list > div:last-child {
  border-bottom: 0;
}

.settings-overview-list span {
  color: var(--muted, #667085);
  font-size: 0.66rem;
  font-weight: 700;
}

.settings-overview-list strong {
  max-width: 170px;
  overflow: hidden;
  color: var(--navy, #07164a);
  font-size: 0.69rem;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.settings-security-note {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 14px;
  padding: 11px;
  border-radius: 11px;
  background: var(--blue-soft-2, #f7f9fd);
  color: var(--navy, #07164a);
}

.settings-security-note i {
  margin-top: 2px;
  color: var(--blue, #164c96);
}

.settings-security-note p {
  margin: 0;
  font-size: 0.65rem;
  line-height: 1.5;
}

/* =========================================================
   Receipt preview
========================================================= */

.receipt-preview-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
}

.receipt-preview-heading > span {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
  font-size: 0.78rem;
}

.receipt-preview-heading small,
.receipt-preview-heading strong {
  display: block;
}

.receipt-preview-heading small {
  margin-bottom: 2px;
  color: var(--muted, #667085);
  font-size: 0.59rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.receipt-preview-heading strong {
  color: var(--navy, #07164a);
  font-size: 0.78rem;
}

.settings-receipt-preview {
  padding: 18px 15px;
  border: 1px dashed rgba(7, 22, 74, 0.22);
  border-radius: 13px;
  background: #fcfcfc;
  color: #202020;
  font-family: "Courier New", Courier, monospace;
  text-align: center;
}

.settings-receipt-preview h4 {
  margin: 0 0 6px;
  color: #111111;
  font-family: inherit;
  font-size: 0.83rem;
  text-transform: uppercase;
}

.settings-receipt-preview > p {
  margin: 0;
  font-size: 0.58rem;
  line-height: 1.5;
}

.receipt-preview-phones {
  display: grid;
  gap: 2px;
  margin-top: 7px;
  font-size: 0.58rem;
}

.receipt-preview-divider {
  margin: 12px 0;
  border-top: 1px dashed #777777;
}

.receipt-preview-example {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.61rem;
}

.receipt-preview-example strong {
  font-size: 0.68rem;
}

.receipt-preview-footer {
  font-weight: 700;
}

.receipt-preview-credit {
  display: block;
  margin-top: 10px;
  color: #555555;
  font-size: 0.5rem;
  line-height: 1.4;
}

.receipt-preview-note {
  margin: 12px 0 0;
  color: var(--muted, #667085);
  font-size: 0.62rem;
  line-height: 1.5;
}

/* =========================================================
   Responsive settings
========================================================= */

@media (max-width: 1050px) {
  .settings-layout {
    grid-template-columns: 1fr;
  }

  .settings-sidebar {
    position: static;
    order: -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .settings-top-actions {
    display: grid;
  }

  .settings-top-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .settings-sidebar {
    grid-template-columns: 1fr;
  }

  .settings-card-header {
    display: grid;
  }
}

@media (max-width: 560px) {
  .settings-form-section {
    padding: 13px;
  }

  .settings-submit-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .settings-submit-row .btn {
    width: 100%;
    justify-content: center;
  }

  .settings-overview-card,
  .receipt-preview-card {
    padding: 16px;
  }
}

/* =========================================================
   BACKUP AND EXPORT MODULE
========================================================= */

/* =========================================================
   Top actions
========================================================= */

.backup-top-actions {
  margin-bottom: 16px;
}

/* =========================================================
   Backup overview banner
========================================================= */

.backup-overview-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  padding: 22px;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(
    135deg,
    var(--navy, #07164a),
    var(--blue, #164c96)
  );
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(7, 22, 74, 0.17);
}

.backup-overview-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 15px;
}

.backup-overview-icon {
  width: 59px;
  height: 59px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 2px solid rgba(255, 255, 255, 0.24);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.11);
  color: #ffffff;
  font-size: 1.1rem;
}

.backup-overview-label {
  display: block;
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.69);
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.backup-overview-main h2 {
  margin: 0 0 5px;
  color: #ffffff;
  font-size: clamp(1.15rem, 2.1vw, 1.55rem);
}

.backup-overview-main p {
  max-width: 580px;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.71rem;
  line-height: 1.55;
}

.backup-overview-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(90px, 1fr));
  gap: 8px;
  flex: 0 0 auto;
}

.backup-overview-metrics > div {
  min-width: 95px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  text-align: center;
}

.backup-overview-metrics span,
.backup-overview-metrics strong {
  display: block;
}

.backup-overview-metrics span {
  margin-bottom: 4px;
  color: rgba(255, 255, 255, 0.67);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.backup-overview-metrics strong {
  color: #ffffff;
  font-size: 0.92rem;
}

/* =========================================================
   Security notice
========================================================= */

.backup-security-notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid rgba(247, 144, 9, 0.22);
  border-radius: 14px;
  background: #fff8eb;
}

.backup-security-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: #ffe7b0;
  color: #985800;
  font-size: 0.77rem;
}

.backup-security-notice strong {
  display: block;
  margin-bottom: 3px;
  color: #764500;
  font-size: 0.76rem;
}

.backup-security-notice p {
  margin: 0;
  color: #8a570c;
  font-size: 0.67rem;
  line-height: 1.55;
}

/* =========================================================
   Export section
========================================================= */

.backup-export-section {
  min-width: 0;
  margin-bottom: 16px;
  overflow: hidden;
}

.backup-card-header {
  align-items: flex-start;
}

.backup-card-title {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.backup-card-icon {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
  font-size: 0.8rem;
}

.backup-card-title h3 {
  margin-bottom: 3px;
}

/* =========================================================
   Export grid and cards
========================================================= */

.backup-export-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
}

.backup-export-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 15px;
  background: #ffffff;
  transition:
    border-color 0.17s ease,
    box-shadow 0.17s ease,
    transform 0.17s ease;
}

.backup-export-card:hover {
  border-color: rgba(22, 76, 150, 0.28);
  box-shadow: 0 11px 24px rgba(7, 22, 74, 0.09);
  transform: translateY(-2px);
}

.backup-export-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 13px;
}

.backup-export-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
  font-size: 0.86rem;
}

.backup-export-category {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 5px 7px;
  border-radius: 999px;
  background: var(--blue-soft-2, #f7f9fd);
  color: var(--muted, #667085);
  font-size: 0.54rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.backup-export-content {
  flex: 1;
}

.backup-export-content h4 {
  margin: 0 0 6px;
  color: var(--navy, #07164a);
  font-size: 0.82rem;
}

.backup-export-content p {
  margin: 0;
  color: var(--muted, #667085);
  font-size: 0.64rem;
  line-height: 1.55;
}

.backup-export-footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  margin-top: 17px;
  padding-top: 13px;
  border-top: 1px solid var(--line, #dbe3f0);
}

.backup-export-count span,
.backup-export-count strong {
  display: block;
}

.backup-export-count span {
  margin-bottom: 2px;
  color: var(--muted, #667085);
  font-size: 0.55rem;
  font-weight: 800;
}

.backup-export-count strong {
  color: var(--navy, #07164a);
  font-size: 0.8rem;
}

.backup-download-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 9px;
  border-radius: 9px;
  background: var(--navy, #07164a);
  color: #ffffff;
  font-size: 0.61rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background 0.16s ease,
    transform 0.16s ease;
}

.backup-download-button:hover {
  background: var(--blue, #164c96);
  color: #ffffff;
  transform: translateY(-1px);
}

/* =========================================================
   Backup guidance
========================================================= */

.backup-guidance-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.backup-guidance-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 15px;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: var(--shadow-soft, 0 8px 24px rgba(7, 22, 74, 0.05));
}

.backup-guidance-card > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--blue-soft, #eaf0fb);
  color: var(--blue, #164c96);
  font-size: 0.72rem;
}

.backup-guidance-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--navy, #07164a);
  font-size: 0.72rem;
}

.backup-guidance-card p {
  margin: 0;
  color: var(--muted, #667085);
  font-size: 0.63rem;
  line-height: 1.5;
}

/* =========================================================
   Responsive Backup and Export
========================================================= */

@media (max-width: 1250px) {
  .backup-export-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1000px) {
  .backup-overview-banner {
    align-items: flex-start;
    flex-direction: column;
  }

  .backup-overview-metrics {
    width: 100%;
  }

  .backup-export-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .backup-top-actions {
    display: grid;
  }

  .backup-top-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .backup-overview-main {
    align-items: flex-start;
  }

  .backup-overview-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .backup-card-header {
    display: grid;
  }

  .backup-export-grid {
    padding: 13px;
  }

  .backup-guidance-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 580px) {
  .backup-overview-banner {
    padding: 17px;
  }

  .backup-overview-icon {
    width: 50px;
    height: 50px;
    border-radius: 15px;
  }

  .backup-overview-metrics {
    grid-template-columns: 1fr;
  }

  .backup-overview-metrics > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
  }

  .backup-overview-metrics span {
    margin-bottom: 0;
  }

  .backup-export-grid {
    grid-template-columns: 1fr;
  }

  .backup-export-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .backup-download-button {
    width: 100%;
  }

  .backup-security-notice {
    flex-direction: column;
  }
}

/* =========================================================
   FINAL SAFE COMPATIBILITY AND RESPONSIVE REFINEMENTS
   Preserves the working system while aligning the current
   POS markup, reports, administration pages, and mobile UI.
========================================================= */

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.main-content,
.dashboard-card,
.form-card,
.profile-card,
.table-wrap,
.app-form,
.form-grid {
  min-width: 0;
}

/* =========================================================
   Current working POS markup compatibility
========================================================= */

.pos-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}

.pos-search-panel,
.pos-cart-panel {
  min-width: 0;
  min-height: clamp(520px, 64vh, 680px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line, #dbe3f0);
  border-radius: 18px;
  background: #ffffff;
  box-shadow: var(--shadow-soft, 0 8px 24px rgba(7, 22, 74, 0.06));
}

.pos-cart-panel {
  position: static;
  top: auto;
}

.pos-search-panel .pos-panel-header,
.pos-cart-panel .pos-panel-header {
  min-height: 82px;
  margin: 0;
  padding: 16px 17px;
  border-bottom: 1px solid var(--line, #dbe3f0);
  background: var(--blue-soft-2, #f7f9fd);
}

.pos-search-panel .pos-search-box {
  min-height: 0;
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 14px 15px;
}

.pos-search-panel .pos-search-box > input {
  flex: 0 0 auto;
}

.pos-search-panel .search-results {
  min-height: 0;
  max-height: none;
  flex: 1;
  margin-top: 12px;
  overflow-y: auto;
}

.pos-cart-panel .cart-items {
  min-height: 0;
  max-height: none;
  flex: 1;
  padding: 0 15px 15px;
  overflow-y: auto;
}

.pos-cart-panel .empty-cart-box {
  margin-top: 15px;
}

/* Modern JS rows rendered inside the current #searchResults container. */
.search-results .pos-medicine-row {
  flex: 0 0 auto;
}

/* Current checkout markup uses four regular summary rows. */
.checkout-summary > div {
  min-width: 0;
}

/* =========================================================
   Spacious report navigation and full-field date controls
========================================================= */

.report-nav {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  align-items: stretch;
  gap: 9px;
  padding: 9px;
  overflow: visible;
}

.report-nav-link {
  width: 100%;
  min-height: 43px;
  padding: 10px 12px;
  background: var(--blue-soft-2, #f7f9fd);
}

.report-date-field,
.report-date-field input[type="date"],
.report-date-field input[type="month"],
input[type="date"],
input[type="month"] {
  cursor: pointer;
}

.report-date-field input[type="date"],
.report-date-field input[type="month"] {
  min-width: 0;
}

/* =========================================================
   Administration navigation spacing
========================================================= */

.administration-nav {
  width: 100%;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 9px;
}

.administration-nav-link {
  width: 100%;
  min-height: 43px;
}

/* =========================================================
   General responsive stability
========================================================= */

@media (max-width: 1200px) {
  .stats-grid,
  .users-stats-grid,
  .staff-stats-grid,
  .report-stats-five,
  .report-stats-six {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .backup-export-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1020px) {
  .pos-layout,
  .pos-workspace,
  .pos-workspace-balanced {
    grid-template-columns: 1fr;
  }

  .pos-search-panel,
  .pos-cart-panel,
  .pos-medicine-panel {
    min-height: unset;
  }

  .pos-search-panel .search-results,
  .pos-cart-panel .cart-items,
  .pos-cart-items {
    max-height: 430px;
  }

  .settings-layout,
  .staff-form-layout,
  .user-form-layout,
  .password-reset-layout {
    grid-template-columns: 1fr;
  }

  .settings-sidebar {
    position: static;
  }
}

@media (max-width: 900px) {
  .main-content {
    width: 100%;
    margin-left: 0;
    padding: 18px;
  }

  .sidebar {
    z-index: 1200;
    filter: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .sidebar-overlay {
    z-index: 1100;
    background: rgba(4, 11, 45, 0.55);
    filter: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  body.menu-open .app-layout,
  body.menu-open .main-content,
  body.menu-open .topbar,
  body.menu-open .sidebar {
    filter: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  .topbar {
    gap: 14px;
    padding: 18px;
  }

  .topbar h1 {
    font-size: clamp(1.35rem, 4vw, 1.75rem);
  }

  .dashboard-grid,
  .profile-grid,
  .staff-profile-grid,
  .staff-profile-grid.secondary,
  .report-insight-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .main-content {
    padding: 14px;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    border-radius: 16px;
  }

  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .page-actions,
  .users-toolbar,
  .staff-toolbar,
  .report-toolbar,
  .settings-top-actions,
  .backup-top-actions,
  .staff-form-actions-top,
  .staff-profile-actions,
  .users-form-actions-top {
    align-items: stretch;
    flex-direction: column;
  }

  .page-actions > .btn,
  .users-toolbar > .btn,
  .staff-toolbar > .btn,
  .report-toolbar > .btn,
  .settings-top-actions .btn,
  .backup-top-actions .btn {
    width: 100%;
    justify-content: center;
  }

  .search-form,
  .users-search-form,
  .staff-search-form,
  .report-filter-form,
  .report-range-form {
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
  }

  .search-form input,
  .users-search-field,
  .staff-search-field,
  .report-search-field,
  .report-date-field,
  .report-select-field {
    width: 100%;
    max-width: none;
  }

  .report-nav,
  .administration-nav {
    display: flex;
    align-items: stretch;
    gap: 8px;
    padding: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x proximity;
  }

  .report-nav::-webkit-scrollbar,
  .administration-nav::-webkit-scrollbar {
    height: 6px;
  }

  .report-nav::-webkit-scrollbar-track,
  .administration-nav::-webkit-scrollbar-track {
    background: transparent;
  }

  .report-nav::-webkit-scrollbar-thumb,
  .administration-nav::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: var(--blue-soft, #eaf0fb);
  }

  .report-nav-link,
  .administration-nav-link {
    width: auto;
    min-width: 145px;
    flex: 0 0 auto;
    scroll-snap-align: start;
  }

  .stats-grid,
  .users-stats-grid,
  .staff-stats-grid,
  .report-stats-four,
  .report-stats-five,
  .report-stats-six {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .full-span {
    grid-column: auto;
  }

  .table-wrap {
    width: 100%;
    overflow-x: auto;
  }

  table {
    min-width: 720px;
  }

  .pos-layout {
    grid-template-columns: 1fr;
  }

  .pos-search-panel,
  .pos-cart-panel {
    min-height: unset;
    border-radius: 15px;
  }

  .pos-search-panel .search-results,
  .pos-cart-panel .cart-items {
    max-height: 390px;
  }

  .sale-customer-header,
  .sale-selected-customer,
  .purchase-selected-product,
  .backup-overview-banner,
  .staff-profile-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .sale-customer-header .btn,
  .sale-selected-customer .btn,
  .purchase-selected-product .btn {
    width: 100%;
    justify-content: center;
  }

  .checkout-modal,
  .confirm-modal {
    padding: 14px;
  }

  .checkout-modal-card,
  .confirm-modal-card {
    max-height: calc(100svh - 28px);
    padding: 20px;
    overflow-y: auto;
    border-radius: 18px;
  }

  .checkout-summary,
  .checkout-actions,
  .confirm-actions {
    grid-template-columns: 1fr;
  }

  .checkout-actions,
  .confirm-actions {
    display: grid;
  }

  .checkout-actions .btn,
  .confirm-actions .btn {
    width: 100%;
    min-width: 0;
  }

  .backup-export-grid,
  .backup-guidance-grid,
  .settings-sidebar {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .main-content {
    padding: 10px;
  }

  .topbar,
  .dashboard-card,
  .form-card,
  .profile-card,
  .settings-overview-card,
  .receipt-preview-card,
  .staff-guidance-card,
  .staff-account-summary,
  .user-guidance-card,
  .user-account-card,
  .password-user-summary {
    border-radius: 14px;
  }

  .topbar,
  .dashboard-card,
  .form-card,
  .profile-card {
    padding: 16px;
  }

  .stats-grid,
  .users-stats-grid,
  .staff-stats-grid,
  .report-stats-four,
  .report-stats-five,
  .report-stats-six {
    grid-template-columns: 1fr;
  }

  .stat-card {
    padding: 16px;
  }

  .btn {
    min-height: 44px;
  }

  .form-actions,
  .settings-submit-row,
  .staff-form-submit-row,
  .user-form-submit-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .form-actions .btn,
  .settings-submit-row .btn,
  .staff-form-submit-row .btn,
  .user-form-submit-row .btn {
    width: 100%;
  }

  .pos-hero {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .pos-live-total {
    width: 100%;
    min-width: 0;
    text-align: left;
  }

  .pos-medicine-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .cart-row {
    grid-template-columns: minmax(0, 1fr) auto 32px;
  }

  .receipt-card {
    padding: 18px;
    border-radius: 14px;
  }

  .receipt-meta {
    grid-template-columns: 1fr 1fr;
  }

  .backup-export-grid {
    padding: 10px;
  }
}
