* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: #1f2937;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #f5f7f8;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  width: min(100%, 760px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px 16px 78px;
}

.login-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 24px 16px;
  background: linear-gradient(135deg, #213547 0%, #146c72 52%, #d99632 100%);
}

.login-panel {
  width: min(100%, 420px);
  padding: 30px 24px;
  color: #fff;
  background: rgba(10, 24, 38, 0.48);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(12px);
}

.brand {
  margin-bottom: 24px;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 12px;
  color: #213547;
  font-size: 24px;
  font-weight: 800;
  background: #fff;
  border-radius: 8px;
}

.brand h1,
.page-title h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.25;
}

.brand p,
.page-title p {
  margin: 8px 0 0;
  color: rgba(255, 255, 255, 0.78);
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field span {
  font-size: 14px;
  font-weight: 700;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  color: #111827;
  background: #fff;
  border: 1px solid #d7dee5;
  border-radius: 6px;
  outline: none;
}

.field textarea {
  min-height: 86px;
  resize: vertical;
}

.primary-btn,
.secondary-btn,
.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 44px;
  padding: 0 16px;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

.primary-btn {
  background: #0f766e;
}

.secondary-btn {
  color: #0f766e;
  background: #e7f7f5;
}

.danger-btn {
  background: #ef4444;
}

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

.page-title h1 {
  color: #111827;
  font-size: 24px;
}

.page-title p {
  color: #6b7280;
}

.logout {
  color: #6b7280;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.hero {
  padding: 20px;
  margin-bottom: 16px;
  color: #fff;
  background: linear-gradient(135deg, #213547, #0f766e);
  border-radius: 8px;
}

.hero small {
  color: rgba(255, 255, 255, 0.72);
}

.hero strong {
  display: block;
  margin-top: 8px;
  font-size: 34px;
  line-height: 1;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 16px;
}

.stat-card,
.panel,
.action-card {
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 8px;
}

.stat-card {
  padding: 14px;
}

.stat-card span {
  display: block;
  color: #6b7280;
  font-size: 12px;
}

.stat-card strong {
  display: block;
  margin-top: 8px;
  font-size: 20px;
}

.panel {
  padding: 16px;
  margin-bottom: 14px;
}

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

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

.action-card {
  display: block;
  min-height: 90px;
  padding: 16px;
  color: #111827;
  text-decoration: none;
}

.action-card span {
  display: block;
  color: #0f766e;
  font-size: 24px;
  font-weight: 800;
}

.action-card strong {
  display: block;
  margin-top: 8px;
}

.list {
  display: grid;
  gap: 10px;
}

.list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  padding: 12px;
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 8px;
}

.row-main {
  min-width: 0;
}

.row-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.row-amounts {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}

.amount {
  color: #0f766e;
  font-weight: 800;
  white-space: nowrap;
}

.amount-sub {
  color: #6b7280;
  font-size: 12px;
  font-weight: 600;
}

.badge {
  display: inline-block;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  white-space: nowrap;
}

.badge-active {
  color: #0f766e;
  background: #d1fae5;
}

.badge-inactive {
  color: #9ca3af;
  background: #f3f4f6;
}

.badge-type {
  color: #1d4ed8;
  background: #dbeafe;
}

.hotel-card {
  background: #fff;
  border: 1px solid #e3e8ef;
  border-radius: 10px;
  overflow: hidden;
}

.hotel-card-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f3f4f6;
}

.hotel-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-placeholder {
  width: 100%;
  height: 100%;
  background: #e5e7eb;
}

.hotel-card-body {
  padding: 12px 14px;
}

.hotel-card-body strong {
  display: block;
  font-size: 15px;
  line-height: 1.4;
}

.hotel-card-body small {
  display: block;
  margin-top: 4px;
  color: #6b7280;
  font-size: 13px;
}

.list-row small,
.muted {
  color: #6b7280;
}

.amount-plus {
  color: #0f766e;
  font-weight: 800;
}

.amount-minus {
  color: #ef4444;
  font-weight: 800;
}

.notice {
  padding: 12px;
  margin: 10px 0 0;
  color: #6b7280;
  background: #f8fafc;
  border-radius: 6px;
}

.bottom-nav {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  width: min(100%, 760px);
  height: 60px;
  margin: 0 auto;
  background: #fff;
  border-top: 1px solid #e3e8ef;
}

.bottom-nav a {
  display: grid;
  place-items: center;
  color: #6b7280;
  font-size: 12px;
  text-decoration: none;
}

.bottom-nav a.active {
  color: #0f766e;
  font-weight: 800;
}

@media (max-width: 560px) {
  .app-shell {
    padding-right: 12px;
    padding-left: 12px;
  }

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

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