/* Design system */
:root {
  --bg: #f5f8ff;
  --panel: #ffffff;
  --text: #0b1b35;
  --muted: #6b7a90;
  --blue: #0b65ff;
  --blue-600: #0a58e6;
  --blue-100: #e6f0ff;
  --green: #22c55e;
  --red: #ef4444;
  --orange: #ff6b35;
  --orange-600: #e55a2b;
  --orange-100: #ffe6df;
  --shadow: 0 10px 30px rgba(11, 101, 255, 0.12);
  --radius: 16px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

/* Screen reader only - accessible but hidden visually */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--text);
  /* Tet Theme Background: Warm Cream/Yellow with subtle Orange/Red tint */
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(255, 107, 53, 0.08) 0%, transparent 60%),
    radial-gradient(900px 500px at 90% -20%, rgba(255, 215, 0, 0.15) 0%, transparent 60%),
    #fffdf5;
  /* Warm cream base */
}

.app {
  display: grid;
  grid-template-rows: auto auto auto;
  min-height: 100dvh;
}

/* Splash (loading) */
.splash {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(1000px 600px at 10% -10%, #eaf2ff 0%, transparent 60%),
    radial-gradient(900px 500px at 90% -20%, #e6f1ff 0%, transparent 60%),
    var(--bg);
  z-index: 50;
}

.splash__card {
  display: grid;
  justify-items: center;
  gap: 16px;
  padding: 24px 28px;
  background: #ffffff;
  border: 1px solid #e9eefb;
  border-radius: 20px;
  box-shadow: 0 30px 60px rgba(11, 101, 255, .16);
}

.splash .title {
  font-weight: 800;
  letter-spacing: .2px;
}

.splash .dots {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 6px;
}

.splash .dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--blue);
  animation: bounce 1s infinite ease-in-out;
}

.splash .dots span:nth-child(2) {
  animation-delay: .15s;
}

.splash .dots span:nth-child(3) {
  animation-delay: .3s;
}

@keyframes bounce {

  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: .5
  }

  40% {
    transform: translateY(-6px);
    opacity: 1
  }
}

/* Cute washer animation */
.loader-washer {
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: linear-gradient(180deg, #eef5ff, #ffffff);
  border: 2px solid #dbe6ff;
  display: grid;
  place-items: center;
  box-shadow: inset 0 8px 12px rgba(255, 255, 255, .8), inset 0 -6px 10px rgba(11, 101, 255, .08);
}

.loader-washer .drum {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 3px solid #9dbaf7;
  border-top-color: var(--blue);
  animation: spin 1.1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Base responsive - ensure no horizontal overflow */
* {
  box-sizing: border-box;
}

html {
  overflow-x: hidden;
  width: 100%;
}

body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  /* Chỉ căn trái, Logo2 sẽ tự đẩy về phải */
  padding: 16px 24px;
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  backdrop-filter: saturate(180%) blur(8px);
  background: color-mix(in srgb, #ffffff 80%, transparent);
  border-bottom: 1px solid #e9eefb;
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
  gap: 0;
  /* Không có gap để đảm bảo đối xứng chính xác */
  box-sizing: border-box;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.brand .logo {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(180deg, #eef5ff, #ffffff);
  box-shadow: inset 0 -2px 6px rgba(11, 101, 255, .08), inset 0 6px 10px rgba(255, 255, 255, .9), 0 6px 16px rgba(11, 101, 255, .08);
  overflow: hidden;
  flex-shrink: 0;
}

.brand-text {
  flex: 1 1 auto;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.brand-text h1 {
  margin: 0;
  font-size: 18px;
  letter-spacing: 0.2px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.brand-text .subtitle {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.omp-logo-header {
  display: flex;
  align-items: center;
  flex-shrink: 1;
  /* Cho phép thu nhỏ khi cần */
  flex-grow: 0;
  /* Không cho phép mở rộng */
  overflow: visible;
  margin-left: auto;
  /* Luôn đẩy về bên phải - QUAN TRỌNG */
  margin-right: 0;
  /* Bám sát cạnh phải, padding-right của topbar (24px) tạo khoảng cách x */
  min-width: 0;
  /* Logo2 tự điều chỉnh kích thước nhưng luôn bám sát cạnh phải với khoảng cách x = padding-right */
  /* margin-left: auto đảm bảo Logo2 luôn ở bên phải bất kể có phần tử nào khác */
}

.omp-logo-header-img {
  max-width: 100%;
  max-height: clamp(35px, 5vw, 60px);
  /* Tự động thu nhỏ theo viewport */
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Responsive adjustments for different screen sizes */
@media (max-width: 1200px) {
  .brand-text h1 {
    font-size: clamp(14px, 1.5vw, 18px);
  }

  .omp-logo-header-img {
    max-height: clamp(35px, 4.5vw, 55px);
  }
}

@media (max-width: 900px) {
  .brand-text h1 {
    font-size: clamp(13px, 1.8vw, 16px);
  }

  .omp-logo-header-img {
    max-height: clamp(35px, 4vw, 50px);
  }
}

/* Hide subtitle on mobile */
@media (max-width: 767px) {
  .brand-text .subtitle {
    display: none;
  }
}

/* Desktop Actions Sidebar - chỉ hiển thị trên desktop */
.desktop-actions {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  z-index: 15;
  display: none;
  /* Mặc định ẩn, chỉ hiển thị trên desktop */
}

.desktop-actions__container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  padding: 16px;
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(11, 101, 255, 0.15);
  border: 1px solid rgba(219, 234, 255, 0.8);
}

.desktop-actions .btn {
  width: 100%;
  min-width: 180px;
  white-space: nowrap;
  justify-content: flex-start;
}

/* Chỉ hiển thị trên desktop (≥768px) */
@media (min-width: 768px) {
  .desktop-actions {
    display: block;
  }
}

/* Ẩn hoàn toàn trên mobile */
@media (max-width: 767px) {
  .desktop-actions {
    display: none !important;
  }
}

.container {
  width: min(1200px, 92vw);
  max-width: 100%;
  padding: 0 4px;
  margin: 24px auto;
  display: grid;
  gap: 20px;
  overflow-x: hidden;
  box-sizing: border-box;
}

.card {
  background: var(--panel);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid #e9eefb;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  justify-content: center;
  align-items: center;
  background: #eef5ff;
  padding: 10px;
  border-radius: 16px;
  border: 1px solid #dbe6ff;
  box-shadow: var(--shadow);
  margin-top: 10px;
}

.tabs--primary {
  margin: 8px 0 4px;
}

.tab {
  border: 0;
  background: white;
  padding: 12px 18px;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  color: var(--muted);
  font-size: 15px;
  letter-spacing: .2px;
  box-shadow: 0 6px 14px rgba(11, 101, 255, .12);
  transition: transform .06s, box-shadow .2s, color .2s, background .2s;
  width: 100%;
  font-family: inherit;
}

.tab:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(11, 101, 255, .18);
  color: var(--text);
}

.tab.is-active {
  background: linear-gradient(180deg, #0b65ff, #0a58e6);
  color: #fff;
  box-shadow: 0 12px 28px rgba(11, 101, 255, .28);
}

.section {
  overflow: visible;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid #eef2ff;
  flex-wrap: wrap;
}

.section-head h2 {
  margin: 0;
  font-size: 18px;
}

/* Disable inner scrollbar on #dashboard - use page scroll instead */
#dashboard {
  overflow-y: visible !important;
}

.view-history #summary,
.view-tokens #summary {
  display: none !important;
}

.filters-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.filters-inline input {
  height: 40px;
  border-radius: 12px;
  border: 1px solid #dbe6ff;
  padding: 0 12px;
  box-shadow: 0 2px 8px rgba(11, 101, 255, .06);
}

/* Date Input Wrapper - Thiết kế đẹp cho input date */
.date-input-wrapper {
  position: relative;
  display: inline-block;
  width: auto;
  min-width: 140px;
}

.date-input-wrapper .date-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
  color: var(--muted);
  transition: color 0.2s ease;
  z-index: 1;
}

.daily-revenue {
  font-weight: 700;
  color: var(--blue);
  background: var(--blue-100);
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 14px;
  white-space: nowrap;
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

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

.date-input-wrapper input[type="date"] {
  width: 100%;
  height: 40px;
  border-radius: 12px;
  border: 1px solid #dbe6ff;
  padding: 0 44px 0 12px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 2px 10px rgba(11, 101, 255, .08);
  transition: all 0.2s ease;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

.date-input-wrapper input[type="date"]::-webkit-calendar-picker-indicator {
  position: absolute;
  right: 0;
  top: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.date-input-wrapper input[type="date"]::-webkit-datetime-edit {
  padding: 0;
}

.date-input-wrapper input[type="date"]::-webkit-datetime-edit-fields-wrapper {
  padding: 0;
}

.date-input-wrapper input[type="date"]::-webkit-datetime-edit-text {
  color: var(--muted);
  padding: 0 2px;
}

.date-input-wrapper input[type="date"]::-webkit-datetime-edit-month-field,
.date-input-wrapper input[type="date"]::-webkit-datetime-edit-day-field,
.date-input-wrapper input[type="date"]::-webkit-datetime-edit-year-field {
  color: var(--text);
  padding: 0 2px;
}

.date-input-wrapper input[type="date"]:hover {
  border-color: var(--blue);
  box-shadow: 0 6px 18px rgba(11, 101, 255, .14);
}

.date-input-wrapper input[type="date"]:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(11, 101, 255, .12), 0 6px 18px rgba(11, 101, 255, .14);
}

.date-input-wrapper input[type="date"]:focus+.date-icon {
  color: var(--blue);
}

.date-input-wrapper input[type="date"]:active {
  transform: translateY(1px);
}

.filters-inline select {
  height: 40px;
  border-radius: 12px;
  border: 1px solid #dbe6ff;
  padding: 0 40px 0 12px;
  cursor: pointer;
  background-color: #fff;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%236b7a90" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>');
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px 18px;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  box-shadow: 0 2px 10px rgba(11, 101, 255, .08);
  transition: box-shadow .2s, border-color .2s, transform .06s;
}

.filters-inline select:hover {
  box-shadow: 0 6px 18px rgba(11, 101, 255, .14);
}

.filters-inline select:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(11, 101, 255, .12);
}

.filters-inline select:active {
  transform: translateY(1px);
}

.filters-inline .dropdown {
  position: relative;
  display: inline-flex;
  align-items: stretch;
  flex: 1 1 160px;
  min-width: 160px;
}

.dropdown__native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}

.dropdown__button {
  height: 40px;
  width: 100%;
  border-radius: 12px;
  border: 1px solid #dbe6ff;
  padding: 0 42px 0 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f2f6ff 100%);
  color: var(--text);
  font-weight: 600;
  letter-spacing: .1px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-shadow: 0 8px 22px rgba(11, 101, 255, .12);
  transition: box-shadow .18s ease, border-color .18s ease, transform .12s ease, background .18s ease;
  font-family: inherit;
}

.dropdown__button::after {
  content: '';
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="%236b7a90" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"/></svg>');
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px;
  transition: transform .2s ease;
}

.dropdown.is-open .dropdown__button {
  border-color: var(--blue);
  box-shadow: 0 16px 30px rgba(11, 101, 255, .18);
  transform: translateY(-1px);
  background: linear-gradient(180deg, #f9fbff 0%, #e8f1ff 100%);
}

.dropdown.is-open .dropdown__button::after {
  transform: rotate(180deg);
}

.dropdown__list {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  padding: 10px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #dbe6ff;
  box-shadow: 0 25px 55px rgba(11, 101, 255, .18);
  display: grid;
  gap: 6px;
  max-height: 260px;
  overflow: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.98);
  transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
  z-index: 40;
}

.dropdown.is-open .dropdown__list {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition: opacity .18s ease, transform .18s ease;
}

.dropdown__list::-webkit-scrollbar {
  width: 6px;
}

.dropdown__list::-webkit-scrollbar-thumb {
  background: rgba(11, 101, 255, .35);
  border-radius: 999px;
}

.dropdown__option {
  list-style: none;
  padding: 10px;
  border-radius: 12px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background .18s ease, color .18s ease, transform .12s ease;
}

.dropdown__option:hover,
.dropdown__option.is-focused {
  background: rgba(11, 101, 255, .08);
  color: var(--text);
}

.dropdown__option.is-active {
  background: linear-gradient(180deg, rgba(11, 101, 255, .12), rgba(11, 101, 255, .04));
  color: var(--blue);
  box-shadow: inset 0 0 0 1px rgba(11, 101, 255, .3);
}

.dropdown__option::after {
  content: '✓';
  font-size: 14px;
  color: var(--blue);
  opacity: 0;
  transition: opacity .18s ease;
}

.dropdown__option.is-active::after {
  opacity: 1;
}

.dropdown__option[aria-disabled="true"] {
  cursor: not-allowed;
  color: rgba(107, 122, 144, .5);
}

.dropdown__option[aria-disabled="true"]:hover {
  background: transparent;
}

.table-wrap {
  overflow-x: auto;
  overflow-y: visible;
}

.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table thead th {
  position: sticky;
  top: 0;
  background: #f6f9ff;
  z-index: 1;
}

.table th,
.table td {
  padding: 12px 14px;
  border-bottom: 1px solid #eef2ff;
  text-align: left;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.table thead th {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
  border-bottom: 1px solid #e1eafe;
}

.table thead,
.table tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.table tbody tr:nth-child(odd) {
  background: #fbfdff;
}

.table tbody tr:hover {
  background: #eef6ff;
}

.table {
  border: 1px solid #e1eafe;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

/* Token cards */
.card-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.token-card {
  border: 1px solid #e1eafe;
  border-radius: 14px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 12px;
  display: grid;
  gap: 6px;
}

.token-title {
  font-weight: 800;
  letter-spacing: .2px;
}

.kv {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.kv b {
  color: var(--text);
  font-weight: 700;
}

.filters {
  padding: 16px;
}

.filter-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.field {
  display: grid;
  gap: 8px;
}

.field.grow {
  grid-column: span 2;
}

.field label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
}

.field input,
.field select {
  appearance: none;
  height: 42px;
  padding: 0 12px;
  border-radius: 12px;
  border: 1px solid #dbe6ff;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: box-shadow .2s, border-color .2s, transform .06s;
}

.field input:focus,
.field select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(11, 101, 255, .12);
}

.field input:active,
.field select:active {
  transform: translateY(1px);
}

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

.stat {
  padding: 18px;
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  text-align: center;
  gap: 6px;
}

.stat::after {
  content: "";
  position: absolute;
  inset: -40% -20% auto auto;
  width: 180px;
  height: 180px;
  background: radial-gradient(120px 120px at 70% 30%, var(--blue-100), transparent 60%);
  transform: rotate(25deg);
}

.stat__label {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.stat__value {
  font-size: 28px;
  font-weight: 800;
  margin-top: 6px;
}

.stat__value.stat__value--blue {
  color: var(--blue);
}

.stat__value.stat__value--orange {
  color: var(--orange);
}

.stat__delta {
  color: var(--muted);
  margin-top: 6px;
  font-size: 12px;
}

.machines .section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid #eef2ff;
}

.machines h2 {
  margin: 0;
  font-size: 18px;
}

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

.machine-card {
  border: 1px solid #e9eefb;
  border-radius: 14px;
  padding: 14px;
  background: white;
  box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .2s ease;
  cursor: pointer;
}

.machine-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 30px rgba(11, 101, 255, .18);
}

.machine-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.machine-card__name {
  font-weight: 700;
  letter-spacing: .2px;
}

.status-pill {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid;
}

.status--on {
  color: #066e2c;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

.status--off {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}

.status--busy {
  color: #1e3a8a;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.machine-card__meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.meta-box {
  border: 1px dashed #e1eafe;
  border-radius: 12px;
  padding: 10px;
  background: #f9fbff;
}

.meta-label {
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
}

.meta-value {
  font-weight: 700;
  margin-top: 4px;
}

.segmented {
  display: inline-flex;
  border: 1px solid #e1eafe;
  border-radius: 12px;
  overflow: hidden;
  background: #f6f9ff;
}

.segmented__btn {
  padding: 8px 12px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  transition: color .15s, background .15s;
}

.segmented__btn:hover {
  color: var(--text);
}

.segmented__btn.is-active {
  background: white;
  color: var(--blue);
  box-shadow: inset 0 0 0 1px #dbe6ff;
}

.btn {
  height: 42px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #dbe6ff;
  background: white;
  color: var(--text);
  font-weight: 700;
  letter-spacing: .2px;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform .06s ease, box-shadow .2s ease, background .2s;
}

.btn:hover {
  box-shadow: 0 16px 30px rgba(11, 101, 255, .18);
}

.btn:active {
  transform: translateY(1px);
}

.btn.primary {
  background: linear-gradient(180deg, #0b65ff, #0a58e6);
  color: white;
  border: 0;
}

.btn.secondary {
  background: linear-gradient(180deg, #ef4444, #dc2626);
  color: white;
  border: 0;
}

.btn.secondary:hover {
  box-shadow: 0 16px 30px rgba(239, 68, 68, .25);
}

.btn .btn__icon {
  margin-right: 8px;
}

.footer {
  display: grid;
  place-items: center;
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
  gap: 4px;
}

.footer>div {
  text-align: center;
}

/* Hero simplified dashboard */
.hero {
  padding: 18px;
  overflow-x: hidden;
  max-width: 100%;
  width: 100%;
}

.hero__head {
  display: grid;
  gap: 6px;
  margin-bottom: 8px;
}

.hero__head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 800;
}

.hero__meta {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14px;
}

.hero__actions {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.stack {
  display: flex;
  gap: 8px;
  padding: 8px;
  align-items: start;
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  box-sizing: border-box;
  /* Hide scrollbar for Chrome, Safari, Edge */
  scrollbar-width: thin;
  scrollbar-color: rgba(11, 101, 255, .3) transparent;
}

.stack::-webkit-scrollbar {
  height: 6px;
}

.stack::-webkit-scrollbar-track {
  background: transparent;
}

.stack::-webkit-scrollbar-thumb {
  background: rgba(11, 101, 255, .3);
  border-radius: 4px;
}

.stack::-webkit-scrollbar-thumb:hover {
  background: rgba(11, 101, 255, .5);
}

.stack .pair {
  /* Show exactly 4 pairs on screen, 5th requires scroll */
  /* 4 pairs at 22% + 3 gaps of 8px = 88% + 24px = fits with 5th hidden */
  width: 22%;
  min-width: 22%;
  max-width: 22%;
  flex: 0 0 22%;
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  box-sizing: border-box;
}

.tile {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 1px solid #dde9ff;
  overflow: hidden;
  background: #eaf2ff;
  box-shadow: 0 20px 40px rgba(11, 101, 255, .12);
  transform: translateZ(0) scale(1.1);
  transition: transform .18s ease, box-shadow .25s ease, filter .25s ease;
}

.tile.dryer {
  border-radius: 22px 22px 0 0;
  background: #ffffff;
}

.tile.washer {
  border-radius: 0 0 22px 22px;
}

.tile::before {
  content: "";
  position: absolute;
  inset: 0;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-image: var(--tile-bg);
  filter: saturate(105%) contrast(102%);
  transition: inherit;
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, .0), rgba(0, 22, 70, .15));
  mix-blend-mode: multiply;
  transition: inherit;
}

.tile.dryer::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, .0), rgba(0, 36, 120, .08));
}

.tile.washer::after {
  background: linear-gradient(180deg, rgba(255, 255, 255, .0), rgba(11, 101, 255, .22));
}

.tile:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 28px 64px rgba(11, 101, 255, .22);
}

.tile:hover::before {
  filter: saturate(112%) contrast(106%) brightness(1.02) scale(1.02);
}

/* Tile number badge */
.tile-number {
  position: absolute;
  top: 8px;
  right: 8px;
  min-width: 28px;
  height: 24px;
  padding: 0 6px;
  border-radius: 12px;
  background: var(--blue);
  color: white;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(11, 101, 255, .3);
}

.tile-number.tile-number--orange {
  background: var(--orange);
  box-shadow: 0 2px 8px rgba(255, 107, 53, .3);
}

/* Machine timer - hiển thị ở giữa máy, format MM:SS như đồng hồ đếm ngược */
.machine-timer {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  padding: 16px 24px;
  border-radius: 20px;
  font-size: 32px;
  font-weight: 900;
  color: var(--blue);
  z-index: 15;
  box-shadow:
    0 12px 32px rgba(11, 101, 255, 0.3),
    0 0 0 3px rgba(255, 255, 255, 0.9),
    inset 0 2px 4px rgba(255, 255, 255, 0.8);
  text-align: center;
  white-space: nowrap;
  letter-spacing: 2px;
  font-variant-numeric: tabular-nums;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', monospace;
  transition: all 0.3s ease;
  line-height: 1;
  min-width: 120px;
}

.machine-timer.timer-warning {
  background: rgba(255, 179, 102, 0.98);
  color: #fff;
  animation: pulse 1.5s ease-in-out infinite;
  box-shadow:
    0 12px 32px rgba(255, 179, 102, 0.4),
    0 0 0 3px rgba(255, 255, 255, 0.9),
    inset 0 2px 4px rgba(255, 255, 255, 0.6);
}

@keyframes pulse {

  0%,
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }

  50% {
    transform: translate(-50%, -50%) scale(1.05);
    opacity: 0.95;
  }
}

/* Responsive timer */
@media (max-width: 767px) {
  .machine-timer {
    font-size: 20px;
    padding: 10px 14px;
    border-radius: 14px;
    min-width: 90px;
    letter-spacing: 1px;
  }
}

@media (max-width: 640px) {
  .machine-timer {
    font-size: 18px;
    padding: 8px 12px;
    border-radius: 12px;
    min-width: 80px;
    letter-spacing: 0.5px;
  }
}

.details {
  padding: 12px;
}

.details__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 4px 12px;
  border-bottom: 1px solid #eef2ff;
}

.details__body {
  display: grid;
  gap: 12px;
  padding-top: 12px;
}

.details .note {
  color: var(--muted);
}

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

/* Modal */
.modal {
  border: 0;
  padding: 0;
  background: transparent;
}

.modal::backdrop {
  background: rgba(3, 18, 43, 0.45);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}

.modal__card {
  width: min(380px, 86vw);
  max-height: 80vh;
  background: white;
  border-radius: 18px;
  box-shadow: 0 30px 60px rgba(3, 18, 43, .35);
  border: 1px solid #e9eefb;
  overflow: hidden auto;
  animation: rise .25s ease both;
  box-sizing: border-box;
}

.modal__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid #eef2ff;
}

.modal__content {
  padding: 16px;
  display: grid;
  gap: 12px;
  overflow-x: hidden;
}

.modal__actions {
  display: flex;
  justify-content: center;
  padding: 12px 16px;
  border-top: 1px solid #eef2ff;
}

.modal__actions .btn {
  width: 100%;
  max-width: 360px;
  margin-inline: auto;
}

.modal__content,
.modal__actions {
  text-align: center;
}

/* Settings Modal Styles */
.settings-section {
  text-align: left;
}

.settings-section-title {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.settings-section-desc {
  margin: 0 0 20px 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.settings-options {
  display: grid;
  gap: 20px;
}

.settings-item {
  padding: 16px;
  background: #f8fbff;
  border-radius: 12px;
  border: 1px solid #e1eafe;
}

.settings-checkbox-label {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.settings-checkbox-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: var(--blue);
  flex-shrink: 0;
}

.settings-checkbox-text {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
}

.settings-item-desc {
  margin: 8px 0 0 32px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.settings-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #eef2ff;
}

.settings-actions .btn {
  min-width: 120px;
}

/* Hide modal actions per latest requirement */
.modal__actions {
  display: none !important;
}

/* Modal grid helper: 3 -> 1 columns responsively */
.modal-grid {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: center;
  gap: 12px;
  width: 100%;
}

.modal-grid .meta-box {
  width: 100%;
  padding: 5px 8px;
  max-width: 220px;
  margin: 0 auto;
}

.modal-grid .meta-label {
  font-size: 16.5px;
}

.modal-grid .meta-value {
  font-size: 21px;
}

/* Machine Modal - Thiết kế mới với chữ lớn hơn và đẹp hơn */
.machine-modal-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

/* Nền trắng khi máy sẵn sàng */
.machine-modal-grid--ready .machine-modal-box {
  background: #ffffff;
  border: 2px solid #e1eafe;
}

/* Nền xanh dương nhạt khi máy đang hoạt động */
.machine-modal-grid--active .machine-modal-box {
  background: linear-gradient(135deg, #e0f2fe 0%, #dbeafe 100%);
  border: 2px solid #bfdbfe;
}

.machine-modal-box {
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.machine-modal-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), var(--blue-600));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.machine-modal-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(11, 101, 255, 0.15);
  border-color: var(--blue);
}

.machine-modal-box:hover::before {
  opacity: 1;
}

.machine-modal-label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 12px;
  line-height: 1.2;
}

.machine-modal-value {
  font-weight: 800;
  font-size: 32px;
  line-height: 1;
  color: var(--blue);
}

.machine-modal-value--number {
  color: var(--blue);
  font-size: 42px;
  letter-spacing: -1px;
}

.machine-modal-box .machine-modal-value {
  display: flex;
  justify-content: center;
  align-items: center;
}

.machine-modal-box .status-pill {
  font-size: 14px;
  padding: 8px 16px;
  font-weight: 700;
}

/* OMP Alliance Info */
.omp-info {
  margin-top: 20px;
  padding: 16px;
  background: linear-gradient(135deg, #f8fbff 0%, #eef5ff 100%);
  border-radius: 16px;
  border: 1px solid #e1eafe;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.omp-logo {
  max-width: 120px;
  max-height: 60px;
  object-fit: contain;
  display: block;
}

.omp-text {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0.2px;
}

.modal__content table {
  table-layout: fixed;
  width: 100%;
}

.modal__content td {
  overflow-wrap: anywhere;
}

/* Remaining time row - centered below main grid */
.remaining-row {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.remaining-box {
  max-width: 200px;
}

.icon-btn {
  background: #f3f7ff;
  border: 1px solid #dbe6ff;
  border-radius: 10px;
  height: 36px;
  width: 36px;
  cursor: pointer;
}

/* Animations */
@keyframes rise {
  from {
    transform: translateY(8px);
    opacity: 0;
  }

  to {
    transform: none;
    opacity: 1;
  }
}

.pop {
  animation: pop .25s ease both;
}

@keyframes pop {
  0% {
    transform: scale(.98);
    opacity: .4;
  }

  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Responsive */
@media (max-width: 1000px) {
  .filter-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field.grow {
    grid-column: auto;
  }

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

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

  .stack {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 10px 8px;
  }

  .stack .pair {
    width: 100%;
    max-width: 100%;
  }

  .tile {
    aspect-ratio: 3 / 4;
  }

  /* Machine Modal Tablet */
  .machine-modal-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .machine-modal-grid .machine-modal-box:first-child {
    grid-column: 1 / -1;
    /* Status box chiếm cả hàng trên tablet */
  }
}

@media (max-width: 767px) {
  .topbar {
    padding: 12px 12px 12px 12px;
    /* Padding đối xứng: 12px trái = 12px phải */
    overflow-x: hidden;
    gap: 0;
    /* Không có gap để đảm bảo đối xứng chính xác */
  }

  .brand {
    gap: 6px;
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand .logo {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
  }

  .brand-text {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-text h1 {
    font-size: clamp(11px, 3vw, 13px);
    /* Tự động điều chỉnh theo viewport */
  }

  .omp-logo-header {
    margin-left: auto;
    /* Luôn đẩy về bên phải */
    margin-right: 0;
    /* Bám sát cạnh phải, padding của topbar (12px) sẽ tạo khoảng cách đối xứng */
    flex-shrink: 1;
    /* Cho phép thu nhỏ khi cần */
    flex-grow: 0;
    /* Không cho phép mở rộng */
    min-width: 0;
  }

  .omp-logo-header-img {
    max-width: 100%;
    max-height: clamp(30px, 4vw, 40px);
    /* Tự động thu nhỏ theo viewport */
    width: auto;
    height: auto;
  }

  .filters-inline {
    flex-wrap: wrap;
    gap: 8px;
  }

  .filters-inline .dropdown,
  .filters-inline input,
  .filters-inline select {
    flex: 1 1 auto;
    min-width: 120px;
  }

  .date-input-wrapper {
    min-width: 140px;
  }

  .date-input-wrapper input[type="date"] {
    font-size: 13px;
    padding: 0 40px 0 10px;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 10px 10px 10px 10px;
    /* Padding đối xứng: 10px trái = 10px phải */
    overflow-x: hidden;
    gap: 0;
    /* Không có gap để đảm bảo đối xứng chính xác */
  }

  .brand {
    gap: 4px;
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand .logo {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
  }

  .brand-text {
    flex: 1 1 auto;
    min-width: 0;
  }

  .brand-text h1 {
    font-size: clamp(10px, 2.8vw, 12px);
    /* Tự động điều chỉnh theo viewport */
  }

  .omp-logo-header {
    margin-left: auto;
    /* Luôn đẩy về bên phải */
    margin-right: 0;
    /* Bám sát cạnh phải, padding của topbar (10px) sẽ tạo khoảng cách đối xứng */
    flex-shrink: 1;
    /* Cho phép thu nhỏ khi cần */
    flex-grow: 0;
    /* Không cho phép mở rộng */
    min-width: 0;
  }

  .omp-logo-header-img {
    max-width: 100%;
    max-height: clamp(28px, 3.5vw, 35px);
    /* Tự động thu nhỏ theo viewport */
    width: auto;
    height: auto;
  }

  .container {
    margin: 12px auto;
    gap: 12px;
  }

  .filters {
    padding: 12px;
  }

  .machines .section-head {
    padding: 12px;
  }

  .section-head {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
  }

  .section-head h2 {
    text-align: center;
    font-size: 16px;
  }

  .section-head .btn {
    width: 100%;
  }

  .machines-grid {
    padding: 12px;
    grid-template-columns: 1fr;
  }

  .stack {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 4px;
    padding: 8px 4px;
    justify-content: stretch;
  }

  /* 4 cặp luôn nằm trên 1 hàng bằng cách co chiều rộng */
  .stack .pair {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .tile {
    aspect-ratio: 3 / 4;
  }

  .tile-number {
    min-width: 22px;
    height: 18px;
    font-size: 9px;
    top: 5px;
    right: 5px;
    padding: 0 3px;
  }

  /* Table mobile improvements */
  .table th,
  .table td {
    padding: 10px 12px;
    font-size: 14px;
    word-wrap: break-word;
    overflow-wrap: break-word;
  }

  .table thead th {
    font-size: 11px;
    padding: 10px 12px;
  }

  .table tbody {
    max-height: calc(5 * 44px);
    /* Chiều cao của 5 dòng trên mobile (khoảng 44px mỗi dòng) */
  }

  .table tbody::-webkit-scrollbar {
    width: 24px;
  }

  .table tbody::-webkit-scrollbar-track {
    border-radius: 12px;
  }

  .table tbody::-webkit-scrollbar-thumb {
    border: 4px solid #f6f9ff;
    border-radius: 12px;
    min-height: 50px;
  }

  .table tbody::-webkit-scrollbar-thumb:hover {
    background: rgba(11, 101, 255, .7);
  }

  /* Modal mobile tuning */
  .modal__card {
    width: 90vw;
    max-height: 85vh;
    border-radius: 12px;
    margin: 0 auto;
  }

  .modal__head {
    padding: 12px 14px;
  }

  .modal__head h3 {
    font-size: 16px;
  }

  .modal__content {
    padding: 14px;
    text-align: center;
    overflow-x: hidden;
  }

  .modal__actions {
    padding: 10px 12px !important;
  }

  .modal__actions .btn {
    white-space: normal;
    line-height: 1.2;
  }

  .meta-box {
    padding: 10px;
  }

  .meta-label {
    font-size: 11px;
  }

  .meta-value {
    font-size: 15px;
  }

  .modal-grid .meta-box {
    padding: 8px 10px;
  }

  .modal-grid .meta-label {
    font-size: 16px;
  }

  .modal-grid .meta-value {
    font-size: 20px;
  }

  /* Force 1 column in modal on very small screens */
  .modal-grid {
    grid-template-columns: 1fr !important;
  }

  /* Machine Modal Responsive */
  .machine-modal-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .machine-modal-box {
    padding: 16px 14px;
  }

  .machine-modal-label {
    font-size: 13px;
    margin-bottom: 10px;
  }

  .machine-modal-value--number {
    font-size: 36px;
  }

  .machine-modal-box .status-pill {
    font-size: 13px;
    padding: 7px 14px;
  }

  .omp-info {
    margin-top: 16px;
    padding: 12px;
    gap: 10px;
  }

  .omp-logo {
    max-width: 100px;
    max-height: 50px;
  }

  .omp-text {
    font-size: 12px;
  }

  .remaining-row {
    margin-top: 8px;
  }

  .remaining-box {
    max-width: 160px;
  }

  .tabs {
    gap: 6px;
    padding: 6px;
    border-radius: 12px;
    grid-template-columns: repeat(3, 1fr);
  }

  .tab {
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 10px;
  }

  .card-list {
    grid-template-columns: 1fr;
  }

  /* Hero section mobile */
  .hero {
    padding: 12px 8px;
    overflow-x: hidden;
  }

  .hero__head h2 {
    font-size: 18px;
  }

  .hero__meta {
    font-size: 13px;
  }

  /* Stats grid mobile */
  .stats-grid {
    gap: 12px;
  }

  .stat {
    padding: 14px;
  }

  .stat__label {
    font-size: 11px;
  }

  .stat__value {
    font-size: 24px;
  }

  /* Footer mobile */
  .footer {
    padding: 12px;
    font-size: 12px;
  }

  .omp-logo-header-img {
    max-width: 80px;
    max-height: 32px;
  }
}

/* Machine Modal Grid - 2 columns, compact boxes */
.machine-modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.machine-modal-box {
  background: #f8faff;
  border: 1px solid #e1eafe;
  border-radius: 12px;
  padding: 12px 14px;
  text-align: center;
}

.machine-modal-box--highlight {
  background: linear-gradient(135deg, #fff0eb 0%, #ffe6df 100%);
  border-color: #ffcbb8;
  grid-column: span 2;
}

.machine-modal-label {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.machine-modal-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

.machine-modal-value--number {
  color: var(--blue);
  font-size: 20px;
}

.machine-modal-value--money {
  color: var(--orange);
  font-size: 16px;
}

.machine-modal-value--timer {
  color: var(--orange);
  font-size: 22px;
  font-weight: 800;
}

.machine-modal-grid--active .machine-modal-box:first-child {
  border-color: #ffcbb8;
  background: #fff8f5;
}

/* OMP Info in modal - Branding emphasis */
.omp-info {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: linear-gradient(135deg, #f0f5ff 0%, #e6efff 100%);
  border: 1px solid #d0e0ff;
  border-radius: 14px;
  margin-top: 12px;
}

.omp-logo {
  width: 120px;
  height: auto;
  flex-shrink: 0;
}

.omp-text {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.4;
}

/* ============================================
   Public Webapp - Compact Styles
   ============================================ */

/* Compact Header */
.topbar--compact {
  padding: 10px 20px;
}

.topbar--compact .brand-text h1 {
  font-size: 16px;
  margin: 0;
}

/* Greeting Banner */
.greeting-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  background: linear-gradient(135deg, #f0f7ff 0%, #e8f4ff 100%);
  border-bottom: 1px solid #d0e0ff;
  text-align: center;
}

.greeting-icon {
  font-size: 20px;
}

.greeting-text {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.greeting-date {
  font-size: 13px;
  color: var(--muted);
}

@media (max-width: 500px) {
  .greeting-banner {
    padding: 10px 14px;
    gap: 6px;
  }

  .greeting-text {
    font-size: 13px;
  }

  .greeting-date {
    font-size: 12px;
  }
}

/* Compact Hero Head */
.hero__head--compact {
  padding: 12px 16px;
  border-bottom: none;
}

.shop-address {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.shop-address::before {
  content: "📍";
  font-size: 12px;
}

/* Compact Footer */
.footer--compact {
  padding: 12px 20px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* Friendly Tip */
.friendly-tip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  margin-top: 12px;
  background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
  border: 1px solid #bae6fd;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.5;
  color: #0369a1;
}

.friendly-tip span:first-child {
  font-size: 20px;
  flex-shrink: 0;
}

/* Compact Container */
.container--compact {
  max-width: 540px;
  margin: 0 auto;
  padding: 12px;
}

.container--compact .hero.card {
  padding: 12px;
}

.container--compact .hero__head--compact {
  padding: 8px 12px;
}

/* -------------------------------
   Payment Modal Styles
   ------------------------------- */

.modal-section {
  margin-bottom: 16px;
}

.modal-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  font-weight: 500;
}

.modal-status--free {
  background: linear-gradient(135deg, #d1fae5 0%, #ecfdf5 100%);
  color: #065f46;
}

.modal-status--busy {
  background: linear-gradient(135deg, #fee2e2 0%, #fef2f2 100%);
  color: #991b1b;
}

.status-icon {
  font-size: 16px;
}

.status-timer {
  font-size: 13px;
  opacity: 0.8;
}

.modal-payment {
  background: #f8fafc;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
}

.price-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
  font-size: 14px;
}

.price-label {
  color: #64748b;
}

.price-value {
  font-weight: 600;
  color: #0f172a;
  font-size: 16px;
}

.time-select {
  margin-bottom: 14px;
}

.time-select label {
  display: block;
  font-size: 14px;
  color: #64748b;
  margin-bottom: 8px;
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 8px;
}

.time-btn {
  padding: 16px 8px;
  font-size: 18px;
  font-weight: 600;
  color: #0f172a;
  background: white;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.time-btn:hover {
  border-color: #3b82f6;
  background: #f0f7ff;
}

.time-btn--selected {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border-color: #2563eb;
}

.time-btn--selected:hover {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.total-amount {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  background: white;
  border-radius: 10px;
  margin-bottom: 16px;
  font-size: 15px;
}

.total-value {
  font-size: 20px;
  font-weight: 700;
  color: #059669;
}

.btn-confirm {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 600;
  color: white;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn-confirm:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.btn-confirm:active {
  transform: translateY(0);
}

.btn-back {
  background: linear-gradient(135deg, #64748b 0%, #475569 100%);
}

.btn-back:hover {
  box-shadow: 0 4px 12px rgba(100, 116, 139, 0.4);
}

.qr-container {
  margin-top: 12px;
  text-align: center;
  padding: 12px;
  background: white;
  border-radius: 10px;
  border: 2px dashed #3b82f6;
}

.qr-image {
  max-width: 200px;
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 8px;
}

.qr-info {
  font-size: 12px;
  color: #475569;
}

.qr-bank-name {
  margin-bottom: 4px;
}

.qr-note {
  font-size: 13px;
  color: #94a3b8;
}

.qr-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.btn-qr-action {
  flex: 1;
  padding: 8px 6px;
  font-size: 12px;
  font-weight: 600;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-open-app {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
}

.btn-open-app:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-download {
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: white;
}

.btn-download:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
}

.qr-fallback {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 8px;
  margin-bottom: 0;
}

.modal-note {
  font-size: 14px;
  color: #64748b;
  margin-top: 12px;
  padding: 12px;
  background: #fffbeb;
  border-radius: 8px;
  border-left: 3px solid #f59e0b;
}

.active-notice {
  font-size: 13px;
  color: #f59e0b;
  margin: 12px 0;
  padding: 10px 12px;
  background: #fffbeb;
  border-radius: 8px;
  text-align: center;
}

/* Washer busy message */
.busy-message {
  text-align: center;
  padding: 16px;
  background: linear-gradient(135deg, #fef2f2 0%, #fff5f5 100%);
  border-radius: 12px;
}

.busy-emoji {
  font-size: 40px;
  margin-bottom: 8px;
}

.busy-text {
  font-size: 15px;
  color: #991b1b;
  margin: 0 0 8px 0;
}

.busy-hint {
  font-size: 14px;
  color: #64748b;
  margin: 0;
}

@keyframes wrenchSwing {
  0% {
    transform: rotate(-10deg);
  }

  50% {
    transform: rotate(10deg);
  }

  100% {
    transform: rotate(-10deg);
  }
}

.wrench-icon {
  font-size: 48px;
  display: inline-block;
  transform-origin: 50% 80%;
  /* Pivot near bottom handle */
  animation: wrenchSwing 2s ease-in-out infinite;
  /* Orange glow on the icon itself */
  filter: drop-shadow(0 2px 8px rgba(255, 107, 53, 0.6));
}

/* Maintenance/Disabled status */
.maintenance-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  pointer-events: none;
}

/* .tile--disabled { } - No visual changes to tile itself, just overlay */

.tile--disabled:hover {
  transform: scale(1.1);
  cursor: not-allowed;
}

.modal-status--disabled {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  color: #475569;
}

.maintenance-message {
  text-align: center;
  padding: 20px;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border-radius: 12px;
}

.maintenance-emoji {
  font-size: 48px;
  margin-bottom: 12px;
}

.maintenance-text {
  font-size: 15px;
  color: #475569;
  margin: 0 0 8px 0;
}

.maintenance-hint {
  font-size: 14px;
  color: #64748b;
  margin: 8px 0 0 0;
}

/* Greeting Text Enhancement */
.greeting-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
  padding: 16px;
  border-radius: 16px;
  margin-bottom: 24px;
  box-shadow: 0 4px 20px rgba(11, 101, 255, 0.08);
  border: 1px solid #eef2ff;
  flex-wrap: wrap;
}

.greeting-icon {
  font-size: 24px;
  margin-right: 12px;
}

.greeting-text {
  font-size: 18px;
  /* Increased font size */
  font-weight: 700;
  color: #0f172a;
  line-height: 1.4;
  margin-right: 12px;
}

.greeting-date {
  font-size: 14px;
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
  padding-left: 12px;
  border-left: 2px solid #e2e8f0;
}

@media (max-width: 600px) {
  .greeting-banner {
    padding: 14px;
    flex-direction: column;
    text-align: center;
  }

  .greeting-icon {
    font-size: 32px;
    margin-right: 0;
    margin-bottom: 8px;
  }

  .greeting-text {
    width: 100%;
    margin-right: 0;
    margin-bottom: 8px;
    font-size: 16px;
  }

  .greeting-date {
    padding-left: 0;
    border-left: none;
    font-size: 13px;
    color: #94a3b8;
  }
}

/* Tet Theme Customizations */
#shopName {
  color: #ff6b35 !important;
  text-shadow: 0 2px 5px rgba(255, 107, 53, 0.15);
}

.brand-text .subtitle {
  color: #ca8a04;
  /* Warm gold/dark yellow */
}

/* Audio Controls */
.audio-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.audio-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.audio-toggle:active {
  transform: scale(0.95);
}

.audio-icon {
  font-size: 24px;
  line-height: 1;
}

.audio-toggle--playing {
  background: #ff6b35;
  /* Orange to match Tet theme */
  color: white;
  /* Icon color white when playing */
  animation: pulse-audio 2s infinite;
}

@keyframes pulse-audio {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(255, 107, 53, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 53, 0);
  }
}

/* Audio Controls */
.audio-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 48px;
  height: 48px;
  background: white;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.audio-toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.audio-toggle:active {
  transform: scale(0.95);
}

.audio-icon {
  font-size: 24px;
  line-height: 1;
}

.audio-toggle--playing {
  background: #ff6b35;
  /* Orange to match Tet theme */
  color: white;
  /* Icon color white when playing */
  animation: pulse-audio 2s infinite;
}

@keyframes pulse-audio {
  0% {
    box-shadow: 0 0 0 0 rgba(255, 107, 53, 0.4);
  }

  70% {
    box-shadow: 0 0 0 12px rgba(255, 107, 53, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(255, 107, 53, 0);
  }
}