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;
}

.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-images-modal {
  border: 0;
  border-radius: 10px;
  overflow: hidden;
}

.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;
}

.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;
}

.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-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 28px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.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;
}

.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;
}

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

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

.exit-list-scroll {
  max-height: 280px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}

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

.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-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-price-select {
  min-height: 38px;
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #ffffff;
  text-align: center;
  font-weight: 800;
}

.pos-price-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;
  }

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

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

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

  .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-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;
  }
}

@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;
  }

  .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-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;
  }
}
