:root {
  --brand: #1377A9;
  --brand-soft: #e9f5fb;
  --bg: #f6f8fb;
  --card: #ffffff;
  --text: #18212b;
  --muted: #6f7a86;
  --line: #e5e9ef;
  --success: #1f9d55;
  --warning: #d98b00;
  --danger: #d64545;
  --shadow: 0 10px 30px rgba(20, 33, 61, 0.08);
  --radius: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: none;
}

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: #0f1720;
  color: #fff;
  padding: 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand h1,
.brand p {
  margin: 0;
}

.brand h1 {
  font-size: 20px;
}

.brand p {
  color: rgba(255, 255, 255, 0.68);
  font-size: 13px;
}

.brand-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--brand);
  font-weight: 700;
  font-size: 20px;
}

.nav {
  display: grid;
  gap: 10px;
}

.nav-item {
  width: 100%;
  text-align: left;
  padding: 14px 16px;
  border-radius: 14px;
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  transition: 0.2s ease;
}

.nav-item:hover,
.nav-item.active {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-footer {
  margin-top: auto;
}

.merchant-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.merchant-card strong,
.merchant-card span {
  display: block;
}

.merchant-card span {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.68);
  margin-top: 3px;
}

.merchant-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #31c46d;
  box-shadow: 0 0 0 4px rgba(49, 196, 109, 0.15);
}

.main {
  padding: 26px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.topbar h2 {
  margin: 0 0 6px;
  font-size: 30px;
}

.subtext {
  margin: 0;
  color: var(--muted);
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.primary-btn,
.secondary-btn,
.text-btn,
.icon-btn,
.filter-chip {
  transition: 0.2s ease;
}

.primary-btn {
  background: var(--brand);
  color: white;
  padding: 12px 18px;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.primary-btn:hover {
  transform: translateY(-1px);
}

.secondary-btn {
  background: white;
  color: var(--text);
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
}

.text-btn {
  background: transparent;
  color: var(--brand);
  padding: 0;
}

.page-section {
  display: none;
}

.page-section.active {
  display: block;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.stat-label {
  display: block;
  color: var(--muted);
  margin-bottom: 10px;
  font-size: 14px;
}

.stat-card strong {
  font-size: 34px;
}

.panel-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: 18px;
}

.panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.panel-header h3 {
  margin: 0;
  font-size: 20px;
}

.panel-header-wrap {
  align-items: flex-start;
  flex-direction: column;
}

.list-stack {
  display: grid;
  gap: 12px;
}

.list-item {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.list-item h4,
.list-item p {
  margin: 0;
}

.list-item p {
  color: var(--muted);
  margin-top: 6px;
  font-size: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.badge.pending {
  background: #fff3db;
  color: var(--warning);
}

.badge.assigned {
  background: #e6f1ff;
  color: #2f6fd6;
}

.badge.ready {
  background: #def7e8;
  color: var(--success);
}

.badge.completed {
  background: #eef1f5;
  color: #57616c;
}

.locker-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(76px, 1fr));
  gap: 12px;
}

.locker-grid-large {
  grid-template-columns: repeat(5, minmax(90px, 1fr));
}

.locker-tile {
  border-radius: 18px;
  padding: 16px 10px;
  text-align: center;
  border: 1px solid var(--line);
  background: #fff;
}

.locker-tile strong,
.locker-tile span {
  display: block;
}

.locker-tile strong {
  margin-bottom: 6px;
}

.locker-tile.available {
  background: #f5fbf7;
  border-color: #d3efdc;
}

.locker-tile.occupied {
  background: #fff7ea;
  border-color: #ffe0a7;
}

.locker-tile.ready {
  background: #edf8ff;
  border-color: #ccecff;
}

.locker-tile span {
  color: var(--muted);
  font-size: 12px;
}

.filters {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-chip {
  padding: 9px 14px;
  border-radius: 999px;
  background: #f3f6f9;
  color: var(--muted);
}

.filter-chip.active {
  background: var(--brand-soft);
  color: var(--brand);
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 15px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.table-btn {
  padding: 8px 12px;
  border-radius: 10px;
  background: #f3f6f9;
  color: var(--text);
}

.table-btn.primary {
  background: var(--brand);
  color: white;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(14, 23, 32, 0.45);
  display: grid;
  place-items: center;
  padding: 18px;
}

.modal.hidden {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 440px;
  background: white;
  border-radius: 24px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.modal-header,
.modal-footer {
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header {
  border-bottom: 1px solid var(--line);
}

.modal-header h3 {
  margin: 0;
}

.modal-body {
  padding: 20px;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.detail-row span {
  color: var(--muted);
}

.input-group {
  display: grid;
  gap: 8px;
  margin-top: 16px;
}

.input-group span {
  font-weight: 700;
}

select {
  width: 100%;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 14px;
  background: white;
}

.icon-btn {
  background: transparent;
  color: var(--muted);
  font-size: 28px;
  line-height: 1;
}

.empty-text {
  color: var(--muted);
  padding: 10px 2px;
}

@media (max-width: 1100px) {
  .stats-grid,
  .panel-grid {
    grid-template-columns: 1fr;
  }

  .locker-grid-large {
    grid-template-columns: repeat(4, minmax(80px, 1fr));
  }
}

@media (max-width: 840px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding-bottom: 10px;
  }

  .main {
    padding: 18px;
  }

  .topbar {
    flex-direction: column;
  }

  .locker-grid,
  .locker-grid-large {
    grid-template-columns: repeat(3, minmax(78px, 1fr));
  }
}

@media (max-width: 520px) {
  .locker-grid,
  .locker-grid-large {
    grid-template-columns: repeat(2, minmax(78px, 1fr));
  }

  .stat-card strong {
    font-size: 28px;
  }
}