/* ============================================================
   预约系统 - 主样式表
   主题色: #2196F3 (柔和蓝色)
   ============================================================ */

/* CSS Variables */
:root {
  --primary: #2196F3;
  --primary-dark: #1976D2;
  --primary-light: #BBDEFB;
  --primary-bg: #E3F2FD;
  --accent: #FF9800;
  --success: #4CAF50;
  --warning: #FF9800;
  --danger: #F44336;
  --info: #2196F3;
  --text: #333333;
  --text-light: #666666;
  --text-muted: #999999;
  --border: #E0E0E0;
  --bg: #F5F7FA;
  --bg-white: #FFFFFF;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.12);
  --radius: 8px;
  --radius-lg: 12px;
  --transition: all 0.3s ease;
  --max-width: 1200px;
  --navbar-height: 64px;
}

/* Reset & Base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
}

img {
  max-width: 100%;
  height: auto;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  background: var(--bg-white);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--navbar-height);
}

.navbar .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo i {
  font-size: 1.4rem;
}

.logo:hover {
  color: var(--primary-dark);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-links a {
  padding: 8px 16px;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
}

.nav-links a:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
}

.dropdown-toggle i {
  font-size: 0.75rem;
  transition: var(--transition);
}

.dropdown:hover .dropdown-toggle i {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 160px;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-hover);
  border: 1px solid var(--border);
  overflow: hidden;
  z-index: 100;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-menu a {
  display: block;
  padding: 10px 20px;
  border-radius: 0;
  color: var(--text);
  font-size: 0.85rem;
}

.dropdown-menu a:hover {
  background: var(--primary-bg);
  color: var(--primary);
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text);
  cursor: pointer;
  padding: 8px;
}

/* Main Content */
.main-content {
  min-height: calc(100vh - var(--navbar-height) - 180px);
  padding: 30px 0;
}

/* Footer */
.footer {
  background: var(--bg-white);
  border-top: 1px solid var(--border);
  padding: 30px 0;
  text-align: center;
}

.footer p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 4px 0;
}

.footer a {
  color: var(--text-muted);
}

.footer a:hover {
  color: var(--primary);
}

/* Cards */
.card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

.card-body {
  padding: 20px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  line-height: 1.4;
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
  color: #fff;
}

.btn-success {
  background: var(--success);
  color: #fff;
}

.btn-success:hover:not(:disabled) {
  background: #388E3C;
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger:hover:not(:disabled) {
  background: #D32F2F;
  color: #fff;
}

.btn-warning {
  background: var(--warning);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.82rem;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 1rem;
}

.btn-block {
  width: 100%;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
}

.form-group .hint {
  display: block;
  margin-top: 4px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg-white);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}

.form-control::placeholder {
  color: var(--text-muted);
}

textarea.form-control {
  min-height: 100px;
  resize: vertical;
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23666' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

/* Form Check */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 12px;
}

.form-check input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}

.form-check label {
  font-size: 0.88rem;
  color: var(--text-light);
}

/* Auth Layout (Login/Register/Forgot) */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--navbar-height) - 180px);
  padding: 40px 20px;
}

.auth-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-hover);
  padding: 40px;
  width: 100%;
  max-width: 440px;
}

.auth-card .auth-header {
  text-align: center;
  margin-bottom: 30px;
}

.auth-card .auth-header h2 {
  font-size: 1.5rem;
  color: var(--text);
  margin-bottom: 8px;
}

.auth-card .auth-header p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.auth-card .auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-light);
}

/* Status Badges */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.78rem;
  font-weight: 500;
}

.badge-primary {
  background: var(--primary-bg);
  color: var(--primary);
}

.badge-success {
  background: #E8F5E9;
  color: #2E7D32;
}

.badge-warning {
  background: #FFF3E0;
  color: #E65100;
}

.badge-danger {
  background: #FFEBEE;
  color: #C62828;
}

.badge-info {
  background: #E3F2FD;
  color: #1565C0;
}

.badge-secondary {
  background: #F5F5F5;
  color: #616161;
}

/* Alerts */
.alert {
  padding: 14px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-danger {
  background: #FFEBEE;
  color: #C62828;
  border: 1px solid #FFCDD2;
}

.alert-success {
  background: #E8F5E9;
  color: #2E7D32;
  border: 1px solid #C8E6C9;
}

.alert-warning {
  background: #FFF3E0;
  color: #E65100;
  border: 1px solid #FFE0B2;
}

.alert-info {
  background: #E3F2FD;
  color: #1565C0;
  border: 1px solid #BBDEFB;
}

/* Grid */
.grid {
  display: grid;
  gap: 24px;
}

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

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-state i {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: var(--text-light);
}

.empty-state p {
  font-size: 0.9rem;
}

/* Loading */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.loading i {
  font-size: 2rem;
  margin-bottom: 12px;
  animation: spin 1s linear infinite;
}

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

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 12px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  background: var(--bg-white);
  border: 1px solid var(--border);
  color: var(--text);
  transition: var(--transition);
}

.pagination a:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.pagination .active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.pagination .disabled {
  opacity: 0.5;
  pointer-events: none;
}

/* Welcome Banner */
.welcome-banner {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 30px;
}

.welcome-banner h2 {
  font-size: 1.6rem;
  margin-bottom: 10px;
}

.welcome-banner p {
  font-size: 1rem;
  opacity: 0.9;
  margin-bottom: 20px;
}

.welcome-banner .btn {
  background: #fff;
  color: var(--primary);
  font-weight: 600;
}

.welcome-banner .btn:hover {
  background: var(--primary-light);
}

/* Search Bar */
.search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.search-bar .form-control {
  flex: 1;
  min-width: 200px;
}

.search-bar .btn {
  white-space: nowrap;
}

/* Category Tabs */
.category-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  overflow-x: auto;
  padding-bottom: 4px;
}

.category-tab {
  padding: 8px 20px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--bg-white);
  color: var(--text-light);
  font-size: 0.88rem;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.category-tab:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.category-tab.active {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

/* Resource Card */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
}

.resource-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: var(--transition);
  cursor: pointer;
}

.resource-card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.resource-card .cover {
  position: relative;
  height: 180px;
  overflow: hidden;
  background: var(--primary-bg);
}

.resource-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.resource-card .cover .no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 3rem;
  color: var(--primary-light);
}

.resource-card .cover .status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
}

.resource-card .info {
  padding: 16px;
}

.resource-card .info h3 {
  font-size: 1rem;
  margin-bottom: 6px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-card .info .meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.resource-card .info .meta i {
  margin-right: 4px;
}

.resource-card .info .price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--danger);
}

.resource-card .info .price .unit {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* Detail Page */
.detail-header {
  margin-bottom: 30px;
}

.detail-header .back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 16px;
}

.detail-header .back-link:hover {
  color: var(--primary);
}

.detail-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.detail-gallery {
  position: relative;
}

.detail-gallery .main-image {
  width: 100%;
  height: 400px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--primary-bg);
  margin-bottom: 12px;
}

.detail-gallery .main-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-gallery .main-image .no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 4rem;
  color: var(--primary-light);
}

.detail-gallery .thumbnails {
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.detail-gallery .thumbnails img {
  width: 80px;
  height: 60px;
  border-radius: 6px;
  object-fit: cover;
  cursor: pointer;
  opacity: 0.7;
  transition: var(--transition);
  border: 2px solid transparent;
}

.detail-gallery .thumbnails img.active,
.detail-gallery .thumbnails img:hover {
  opacity: 1;
  border-color: var(--primary);
}

.detail-info h1 {
  font-size: 1.5rem;
  margin-bottom: 12px;
}

.detail-info .tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.detail-info .tag {
  padding: 3px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
}

.detail-info .description {
  color: var(--text-light);
  line-height: 1.8;
  margin-bottom: 20px;
  font-size: 0.92rem;
}

.detail-info .price-section {
  background: var(--primary-bg);
  padding: 16px 20px;
  border-radius: var(--radius);
  margin-bottom: 20px;
}

.detail-info .price-section .price-label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.detail-info .price-section .price-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--danger);
}

.detail-info .price-section .price-value .unit {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-muted);
}

/* Calendar */
.calendar-section {
  margin-top: 30px;
}

.calendar-section h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.calendar-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.calendar-nav button {
  background: none;
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: var(--radius);
  cursor: pointer;
  font-size: 0.9rem;
  transition: var(--transition);
  color: var(--text);
}

.calendar-nav button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.calendar-nav .month-label {
  font-size: 1.05rem;
  font-weight: 600;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 4px;
}

.calendar-weekdays span {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  padding: 8px 0;
  font-weight: 500;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.calendar-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 10px 4px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  border: 1px solid transparent;
  min-height: 60px;
  background: var(--bg-white);
  position: relative;
}

.calendar-day .day-number {
  font-size: 0.9rem;
  font-weight: 500;
}

.calendar-day .day-info {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.calendar-day.available {
  background: var(--bg-white);
  border-color: var(--primary-light);
}

.calendar-day.available:hover {
  background: var(--primary-bg);
  border-color: var(--primary);
}

.calendar-day.selected {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.calendar-day.selected .day-info {
  color: rgba(255, 255, 255, 0.8);
}

.calendar-day.unavailable {
  background: #F5F5F5;
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.6;
}

.calendar-day.today {
  font-weight: 700;
  border-color: var(--accent);
}

.calendar-day.other-month {
  opacity: 0.3;
}

/* Time Slots */
.time-slots {
  margin-top: 20px;
}

.time-slots h4 {
  font-size: 0.95rem;
  margin-bottom: 12px;
  color: var(--text-light);
}

.slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
}

.slot-item {
  padding: 10px;
  text-align: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
  font-size: 0.85rem;
}

.slot-item:hover:not(.unavailable) {
  border-color: var(--primary);
  background: var(--primary-bg);
}

.slot-item.selected {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.slot-item.unavailable {
  background: #F5F5F5;
  color: var(--text-muted);
  cursor: not-allowed;
  text-decoration: line-through;
}

/* Order Card */
.order-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
  transition: var(--transition);
}

.order-card:hover {
  box-shadow: var(--shadow-hover);
}

.order-card .order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}

.order-card .order-header .order-no {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.order-card .order-body {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.order-card .order-body .order-info {
  flex: 1;
  min-width: 200px;
}

.order-card .order-body .order-info h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.order-card .order-body .order-info p {
  font-size: 0.88rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

.order-card .order-body .order-info p i {
  width: 18px;
  color: var(--text-muted);
}

.order-card .order-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
  gap: 8px;
}

.order-card .order-footer .booking-code {
  font-family: 'Courier New', monospace;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 2px;
}

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

/* Order Tabs */
.order-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
  overflow-x: auto;
}

.order-tab {
  padding: 12px 20px;
  font-size: 0.9rem;
  color: var(--text-light);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
}

.order-tab:hover {
  color: var(--primary);
}

.order-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

/* Order Detail */
.order-detail-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 30px;
}

.order-detail-card .detail-row {
  display: flex;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.order-detail-card .detail-row:last-child {
  border-bottom: none;
}

.order-detail-card .detail-label {
  width: 140px;
  font-size: 0.88rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

.order-detail-card .detail-value {
  flex: 1;
  font-size: 0.92rem;
}

.order-detail-card .booking-code-large {
  text-align: center;
  padding: 30px;
  margin: 20px 0;
  background: var(--primary-bg);
  border-radius: var(--radius);
}

.order-detail-card .booking-code-large .code {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 6px;
  font-family: 'Courier New', monospace;
}

.order-detail-card .booking-code-large .label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 30px;
  margin-top: 20px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  padding-bottom: 24px;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -24px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-white);
}

.timeline-item .tl-time {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.timeline-item .tl-action {
  font-size: 0.9rem;
  font-weight: 500;
}

.timeline-item .tl-detail {
  font-size: 0.85rem;
  color: var(--text-light);
  margin-top: 2px;
}

/* Profile */
.profile-header {
  text-align: center;
  padding: 30px;
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin-bottom: 24px;
}

.profile-header .avatar-wrapper {
  position: relative;
  width: 100px;
  height: 100px;
  margin: 0 auto 16px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--primary-light);
}

.profile-header .avatar-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-header .avatar-wrapper .avatar-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-bg);
  color: var(--primary);
  font-size: 2.5rem;
}

.profile-header .avatar-wrapper .avatar-upload {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  font-size: 1.5rem;
  opacity: 0;
  transition: var(--transition);
  cursor: pointer;
}

.profile-header .avatar-wrapper:hover .avatar-upload {
  opacity: 1;
}

.profile-header h3 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}

.profile-header p {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.profile-section {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 24px;
  margin-bottom: 20px;
}

.profile-section h3 {
  font-size: 1rem;
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* Message List */
.message-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.message-item {
  background: var(--bg-white);
  border-radius: var(--radius);
  padding: 16px 20px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.message-item:hover {
  box-shadow: var(--shadow-hover);
}

.message-item.unread {
  border-left: 3px solid var(--primary);
}

.message-item .msg-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-bg);
  color: var(--primary);
  flex-shrink: 0;
}

.message-item .msg-content {
  flex: 1;
  min-width: 0;
}

.message-item .msg-content .msg-title {
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.message-item.unread .msg-title {
  font-weight: 600;
}

.message-item .msg-content .msg-preview {
  font-size: 0.85rem;
  color: var(--text-light);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.message-item .msg-content .msg-time {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Message Detail Modal */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.show {
  display: flex;
}

.modal-content {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow-hover);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.modal-header h3 {
  font-size: 1.1rem;
}

.modal-header .close-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.modal-header .close-btn:hover {
  color: var(--text);
}

.modal-body {
  padding: 24px;
}

/* Favorites page uses same resource grid */

/* Responsive */
@media (max-width: 768px) {
  .menu-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--navbar-height);
    left: 0;
    right: 0;
    background: var(--bg-white);
    flex-direction: column;
    padding: 16px;
    box-shadow: var(--shadow-hover);
    border-top: 1px solid var(--border);
    gap: 4px;
  }

  .nav-links.show {
    display: flex;
  }

  .nav-links a {
    padding: 12px 16px;
    width: 100%;
    border-radius: var(--radius);
  }

  .dropdown-menu {
    position: static;
    box-shadow: none;
    border: none;
    padding-left: 16px;
  }

  .dropdown-menu a {
    padding: 10px 16px;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  .detail-content {
    grid-template-columns: 1fr;
  }

  .detail-gallery .main-image {
    height: 250px;
  }

  .resource-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  }

  .auth-card {
    padding: 30px 24px;
  }

  .order-detail-card {
    padding: 20px;
  }

  .order-detail-card .detail-label {
    width: 100px;
  }

  .welcome-banner {
    padding: 30px 24px;
  }

  .slots-grid {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  }

  .order-card .order-body {
    flex-direction: column;
  }

  .order-card .order-footer {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 12px;
  }

  .main-content {
    padding: 20px 0;
  }

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

  .search-bar {
    flex-direction: column;
  }

  .calendar-day {
    padding: 6px 2px;
    min-height: 44px;
  }
}
