/* 民宿订单助手 v3 - 样式 */
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.5;
}

/* Header */
.app-header {
  background: linear-gradient(135deg, #4A90E2, #357ABD);
  color: white;
  padding: 20px 16px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.app-header h1 { font-size: 22px; }

/* Tabs */
.tabs {
  display: flex;
  background: white;
  border-bottom: 2px solid #e0e0e0;
  position: sticky;
  top: 0;
  z-index: 10;
}
.tab {
  flex: 1;
  padding: 16px;
  background: none;
  border: none;
  font-size: 16px;
  font-weight: 600;
  color: #666;
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}
.tab.active {
  color: #4A90E2;
  border-bottom-color: #4A90E2;
}

/* Page */
.page { display: none; padding: 16px; max-width: 720px; margin: 0 auto; }
.page.active { display: block; }

/* Section */
.section { margin-bottom: 24px; }
.section-title {
  font-size: 18px;
  color: #333;
  margin-bottom: 12px;
  padding: 8px 12px;
  background: #4A90E2;
  color: white;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.badge {
  background: rgba(255,255,255,0.25);
  padding: 2px 10px;
  border-radius: 12px;
  font-size: 13px;
}

/* Order Card */
.card-list { display: flex; flex-direction: column; gap: 12px; }
.order-card {
  background: white;
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.06);
  border-left: 4px solid #4A90E2;
  position: relative;
}
.order-card .top-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  flex-wrap: wrap;
  gap: 8px;
}
.order-card .date-name { font-size: 16px; font-weight: bold; }
.order-card .date-name .name { color: #4A90E2; margin-left: 8px; }
.order-card .room-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.room-tag {
  border: 2px solid #FF8C42;
  color: #FF8C42;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  background: white;
}
.money-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 6px 0;
  flex-wrap: wrap;
}
.money-pill {
  background: #E8F5E9;
  color: #2E7D32;
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
}
.money-plus { color: #2E7D32; font-weight: bold; }
.meta { color: #888; font-size: 13px; margin: 4px 0; }
.phone-row { color: #4A90E2; font-size: 15px; margin: 6px 0; }
.phone-row a { color: #4A90E2; text-decoration: none; }
.actions { display: flex; gap: 8px; margin-top: 8px; }
.actions button { flex: 1; padding: 8px; border: none; border-radius: 6px; cursor: pointer; font-size: 14px; }
.btn-copy { background: #ECEFF1; color: #455A64; }
.btn-del { background: #EF5350; color: white; flex: 0 0 80px !important; }
.btn-edit { background: #FFF3E0; color: #E65100; }

/* Room Grid */
.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 10px;
}
.room-card {
  background: white;
  border-radius: 10px;
  padding: 16px 8px;
  text-align: center;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  border-top: 4px solid;
}
.room-card.empty { border-top-color: #4CAF50; background: #E8F5E9; }
.room-card.partial { border-top-color: #FF8C42; background: #FFF3E0; }
.room-card.full { border-top-color: #EF5350; background: #FFEBEE; }
.room-card .room-num { font-size: 24px; font-weight: bold; }
.room-card .room-occ { font-size: 13px; color: #666; margin-top: 4px; }

/* Calendar */
.calendar {
  background: white;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
.calendar-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.day-cell {
  aspect-ratio: 1;
  border: 2px solid transparent;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 13px;
  background: #FAFAFA;
  transition: all 0.15s;
}
.day-cell:hover { transform: scale(1.05); box-shadow: 0 2px 6px rgba(0,0,0,0.1); }
.day-cell.has-booking { font-weight: 600; }
.day-cell.has-booking.custom-color:hover { filter: brightness(1.1); }
.day-cell.selected {
  border-color: #4A90E2;
  box-shadow: 0 0 0 3px rgba(74,144,226,0.3);
}
.day-cell .day-num { font-size: 16px; font-weight: 600; }
.day-cell .day-count { font-size: 11px; }
.day-cell.has-booking .day-count { color: rgba(255,255,255,0.95); }
.day-cell.empty-day { background: #F5F5F5; color: #999; cursor: default; }

.day-details {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-top: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  min-height: 80px;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}
.day-details .placeholder { color: #999; text-align: center; padding: 20px; }
.day-details .detail-summary {
  padding: 10px;
  background: #E3F2FD;
  border-radius: 6px;
  margin-bottom: 12px;
  font-size: 13px;
}
.day-details .detail-note {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
  padding-left: 6px;
}

/* Form */
.form { background: white; border-radius: 12px; padding: 20px; box-shadow: 0 1px 4px rgba(0,0,0,0.05); }
.form label { display: block; margin-bottom: 14px; font-size: 14px; color: #555; }
.form input, .form textarea {
  display: block;
  width: 100%;
  padding: 10px 12px;
  margin-top: 4px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 15px;
  font-family: inherit;
}
.form input:focus, .form textarea:focus { outline: none; border-color: #4A90E2; }
.btn-primary, .btn-secondary {
  width: 100%;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 8px;
}
.btn-primary { background: #4A90E2; color: white; }
.btn-secondary { background: #ECEFF1; color: #455A64; }
.preview {
  background: white;
  border-radius: 8px;
  padding: 14px;
  margin-top: 14px;
  font-family: "Consolas", monospace;
  font-size: 14px;
  white-space: pre-wrap;
  min-height: 100px;
  border: 1px dashed #ccc;
}

/* Empty state */
.empty-state {
  text-align: center;
  color: #999;
  padding: 30px 10px;
  font-size: 14px;
}
