* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  list-style: none;
}

html,
body {
  width: 100%;
  height: 100%;
}

body {
  overflow: hidden;
  background: #091128;
  color: #fff;
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

.hidden {
  display: none !important;
}

.view {
  width: 100%;
  height: 100%;
}

.login-view {
  overflow: hidden;
  background: #091128;
  text-align: center;
}

.login-panel {
  display: inline-block;
  width: 95%;
  max-width: 640px;
  margin-top: 20px;
  padding: 10px 0;
  border-radius: 5px;
  background: #091128;
  text-align: left;
}

.logo-wrap {
  text-align: center;
}

.login-logo {
  width: 150px;
  height: auto;
  vertical-align: middle;
}

.loginbox {
  width: 90%;
  margin: 5px auto;
}

.field-row {
  margin-bottom: 10px;
}

.field-row label {
  display: inline-block;
  width: 35%;
  max-width: 150px;
  color: #fff;
  font-size: 17px;
  line-height: 40px;
  vertical-align: top;
}

.field-row input {
  display: inline-block;
  width: 62%;
  height: 40px;
  padding: 10px 15px;
  border: 1px solid rgba(0, 0, 0, .2);
  border-radius: 3px;
  outline: none;
  background: #fff;
  color: #000;
  font-size: 17px;
}

.field-row input:focus {
  border-color: #007aff;
}

.button-row {
  text-align: center;
}

.mui-btn {
  display: inline-block;
  padding: 6px 12px;
  border: 1px solid #007aff;
  border-radius: 3px;
  background: #fff;
  color: #333;
  font-size: 14px;
  line-height: 1.42;
  text-align: center;
  cursor: pointer;
}

.mui-btn-primary {
  border-color: #007aff;
  background-color: #007aff;
  color: #fff;
}

.main-view {
  overflow: hidden;
  padding: 16px;
  background: radial-gradient(circle at top, #36517f 0, #172039 42%, #080d1e 100%);
}

.main-logo {
  display: block;
  width: 100%;
  margin: 8px auto 18px;
  border-radius: 18px;
  box-shadow: 0 18px 38px rgba(0, 0, 0, .35);
}

.menu-box {
  width: 100%;
  margin: 0 auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .16), 0 18px 36px rgba(0, 0, 0, .28);
  backdrop-filter: blur(10px);
}

.menu-button {
  width: 100%;
  height: 48px;
  margin: 6px 0;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(135deg, #f8d37a, #d9922d);
  color: #1f1300;
  box-shadow: 0 8px 18px rgba(0, 0, 0, .24);
  font-size: 1.05em;
  font-weight: 700;
}

.chat-container {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: linear-gradient(180deg, #101b34 0, #1c3650 88px, #eef4f7 89px, #f7f1e7 100%);
}

.system-closed-notice {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 20;
  transform: translate(-50%, -50%);
  padding: 18px 34px;
  border: 3px solid #ef4444;
  border-radius: 18px;
  background: rgba(255, 255, 255, .96);
  color: #dc2626;
  box-shadow: 0 18px 44px rgba(220, 38, 38, .26);
  font-size: 34px;
  font-weight: 900;
  letter-spacing: 6px;
  text-align: center;
}

.scratch-modal {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 72px 14px 20px;
  background: rgba(20, 20, 20, .94);
}

.scratch-panel {
  width: min(420px, 100%);
  border-radius: 18px;
  background: #333;
  color: #fff;
  box-shadow: 0 22px 48px rgba(0, 0, 0, .45);
  overflow: hidden;
}

.scratch-title {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 46px;
  background: linear-gradient(135deg, #9a1d1d, #d33a2c);
  font-weight: 800;
}

.scratch-title button {
  position: absolute;
  left: 10px;
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 14px;
}

.scratch-period {
  padding: 14px 16px 4px;
  color: #fef3c7;
  text-align: right;
  font-size: 15px;
}

.scratch-period span {
  color: #ffdf5d;
  font-weight: 900;
}

.scratch-card {
  position: relative;
  width: calc(100% - 32px);
  height: 142px;
  margin: 12px auto;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff8dc, #fbbf24);
  overflow: hidden;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .36), 0 12px 24px rgba(0, 0, 0, .24);
}

.scratch-result {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #7f1d1d;
  font-size: 24px;
  font-weight: 900;
}

.scratch-result em {
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(17, 24, 39, .12);
  color: #7f1d1d;
  font-style: normal;
}

.scratch-result span,
.scratch-result strong {
  min-width: 36px;
  padding: 5px 8px;
  border-radius: 10px;
  background: #b91c1c;
  color: #fff;
  text-align: center;
}

.scratch-result strong {
  min-width: 70px;
  background: #111827;
}

#scratchCanvas {
  position: absolute;
  inset: 0;
  z-index: 2;
  cursor: crosshair;
  touch-action: none;
}

.scratch-countdown {
  padding: 6px 16px 12px;
  color: #fef3c7;
  text-align: center;
  font-size: 15px;
}

.scratch-reset {
  display: block;
  width: 120px;
  height: 36px;
  margin: 0 auto 16px;
  border: 0;
  border-radius: 999px;
  background: #ef4444;
  color: #fff;
  font-weight: 800;
}

.chat-header {
  padding: 12px 12px 10px;
  background: linear-gradient(135deg, #08142a, #213f63 55%, #08142a);
  color: #fff;
  box-shadow: 0 8px 22px rgba(8, 20, 42, .28);
}

.header-left {
  display: flex;
  align-items: center;
  width: 100%;
}

.back-button {
  width: 60px;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  text-align: left;
}

.header-title {
  width: calc(100% - 60px);
  text-align: center;
  font-size: 16px;
  font-weight: 700;
}

.header-details,
.lastResult,
.resultBox {
  background: #fff;
  color: #000;
}

.header-details {
  width: 100%;
  padding: 10px 0;
  border-bottom: 0;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

.user-info,
.date-box {
  display: inline-block;
  width: 48%;
  text-align: center;
  font-size: 14px;
}

.user-info {
  border-right: 1px solid #ddd;
}

.user-info p,
.date-box p {
  margin: 0;
  font-size: 14px;
}

.countdown-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  margin-top: 2px;
  padding: 4px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, #ecfeff, #bae6fd);
  color: #075985;
  box-shadow: inset 0 0 0 1px rgba(14, 116, 144, .18), 0 4px 10px rgba(14, 165, 233, .18);
  font-size: 13px;
  font-weight: 800;
}

.countdown-pill strong {
  margin: 0 3px;
  color: #dc2626;
  font-size: 16px;
}

.countdown-pill.closed {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #b91c1c;
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, .16), 0 4px 10px rgba(248, 113, 113, .18);
}

.chat-messages {
  flex: 1;
  padding: 12px 54px 84px 10px;
  overflow-y: auto;
  border-bottom: 0;
}

.chat-input {
  display: flex;
  gap: 8px;
  padding: 10px;
  background-color: rgba(255, 255, 255, .95);
  box-shadow: 0 -8px 22px rgba(15, 23, 42, .08);
  z-index: 9;
}

.chat-input input {
  flex: 1;
  width: calc(100% - 200px);
  margin: 0;
  padding: 11px 12px;
  border: 1px solid #d0d8e4;
  border-radius: 999px;
  outline: none;
}

.chat-input button {
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  cursor: pointer;
  font-weight: 700;
}

#investButton {
  background-color: #007bff;
  padding: 6px 8px;
  font-size: 12px;
  white-space: nowrap;
}

#sendButton {
  background-color: #e62526;
}

.message {
  display: flex;
  margin-bottom: 10px;
}

.message.time {
  justify-content: center;
  margin: 10px 0;
  color: #555;
  font-size: 12px;
  text-align: center;
}

.message.sent {
  justify-content: flex-end;
}

.message.received {
  justify-content: flex-start;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  margin-right: 10px;
  background: #ddd;
}

.message.sent .avatar {
  margin-right: 0;
  margin-left: 10px;
}

.message-box {
  max-width: 80%;
}

.message.bill-message .message-box {
  max-width: calc(100% - 54px);
  width: calc(100% - 54px);
}

.message-name {
  margin: 0;
  color: #333;
  font-size: 12px;
}

.message.sent .message-name {
  text-align: right;
}

.message-text {
  padding: 10px 12px;
  border-radius: 14px;
  background-color: #f1f0f0;
  color: #000;
  box-shadow: 0 6px 14px rgba(15, 23, 42, .08);
  font-size: 16px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.message.sent .message-text {
  background: linear-gradient(135deg, #d8f9c2, #bdf0a8);
}

.message-text.bill-text {
  padding: 7px 10px;
  line-height: 1.25;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.message-text.bill-text-balance {
  padding: 4px 8px;
  line-height: 1.12;
}

.bill-balance-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
}

.bill-balance .bill-balance-row {
  gap: 4px;
  line-height: 1.08;
}

.bill-balance-row span {
  white-space: nowrap;
}

.lastResult {
  padding: 3px 0;
  border-bottom: 1px solid #ccc;
  text-align: center;
  font-size: 11px;
}

.resultBox {
  width: 100%;
  min-height: 30px;
  padding: 3px 6px;
  overflow: hidden;
  box-shadow: 0 6px 14px rgba(15, 23, 42, .12);
}

.resultBox .title {
  display: inline-block;
  margin-right: 4px;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  line-height: 22px;
  vertical-align: top;
}

#resultBox {
  display: inline-flex;
  width: calc(100% - 48px);
  gap: 3px;
  align-items: center;
  direction: rtl;
  overflow: hidden;
  padding-left: 3px;
}

.resultBox .num {
  display: inline-flex;
  flex: 0 0 24px;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: #fff;
  box-shadow: 0 4px 10px rgba(20, 184, 166, .28);
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .55);
  text-align: center;
}

.keywords-box {
  margin: 0 0 -10px;
  padding-left: 0;
  background-color: #fff;
  color: #000;
  z-index: 9;
}

.keywords-box li {
  float: left;
  width: 20%;
  height: 35px;
  margin-bottom: 5px;
  border: 1px solid #b0b0b0;
  border-right: 0;
  line-height: 35px;
  text-align: center;
}

.keywords-box .liItem-br {
  border-right: 1px solid #b0b0b0;
}

.keywords-box .hide-keyWords {
  background-color: #fec107;
}

.leftBox {
  position: absolute;
  top: 210px;
  right: 6px;
  display: grid;
  gap: 6px;
}

.round-button {
  display: block;
  width: 38px;
  height: 38px;
  margin-top: 0;
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: #fff;
  box-shadow: 0 6px 12px rgba(0, 0, 0, .2);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.rule { background: #f95000; }
.record { background: #29a3a2; }
.history { background: #ff1f68; }
.scratch { background: #8b8b8b; }
.refresh { background: #c37903; }

.page-view {
  overflow: auto;
  background: #efeff4;
  color: #000;
  opacity: 1;
  transform: translateZ(0);
  transition: opacity .14s ease-out;
  will-change: opacity;
}

.page-view.is-entering {
  opacity: 0;
}

.page-header {
  position: sticky;
  top: 0;
  display: flex;
  align-items: center;
  height: 44px;
  background: #f7f7f7;
  box-shadow: 0 1px 6px #ccc;
  z-index: 2;
}

.page-back {
  width: 48px;
  border: 0;
  background: transparent;
  color: #007aff;
  font-size: 28px;
}

.page-header h1 {
  flex: 1;
  margin-right: 48px;
  text-align: center;
  font-size: 17px;
  font-weight: 500;
}

.page-content {
  padding: 14px 10px;
}

.card {
  margin: 10px 0;
  border-radius: 2px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .15);
}

.card-header {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  font-size: 17px;
  font-weight: 700;
}

.card-content {
  padding: 12px;
  overflow-x: auto;
}

.rules-content {
  line-height: 1.85;
  font-size: 16px;
}

.rules-content p {
  margin-bottom: 12px;
}

table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  text-align: center;
  font-size: 15px;
}

th,
td {
  padding: 11px 7px;
  border-bottom: 1px solid #eee;
}

th {
  background: #f5f5f5;
  font-weight: 500;
}

.ball {
  display: inline-block;
  width: 28px;
  height: 28px;
  margin: 0 3px;
  border-radius: 50%;
  background: linear-gradient(145deg, #f8f9fa, #d9edf7);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .15);
  line-height: 28px;
  font-weight: 700;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 80px;
  z-index: 20;
  display: none;
  max-width: 80%;
  padding: 10px 14px;
  border-radius: 5px;
  background: rgba(0, 0, 0, .78);
  color: #fff;
  transform: translateX(-50%);
  font-size: 14px;
}

.admin-body {
  overflow: auto;
  background: #eef2f7;
  color: #172033;
}

.admin-shell {
  width: min(1100px, 100%);
  min-height: 100%;
  margin: 0 auto;
  padding: 18px;
}

.admin-login,
.admin-card,
.admin-topbar {
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(24, 39, 75, .08);
}

.admin-login {
  max-width: 420px;
  margin: 80px auto;
  padding: 28px;
}

.admin-login h1,
.admin-topbar h1 {
  margin-bottom: 8px;
  font-size: 24px;
}

.admin-login p,
.admin-topbar p {
  margin-bottom: 16px;
  color: #667085;
}

.admin-house-today {
  align-items: center;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  border-radius: 8px;
  color: #344054;
  display: flex;
  font-size: 14px;
  min-height: 38px;
  padding: 8px 10px;
  white-space: nowrap;
}

.admin-house-today .win {
  color: #027a48;
}

.admin-house-today .lose {
  color: #c01048;
}

.admin-house-today .tie {
  color: #344054;
}

.admin-login input,
.admin-adjust input,
.admin-form input,
.admin-form select,
.admin-form textarea,
.admin-user-fields input,
.admin-user-fields select {
  padding: 8px 10px;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  outline: none;
}

.admin-login input,
.admin-adjust input,
.admin-form input,
.admin-form select,
.admin-user-fields input,
.admin-user-fields select {
  height: 38px;
}

.admin-form textarea {
  min-height: 140px;
  resize: vertical;
}

.admin-login input {
  width: 100%;
  margin-bottom: 12px;
}

.admin-login button,
.admin-topbar button,
.admin-card-title button,
.admin-actions button,
.admin-adjust button,
.admin-form button {
  border: 0;
  border-radius: 8px;
  background: #175cd3;
  color: #fff;
  cursor: pointer;
}

.admin-login button {
  width: 100%;
  height: 40px;
}

.admin-topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
  padding: 20px;
}

.admin-topbar button,
.admin-card-title button {
  padding: 9px 14px;
}

.admin-card {
  margin-bottom: 16px;
  padding: 18px;
}

.admin-workspace {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.admin-nav,
.admin-detail-panel {
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(24, 39, 75, .08);
}

.admin-nav {
  padding: 12px;
}

.admin-nav-item {
  width: 100%;
  margin-bottom: 8px;
  padding: 12px 14px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #f8fafc;
  color: #101828;
  text-align: left;
  cursor: pointer;
}

.admin-nav-item.active {
  border-color: #175cd3;
  background: #175cd3;
  color: #fff;
}

.admin-detail {
  min-width: 0;
}

.admin-topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-sound-status {
  padding: 7px 10px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #667085;
  font-size: 13px;
  white-space: nowrap;
}

.admin-sound-status.enabled {
  background: #dcfae6;
  color: #067647;
}

.admin-card-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.admin-card-title h2 {
  font-size: 18px;
}

.admin-card-subtitle {
  margin: 18px 0 10px;
  padding-top: 14px;
  border-top: 1px solid #eaecf0;
  color: #344054;
  font-weight: 700;
}

.admin-form.inline {
  display: flex;
  gap: 10px;
  align-items: center;
}

.admin-form.settings-grid {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.admin-form.settings-grid button {
  grid-column: 1 / -1;
}

.market-control {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.market-control span {
  flex: 1;
  min-width: 140px;
  color: #344054;
  font-weight: 700;
}

.admin-form.settings-grid .market-control button {
  grid-column: auto;
}

.admin-history-toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.admin-history-toolbar input {
  flex: 1;
}

.admin-history-toolbar select {
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  flex: 0 0 180px;
  min-height: 38px;
  padding: 8px 10px;
}

.admin-history-toolbar button {
  border: 0;
  border-radius: 8px;
  background: #175cd3;
  color: #fff;
  padding: 8px 12px;
  cursor: pointer;
}

.admin-hint {
  margin-bottom: 8px;
  color: #667085;
  font-size: 14px;
}

.admin-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 12px;
}

.admin-summary span {
  border-radius: 8px;
  background: #f2f4f7;
  color: #344054;
  padding: 8px 10px;
  font-size: 14px;
}

.admin-summary .win {
  background: #ecfdf3;
  color: #027a48;
}

.admin-summary .lose {
  background: #fff1f3;
  color: #c01048;
}

.admin-summary .tie {
  background: #f2f4f7;
  color: #344054;
}

.admin-daily-overview {
  border-top: 1px solid #eef2f7;
  padding: 12px 0;
}

.admin-daily-title {
  color: #101828;
  font-weight: 800;
  margin-bottom: 8px;
}

.admin-daily-row {
  align-items: center;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(120px, 1.2fr) repeat(4, minmax(90px, 1fr));
  padding: 7px 0;
}

.admin-daily-row.summary {
  background: #f8fafc;
  border-radius: 8px;
  padding: 8px 10px;
}

.admin-pagination {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
}

.admin-pagination button {
  border: 0;
  border-radius: 8px;
  background: #175cd3;
  color: #fff;
  padding: 8px 12px;
  cursor: pointer;
}

@media (max-width: 900px) and (min-width: 641px) {
  .daily-overview-toolbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .daily-overview-toolbar select {
    flex: none;
    width: 100%;
  }
}

.admin-pagination button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.admin-form.grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.admin-form button {
  min-height: 38px;
  padding: 8px 12px;
}

.admin-user-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-items: center;
}

.admin-user-fields p {
  grid-column: 1 / -1;
}

.admin-player-heading {
  align-items: center;
  display: flex;
  gap: 8px;
  grid-column: 1 / -1;
}

.status-pill {
  border-radius: 999px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 8px;
}

.status-pill.ok {
  background: #dcfce7;
  color: #166534;
}

.status-pill.danger {
  background: #fee2e2;
  color: #991b1b;
}

.admin-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-top: 1px solid #eef2f7;
}

.admin-item p {
  margin-top: 4px;
  color: #667085;
  font-size: 14px;
}

.admin-actions,
.admin-adjust {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-actions button,
.admin-adjust button {
  min-width: 58px;
  padding: 8px 10px;
}

.admin-actions .danger,
.admin-adjust .danger,
.admin-form .danger {
  background: #d92d20;
}

.admin-adjust input {
  width: 92px;
}

.admin-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #fff;
  font-size: 12px;
}

.admin-badge.recharge {
  background: #039855;
}

.admin-badge.withdraw {
  background: #dc6803;
}

.admin-badge.approved {
  background: #039855;
}

.admin-badge.rejected {
  background: #d92d20;
}

.admin-badge.win {
  background: #039855;
}

.admin-badge.lose {
  background: #d92d20;
}

.admin-badge.tie,
.admin-badge.unsettled {
  background: #667085;
}

.admin-result-win {
  color: #039855;
  font-weight: 700;
}

.admin-result-lose {
  color: #d92d20;
  font-weight: 700;
}

.admin-empty {
  padding: 20px;
  border-radius: 8px;
  background: #f9fafb;
  color: #667085;
  text-align: center;
}

@media (min-width: 700px) {
  body {
    display: flex;
    justify-content: center;
    background: #20243a;
  }

  .view {
    max-width: 430px;
  }

  .toast {
    max-width: 360px;
  }
}

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

  .admin-login {
    margin: 32px auto;
    padding: 22px;
  }

  .admin-workspace,
  .admin-topbar,
  .admin-item {
    display: block;
  }

  .admin-topbar {
    padding: 16px;
  }

  .admin-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding: 10px;
    -webkit-overflow-scrolling: touch;
  }

  .admin-nav-item {
    flex: 0 0 auto;
    width: auto;
    min-width: 112px;
    margin-bottom: 0;
    text-align: center;
    white-space: nowrap;
  }

  .admin-topbar-actions,
  .admin-history-toolbar,
  .admin-form.inline,
  .admin-form.settings-grid,
  .admin-form.grid,
  .admin-user-fields {
    display: grid;
    grid-template-columns: 1fr;
  }

  .admin-topbar-actions button,
  .admin-history-toolbar button,
  .admin-form button,
  .admin-actions button,
  .admin-adjust button,
  .admin-pagination button,
  .admin-adjust input,
  .admin-history-toolbar input,
  .admin-history-toolbar select,
  .admin-form input,
  .admin-form select,
  .admin-user-fields input,
  .admin-user-fields select {
    width: 100%;
    min-height: 42px;
  }

  .admin-card,
  .admin-detail-panel {
    padding: 14px;
  }

  .admin-actions,
  .admin-adjust {
    margin-top: 10px;
  }

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

  .admin-daily-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 360px) {
  .field-row label,
  .field-row input {
    font-size: 16px;
  }

  .mui-btn {
    padding-right: 9px;
    padding-left: 9px;
  }
}
