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

.access-page {
  min-height: 100vh;
  margin-bottom: 0;
  background:
    linear-gradient(180deg, rgba(4, 19, 31, 0.45), rgba(4, 19, 31, 0.72)),
    url("../img/backgrounds/login-background.png") center / cover no-repeat fixed;
}

.access-page header .navbar {
  background: rgba(255, 255, 255, 0.88) !important;
  backdrop-filter: blur(10px);
}

.login-page {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(180deg, rgba(4, 19, 31, 0.45), rgba(4, 19, 31, 0.68)),
    url("../img/backgrounds/login-background.png") center / cover no-repeat;
  color: #172033;
}

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-brand-mark {
  width: 54px;
  height: 54px;
  margin: 0 auto 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #20c997, #0d6efd);
  color: #ffffff;
  font-size: 24px;
  font-weight: 700;
  box-shadow: 0 12px 30px rgba(13, 110, 253, 0.30);
}

.login-card {
  width: min(100%, 430px);
  padding: 36px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.login-header {
  margin-bottom: 28px;
  text-align: center;
}

.login-card h1 {
  margin-bottom: 6px;
  font-size: 30px;
  font-weight: 700;
}

.login-card p {
  margin: 0;
  color: #6b7280;
}

.login-card .form-label {
  font-weight: 600;
  color: #374151;
}

.login-card .form-control {
  border-radius: 8px;
  border-color: #d8dee8;
  background: rgba(255, 255, 255, 0.9);
}

.login-card .btn {
  border-radius: 8px;
  font-weight: 600;
}

@media (max-width: 860px) {
  .login-card {
    padding: 28px;
  }
}

.branch-shell {
  min-height: calc(100vh - 140px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0 44px;
}

.branch-card {
  width: min(100%, 760px);
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.93);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(10px);
}

.branch-header {
  max-width: 560px;
  margin: 0 auto 26px;
  text-align: center;
}

.branch-kicker {
  margin: 0 0 8px;
  color: #0d6efd;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
}

.branch-header h1 {
  margin-bottom: 8px;
  font-size: 30px;
  font-weight: 700;
}

.branch-header p {
  margin-bottom: 0;
  color: #6b7280;
}

.branch-list {
  display: grid;
  gap: 12px;
}

.branch-option {
  margin: 0;
}

.branch-button {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #dce3ee;
  border-radius: 10px;
  background: #ffffff;
  color: #172033;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.branch-button:hover,
.branch-button:focus {
  border-color: #0d6efd;
  box-shadow: 0 12px 28px rgba(13, 110, 253, 0.16);
  transform: translateY(-1px);
}

.branch-icon {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #e7f7f2;
  color: #087f5b;
  font-weight: 700;
}

.branch-text {
  min-width: 0;
}

.branch-text strong,
.branch-text small {
  display: block;
}

.branch-text strong {
  font-size: 16px;
}

.branch-text small {
  margin-top: 3px;
  color: #6b7280;
}

.branch-action {
  padding: 8px 12px;
  border-radius: 8px;
  background: #0d6efd;
  color: #ffffff;
  font-weight: 600;
}

@media (max-width: 640px) {
  .branch-card {
    padding: 24px;
  }

  .branch-button {
    grid-template-columns: 42px 1fr;
  }

  .branch-action {
    grid-column: 1 / -1;
    text-align: center;
  }
}

.public-page {
  margin: 0;
  background: #f5f7fb;
  color: #182033;
}

.public-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #e5e8ef;
  backdrop-filter: blur(10px);
}

.public-nav {
  min-height: 78px;
}

.public-brand img {
  width: 210px;
  max-height: 58px;
  object-fit: contain;
}

.public-nav .nav-link {
  color: #15315c;
  font-weight: 600;
}

.public-nav .nav-link:hover,
.public-nav .nav-link:focus {
  color: #e4002b;
}

.public-nav .navbar-toggler {
  border-color: #d8dee8;
  border-radius: 8px;
  background: #ffffff;
}

.public-nav .navbar-toggler:focus {
  box-shadow: 0 0 0 0.2rem rgba(18, 63, 145, 0.18);
}

.public-login-button {
  border-radius: 8px;
  background: #123f91;
  border-color: #123f91;
  font-weight: 700;
}

.public-login-button:hover,
.public-login-button:focus {
  background: #e4002b;
  border-color: #e4002b;
}

.public-hero {
  min-height: 680px;
  display: flex;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(8, 25, 56, 0.92), rgba(8, 25, 56, 0.62), rgba(8, 25, 56, 0.18)),
    url("../img/public/hardware-hero.png") center / cover no-repeat;
  color: #ffffff;
}

.public-hero-content {
  width: min(100%, 650px);
  padding: 72px 0;
}

.public-kicker {
  margin-bottom: 14px;
  color: #ffccd5;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.public-hero h1 {
  margin-bottom: 18px;
  font-size: 58px;
  line-height: 1.05;
  font-weight: 800;
}

.public-hero p {
  margin-bottom: 28px;
  color: #e8eef8;
  font-size: 20px;
}

.public-hero .btn,
.public-section .btn {
  border-radius: 8px;
  font-weight: 700;
}

.public-hero .btn-primary {
  background: #e4002b;
  border-color: #e4002b;
}

.public-section {
  padding: 64px 0;
}

.public-feature,
.public-info-card,
.product-line,
.branch-public-card {
  height: 100%;
  padding: 26px;
  border: 1px solid #e1e6f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(18, 63, 145, 0.08);
  overflow: hidden;
}

.product-line,
.branch-public-card {
  padding: 0;
}

.product-line img,
.branch-public-card img {
  width: 100%;
  height: 190px;
  display: block;
  object-fit: cover;
}

.product-line h2,
.product-line p,
.branch-public-card h2,
.branch-public-card p,
.branch-public-card strong,
.branch-public-card span {
  margin-left: 24px;
  margin-right: 24px;
}

.public-feature span {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-radius: 8px;
  background: #123f91;
  color: #ffffff;
  font-weight: 800;
}

.public-feature h2,
.public-info-card h2,
.product-line h2,
.branch-public-card h2 {
  margin-bottom: 10px;
  color: #123f91;
  font-size: 21px;
  font-weight: 800;
}

.public-feature p,
.public-info-card p,
.product-line p,
.branch-public-card p {
  margin-bottom: 0;
  color: #5e6878;
}

.public-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.public-chip-list span {
  display: inline-flex;
  padding: 8px 12px;
  border-radius: 8px;
  background: #edf3ff;
  color: #123f91;
  font-size: 14px;
  font-weight: 700;
}

.public-page-title {
  padding: 82px 0 44px;
  background: #123f91;
  color: #ffffff;
}

.public-page-title h1 {
  width: min(100%, 820px);
  margin: 0;
  font-size: 42px;
  line-height: 1.12;
  font-weight: 800;
}

.product-grid,
.branch-public-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.branch-public-card {
  border-top: 5px solid #e4002b;
}

.branch-public-card strong {
  display: block;
  margin-top: 16px;
  color: #182033;
}

.branch-public-card span {
  display: inline-flex;
  margin-bottom: 24px;
  margin-top: 12px;
  padding: 6px 10px;
  border-radius: 8px;
  background: #edf3ff;
  color: #123f91;
  font-size: 13px;
  font-weight: 700;
}

.branch-hours {
  margin: 16px 24px 24px;
  padding: 14px;
  border-radius: 8px;
  background: #f6f9ff;
  color: #384456;
  font-size: 14px;
}

.branch-hours b {
  display: block;
  margin-top: 8px;
  color: #123f91;
}

.branch-hours b:first-child {
  margin-top: 0;
}

.product-line h2,
.branch-public-card h2 {
  margin-top: 22px;
}

.product-line p {
  margin-bottom: 24px;
}

.brand-section {
  margin-top: 48px;
  padding: 32px;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(18, 63, 145, 0.08);
}

.brand-section h2 {
  margin-bottom: 18px;
  color: #123f91;
  font-size: 28px;
  font-weight: 800;
}

.brand-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.brand-cloud span {
  display: inline-flex;
  padding: 9px 13px;
  border: 1px solid #dbe4f2;
  border-radius: 8px;
  background: #f6f9ff;
  color: #123f91;
  font-size: 14px;
  font-weight: 800;
}

.public-footer {
  padding: 24px 0;
  background: #0d2e6d;
  color: #ffffff;
  font-weight: 600;
}

@media (max-width: 991px) {
  .public-brand img {
    width: 170px;
  }

  .public-nav .navbar-collapse {
    margin-top: 12px;
    padding: 12px;
    border: 1px solid #e1e6f0;
    border-radius: 8px;
    background: #ffffff;
  }

  .public-nav .navbar-nav {
    align-items: stretch !important;
    gap: 4px;
  }

  .public-login-button {
    width: 100%;
    margin-top: 8px;
  }

  .public-hero {
    min-height: 560px;
  }

  .public-hero h1 {
    font-size: 42px;
  }

  .product-grid,
  .branch-public-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .public-hero {
    min-height: 520px;
    background:
      linear-gradient(180deg, rgba(8, 25, 56, 0.92), rgba(8, 25, 56, 0.72)),
      url("../img/public/hardware-hero.png") center / cover no-repeat;
  }

  .public-hero-content {
    padding: 48px 0;
  }

  .public-hero h1,
  .public-page-title h1 {
    font-size: 34px;
  }

  .product-grid,
  .branch-public-grid {
    grid-template-columns: 1fr;
  }
}

.work-page {
  padding: 24px 0 44px;
}

.work-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.work-kicker {
  margin-bottom: 4px;
  color: #0d6efd;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.work-header h1 {
  margin: 0;
  color: #172033;
  font-size: 30px;
  font-weight: 800;
}

.filter-panel {
  display: grid;
  grid-template-columns: 1.3fr 220px 1fr auto;
  gap: 14px;
  align-items: end;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid #e1e6f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(18, 63, 145, 0.06);
}

.product-search-panel {
  grid-template-columns: 240px 1fr;
}

.product-page {
  height: calc(100vh - 40px);
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 14px;
  overflow: hidden;
}

.product-page .work-header,
.product-page .product-search-panel {
  margin-bottom: 0;
}

.product-results-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.product-table-scroll {
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.product-table-scroll .inventory-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.merchandise-page {
  display: grid;
  gap: 14px;
  padding-bottom: 24px;
}

.merchandise-filter {
  display: flex;
  align-items: center;
  gap: 10px;
}

.merchandise-filter label {
  color: #5e6878;
  font-weight: 800;
}

.merchandise-filter .form-select {
  min-width: 130px;
  border-radius: 8px;
}

.merchandise-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.merchandise-card {
  min-height: 120px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 18px;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 30px rgba(31, 48, 72, 0.08);
}

.merchandise-card span {
  color: #0b5ed7;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.merchandise-card strong {
  color: #172033;
  font-size: 34px;
  line-height: 1;
}

.merchandise-card small {
  color: #687386;
  font-weight: 700;
}

.merchandise-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  gap: 14px;
  align-items: start;
}

.merchandise-wide {
  grid-row: span 2;
}

.merchandise-panel {
  min-width: 0;
}

.merchandise-table-scroll {
  max-height: calc(100vh - 360px);
  min-height: 420px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.merchandise-small-scroll,
.merchandise-rank-list {
  max-height: 340px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

.merchandise-table-scroll .inventory-table thead th,
.merchandise-small-scroll .inventory-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.merchandise-rank-list {
  display: grid;
  gap: 8px;
  padding: 12px;
}

.merchandise-rank-item {
  position: relative;
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e1e6f0;
  border-radius: 9px;
  background: #ffffff;
  color: #172033;
  text-decoration: none;
  overflow: hidden;
}

.merchandise-rank-item:hover,
.merchandise-rank-item:focus {
  color: #172033;
  border-color: #cfe2ff;
}

.merchandise-rank-item span,
.merchandise-rank-item b {
  position: relative;
  z-index: 1;
}

.merchandise-rank-item strong,
.merchandise-rank-item small {
  display: block;
}

.merchandise-rank-item strong {
  overflow: hidden;
  color: #172033;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merchandise-rank-item small {
  color: #687386;
  font-size: 12px;
  font-weight: 700;
}

.merchandise-rank-item b {
  color: #123f91;
  white-space: nowrap;
}

.merchandise-rank-item i {
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  background: linear-gradient(90deg, rgba(13, 110, 253, 0.14), rgba(32, 201, 151, 0.1));
}

.merchandise-empty {
  padding: 28px 16px;
  color: #687386;
  text-align: center;
}

.purchase-filter-panel {
  grid-template-columns: 220px 1fr 170px 170px auto;
}

.filter-actions {
  display: flex;
  justify-content: flex-end;
}

.result-panel {
  border: 1px solid #e1e6f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(18, 63, 145, 0.06);
  overflow: hidden;
}

.result-summary {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 14px 18px;
  border-bottom: 1px solid #e1e6f0;
  color: #5e6878;
}

.result-summary strong {
  color: #123f91;
}

.inventory-table {
  margin-bottom: 0;
  font-size: 14px;
}

.inventory-table thead th {
  background: #f6f9ff;
  color: #123f91;
  font-weight: 800;
  white-space: nowrap;
}

.location-pill {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 8px;
  background: #edf3ff;
  color: #123f91;
  font-weight: 700;
  white-space: nowrap;
}

.product-images-button {
  border-radius: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.product-row-actions {
  display: inline-flex;
  justify-content: flex-end;
  gap: 6px;
}

.product-action-button {
  min-width: 54px;
  border-radius: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.product-images-modal {
  border: 0;
  border-radius: 10px;
  overflow: hidden;
}

.device-filter-panel {
  grid-template-columns: 240px auto;
}

.device-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.device-actions form {
  margin: 0;
}

.device-pending-card .alert {
  border-radius: 8px;
}

.product-images-grid {
  min-height: 260px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.product-image-item {
  margin: 0;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: #f8fbff;
  overflow: hidden;
}

.product-image-item img {
  width: 100%;
  height: 250px;
  display: block;
  object-fit: contain;
  background: #ffffff;
}

.product-image-item figcaption {
  padding: 10px 12px;
  color: #384456;
  font-size: 13px;
  font-weight: 700;
}

.product-stock-list {
  display: grid;
  gap: 10px;
}

.product-stock-item {
  min-height: 68px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: #f8fbff;
}

.product-stock-item strong,
.product-stock-item small {
  display: block;
}

.product-stock-item strong {
  color: #172033;
  font-weight: 900;
}

.product-stock-item small {
  margin-top: 2px;
  color: #687386;
  font-weight: 700;
}

.product-stock-item b {
  min-width: 74px;
  padding: 8px 12px;
  border-radius: 9px;
  background: #e7f7f2;
  color: #087f5b;
  font-size: 22px;
  line-height: 1;
  text-align: center;
}

.product-stock-item b::after {
  content: " exist.";
  display: block;
  margin-top: 4px;
  color: #087f5b;
  font-size: 11px;
  font-weight: 800;
}

.home-dashboard {
  display: grid;
  gap: 18px;
}

.home-hero-panel {
  min-height: 210px;
  align-items: center;
}

.home-lead {
  max-width: 760px;
  margin: 12px 0 0;
  color: #5e6878;
  font-size: 18px;
  line-height: 1.55;
}

.home-definition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.home-definition-card {
  min-height: 210px;
  padding: 22px;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 30px rgba(31, 48, 72, 0.08);
}

.home-definition-card span {
  display: inline-flex;
  width: 38px;
  height: 38px;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  border-radius: 8px;
  background: #e9f2ff;
  color: #0b5ed7;
  font-weight: 800;
}

.home-definition-card h2 {
  margin-bottom: 10px;
  color: #172033;
  font-size: 20px;
  font-weight: 800;
}

.home-definition-card p {
  margin: 0;
  color: #5e6878;
  line-height: 1.5;
}

.home-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.home-metric-card {
  min-height: 150px;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 22px;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 14px 30px rgba(31, 48, 72, 0.08);
}

.home-metric-card span {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #e9f2ff;
  color: #0b5ed7;
  font-weight: 900;
}

.home-metric-card strong {
  display: block;
  color: #172033;
  font-size: 40px;
  line-height: 1;
}

.home-metric-card p {
  margin: 8px 0 0;
  color: #5e6878;
  font-weight: 800;
}

.home-summary-panel {
  padding-bottom: 18px;
}

.home-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px;
}

.home-summary-actions .btn {
  border-radius: 8px;
  font-weight: 800;
}

.home-operations-dashboard {
  gap: 16px;
}

.home-operations-hero {
  min-height: 150px;
  background:
    linear-gradient(135deg, rgba(18, 63, 145, 0.95), rgba(10, 31, 64, 0.9)),
    linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent);
  color: #ffffff;
}

.home-operations-hero .work-kicker,
.home-operations-hero h1 {
  color: #ffffff;
}

.home-operations-hero .home-lead {
  color: rgba(255, 255, 255, 0.82);
}

.home-hero-total {
  min-width: 180px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.12);
  text-align: right;
}

.home-hero-total span,
.home-hero-total strong {
  display: block;
}

.home-hero-total span {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.home-hero-total strong {
  margin-top: 6px;
  font-size: 46px;
  line-height: 1;
}

.home-operations-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.home-operation-card {
  min-width: 0;
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 36px rgba(31, 48, 72, 0.1);
}

.home-operation-card-primary {
  border-top: 5px solid #123f91;
}

.home-operation-card-accent {
  border-top: 5px solid #20c997;
}

.home-operation-header {
  display: flex;
  align-items: center;
  gap: 14px;
}

.home-operation-header span {
  width: 52px;
  height: 52px;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #e9f2ff;
  color: #123f91;
  font-weight: 900;
}

.home-operation-card-accent .home-operation-header span {
  background: #e7f7f2;
  color: #087f5b;
}

.home-operation-header strong,
.home-operation-header small {
  display: block;
}

.home-operation-header strong {
  color: #172033;
  font-size: 22px;
  font-weight: 900;
}

.home-operation-header small {
  margin-top: 2px;
  color: #687386;
  font-weight: 700;
}

.home-operation-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.home-operation-values div {
  min-height: 92px;
  display: grid;
  align-content: center;
  padding: 12px;
  border-radius: 9px;
  background: #f6f9ff;
}

.home-operation-values b,
.home-operation-values span {
  display: block;
}

.home-operation-values b {
  color: #172033;
  font-size: 34px;
  line-height: 1;
}

.home-operation-values span {
  margin-top: 6px;
  color: #5e6878;
  font-size: 13px;
  font-weight: 800;
}

.home-operation-link,
.home-table-link {
  color: #0b5ed7;
  font-weight: 900;
  text-decoration: none;
}

.home-operation-link:hover,
.home-operation-link:focus,
.home-table-link:hover,
.home-table-link:focus {
  color: #e4002b;
}

.home-status-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.home-status-strip article {
  min-height: 104px;
  display: grid;
  align-content: center;
  padding: 16px;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 28px rgba(31, 48, 72, 0.08);
}

.home-status-strip span {
  color: #687386;
  font-weight: 800;
}

.home-status-strip strong {
  margin-top: 6px;
  color: #172033;
  font-size: 34px;
  line-height: 1;
}

.home-week-panel .inventory-table td,
.home-week-panel .inventory-table th {
  padding: 14px 18px;
}

.app-page {
  min-height: 100vh;
  margin: 0;
  margin-bottom: 0;
  background:
    radial-gradient(circle at top left, rgba(13, 110, 253, 0.13), transparent 34%),
    linear-gradient(135deg, #f7f9fd 0%, #eef3f8 52%, #f8fafc 100%);
  color: #172033;
  overflow: hidden;
}

.app-shell {
  height: 100vh;
  display: grid;
  grid-template-columns: 252px 1fr;
  transition: grid-template-columns 0.2s ease;
  overflow: hidden;
}

.app-sidebar {
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 16px;
  border-right: 1px solid #dce4ef;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 12px 0 34px rgba(31, 48, 72, 0.08);
  transition: transform 0.2s ease, opacity 0.2s ease, width 0.2s ease;
  overflow: hidden;
}

.app-page.app-sidebar-collapsed .app-shell {
  grid-template-columns: 0 1fr;
}

.app-page.app-sidebar-collapsed .app-sidebar {
  width: 252px;
  transform: translateX(-100%);
  opacity: 0;
  pointer-events: none;
}

.app-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 6px 18px;
  border-bottom: 1px solid #e5ecf5;
}

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

.app-sidebar-brand .login-brand-mark {
  width: 46px;
  height: 46px;
  margin: 0;
  border-radius: 12px;
  font-size: 21px;
}

.app-sidebar-brand strong,
.app-sidebar-brand small {
  display: block;
}

.app-sidebar-brand strong {
  color: #172033;
  font-size: 18px;
}

.app-sidebar-brand small {
  color: #6b7280;
}

.app-sidebar-brand .app-session-context {
  max-width: 150px;
  overflow: hidden;
  color: #123f91;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-menu {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  align-content: start;
  gap: 8px;
  margin-top: 18px;
  padding-right: 4px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.app-menu-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #263246;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.app-menu-link span,
.app-menu-group summary span {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #e9f2ff;
  color: #0b5ed7;
  font-size: 12px;
  font-weight: 800;
}

.app-menu-link:hover,
.app-menu-link:focus {
  border-color: #cfe2ff;
  background: #ffffff;
  color: #0b5ed7;
  transform: translateX(2px);
}

.app-menu-logout-form {
  margin: 0;
}

.app-menu-button {
  width: 100%;
  background: transparent;
  text-align: left;
}

.app-menu-button:hover,
.app-menu-button:focus {
  color: #c41230;
}

.app-menu-button span {
  background: #fff0f3;
  color: #c41230;
}

.app-menu-group {
  border: 1px solid transparent;
  border-radius: 10px;
}

.app-menu-group summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 7px 10px;
  border-radius: 10px;
  color: #172033;
  cursor: pointer;
  font-weight: 800;
  list-style: none;
}

.app-menu-group summary::-webkit-details-marker {
  display: none;
}

.app-menu-group summary::after {
  content: "";
  width: 8px;
  height: 8px;
  margin-left: auto;
  border-right: 2px solid #7a8798;
  border-bottom: 2px solid #7a8798;
  transform: rotate(45deg);
  transition: transform 0.15s ease;
}

.app-menu-group[open] {
  border-color: #dce8f8;
  background: #f4f8fd;
}

.app-menu-group[open] summary::after {
  transform: rotate(225deg);
}

.app-menu-children {
  display: grid;
  gap: 4px;
  padding: 0 8px 8px 18px;
}

.app-menu-children .app-menu-link {
  padding: 8px 9px;
  font-size: 14px;
}

.app-menu-children .app-menu-link span {
  width: 28px;
  height: 28px;
  background: #ffffff;
}

.app-logout-form {
  margin-top: auto;
  padding-top: 16px;
  flex: 0 0 auto;
}

.app-logout-button {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #f5bcc8;
  border-radius: 8px;
  background: #fff6f8;
  color: #c41230;
  font-weight: 800;
}

.app-logout-button:hover,
.app-logout-button:focus {
  background: #e4002b;
  color: #ffffff;
}

.app-main {
  min-width: 0;
  height: 100vh;
  overflow: hidden;
}

.app-topbar {
  display: none;
}

.app-sidebar-toggle,
.app-floating-toggle {
  width: 42px;
  height: 42px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  color: #123f91;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
}

.app-sidebar-toggle span,
.app-floating-toggle span {
  width: 19px;
  height: 2px;
  border-radius: 2px;
  background: #123f91;
}

.app-floating-toggle {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 40;
}

.app-sidebar-toggle {
  display: none;
}

.app-sidebar .app-sidebar-close {
  width: 36px;
  height: 36px;
  display: inline-flex;
  margin-left: auto;
  flex: 0 0 auto;
  box-shadow: none;
}

.app-page:not(.app-sidebar-collapsed) .app-floating-toggle {
  display: none;
}

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

.app-content {
  width: min(100%, 1440px);
  height: 100vh;
  margin: 0 auto;
  padding: 20px 24px 48px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.app-notification-stack {
  position: fixed;
  top: 78px;
  right: 22px;
  z-index: 60;
  width: min(360px, calc(100vw - 32px));
  display: grid;
  gap: 10px;
  pointer-events: none;
}

.app-notification-toast {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid #cfe2ff;
  border-left: 5px solid #0b5ed7;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  color: #172033;
  text-decoration: none;
  box-shadow: 0 18px 44px rgba(31, 48, 72, 0.22);
  pointer-events: auto;
  animation: notificationIn 0.22s ease-out;
}

.app-notification-toast:hover,
.app-notification-toast:focus {
  color: #172033;
  transform: translateY(-1px);
}

.app-notification-toast strong {
  color: #123f91;
  font-size: 15px;
}

.app-notification-toast span {
  color: #384456;
  font-size: 14px;
}

.app-notification-toast small {
  color: #6b7280;
  font-weight: 700;
}

.app-notification-toast.is-hiding {
  opacity: 0;
  transform: translateX(18px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.notification-bell {
  position: fixed;
  top: 18px;
  right: 22px;
  z-index: 70;
}

.notification-bell-button {
  width: 46px;
  height: 46px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cfe2ff;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  color: #123f91;
  font-weight: 900;
  box-shadow: 0 16px 36px rgba(31, 48, 72, 0.18);
}

.notification-bell-icon {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e9f2ff;
  color: #123f91;
  font-size: 15px;
  line-height: 1;
}

.notification-bell-count {
  min-width: 20px;
  height: 20px;
  position: absolute;
  top: -6px;
  right: -6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  border-radius: 999px;
  background: #e4002b;
  color: #ffffff;
  font-size: 12px;
}

.notification-bell-panel {
  width: min(360px, calc(100vw - 32px));
  max-height: 420px;
  position: absolute;
  top: 54px;
  right: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border: 1px solid #dce4ef;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.99);
  box-shadow: 0 22px 54px rgba(31, 48, 72, 0.24);
  overflow: hidden;
}

.notification-bell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid #e1e6f0;
}

.notification-bell-header strong {
  color: #172033;
}

.notification-bell-header button {
  border: 0;
  background: transparent;
  color: #0b5ed7;
  font-size: 13px;
  font-weight: 800;
}

.notification-bell-list {
  max-height: 360px;
  overflow: auto;
}

.notification-bell-item {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-bottom: 1px solid #eef2f7;
  color: #172033;
  text-decoration: none;
}

.notification-bell-item:hover,
.notification-bell-item:focus {
  background: #f6f9ff;
  color: #172033;
}

.notification-bell-item strong {
  color: #123f91;
  font-size: 14px;
}

.notification-bell-item span {
  color: #384456;
  font-size: 13px;
}

.notification-bell-item small,
.notification-bell-empty {
  color: #6b7280;
  font-size: 12px;
  font-weight: 700;
}

.notification-bell-empty {
  padding: 18px 14px;
  text-align: center;
}

@keyframes notificationIn {
  from {
    opacity: 0;
    transform: translateX(18px);
  }

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

.app-page.app-sidebar-collapsed .app-content {
  width: min(100%, 1580px);
  padding-left: 72px;
  padding-right: 34px;
}

.app-page .work-page {
  padding: 0;
}

.app-page .work-header {
  padding: 16px 18px;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 36px rgba(31, 48, 72, 0.08);
}

.app-page .filter-panel,
.app-page .result-panel {
  border-color: #dce4ef;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 30px rgba(31, 48, 72, 0.08);
}

.app-page .inventory-table tbody td {
  vertical-align: middle;
}


.cxc-filter-panel {
  grid-template-columns: minmax(260px, 1fr) auto;
}

.cxc-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.85fr) minmax(0, 1.45fr);
  gap: 18px;
  align-items: start;
}

.cxc-client-panel,
.cxc-detail-panel {
  min-width: 0;
}

.cxc-client-scroll,
.cxc-detail-scroll {
  max-height: calc(100vh - 270px);
  min-height: 360px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.cxc-client-row {
  cursor: pointer;
}

.cxc-client-row.table-active td {
  background: #edf3ff;
}
.purchase-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.85fr);
  gap: 18px;
  align-items: start;
}

.purchase-list-panel,
.purchase-detail-panel {
  min-width: 0;
}

.purchase-detail-panel {
  position: sticky;
  top: 28px;
}

.purchase-detail-panel .table-responsive {
  max-height: calc(100vh - 260px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.purchase-detail-panel .inventory-table {
  margin-bottom: 0;
}

.purchase-detail-button {
  border-radius: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.exit-check-page {
  display: grid;
  gap: 14px;
  padding-bottom: 18px;
}

.exit-filter-panel {
  grid-template-columns: minmax(280px, 1fr) auto;
}

.history-filter-panel {
  grid-template-columns: 190px 190px auto;
}

.exit-list-scroll {
  max-height: clamp(190px, 28vh, 300px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 6px;
}

.exit-detail-scroll {
  height: calc(100vh - 520px);
  min-height: 260px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 12px;
}

.exit-items-grid {
  min-height: 0;
}

.exit-items-grid .warehouse-items-table {
  height: clamp(260px, calc(100vh - 500px), 430px);
  min-height: 260px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 12px;
}

.history-check-page .exit-list-scroll {
  max-height: clamp(180px, 25vh, 280px);
}

.history-check-page .exit-detail-scroll {
  height: clamp(260px, calc(100vh - 560px), 460px);
}

.exit-message {
  margin-left: auto;
  font-weight: 800;
}

.exit-check-button,
.exit-detail-button {
  border-radius: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.pos-page {
  padding-bottom: 120px;
}

.pos-header {
  gap: 16px;
}

.pos-mode {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pos-mode .btn {
  min-width: 118px;
  border-radius: 8px;
  font-weight: 800;
}

.pos-status-panel {
  margin-bottom: 14px;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.94);
  color: #123f91;
  font-weight: 800;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.14);
}

.pos-customer-panel,
.pos-client-search-panel,
.pos-search-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(10px);
}

.pos-customer-panel {
  grid-template-columns: 145px minmax(210px, 1fr) minmax(210px, 0.9fr) 150px 150px 150px;
}

.pos-customer-summary {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  gap: 8px;
}

.pos-customer-summary span {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f6f9ff;
  color: #687386;
  font-size: 12px;
  font-weight: 800;
}

.pos-customer-summary b {
  color: #172033;
  font-size: 14px;
}

.pos-customer-action {
  display: flex;
  align-items: end;
}

.pos-customer-action .btn {
  width: 100%;
  min-height: 48px;
  border-radius: 8px;
  font-weight: 800;
}

.pos-search-panel {
  grid-template-columns: minmax(280px, 1fr) 220px;
}

.pos-search-button {
  width: 100%;
  min-height: 52px;
  border-radius: 8px;
  font-weight: 800;
}

.pos-inline-status {
  min-height: 52px;
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 8px;
  background: #f6f9ff;
  color: #123f91;
  font-weight: 800;
}

.pos-client-search-panel {
  grid-template-columns: 220px minmax(260px, 1fr) minmax(320px, 1.2fr);
  align-items: end;
}

.pos-input,
.pos-search-input {
  min-height: 48px;
  border-radius: 8px;
}

.pos-search-input {
  font-size: 18px;
  font-weight: 700;
}

.pos-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 240px;
  gap: 14px;
  align-items: start;
}

.pos-product-list {
  max-height: 620px;
  overflow: auto;
  padding: 12px;
}

.pos-product-button {
  width: 100%;
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
  padding: 14px;
  border: 1px solid #dce3ee;
  border-radius: 10px;
  background: #ffffff;
  color: #172033;
  text-align: left;
}

.pos-product-button:hover,
.pos-product-button:focus {
  border-color: #0d6efd;
  box-shadow: 0 12px 28px rgba(13, 110, 253, 0.14);
}

.pos-product-button strong,
.pos-product-button small {
  display: block;
}

.pos-product-button small,
.pos-product-code {
  margin-top: 4px;
  color: #6b7280;
  font-size: 12px;
}

.pos-product-button b {
  color: #123f91;
  font-size: 17px;
  white-space: nowrap;
}

.pos-empty {
  padding: 28px 18px;
  color: #6b7280;
  text-align: center;
}

.pos-client-results {
  min-height: 48px;
  max-height: 360px;
  overflow: auto;
  border: 1px solid #dce3ee;
  border-radius: 10px;
  background: #ffffff;
}

.pos-client-results .pos-empty {
  padding: 12px;
}

.pos-client-button {
  width: 100%;
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid #edf0f6;
  background: #ffffff;
  color: #172033;
  text-align: left;
}

.pos-client-button:hover,
.pos-client-button:focus {
  background: #f5f8ff;
}

.pos-client-button strong,
.pos-client-button small {
  display: block;
}

.pos-client-button small {
  margin-top: 2px;
  color: #6b7280;
}

.pos-client-button b {
  min-width: 34px;
  padding: 5px 8px;
  border-radius: 8px;
  background: #edf3ff;
  color: #123f91;
  text-align: center;
}

.pos-client-modal {
  border: 0;
  border-radius: 12px;
  overflow: hidden;
}

.pos-client-modal-search {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.pos-product-modal-search {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px;
  margin-bottom: 14px;
}

.pending-panel {
  padding: 18px;
}

.pending-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: #5e6878;
  text-align: center;
}

.warehouse-page {
  display: grid;
  gap: 14px;
}

.warehouse-header-panel {
  min-width: 0;
}

.warehouse-message {
  margin-left: auto;
  color: #123f91;
  font-weight: 700;
}

.warehouse-header-scroll {
  max-height: 260px;
  overflow: auto;
}

.warehouse-header-table tbody tr {
  cursor: pointer;
}

.warehouse-header-table tbody tr.active td {
  background: #edf3ff;
}

.warehouse-selected-panel {
  padding: 14px 18px;
}

.warehouse-selected-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.warehouse-selected-header h2 {
  margin: 0;
  color: #172033;
  font-size: 24px;
  font-weight: 800;
}

.warehouse-selected-header span {
  color: #5e6878;
}

.warehouse-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.warehouse-actions .btn {
  border-radius: 8px;
  font-weight: 800;
}

.warehouse-items-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  align-items: start;
}

.warehouse-items-table {
  height: 310px;
  overflow: auto;
}

.warehouse-items-compact .result-panel {
  min-width: 0;
}

.pos-detail-table td:first-child {
  min-width: 320px;
}

.pos-detail-panel .table-responsive {
  max-height: calc(100vh - 390px);
  min-height: 360px;
  overflow: auto;
}

.pos-quantity {
  width: 132px;
  display: grid;
  grid-template-columns: 38px 56px 38px;
  gap: 4px;
}

.pos-quantity button,
.pos-quantity input,
.pos-price-input,
.pos-discount-input,
.pos-price-select {
  min-height: 38px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #ffffff;
  text-align: center;
  font-weight: 800;
}

.pos-price-input,
.pos-discount-input {
  width: 96px;
}

.pos-price-select {
  min-width: 132px;
  padding: 6px 28px 6px 10px;
  font-size: 13px;
}

.pos-price-readonly {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 8px;
  background: #f6f9ff;
  color: #123f91;
  font-weight: 800;
  white-space: nowrap;
}

.pos-total-panel {
  position: sticky;
  top: 28px;
  display: grid;
  gap: 9px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 20px 54px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(10px);
}

.pos-total-card {
  padding: 14px;
  border-radius: 10px;
  background: #123f91;
  color: #ffffff;
}

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

.pos-total-card span {
  margin-bottom: 6px;
  font-weight: 700;
  opacity: 0.84;
}

.pos-total-card strong {
  font-size: 26px;
  line-height: 1;
}

.pos-total-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #384456;
}

.pos-total-line b {
  color: #172033;
}

.pos-action-button {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 800;
}

.pos-note {
  padding: 10px 12px;
  border-radius: 8px;
  background: #f6f9ff;
  color: #5e6878;
  font-size: 13px;
}

@media (max-width: 992px) {
  .product-images-grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-definition-grid {
    grid-template-columns: 1fr;
  }

  .home-metric-grid {
    grid-template-columns: 1fr 1fr;
  }

  .home-operations-grid,
  .home-status-strip {
    grid-template-columns: 1fr 1fr;
  }

  .home-hero-total {
    margin-top: 16px;
    text-align: left;
  }

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

  .filter-actions {
    justify-content: stretch;
  }

  .filter-actions .btn {
    width: 100%;
  }

  .cxc-filter-panel,
  .cxc-layout {
    grid-template-columns: 1fr;
  }

  .cxc-client-scroll,
  .cxc-detail-scroll {
    max-height: none;
    min-height: 0;
  }

  .purchase-layout {
    grid-template-columns: 1fr;
  }

  .purchase-detail-panel {
    position: static;
  }

  .purchase-detail-panel .table-responsive {
    max-height: 420px;
  }

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

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

  .exit-list-scroll,
  .exit-detail-scroll {
    max-height: none;
    height: auto;
  }

  .pos-header {
    display: grid !important;
  }

  .pos-mode {
    width: 100%;
  }

  .pos-mode .btn {
    flex: 1;
  }

  .pos-customer-panel,
  .pos-client-search-panel,
  .pos-search-panel,
  .pos-layout {
    grid-template-columns: 1fr;
  }

  .pos-client-modal-search {
    grid-template-columns: 1fr;
  }

  .pos-customer-summary {
    grid-template-columns: 1fr 1fr;
  }

  .pos-product-modal-search {
    grid-template-columns: 1fr;
  }

  .pos-products-panel {
    order: 1;
  }

  .pos-detail-panel {
    order: 2;
  }

  .pos-total-panel {
    position: sticky;
    bottom: 0;
    top: auto;
    z-index: 10;
    order: 3;
    margin-left: -14px;
    margin-right: -14px;
    border-radius: 12px 12px 0 0;
  }

  .pos-product-list {
    max-height: 420px;
  }

  .warehouse-items-grid {
    grid-template-columns: 1fr;
  }

  .warehouse-selected-header {
    display: grid;
  }

  .warehouse-header-scroll,
  .warehouse-items-table {
    max-height: none;
    height: auto;
  }

  .exit-items-grid .warehouse-items-table {
    height: auto;
    min-height: 0;
  }
}

@media (max-width: 991px) {
  .app-page {
    min-height: 100vh;
    overflow: auto;
  }

  .app-shell {
    height: auto;
    min-height: 100vh;
    display: block;
    overflow: visible;
  }

  .app-sidebar {
    height: auto;
    display: none;
  }

  .app-page.app-sidebar-collapsed .app-shell {
    display: block;
  }

  .app-floating-toggle {
    display: none !important;
  }

  .app-topbar {
    min-height: 64px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
  }

  .app-menu-toggle {
    border-color: #d8dee8;
    border-radius: 8px;
    background: #ffffff;
  }

  .app-sidebar-toggle {
    display: inline-flex;
    box-shadow: none;
  }

  .app-mobile-menu-toggle {
    display: inline-flex;
  }

  .app-mobile-menu {
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #e1e6f0;
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
  }

  .app-mobile-menu.show {
    display: grid;
    gap: 8px;
  }

  .app-mobile-menu strong {
    margin-top: 6px;
    color: #687386;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .app-mobile-context {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    background: #edf3ff;
    color: #123f91;
    font-size: 13px;
    font-weight: 800;
  }

  .app-mobile-menu a {
    padding: 10px 12px;
    border-radius: 8px;
    background: #f5f8ff;
    color: #0b5ed7;
    font-weight: 800;
    text-decoration: none;
  }

  .app-mobile-logout-form {
    margin: 0;
  }

  .app-mobile-logout-form button {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #f5bcc8;
    border-radius: 8px;
    background: #fff6f8;
    color: #c41230;
    font-weight: 800;
    text-align: left;
  }

  .app-content {
    height: auto;
    overflow: visible;
    padding: 18px 14px 28px;
  }

  .app-page.app-sidebar-collapsed .app-content {
    width: min(100%, 1320px);
    padding: 18px 14px 28px;
  }

  .app-page .work-header {
    display: block;
  }

  .product-search-panel {
    grid-template-columns: 1fr;
  }

  .product-images-grid {
    grid-template-columns: 1fr;
  }

  .product-page {
    height: auto;
    display: grid;
    overflow: visible;
  }

  .product-table-scroll {
    max-height: 70vh;
  }

  .merchandise-cards {
    grid-template-columns: 1fr 1fr;
  }

  .merchandise-grid {
    grid-template-columns: 1fr;
  }

  .merchandise-table-scroll {
    max-height: 70vh;
    min-height: 320px;
  }

  .merchandise-filter {
    margin-top: 12px;
  }
}

@media (max-width: 640px) {
  .merchandise-cards {
    grid-template-columns: 1fr;
  }

  .merchandise-filter {
    align-items: stretch;
    flex-direction: column;
  }

  .home-metric-grid {
    grid-template-columns: 1fr;
  }

  .home-operations-grid,
  .home-status-strip,
  .home-operation-values {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991px), (pointer: coarse) {
  html,
  body.app-page {
    min-height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .app-page,
  .app-shell,
  .app-main,
  .app-content,
  .work-page {
    height: auto;
    min-height: 0;
  }

  .app-shell {
    overflow: visible;
  }

  .app-main,
  .app-content,
  .work-page,
  .warehouse-page,
  .exit-check-page,
  .product-page,
  .merchandise-page,
  .pos-page {
    overflow: visible;
  }

  .app-content {
    height: auto;
    padding-bottom: 96px;
  }

  .exit-list-scroll,
  .exit-detail-scroll,
  .warehouse-header-scroll,
  .warehouse-items-table,
  .exit-items-grid .warehouse-items-table {
    max-height: none;
    height: auto;
    min-height: 0;
  }
}

.permissions-filter-panel {
  grid-template-columns: minmax(260px, 1fr) auto;
}

.permissions-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(240px, 0.85fr) minmax(420px, 1.6fr);
  gap: 14px;
  align-items: start;
}

.permissions-list-panel,
.permissions-editor-panel {
  min-width: 0;
}

.permissions-list-scroll {
  max-height: calc(100vh - 260px);
  min-height: 320px;
  overflow: auto;
  padding: 10px;
}

.permissions-list-item {
  display: block;
  margin-bottom: 8px;
  padding: 11px 12px;
  border: 1px solid #dce4ef;
  border-radius: 9px;
  background: #ffffff;
  color: #172033;
  text-decoration: none;
}

.permissions-list-item:hover,
.permissions-list-item:focus,
.permissions-list-item.active {
  border-color: #0b5ed7;
  background: #f5f8ff;
  color: #172033;
}

.permissions-list-item strong,
.permissions-list-item small {
  display: block;
}

.permissions-list-item small {
  margin-top: 3px;
  color: #687386;
  font-size: 12px;
  font-weight: 700;
}

.permissions-form {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.permissions-editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e1e6f0;
}

.permissions-editor-header h2 {
  margin: 0;
  color: #172033;
  font-size: 24px;
  font-weight: 800;
}

.permissions-editor-header span {
  color: #687386;
  font-weight: 700;
}

.permissions-group-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.permissions-group {
  min-width: 0;
  margin: 0;
  padding: 13px;
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: #f8fbff;
}

.permissions-group legend {
  float: none;
  width: auto;
  margin-bottom: 10px;
  padding: 0;
  color: #123f91;
  font-size: 14px;
  font-weight: 900;
}

.permissions-check {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 32px;
  color: #384456;
  font-weight: 700;
}

@media (max-width: 1200px) {
  .permissions-layout,
  .permissions-group-grid {
    grid-template-columns: 1fr;
  }

  .permissions-list-scroll {
    max-height: none;
    min-height: 0;
  }

  .permissions-editor-header {
    display: grid;
  }
}

.permissions-window-page {
  height: calc(100vh - 40px);
  min-height: 620px;
  padding: 0;
}

.permissions-window {
  height: 100%;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border: 1px solid #dce4ef;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 16px 36px rgba(31, 48, 72, 0.08);
  overflow: hidden;
}

.permissions-window-header {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(420px, 0.9fr);
  gap: 18px;
  align-items: end;
  padding: 16px 18px;
  border-bottom: 1px solid #e1e6f0;
  background: #ffffff;
}

.permissions-window-header h1 {
  margin: 0;
  color: #172033;
  font-size: 28px;
  font-weight: 800;
}

.permissions-window-search {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
}

.permissions-window-search .form-label {
  margin-bottom: 0;
  padding-bottom: 8px;
  color: #5e6878;
  font-weight: 800;
}

.permissions-window-alert {
  margin: 10px 14px 0;
}

.permissions-window-body {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(250px, 0.95fr) minmax(250px, 0.95fr) minmax(500px, 1.55fr);
  border-top: 0;
}

.permissions-pane {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-right: 1px solid #e1e6f0;
  background: #ffffff;
}

.permissions-pane:last-child {
  border-right: 0;
}

.permissions-pane-title {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #e1e6f0;
  background: #f6f9ff;
}

.permissions-pane-title strong {
  color: #123f91;
  font-weight: 900;
}

.permissions-pane-title span {
  min-width: 30px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e7f7f2;
  color: #087f5b;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.permissions-table-scroll,
.permissions-detail-scroll {
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.permissions-select-table {
  font-size: 13px;
}

.permissions-select-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.permissions-select-table tbody tr.active td {
  background: #edf3ff;
}

.permissions-select-table a {
  display: block;
  color: #172033;
  font-weight: 800;
  text-decoration: none;
}

.permissions-select-table td {
  cursor: pointer;
}

.permissions-detail-pane {
  background: #fbfdff;
}

.permissions-empty-detail {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 24px;
  color: #687386;
  text-align: center;
  font-weight: 700;
}

.permissions-detail-form {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.permissions-detail-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-bottom: 1px solid #e1e6f0;
  background: #ffffff;
}

.permissions-detail-header p {
  margin: 0 0 3px;
  color: #0d6efd;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.permissions-detail-header h2 {
  margin: 0;
  color: #172033;
  font-size: 22px;
  font-weight: 800;
}

.permissions-detail-header span {
  display: block;
  margin-top: 3px;
  color: #687386;
  font-weight: 700;
}

.permissions-compact-group {
  margin: 0;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid #e1e6f0;
}

.permissions-compact-group legend {
  float: none;
  width: auto;
  margin: 0 0 8px;
  color: #123f91;
  font-size: 14px;
  font-weight: 900;
}

.permissions-compact-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 12px;
}

.permissions-compact-checks .permissions-check {
  min-height: 28px;
}

@media (max-width: 1200px) {
  .permissions-window-page {
    height: auto;
    min-height: 0;
  }

  .permissions-window,
  .permissions-window-body,
  .permissions-detail-form {
    display: block;
    height: auto;
  }

  .permissions-window-header {
    grid-template-columns: 1fr;
  }

  .permissions-window-search,
  .permissions-compact-checks {
    grid-template-columns: 1fr;
  }

  .permissions-pane {
    border-right: 0;
    border-bottom: 1px solid #e1e6f0;
  }

  .permissions-table-scroll,
  .permissions-detail-scroll {
    max-height: none;
    overflow: visible;
  }
}

/* Ajuste final: conservar el layout de tarjetas y usar pestanas solo para permisos. */
.permissions-page:not(.permissions-window-page) {
  height: auto;
  min-height: 0;
  padding: 0;
}

.permissions-page:not(.permissions-window-page) .permissions-layout-cards {
  display: grid;
  grid-template-columns: minmax(220px, 0.75fr) minmax(240px, 0.85fr) minmax(460px, 1.6fr);
  gap: 14px;
  align-items: start;
  border-top: 0;
}

.permissions-page:not(.permissions-window-page) .permissions-list-panel,
.permissions-page:not(.permissions-window-page) .permissions-editor-panel {
  min-width: 0;
  display: block;
  border-right: 0;
  background: rgba(255, 255, 255, 0.94);
}

.permissions-page:not(.permissions-window-page) .permissions-list-scroll {
  max-height: calc(100vh - 260px);
  min-height: 320px;
  overflow: auto;
  padding: 10px;
}

.permissions-tab-form {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 0;
  padding: 0;
}

.permissions-tab-form .permissions-editor-header {
  margin: 0;
  padding: 16px;
  border-bottom: 1px solid #e1e6f0;
}

.permissions-tabs {
  padding: 10px 12px 0;
  background: #f6f9ff;
  border-bottom: 1px solid #dce4ef;
  gap: 4px;
}

.permissions-tabs .nav-link {
  border-radius: 8px 8px 0 0;
  color: #5e6878;
  font-size: 13px;
  font-weight: 900;
}

.permissions-tabs .nav-link.active {
  color: #123f91;
}

.permissions-tab-content {
  min-height: 330px;
  padding: 16px;
  background: #ffffff;
}

.permissions-tab-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 16px;
}

.permissions-tab-checks .permissions-check {
  min-height: 34px;
  padding: 5px 6px;
  border-radius: 8px;
}

.permissions-tab-checks .permissions-check:hover {
  background: #f6f9ff;
}

@media (max-width: 1200px) {
  .permissions-page:not(.permissions-window-page) .permissions-layout-cards,
  .permissions-tab-checks {
    grid-template-columns: 1fr;
  }

  .permissions-page:not(.permissions-window-page) .permissions-list-scroll {
    max-height: none;
    min-height: 0;
  }
}

.permissions-layout-cards.is-loading {
  opacity: 0.72;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.permissions-selection-form {
  margin: 0;
}

.permissions-selection-form .permissions-list-item {
  width: 100%;
  border: 1px solid #dce4ef;
  text-align: left;
}

#app-page-content.is-loading {
  opacity: 0.58;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.app-menu-link.active,
.app-mobile-menu a.active {
  background: #edf3ff;
  color: #123f91;
}

.completed-sales-filter {
  grid-template-columns: 170px 170px 180px minmax(220px, 1fr) auto;
}

.completed-sales-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(360px, 0.75fr);
  gap: 14px;
  align-items: start;
}

.completed-sales-list-panel,
.completed-sales-detail-panel {
  min-width: 0;
}

.completed-sales-table-scroll {
  height: calc(100vh - 300px);
  min-height: 360px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.completed-sales-detail-scroll {
  height: calc(100vh - 300px);
  min-height: 360px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.completed-sales-table-scroll .inventory-table thead th,
.completed-sales-detail-scroll .inventory-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.completed-sale-row {
  cursor: pointer;
}

.completed-sales-total {
  margin-left: auto;
  color: #087f5b;
  font-weight: 900;
}

@media (max-width: 1100px) {
  .completed-sales-filter,
  .completed-sales-layout {
    grid-template-columns: 1fr;
  }

  .completed-sales-table-scroll,
  .completed-sales-detail-scroll {
    height: auto;
    max-height: 70vh;
  }
}

.cash-page {
  display: grid;
  gap: 14px;
}

.cash-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 8px;
  background: #e7f7f2;
  color: #087f5b;
  font-weight: 800;
}

.cash-opening-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 18px;
  align-items: center;
  padding: 20px;
}

.cash-opening-content h2 {
  margin-bottom: 8px;
  color: #172033;
  font-size: 26px;
  font-weight: 800;
}

.cash-opening-content p:last-child {
  margin-bottom: 0;
  color: #5e6878;
}

.cash-opening-form .input-group-text,
.cash-opening-form .form-control,
.cash-opening-form .btn {
  min-height: 46px;
}

.cash-opening-form .btn {
  font-weight: 800;
}

.cash-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(360px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.cash-list-panel,
.cash-detail-panel {
  min-width: 0;
}

.cash-table-scroll {
  max-height: calc(100vh - 260px);
  min-height: 380px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.cash-detail-scroll {
  max-height: calc(100vh - 260px);
  min-height: 380px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.cash-table-scroll .inventory-table thead th,
.cash-detail-scroll .inventory-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.cash-sale-row {
  cursor: pointer;
}

.cash-total {
  margin-left: auto;
  color: #123f91;
}

@media (max-width: 992px) {
  .cash-opening-panel,
  .cash-layout {
    grid-template-columns: 1fr;
  }

  .cash-table-scroll,
  .cash-detail-scroll {
    max-height: 70vh;
    min-height: 0;
  }
}

.cash-charge-button {
  border-radius: 8px;
  font-weight: 800;
  white-space: nowrap;
}

.cash-charge-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 8px;
  background: #f6f9ff;
}

.cash-charge-summary span {
  color: #5e6878;
  font-weight: 800;
}

.cash-charge-summary strong {
  color: #123f91;
  font-size: 24px;
  line-height: 1;
}

.cash-payment-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.cash-charge-balance {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #e1e6f0;
  color: #384456;
  font-weight: 800;
}

.cash-charge-balance strong {
  color: #172033;
}

@media (max-width: 640px) {
  .cash-payment-grid {
    grid-template-columns: 1fr;
  }
}







.pos-line-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

@media (max-width: 640px) {
  .pos-line-actions {
    grid-template-columns: 1fr;
  }
}

.report-table .report-column-filters th {
  padding: 6px 8px 10px;
  background: #f8fbff;
  border-top: 0;
}

.report-column-filter {
  min-width: 120px;
  border-color: #d7e0ec;
  font-size: 12px;
  font-weight: 600;
}

.report-column-filter::placeholder {
  color: #8a96a8;
}
/* AdminLTE-inspired application shell */
.app-page {
  background: #f4f6f9;
  color: #1f2937;
}

.app-shell {
  grid-template-columns: 270px 1fr;
  background: #f4f6f9;
}

.app-sidebar {
  padding: 0;
  border-right: 0;
  background: #343a40;
  box-shadow: 0 0 16px rgba(0, 0, 0, 0.24);
}

.app-page.app-sidebar-collapsed .app-sidebar {
  width: 270px;
}

.app-sidebar-brand {
  min-height: 66px;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: #343a40;
}

.app-sidebar-brand .login-brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: #0d6efd;
  box-shadow: none;
}

.app-sidebar-brand strong {
  color: #f8f9fa;
  font-size: 18px;
  letter-spacing: .02em;
}

.app-sidebar-brand small {
  color: #c2c7d0;
  line-height: 1.25;
}

.app-sidebar-brand .app-session-context {
  max-width: 165px;
  color: #adb5bd;
  font-weight: 700;
}

.app-menu {
  gap: 2px;
  margin-top: 0;
  padding: 12px 10px 18px;
  scrollbar-color: #6c757d transparent;
}

.app-menu-section {
  margin: 14px 8px 6px;
  color: #8f9ca8;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.app-menu-section:first-child {
  margin-top: 4px;
}

.app-menu-link,
.app-menu-group summary {
  min-height: 40px;
  gap: 10px;
  padding: 7px 9px;
  border: 0;
  border-radius: 6px;
  color: #c2c7d0;
  font-size: 14px;
  font-weight: 700;
}

.app-menu-link span,
.app-menu-group summary span {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8f9fa;
  font-size: 11px;
}

.app-menu-link:hover,
.app-menu-link:focus,
.app-menu-group summary:hover,
.app-menu-group summary:focus {
  background: rgba(255, 255, 255, 0.10);
  color: #ffffff;
  transform: none;
}

.app-menu-link.active,
.app-mobile-menu a.active {
  background: #0d6efd;
  color: #ffffff;
}

.app-menu-link.active span {
  background: rgba(255, 255, 255, 0.18);
}

.app-menu-group {
  border: 0;
  border-radius: 6px;
}

.app-menu-group[open] {
  border-color: transparent;
  background: rgba(0, 0, 0, 0.12);
}

.app-menu-group summary::after {
  border-color: #adb5bd;
}

.app-menu-children {
  gap: 2px;
  padding: 2px 0 7px 16px;
}

.app-menu-children .app-menu-link {
  min-height: 34px;
  padding: 5px 8px;
  color: #b8c0ca;
  font-size: 13px;
}

.app-menu-children .app-menu-link span {
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.06);
  color: #dbe2ea;
  font-size: 10px;
}

.app-menu-subgroup {
  margin-left: 0;
}

.app-menu-button {
  color: #f1b0b7;
}

.app-menu-button span {
  background: rgba(220, 53, 69, 0.18);
  color: #f1b0b7;
}

.app-sidebar-toggle,
.app-floating-toggle {
  border-color: #ced4da;
  background: #ffffff;
  color: #343a40;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
}

.app-sidebar-toggle span,
.app-floating-toggle span {
  background: #343a40;
}

.app-main {
  background: #f4f6f9;
}

.app-content {
  width: min(100%, 1480px);
  padding: 18px 22px 42px;
}

@media (max-width: 991px) {
  .app-topbar {
    background: #343a40;
    color: #ffffff;
    border-bottom: 0;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
  }

  .app-menu-toggle {
    border-color: rgba(255,255,255,.18);
    background: rgba(255,255,255,.12);
  }

  .app-mobile-menu {
    background: #343a40;
    border-bottom: 0;
  }

  .app-mobile-menu strong {
    color: #8f9ca8;
    letter-spacing: .08em;
  }

  .app-mobile-context {
    background: rgba(255,255,255,.08);
    color: #e9ecef;
  }

  .app-mobile-menu a {
    background: rgba(255,255,255,.08);
    color: #e9ecef;
  }

  .app-mobile-menu a:hover,
  .app-mobile-menu a:focus {
    background: rgba(255,255,255,.14);
    color: #ffffff;
  }

  .app-mobile-logout-form button {
    border-color: rgba(220, 53, 69, .35);
    background: rgba(220, 53, 69, .16);
    color: #f1b0b7;
  }
}

/* AdminLTE-inspired login */
.adminlte-login-page {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(13, 110, 253, .16), transparent 34%),
    linear-gradient(135deg, #e9ecef 0%, #f4f6f9 54%, #ffffff 100%);
  color: #343a40;
}

.adminlte-login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 22px;
}

.adminlte-login-box {
  width: min(100%, 420px);
}

.adminlte-login-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 14px;
  color: #343a40;
  text-align: left;
}

.adminlte-login-logo span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #0d6efd;
  color: #ffffff;
  font-size: 23px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(13, 110, 253, .24);
}

.adminlte-login-logo strong,
.adminlte-login-logo small {
  display: block;
}

.adminlte-login-logo strong {
  color: #343a40;
  font-size: 28px;
  line-height: 1;
  letter-spacing: .02em;
}

.adminlte-login-logo small {
  margin-top: 4px;
  color: #6c757d;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
}

.adminlte-login-card {
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(33, 37, 41, .18);
  overflow: hidden;
}

.adminlte-login-header {
  padding: 20px 22px 18px;
  background: #343a40;
  color: #ffffff;
  text-align: center;
}

.adminlte-login-header h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 800;
}

.adminlte-login-header p {
  margin: 6px 0 0;
  color: #c2c7d0;
  font-size: 14px;
}

.adminlte-login-card > .alert,
.adminlte-company-switch,
.adminlte-input-group,
.adminlte-login-options,
.adminlte-login-button {
  margin-left: 22px;
  margin-right: 22px;
}

.adminlte-login-card > .alert {
  margin-top: 18px;
}

.adminlte-company-switch,
.adminlte-input-group {
  display: grid;
  gap: 6px;
  margin-top: 16px;
}

.adminlte-company-switch label,
.adminlte-input-group label {
  color: #495057;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.adminlte-company-switch .form-select,
.adminlte-input-wrap .form-control {
  min-height: 42px;
  border-color: #ced4da;
  border-radius: 6px;
  color: #212529;
  font-weight: 700;
}

.adminlte-company-switch .form-select:focus,
.adminlte-input-wrap .form-control:focus {
  border-color: #0d6efd;
  box-shadow: 0 0 0 .16rem rgba(13, 110, 253, .16);
}

.adminlte-input-wrap {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  border: 1px solid #ced4da;
  border-radius: 6px;
  overflow: hidden;
  background: #ffffff;
}

.adminlte-input-wrap:focus-within {
  border-color: #0d6efd;
  box-shadow: 0 0 0 .16rem rgba(13, 110, 253, .16);
}

.adminlte-input-wrap span {
  display: grid;
  place-items: center;
  background: #f4f6f9;
  color: #6c757d;
  font-size: 12px;
  font-weight: 900;
  border-right: 1px solid #ced4da;
}

.adminlte-input-wrap .form-control {
  border: 0;
  box-shadow: none;
}

.adminlte-input-wrap .form-control:focus {
  box-shadow: none;
}

.adminlte-login-options {
  margin-top: 14px;
  color: #495057;
  font-weight: 700;
}

.adminlte-login-options .form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  margin: 0;
  padding-left: 0;
}

.adminlte-login-options .form-check-input {
  float: none;
  margin: 0;
}

.adminlte-login-button {
  min-height: 44px;
  margin-top: 18px;
  margin-bottom: 22px;
  border: 0;
  border-radius: 6px;
  background: #0d6efd;
  color: #ffffff;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.adminlte-login-button:hover,
.adminlte-login-button:focus {
  background: #0b5ed7;
  color: #ffffff;
}

@media (max-width: 520px) {
  .adminlte-login-shell {
    padding: 14px;
  }

  .adminlte-login-logo strong {
    font-size: 24px;
  }

  .adminlte-login-card > .alert,
  .adminlte-company-switch,
  .adminlte-input-group,
  .adminlte-login-options,
  .adminlte-login-button {
    margin-left: 16px;
    margin-right: 16px;
  }
}

/* AdminLTE-inspired society/branch selection */
.access-page {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(13, 110, 253, .16), transparent 34%),
    linear-gradient(135deg, #e9ecef 0%, #f4f6f9 54%, #ffffff 100%);
  color: #343a40;
}

.branch-shell {
  min-height: calc(100vh - 70px);
  display: grid;
  place-items: center;
  padding: 24px;
}

.branch-card {
  width: min(100%, 760px);
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(33, 37, 41, .18);
  overflow: hidden;
}

.branch-header {
  max-width: none;
  margin: 0;
  padding: 22px 26px;
  background: #343a40;
  color: #ffffff;
  text-align: center;
}

.branch-header .login-brand-mark {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  border-radius: 8px;
  background: #0d6efd;
  box-shadow: 0 12px 24px rgba(13, 110, 253, .24);
}

.branch-kicker {
  margin: 0 0 6px;
  color: #8bb9ff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}

.branch-header h1 {
  margin: 0;
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
}

.branch-header p:last-child {
  max-width: 520px;
  margin: 8px auto 0;
  color: #c2c7d0;
  font-size: 14px;
}

.branch-card > .alert {
  margin: 18px 22px 0;
  border-radius: 6px;
}

.branch-list {
  display: grid;
  gap: 10px;
  padding: 22px;
}

.branch-option {
  margin: 0;
}

.branch-button {
  width: 100%;
  min-height: 76px;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  padding: 13px 14px;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  background: #ffffff;
  color: #343a40;
  text-align: left;
  box-shadow: none;
}

.branch-button:hover,
.branch-button:focus {
  border-color: #0d6efd;
  background: #f8fbff;
  box-shadow: 0 10px 24px rgba(13, 110, 253, .13);
  transform: translateY(-1px);
}

.branch-icon {
  width: 46px;
  height: 46px;
  margin: 0;
  border-radius: 8px;
  background: #0d6efd;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
}

.branch-text strong {
  color: #212529;
  font-size: 16px;
  font-weight: 900;
}

.branch-text small {
  margin-top: 3px;
  color: #6c757d;
  font-size: 13px;
  font-weight: 700;
}

.branch-action {
  padding: 8px 12px;
  border-radius: 6px;
  background: #343a40;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
}

.branch-button:hover .branch-action,
.branch-button:focus .branch-action {
  background: #0d6efd;
}

@media (max-width: 640px) {
  .branch-shell {
    padding: 14px;
  }

  .branch-header {
    padding: 20px 18px;
  }

  .branch-list {
    padding: 16px;
  }

  .branch-button {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .branch-action {
    grid-column: 1 / -1;
    text-align: center;
  }
}

/* AdminLTE polish for administrative modules */
.administrative-page,
.trace-page,
.consolidated-page,
.admin-report-page,
.executive-dashboard-page {
  color: #343a40;
}

.administrative-hero-panel,
.trace-hero,
.consolidated-hero,
.admin-report-hero,
.executive-hero-panel {
  background: #343a40 !important;
  color: #ffffff !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 22px rgba(0, 0, 0, .12) !important;
}

.administrative-hero-panel .work-kicker,
.trace-hero .work-kicker,
.consolidated-hero .work-kicker,
.admin-report-hero .work-kicker,
.executive-hero-panel .work-kicker {
  color: #c2c7d0 !important;
}

.administrative-hero-panel .home-lead,
.trace-hero .home-lead,
.consolidated-hero .home-lead,
.admin-report-hero .home-lead,
.executive-hero-panel .home-lead {
  color: #e9ecef !important;
}

.administrative-card,
.trace-option,
.trace-panel,
.consolidated-panel,
.admin-report-panel,
.admin-report-option-group,
.executive-card,
.executive-chart-card {
  border: 1px solid #dee2e6 !important;
  border-radius: 8px !important;
  background: #ffffff !important;
  color: #343a40 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .045) !important;
}

.administrative-card span,
.trace-option span,
.admin-report-option-group span {
  background: #e9ecef !important;
  color: #0d6efd !important;
}

.administrative-card-primary span,
.trace-option-active span,
.admin-report-option-active span {
  background: #0d6efd !important;
  color: #ffffff !important;
}

.trace-option-active,
.admin-report-option-active,
a.administrative-card:hover,
a.administrative-card:focus {
  border-color: #0d6efd !important;
  box-shadow: 0 8px 22px rgba(13, 110, 253, .10) !important;
}

.administrative-section-title strong,
.trace-panel h2,
.consolidated-panel h2,
.admin-report-panel h2,
.executive-card strong,
.executive-chart-card h2 {
  color: #343a40 !important;
}

.administrative-section-title span,
.administrative-card small,
.trace-option small,
.admin-report-option-group small,
.consolidated-muted,
.admin-report-muted,
.executive-muted {
  color: #6c757d !important;
}

/* AdminLTE final theme */
.app-page,
.app-main {
  background: #f4f6f9 !important;
  color: #212529 !important;
}

.app-sidebar {
  background: #343a40 !important;
  border-right: 0 !important;
  box-shadow: 0 0 16px rgba(0, 0, 0, .24) !important;
}

.app-sidebar-brand {
  background: #343a40 !important;
  border-bottom: 1px solid rgba(255,255,255,.08) !important;
}

.app-sidebar-brand .login-brand-mark {
  background: #007bff !important;
  color: #ffffff !important;
}

.app-sidebar-brand strong {
  color: #ffffff !important;
}

.app-sidebar-brand small,
.app-sidebar-brand .app-session-context {
  color: #c2c7d0 !important;
}

.app-menu-section {
  color: #8f9ca8 !important;
}

.app-menu-link,
.app-menu-group summary {
  background: transparent !important;
  color: #c2c7d0 !important;
}

.app-menu-link span,
.app-menu-group summary span {
  background: rgba(255,255,255,.08) !important;
  color: #f8f9fa !important;
}

.app-menu-link:hover,
.app-menu-link:focus,
.app-menu-group summary:hover,
.app-menu-group summary:focus,
.app-menu-group[open] > summary {
  background: rgba(255,255,255,.10) !important;
  color: #ffffff !important;
}

.app-menu-link.active,
.app-mobile-menu a.active {
  background: #007bff !important;
  color: #ffffff !important;
}

.app-menu-link.active span,
.app-menu-group[open] > summary span {
  background: rgba(255,255,255,.18) !important;
  color: #ffffff !important;
}

.app-menu-group[open] {
  background: rgba(0, 0, 0, .12) !important;
}

.app-menu-children .app-menu-link {
  color: #b8c0ca !important;
}

.app-menu-children .app-menu-link span {
  background: rgba(255,255,255,.06) !important;
  color: #dbe2ea !important;
}

.app-menu-button {
  color: #f1b0b7 !important;
}

.app-menu-button span {
  background: rgba(220,53,69,.18) !important;
  color: #f1b0b7 !important;
}

.app-topbar {
  background: #ffffff !important;
  color: #343a40 !important;
  border-bottom: 1px solid #dee2e6 !important;
  box-shadow: 0 1px 2px rgba(0,0,0,.04) !important;
}

.administrative-hero-panel,
.trace-hero,
.consolidated-hero,
.admin-report-hero,
.executive-hero-panel {
  background: #ffffff !important;
  color: #343a40 !important;
  border: 1px solid #dee2e6 !important;
  border-top: 3px solid #007bff !important;
  border-radius: 4px !important;
  box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2) !important;
}

.administrative-hero-panel .work-kicker,
.trace-hero .work-kicker,
.consolidated-hero .work-kicker,
.admin-report-hero .work-kicker,
.executive-hero-panel .work-kicker {
  color: #007bff !important;
}

.administrative-hero-panel .home-lead,
.trace-hero .home-lead,
.consolidated-hero .home-lead,
.admin-report-hero .home-lead,
.executive-hero-panel .home-lead {
  color: #6c757d !important;
}

.administrative-card,
.trace-option,
.trace-panel,
.consolidated-panel,
.admin-report-panel,
.admin-report-option-group,
.executive-card,
.executive-chart-card {
  background: #ffffff !important;
  color: #343a40 !important;
  border: 1px solid #dee2e6 !important;
  border-radius: 4px !important;
  box-shadow: 0 0 1px rgba(0,0,0,.125), 0 1px 3px rgba(0,0,0,.2) !important;
}

.administrative-card span,
.trace-option span,
.admin-report-option-group span {
  background: #007bff !important;
  color: #ffffff !important;
  border-radius: 4px !important;
}

.administrative-card-primary span,
.trace-option-active span,
.admin-report-option-active span {
  background: #17a2b8 !important;
  color: #ffffff !important;
}

.trace-option-active,
.admin-report-option-active,
a.administrative-card:hover,
a.administrative-card:focus {
  border-color: #007bff !important;
  box-shadow: 0 0 1px rgba(0,123,255,.35), 0 4px 10px rgba(0,123,255,.16) !important;
}
/* AdminLTE icon polish */
.app-menu-link .nav-icon,
.app-menu-group summary .nav-icon {
  width: 1.6rem !important;
  min-width: 1.6rem !important;
  height: auto !important;
  margin-right: .45rem !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  color: #c2c7d0 !important;
  font-size: .96rem !important;
  line-height: 1 !important;
  border-radius: 0 !important;
}

.app-menu-link:hover .nav-icon,
.app-menu-link:focus .nav-icon,
.app-menu-group summary:hover .nav-icon,
.app-menu-group summary:focus .nav-icon,
.app-menu-group[open] > summary .nav-icon,
.app-menu-link.active .nav-icon {
  color: #ffffff !important;
  background: transparent !important;
}

.app-menu-children .app-menu-link .nav-icon {
  width: 1.45rem !important;
  min-width: 1.45rem !important;
  font-size: .86rem !important;
  color: #b8c0ca !important;
}

.app-menu-children .app-menu-link:hover .nav-icon,
.app-menu-children .app-menu-link.active .nav-icon {
  color: #ffffff !important;
}

.app-menu-button .nav-icon {
  color: #f1b0b7 !important;
}

.app-sidebar-brand .login-brand-mark i,
.adminlte-login-logo span i,
.notification-bell-icon i {
  line-height: 1;
}

.adminlte-company-switch label i {
  width: 1.05rem;
  margin-right: .35rem;
  color: #007bff;
}

.adminlte-login-button i {
  margin-right: .45rem;
}

/* Product credit */
.app-sidebar {
  display: flex !important;
  flex-direction: column !important;
}

.app-menu {
  flex: 1 1 auto !important;
}

.app-sidebar-footer {
  padding: 12px 16px 14px;
  border-top: 1px solid rgba(255,255,255,.08);
  color: #c2c7d0;
  font-size: .74rem;
  line-height: 1.25;
}

.app-sidebar-footer strong,
.app-sidebar-footer span,
.app-sidebar-footer small {
  display: block;
}

.app-sidebar-footer strong {
  color: #ffffff;
  font-size: .82rem;
  letter-spacing: .03em;
}

.app-sidebar-footer span {
  margin-top: 2px;
  color: #adb5bd;
}

.app-sidebar-footer small {
  margin-top: 5px;
  color: #8f9ca8;
}

.adminlte-login-credit {
  margin: 12px 0 0;
  text-align: center;
  color: #6c757d;
  font-size: .78rem;
  font-weight: 600;
}

/* Sidebar credit refinement */
.app-sidebar-footer {
  margin: 10px 10px 12px;
  padding: 12px 13px !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  border-radius: 6px;
  background: rgba(0,0,0,.16);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.04);
}

.app-sidebar-footer strong {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #ffffff !important;
  font-size: .84rem !important;
}

.app-sidebar-footer strong::before {
  content: "\f1ad";
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  color: #007bff;
}

.app-sidebar-footer span {
  color: #c2c7d0 !important;
  font-size: .72rem;
}

.app-sidebar-footer small {
  color: #8f9ca8 !important;
  font-size: .69rem;
}
