/* ============================================================
   MIKU CARE DESIGN SYSTEM
   Warm Minimal Operational UI
   ============================================================ */

:root {
  /* Brand Colors */
  --miku-blue: #8FBBEB;
  --miku-brown: #4A2F22;
  --soft-yellow: #F8E59C;
  --warm-cream: #FAF6EE;
  --white: #FFFFFF;
  --soft-blue-bg: #DCEFFB;

  /* Status Colors */
  --status-green: #6BBF8A;
  --status-green-bg: #E8F7EE;
  --status-yellow: #E8C547;
  --status-yellow-bg: #FCF6E0;
  --status-orange: #E89B5D;
  --status-orange-bg: #FCEFE0;
  --status-red: #D97575;
  --status-red-bg: #FBE5E5;
  --status-blue: #8FBBEB;
  --status-blue-bg: #EAF4FC;

  /* Text Colors */
  --text-primary: #4A2F22;
  --text-secondary: #7A6352;
  --text-light: #8E7763;
  --text-white: #FFFFFF;

  /* Borders */
  --border-light: #EADFCB;
  --border-medium: #D6C6AE;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(79, 62, 45, 0.06);
  --shadow-md: 0 2px 8px rgba(79, 62, 45, 0.08);
  --shadow-lg: 0 4px 16px rgba(79, 62, 45, 0.1);

  /* Radii */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 24px;
  --radius-xl: 24px;
  --radius-full: 9999px;

  /* Layout */
  --sidebar-w: 240px;
  --mobile-header-h: 64px;
  --mobile-nav-h: 72px;
  --desktop-header-h: 60px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--warm-cream);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ============================================================
   LOGIN SCREEN
   ============================================================ */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--warm-cream) 0%, var(--soft-blue-bg) 100%);
  padding: 20px;
}

.login-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  width: 100%;
  max-width: 380px;
  box-shadow: var(--shadow-md);
}

.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.login-logo .logo-icon {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.login-logo h1 {
  font-size: 28px;
  font-weight: 800;
  color: var(--miku-brown);
  margin-bottom: 4px;
}

.login-logo p {
  font-size: 13px;
  color: var(--text-secondary);
}

.login-form .form-group {
  margin-bottom: 20px;
}

.login-form label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.login-form input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--warm-cream);
  transition: border-color 0.2s;
}

.login-form input:focus {
  outline: none;
  border-color: var(--miku-blue);
  background: var(--white);
}

.login-hint {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
  font-size: 12px;
  color: var(--text-light);
}

/* ============================================================
   APP LAYOUT - DESKTOP
   ============================================================ */
.app {
  display: flex;
  flex-wrap: wrap;
  min-height: 100vh;
  padding-top: var(--desktop-header-h);
}

.sidebar {
  width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  overflow-y: auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 16px;
  border-bottom: 1px solid var(--border-light);
}

.sidebar-logo span {
  font-size: 18px;
  font-weight: 800;
  color: var(--miku-brown);
}

.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-light);
  padding: 12px 12px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.15s;
  cursor: pointer;
}

.nav-item:hover {
  background: var(--soft-blue-bg);
  color: var(--miku-brown);
}

.nav-item.active {
  background: var(--miku-blue);
  color: var(--white);
}

.nav-item.active svg {
  color: var(--white);
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border-light);
}

.user-info {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
  padding: 8px;
}

.user-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.user-role {
  font-size: 11px;
  color: var(--text-light);
  text-transform: capitalize;
}

.btn-logout {
  width: 100%;
  padding: 8px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--text-secondary);
  font-size: 13px;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-logout:hover {
  background: var(--status-red-bg);
  color: var(--status-red);
  border-color: var(--status-red);
}

/* ============================================================
   HEADERS
   ============================================================ */
.desktop-header {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--desktop-header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  z-index: 90;
}

.global-search {
  position: relative;
  flex: 1;
  max-width: 480px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.global-search svg {
  color: var(--text-light);
}

.global-search input {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--warm-cream);
}

.global-search input:focus {
  outline: none;
  border-color: var(--miku-blue);
  background: var(--white);
}

.search-results {
  position: absolute;
  top: 100%;
  left: 28px;
  right: 0;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 400px;
  overflow-y: auto;
  z-index: 200;
  margin-top: 4px;
}

.search-result-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: background 0.15s;
}

.search-result-item:hover {
  background: var(--soft-blue-bg);
}

.search-result-item:last-child {
  border-bottom: none;
}

/* Searchable customer dropdown for booking modals */
.customer-search-results {
  position: absolute;
  z-index: 1000;
  background: var(--bg-card, #fff);
  border: 1px solid var(--border-light, #e0e0e0);
  border-radius: var(--radius-sm, 8px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  max-height: 240px;
  overflow-y: auto;
  width: 100%;
  margin-top: 4px;
}

.customer-search-item {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border-light, #eee);
  cursor: pointer;
  transition: background 0.15s;
}

.customer-search-item:hover {
  background: var(--soft-blue-bg, #e8f4f8);
}

.customer-search-item:last-child {
  border-bottom: none;
}

.today-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Mobile Header */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--mobile-header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border-light);
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  z-index: 90;
}

.mobile-logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--miku-brown);
}

.search-trigger {
  padding: 8px;
  cursor: pointer;
  color: var(--text-secondary);
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-w);
  padding: 24px;
  min-height: calc(100vh - var(--desktop-header-h));
}

/* ============================================================
   MOBILE NAV
   ============================================================ */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--mobile-nav-h);
  background: var(--white);
  border-top: 1px solid var(--border-light);
  z-index: 90;
}

.mobile-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--text-light);
  text-decoration: none;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

.mobile-nav-item.active {
  color: var(--miku-blue);
}

/* ============================================================
   PAGE STRUCTURE
   ============================================================ */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--miku-brown);
}

.page-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.page-section {
  margin-bottom: 24px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ============================================================
   CARDS
   ============================================================ */
.card {
  background: var(--white);
  border-radius: var(--radius-md);
  border: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  margin-bottom: 12px;
}

.card-clickable {
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.1s;
}

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

.card-clickable:active {
  transform: scale(0.99);
}

.card-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.card-row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

/* ============================================================
   CAT PHOTO
   ============================================================ */
.cat-photo {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  object-fit: cover;
  background: var(--soft-blue-bg);
  flex-shrink: 0;
}

.cat-photo-lg {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
}

.cat-photo-sm {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
}

.cat-photo-placeholder {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  background: var(--soft-blue-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.cat-photo-placeholder-lg {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-lg);
  font-size: 32px;
}

.cat-photo-xs {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  object-fit: cover;
}

.cat-photo-placeholder-xs {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--soft-blue-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex-shrink: 0;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--miku-brown);
  color: var(--white);
}

.btn-primary:hover {
  background: #3D3022;
}

.btn-blue {
  background: var(--miku-blue);
  color: var(--white);
}

.btn-blue:hover {
  background: #7AA8DA;
}

.btn-outline {
  background: var(--white);
  color: var(--text-primary);
  border: 1.5px solid var(--border-medium);
}

.btn-outline:hover {
  border-color: var(--miku-blue);
  color: var(--miku-blue);
}

.btn-danger {
  background: var(--white);
  color: var(--status-red);
  border: 1.5px solid var(--status-red);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12px;
}

.btn-lg {
  padding: 14px 24px;
  font-size: 16px;
}

.btn-full {
  width: 100%;
}

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

/* ============================================================
   FORM ELEMENTS
   ============================================================ */
.form-group {
  margin-bottom: 16px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-group .label-hint {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-light);
  margin-left: 4px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: var(--white);
  transition: border-color 0.2s;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--miku-blue);
}

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

.form-row {
  display: flex;
  gap: 12px;
}

.form-row > * {
  flex: 1;
}

/* ============================================================
   SELECTION BUTTONS (Behaviour etc)
   ============================================================ */
.sel-group {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.sel-btn {
  flex: 1;
  min-width: 80px;
  padding: 12px 8px;
  border: 2px solid var(--border-light);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.sel-btn:hover {
  border-color: var(--miku-blue);
}

.sel-btn.selected {
  border-color: var(--miku-blue);
  background: var(--soft-blue-bg);
  color: var(--miku-brown);
}

.sel-btn.sel-green.selected { border-color: var(--status-green); background: var(--status-green-bg); color: #2D6B4A; }
.sel-btn.sel-yellow.selected { border-color: var(--status-yellow); background: var(--status-yellow-bg); color: #8A7220; }
.sel-btn.sel-orange.selected { border-color: var(--status-orange); background: var(--status-orange-bg); color: #8B5520; }
.sel-btn.sel-red.selected { border-color: var(--status-red); background: var(--status-red-bg); color: #8B3D3D; }

/* ============================================================
   BADGES & TAGS
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
}

.badge-green { background: var(--status-green-bg); color: #2D6B4A; }
.badge-yellow { background: var(--status-yellow-bg); color: #8A7220; }
.badge-orange { background: var(--status-orange-bg); color: #8B5520; }
.badge-red { background: var(--status-red-bg); color: #8B3D3D; }
.badge-blue { background: var(--status-blue-bg); color: #4A6A8A; }
.badge-brown { background: #F0EAE0; color: var(--miku-brown); }

/* ============================================================
   ALERT BANNER
   ============================================================ */
.alert-banner {
  background: var(--status-orange-bg);
  border: 1px solid var(--status-orange);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 12px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.alert-banner.alert-red {
  background: var(--status-red-bg);
  border-color: var(--status-red);
}

.alert-banner svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--status-orange);
}

.alert-banner.alert-red svg {
  color: var(--status-red);
}

.alert-banner-content {
  flex: 1;
}

.alert-banner-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.alert-banner-text {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ============================================================
   ROOM CARDS
   ============================================================ */
.room-grid {
  display: grid;
  gap: 12px;
}

.room-group-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--miku-brown);
  margin-bottom: 8px;
  padding-left: 4px;
}

.room-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
  padding: 6px 12px;
  background: var(--warm-cream);
  border-radius: var(--radius-sm);
}

.room-group-header .room-group-title {
  margin-bottom: 0;
  padding-left: 0;
}

.room-group-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
}

.room-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px;
  cursor: pointer;
  transition: box-shadow 0.2s;
}

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

.room-card.room-empty {
  background: var(--warm-cream);
  border-style: dashed;
}

.room-number {
  font-size: 18px;
  font-weight: 800;
  color: var(--miku-brown);
}

.room-type-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: var(--soft-blue-bg);
  color: var(--miku-blue);
}

/* ============================================================
   ROOM GRID COMPACT
   ============================================================ */
.room-grid-compact {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.room-summary {
  display: flex;
  align-items: center;
  gap: 8px;
}

.room-cell {
  border-radius: var(--radius-md);
  padding: 8px 6px;
  text-align: center;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 4px;
  transition: box-shadow 0.2s, transform 0.15s;
}

.room-cell-clickable {
  cursor: pointer;
}

.room-cell-clickable:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.room-cell-empty {
  background: var(--warm-cream);
  border: 1px dashed var(--border-light);
  color: var(--text-light);
  cursor: pointer;
}

.room-cell-occupied {
  background: var(--soft-blue-bg);
  border: 1px solid var(--miku-blue);
  cursor: pointer;
}

.room-cell-number {
  font-size: 13px;
  font-weight: 800;
  color: var(--miku-brown);
  line-height: 1;
}

.room-cell-photo {
  margin: 2px 0;
}

.room-cell-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.room-cell-extra {
  font-size: 9px;
  color: var(--miku-blue);
  font-weight: 600;
}

.room-cell-day {
  font-size: 10px;
  color: var(--text-light);
}

.room-cell-empty-text {
  font-size: 11px;
  color: var(--text-light);
  margin-top: auto;
  margin-bottom: auto;
}

/* Next check-in info for occupied rooms (small text) */
.room-cell-next-small {
  font-size: 9px;
  color: var(--miku-blue);
  background: rgba(79, 168, 217, 0.12);
  border-radius: var(--radius-sm);
  padding: 2px 6px;
  margin-top: 2px;
  font-weight: 600;
  white-space: nowrap;
}

/* Countdown for empty rooms (large number) */
.room-cell-countdown {
  font-size: 28px;
  font-weight: 800;
  color: var(--miku-brown);
  line-height: 1;
  margin-top: 4px;
}

.room-cell-countdown-label {
  font-size: 10px;
  color: var(--text-light);
  font-weight: 600;
}

.room-cell-next-date {
  font-size: 10px;
  color: var(--miku-blue);
  font-weight: 600;
  margin-top: 2px;
  white-space: nowrap;
}

/* ============================================================
   SCHEDULE
   ============================================================ */
.schedule-view-toggle {
  display: flex;
  gap: 4px;
  background: var(--warm-cream);
  border-radius: var(--radius-full);
  padding: 3px;
}

.schedule-view-toggle button {
  padding: 6px 16px;
  border: none;
  border-radius: var(--radius-full);
  background: transparent;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
}

.schedule-view-toggle button.active {
  background: var(--miku-blue);
  color: var(--white);
}

.schedule-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1px solid var(--border-light);
  margin-bottom: 8px;
  cursor: pointer;
  transition: box-shadow 0.15s;
}

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

.schedule-time {
  font-size: 13px;
  font-weight: 700;
  color: var(--miku-brown);
  min-width: 60px;
}

/* ============================================================
   TOGGLE SWITCH
   ============================================================ */
.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  background: var(--border-medium);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.toggle.on {
  background: var(--miku-blue);
}

.toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: var(--white);
  border-radius: var(--radius-full);
  transition: transform 0.2s;
  box-shadow: var(--shadow-sm);
}

.toggle.on::after {
  transform: translateX(20px);
}

/* ============================================================
   CHECKBOX
   ============================================================ */
.check-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
  padding: 8px 12px;
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  transition: all 0.15s;
}

.check-item:hover {
  border-color: var(--miku-blue);
}

.check-item.checked {
  border-color: var(--miku-blue);
  background: var(--soft-blue-bg);
}

.check-item input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--miku-blue);
  cursor: pointer;
}

/* ============================================================
   STAR RATING
   ============================================================ */
.star-rating {
  display: flex;
  gap: 4px;
}

.star {
  cursor: pointer;
  font-size: 20px;
  color: var(--border-medium);
  transition: color 0.15s;
  user-select: none;
}

.star.active {
  color: var(--soft-yellow);
}

/* ============================================================
   STAT CARDS
   ============================================================ */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card {
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
}

.stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--miku-brown);
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(79, 62, 45, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  overflow-y: auto;
}

.modal {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal.modal-lg {
  max-width: 720px;
}

.modal.modal-sm {
  max-width: 400px;
}

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

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--miku-brown);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}

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

.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-light);
}

/* ============================================================
   FAB
   ============================================================ */
.fab {
  position: fixed;
  bottom: 80px;
  right: 20px;
  width: 56px;
  height: 56px;
  border: none;
  border-radius: var(--radius-full);
  background: var(--miku-blue);
  color: var(--white);
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 80;
  transition: transform 0.15s;
}

.fab:hover {
  transform: scale(1.05);
}

/* ============================================================
   REMINDER BANNER
   ============================================================ */
.reminder-banner {
  flex: 0 0 calc(100% - var(--sidebar-w));
  margin-left: var(--sidebar-w);
  padding: 0 24px 12px;
  box-sizing: border-box;
  background: linear-gradient(135deg, #e3f2fd, #f0f7ff);
  border: 1px solid var(--miku-blue);
  border-radius: var(--radius-md);
  overflow: hidden;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}

.reminder-banner-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--miku-blue);
  color: var(--white);
}

.reminder-banner-icon {
  font-size: 18px;
}

.reminder-banner-count {
  font-weight: 700;
  font-size: 14px;
  flex: 1;
}

.reminder-banner-close {
  font-size: 20px;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
  opacity: 0.8;
}

.reminder-banner-close:hover {
  opacity: 1;
}

.reminder-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: background 0.2s;
}

.reminder-item:hover {
  background: rgba(143, 187, 235, 0.1);
}

.reminder-item:last-child {
  border-bottom: none;
}

.reminder-cat-photo {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  object-fit: cover;
  flex-shrink: 0;
}

.reminder-content {
  flex: 1;
  min-width: 0;
}

.reminder-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dark);
}

.reminder-text {
  font-size: 12px;
  color: var(--text-light);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.reminder-dismiss {
  font-size: 18px;
  cursor: pointer;
  color: var(--text-light);
  padding: 0 4px;
  flex-shrink: 0;
}

/* ============================================================
   TOAST
   ============================================================ */
.toast-container {
  position: fixed;
  top: 80px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: var(--miku-brown);
  color: var(--white);
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.2s ease;
}

.toast.toast-success { background: var(--status-green); }
.toast.toast-error { background: var(--status-red); }
.toast.toast-warning { background: var(--status-orange); }

@keyframes slideIn {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-light);
}

.empty-state svg {
  margin-bottom: 12px;
  opacity: 0.5;
}

.empty-state-text {
  font-size: 14px;
}

/* ============================================================
   TABS
   ============================================================ */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 20px;
  overflow-x: auto;
}

.tab {
  padding: 10px 16px;
  border: none;
  background: none;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-secondary);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  white-space: nowrap;
  transition: all 0.15s;
}

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

.tab.active {
  color: var(--miku-blue);
  border-bottom-color: var(--miku-blue);
}

/* ============================================================
   TIMELINE
   ============================================================ */
.timeline-item {
  display: flex;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.timeline-item:last-child {
  border-bottom: none;
}

.timeline-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--miku-blue);
  margin-top: 6px;
  flex-shrink: 0;
}

.timeline-content {
  flex: 1;
}

.timeline-date {
  font-size: 11px;
  color: var(--text-light);
}

/* ============================================================
   PROGRESS BAR
   ============================================================ */
.progress-bar {
  height: 6px;
  background: var(--border-light);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--miku-blue);
  border-radius: var(--radius-full);
  transition: width 0.3s;
}

/* ============================================================
   RESPONSIVE - MOBILE
   ============================================================ */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .desktop-header { display: none; }
  .mobile-header { display: flex; }
  .mobile-nav {
    display: flex;
  }

  .app {
    padding-top: var(--mobile-header-h);
  }

  .main-content {
    margin-left: 0;
    padding: 12px;
    padding-bottom: calc(var(--mobile-nav-h) + 20px);
  }

  .reminder-banner {
    flex: 0 0 100%;
    margin-left: 0;
    padding: 0 12px 12px;
  }

  /* Push onboarding banner */
  .push-onboard-banner {
    flex: 0 0 calc(100% - var(--sidebar-w));
    margin-left: var(--sidebar-w);
    padding: 0 24px 12px;
    box-sizing: border-box;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: linear-gradient(135deg, #fff8e1, #fffde7);
    border: 1px solid var(--status-orange);
    border-radius: var(--radius-md);
    animation: slideDown 0.3s ease;
  }

  .push-onboard-icon {
    font-size: 28px;
    line-height: 1;
    padding-top: 10px;
  }

  .push-onboard-body {
    flex: 1;
    padding: 8px 0 4px;
  }

  .push-onboard-title {
    font-weight: 800;
    font-size: 15px;
    color: #5d4037;
    margin-bottom: 2px;
  }

  .push-onboard-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.5;
  }

  .push-onboard-ios-note {
    margin-top: 6px;
    font-size: 12px;
    color: var(--status-orange);
    font-weight: 600;
    line-height: 1.4;
  }

  .push-onboard-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 8px;
  }

  .push-onboard-dismiss {
    font-size: 13px;
    color: var(--text-light);
    cursor: pointer;
    text-decoration: underline;
  }

  .push-onboard-dismiss:hover {
    color: var(--text-secondary);
  }

  /* Settings category list */
  .settings-cat-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .settings-cat-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px;
  }

  .settings-cat-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
  }

  .settings-cat-arrow {
    font-size: 24px;
    color: var(--text-light);
    flex-shrink: 0;
  }

  .flex-1 {
    flex: 1;
  }

  /* Daily tasks checklist */
  .task-item {
    transition: opacity 0.2s ease;
    padding: 14px 16px !important;
  }

  .task-checkbox {
    width: 22px;
    height: 22px;
    border: 2px solid var(--border-color, #ddd);
    border-radius: 6px;
    flex-shrink: 0;
    margin-top: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
  }

  .section-header {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-secondary, #888);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0 4px;
  }

  .page-title {
    font-size: 18px;
  }

  .push-onboard-banner {
    flex: 0 0 100%;
    margin-left: 0;
    padding: 0 12px 12px;
    flex-direction: column;
    gap: 4px;
  }

  .push-onboard-actions {
    padding-top: 2px;
  }

  .form-row {
    flex-direction: column;
  }

  .sel-group {
    flex-direction: column;
  }

  .sel-btn {
    min-width: auto;
    padding: 14px 12px;
    font-size: 14px;
  }

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

  .modal {
    padding: 16px;
    max-width: 100%;
  }

  .card-row {
    flex-wrap: wrap;
  }

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

  .room-grid-compact {
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
  }

  .room-cell {
    min-height: 85px;
    padding: 6px 4px;
  }

  .room-cell-number {
    font-size: 12px;
  }

  .room-cell-name {
    font-size: 10px;
  }

  .global-search {
    display: none;
  }
}

@media (min-width: 769px) {
  .room-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  }
}

/* ============================================================
   TABLET
   ============================================================ */
@media (min-width: 769px) and (max-width: 1024px) {
  .sidebar {
    width: 64px;
  }
  .sidebar-logo span { display: none; }
  .nav-item span { display: none; }
  .nav-section-label { display: none; }
  .sidebar-footer { display: none; }
  .main-content { margin-left: 64px; }
  .desktop-header { left: 64px; }
  .reminder-banner {
    flex: 0 0 calc(100% - 64px);
    margin-left: 64px;
  }
}

/* ============================================================
   UTILITIES
   ============================================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 12px; }
.text-light { color: var(--text-light); }
.text-secondary { color: var(--text-secondary); }
.font-bold { font-weight: 700; }
.font-extra-bold { font-weight: 800; }
.text-center { text-align: center; }
.flex-1 { flex: 1; }
.w-full { width: 100%; }
.hidden { display: none !important; }
.flex-wrap { flex-wrap: wrap; }
.rounded-full { border-radius: var(--radius-full); }
.bg-yellow-tint { background: var(--soft-yellow); border-radius: var(--radius-sm); padding: 4px 10px; }

.time-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  padding: 4px 10px;
  background: var(--soft-blue-bg);
  color: var(--miku-brown);
  font-size: 13px;
  font-weight: 700;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.section-count {
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  background: var(--miku-brown);
  border-radius: var(--radius-full);
  padding: 2px 10px;
  min-width: 24px;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.section-count.orange { background: var(--status-orange); }
.section-count.red { background: var(--status-red); }
.section-count.blue { background: var(--status-blue); }
.section-count.green { background: var(--status-green); }

/* Dashboard two-column layout */
.dashboard-stats-bar {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 12px 8px;
  margin-bottom: 20px;
}
.dashboard-stat-item {
  flex: 1;
  text-align: center;
  border-right: 1px solid var(--border-light);
}
.dashboard-stat-item:last-child { border-right: none; }
.dashboard-stat-item .stat-num {
  font-size: 20px;
  font-weight: 800;
  color: var(--miku-brown);
  line-height: 1.2;
}
.dashboard-stat-item .stat-text {
  font-size: 10px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.dashboard-two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}
.dashboard-col {
  min-width: 0;
}

@media (max-width: 768px) {
  .dashboard-two-col {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ============================================================
   PHOTO UPLOAD UI
   ============================================================ */
.photo-preview-area {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}
.photo-upload-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ============================================================
   PHOTO GALLERY
   ============================================================ */
.photo-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}
.photo-gallery-item {
  cursor: pointer;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--border-light);
  position: relative;
  transition: transform 0.15s;
}
.photo-gallery-item:hover {
  transform: scale(1.03);
}
.photo-gallery-item img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  display: block;
}
.photo-gallery-label {
  font-size: 11px;
  font-weight: 500;
  padding: 4px 8px 0;
  color: var(--text-dark);
}
.photo-gallery-date {
  font-size: 11px;
  padding: 0 8px 6px;
  color: var(--text-light);
}

/* ============================================================
   CAPACITY FORECAST
   ============================================================ */
.capacity-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.capacity-cell {
  border-radius: 6px;
  padding: 8px 4px;
  text-align: center;
  font-size: 12px;
  border: 1px solid var(--border-light);
}
.capacity-day-name {
  font-size: 10px;
  color: var(--text-light);
  text-transform: uppercase;
}
.capacity-day-num {
  font-size: 16px;
  font-weight: 500;
  margin: 2px 0;
}
.capacity-avail {
  font-size: 11px;
  font-weight: 500;
}
.capacity-full {
  background: rgba(217, 83, 40, 0.1);
  border-color: rgba(217, 83, 40, 0.3);
}
.capacity-full .capacity-avail {
  color: var(--status-red);
}
.capacity-tight {
  background: rgba(240, 173, 0, 0.1);
  border-color: rgba(240, 173, 0, 0.3);
}
.capacity-tight .capacity-avail {
  color: var(--status-yellow);
}
.capacity-ok {
  background: rgba(26, 167, 108, 0.06);
  border-color: rgba(26, 167, 108, 0.2);
}
.capacity-ok .capacity-avail {
  color: var(--status-green);
}
.capacity-today {
  border: 2px solid var(--miku-blue);
}

/* ============================================================
   CAT PICKER (boarding multi-select)
   ============================================================ */
.cat-pick-item {
  display: flex !important;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  cursor: pointer;
  margin-bottom: 6px;
  transition: all 0.15s;
  user-select: none;
}
.cat-pick-item:hover {
  border-color: var(--brand-blue) !important;
}

/* ============================================================
   MORE MENU (⋯ dropdown)
   ============================================================ */
.more-menu-wrap {
  position: relative;
  display: inline-block;
}
.more-menu {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: white;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  min-width: 140px;
  z-index: 1000;
  overflow: hidden;
}
.more-menu-item {
  display: block;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  border: none;
  background: none;
  font-size: 14px;
  cursor: pointer;
  color: var(--text-primary);
}
.more-menu-item:hover { background: var(--warm-cream); }
.more-menu-danger { color: var(--status-red) !important; }
.more-menu-danger:hover { background: #fef2f2 !important; }

/* ============================================================
   DELETE CONFIRMATION MODAL
   ============================================================ */
.btn-red {
  background: var(--status-red);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}
.btn-red:hover { opacity: 0.9; }
.btn-green {
  background: var(--status-green);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  cursor: pointer;
  font-size: 14px;
}
.btn-green:hover { opacity: 0.9; }

/* ============================================================
   MONTH CALENDAR GRID (Google Calendar style)
   ============================================================ */
.cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  background: var(--border-light);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
.cal-header {
  background: var(--bg-pink);
  padding: 8px 6px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}
.cal-cell {
  background: var(--white);
  min-height: 72px;
  padding: 4px 4px 2px;
  cursor: pointer;
  transition: background 0.12s;
  overflow: hidden;
}
.cal-cell:hover { background: var(--soft-pink); }
.cal-cell-empty { background: #f9f9f9; cursor: default; }
.cal-cell-empty:hover { background: #f9f9f9; }
.cal-cell-today { background: #eef6ff; }
.cal-cell-today:hover { background: #e0eff9; }
.cal-day-num {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 2px;
  text-align: right;
  padding-right: 2px;
}
.cal-day-today {
  color: var(--brand-blue);
}
.cal-chip {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 3px;
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.5;
}
.cal-chip-grooming {
  background: #dbeafe;
  color: #1e40af;
  border-left: 2px solid #3b82f6;
}
.cal-chip-boarding {
  background: #fef3c7;
  color: #92400e;
  border-left: 2px solid #f59e0b;
}
.cal-more {
  font-size: 10px;
  color: var(--text-light);
  padding: 0 4px;
}
.cal-legend {
  display: flex;
  gap: 16px;
  align-items: center;
}
.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  color: var(--text-secondary);
}
.cal-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.cal-dot-grooming { background: #3b82f6; }
.cal-dot-boarding { background: #f59e0b; }
@media (max-width: 768px) {
  .cal-cell { min-height: 56px; }
  .cal-header { font-size: 10px; padding: 6px 2px; }
  .cal-day-num { font-size: 11px; }
  .cal-chip { font-size: 9px; }
}

/* ============================================================
   GROOMING STATUS CARD COLORS
   ============================================================ */
.card-grooming-pending, .schedule-item.card-grooming-pending {
  background: #fef2f2 !important;
  border-left: 3px solid var(--status-red);
}
.card-grooming-done, .schedule-item.card-grooming-done {
  background: #f0fdf4 !important;
  border-left: 3px solid var(--status-green);
}

/* ============================================================
   ARCHIVED CUSTOMER CARD
   ============================================================ */
.card-archived {
  opacity: 0.7;
  background: var(--warm-cream);
  border: 1px dashed var(--text-secondary);
}
.badge-grey {
  background: #9ca3af;
  color: white;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 600;
}
.cursor-pointer { cursor: pointer; }

/* Feature switches (设置 → 功能开关). Hidden features keep their data. */
body.hide-payment .feat-payment { display: none !important; }

/* Cat personality tags */
.cat-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; cursor: pointer; }
.cat-tag { font-size: 12px; line-height: 1; padding: 4px 8px; border-radius: 999px; background: #f1ece4; color: var(--miku-brown, #5a4632); white-space: nowrap; }
.cat-tag-warn { background: #fde7e7; color: #c62828; font-weight: 600; }
.cat-tag-add { background: transparent; border: 1px dashed #c9bba8; color: #9a8b78; }
.cat-tag-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-tag-toggle { font-size: 14px; padding: 8px 12px; border-radius: 999px; border: 1px solid #ddd3c4; background: #fff; color: #5a4632; cursor: pointer; }
.cat-tag-toggle.on { background: var(--miku-blue, #6fa8dc); border-color: var(--miku-blue, #6fa8dc); color: #fff; }
.cat-tag-toggle.warn.on { background: #e53935; border-color: #e53935; }
.cat-avatar-tap { position: relative; cursor: pointer; flex-shrink: 0; }
.cat-avatar-cam { position: absolute; right: -4px; bottom: -4px; font-size: 14px; background: #fff; border-radius: 50%; width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
body.hide-dailycare .feat-dailycare,
body.hide-medication .feat-medication,
body.hide-incident .feat-incident,
body.hide-xiaomi .feat-xiaomi { display: none !important; }
/* Keep cat photo beside name/tags on narrow screens */
.cat-avatar-tap + div { flex: 1 1 0; min-width: 0; }


@font-face {
  font-family: 'Schoolbell';
  src: url('/fonts/Schoolbell-Regular.ttf') format('truetype');
  font-display: swap;
}

/* ============================================================
   THEME v2 (2026-10) — Miku Pet hand-drawn style
   Cream ground, white cards, brown text, blue/yellow accents,
   plaid strip, handwritten titles (Schoolbell + ZCOOL KuaiLe).
   ============================================================ */
:root {
  --ink: #2B1D14;
  --warn-red: #B3261E;
  --title-font: 'Schoolbell', 'ZCOOL KuaiLe', 'Noto Sans SC', cursive;
  --plaid: repeating-linear-gradient(0deg, rgba(255,255,255,0.18) 0 2px, transparent 2px 5px),
           repeating-linear-gradient(90deg, #A9775A 0 12px, #EFE0C4 12px 16px, #8A5E46 16px 30px, #C9DCE8 30px 33px, #C28E6C 33px 44px, #F6ECD8 44px 47px);
}

.page-title, .login-logo h1, .mobile-logo, .sidebar-logo span, .hand-title {
  font-family: var(--title-font);
  font-weight: 400;
  letter-spacing: 0.5px;
}
.page-title { font-size: 30px; line-height: 1.15; color: var(--miku-brown); }

.card {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: 0 1px 3px rgba(74, 47, 34, 0.07);
}

.btn { border-radius: 999px; }
.btn-blue { background: var(--miku-blue); color: var(--ink); }
.btn-blue:hover { background: #7AA8DA; color: var(--ink); }
.btn-outline { border: 2px solid var(--border-medium); }
.btn-outline:hover { border-color: var(--miku-brown); color: var(--miku-brown); }

.form-input, .form-select, .form-textarea {
  border-radius: 14px !important;
  border-width: 2px !important;
  border-color: var(--border-light) !important;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--miku-blue) !important; }

.modal { border-radius: 26px; }

/* Section labels as outlined pills, like the shop menu */
.pill-label {
  display: inline-flex; align-items: center;
  font-size: 14px; font-weight: 700; line-height: 1.3;
  padding: 3px 14px; border-radius: 999px;
  border: 1.5px solid var(--miku-brown);
  background: var(--soft-blue-bg); color: var(--ink);
}
.pill-label.yellow { background: var(--soft-yellow); }

/* Mobile top bar: plaid strip + handwritten name */
.mobile-header {
  background: var(--warm-cream);
  border-bottom: none;
  padding-top: 10px;
}
.mobile-header::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 10px;
  background: var(--plaid);
}
.mobile-logo { font-size: 24px; color: var(--miku-brown); display: flex; align-items: center; gap: 8px; }
.mobile-header-actions { display: flex; gap: 8px; }
.round-icon-btn {
  width: 40px; height: 40px; border-radius: 20px; border: none; background: #FFFFFF;
  display: flex; align-items: center; justify-content: center; color: var(--miku-brown);
  box-shadow: 0 1px 3px rgba(74, 47, 34, 0.1); cursor: pointer;
}
.mobile-header .search-trigger { width: 40px; height: 40px; border-radius: 20px; background: #FFFFFF; display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(74, 47, 34, 0.1); }

/* Bottom nav: yellow band with a big + in the middle */
.mobile-nav {
  background: var(--soft-yellow);
  border-top: 2px solid var(--miku-brown);
  height: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  align-items: center;
}
.mobile-nav-item { color: #6B5444; font-size: 11px; }
.mobile-nav-item.active { color: var(--ink); font-weight: 800; }
.mobile-nav-item.active svg { fill: #FFFFFF; }
.mobile-nav-add {
  flex: 0 0 auto; width: 60px; height: 60px; margin: -30px 6px 0; border-radius: 30px;
  background: var(--miku-blue); border: 2.5px solid var(--miku-brown); color: var(--ink);
  display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
@media (max-width: 768px) {
  .fab { display: none !important; }
}
.fab { background: var(--miku-blue); color: var(--ink); border: 2.5px solid var(--miku-brown); }

/* Desktop sidebar */
.sidebar { background: #FFFFFF; }
.sidebar-logo { border-bottom: none; position: relative; padding-top: 30px; }
.sidebar-logo::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 12px; background: var(--plaid); }
.sidebar-logo span { font-size: 26px; }
.nav-item { border-radius: 999px; }
.nav-item.active { background: var(--soft-yellow); color: var(--ink); }
.nav-item.active svg { color: var(--ink); }
.desktop-header { background: var(--warm-cream); border-bottom: none; }

/* Login */
.login-screen { background: var(--warm-cream); position: relative; }
.login-screen::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 26px; background: var(--plaid); }
.login-card { background: transparent; box-shadow: none; border: none; }
.login-logo h1 { font-size: 42px; color: var(--miku-brown); }
.login-tagline { font-size: 14px; color: var(--text-secondary); }

/* Doodle cat helper */
.doodle { display: block; flex-shrink: 0; }

/* Time chip (yellow) */
.time-chip {
  display: inline-block; font-size: 14px; font-weight: 700; white-space: nowrap;
  padding: 4px 10px; border-radius: 999px; background: var(--soft-yellow); color: var(--ink);
}

/* ---------- Home (今日) ---------- */
.home-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 12px; }
.home-date { font-size: 13px; color: var(--text-secondary); }
.home-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 16px; }
.home-stat { background: #FFFFFF; border-radius: 18px; padding: 12px; display: flex; align-items: center; gap: 10px; box-shadow: 0 1px 3px rgba(74,47,34,0.07); }
.home-stat b { display: block; font-size: 22px; font-weight: 900; line-height: 1.1; color: var(--ink); }
.home-stat span { font-size: 12px; color: var(--text-secondary); }
.home-section-head { display: flex; align-items: center; gap: 8px; margin: 4px 0 10px; }
.home-empty { padding: 16px; border-radius: 18px; border: 2px dashed var(--border-medium); color: var(--text-secondary); font-size: 14px; text-align: center; margin-bottom: 12px; }
.home-card { background: #FFFFFF; border-radius: 22px; padding: 12px 14px; display: flex; gap: 12px; align-items: center; box-shadow: 0 1px 3px rgba(74,47,34,0.07); margin-bottom: 10px; cursor: pointer; }
.home-card .cat-photo, .home-card .cat-photo-placeholder { width: 56px; height: 56px; border: 2px solid var(--miku-brown); }
.home-card-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.home-card-name { font-size: 17px; font-weight: 700; color: var(--ink); line-height: 1.3; }
.home-card-name span { font-size: 12px; font-weight: 400; color: var(--text-secondary); margin-left: 4px; }
.home-card-name .room-chip { font-weight: 700; color: var(--ink); background: var(--soft-blue-bg); padding: 1px 8px; border-radius: 6px; }
.home-card-name .room-chip.out { background: var(--soft-yellow); }
.home-card-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex-shrink: 0; }
.home-card-actions { display: flex; align-items: center; gap: 6px; }
.home-card-actions .btn-sm { height: 36px; padding: 0 16px; }
.home-outline { border: 2px solid var(--miku-brown) !important; color: var(--miku-brown) !important; }
.home-more { width: 32px; height: 32px; border-radius: 16px; border: none; background: #F3EBDD; color: var(--miku-brown); font-size: 16px; font-weight: 900; line-height: 1; cursor: pointer; }
.home-card-done { background: #F3EBDD; box-shadow: none; }
.home-card-done .cat-photo, .home-card-done .cat-photo-placeholder { width: 44px; height: 44px; }
.home-card-done .home-card-name { font-size: 15px; }
.home-card-done-text { font-size: 12px; font-weight: 700; color: #2E6B45; }
.home-note { display: flex; align-items: center; gap: 10px; background: #FFFFFF; border-radius: 16px; padding: 10px 14px; margin-bottom: 8px; font-size: 14px; cursor: pointer; box-shadow: 0 1px 3px rgba(74,47,34,0.06); }
.home-note-dot { width: 22px; height: 22px; border-radius: 11px; background: var(--soft-yellow); border: 1.5px solid var(--miku-brown); display: inline-flex; align-items: center; justify-content: center; font-weight: 900; font-size: 12px; flex-shrink: 0; }
.action-list { display: flex; flex-direction: column; gap: 8px; }
.action-item { height: 52px; border-radius: 16px; border: 2px solid var(--border-light); background: #FFFFFF; font-size: 15px; font-weight: 700; color: var(--ink); cursor: pointer; font-family: inherit; }
.action-item.danger { color: var(--warn-red); }
.cat-tag-warn { background: transparent; border: 1.5px solid var(--warn-red); color: var(--warn-red); }
.cat-tag { background: #F3EBDD; }
@media (max-width: 768px) {
  .home-head .doodle { width: 84px; height: auto; }
}

.login-logo { display: flex; flex-direction: column; align-items: center; text-align: center; }
.login-logo .doodle { margin: 0 auto 6px; }

/* ---------- Booking sheet ---------- */
@media (max-width: 768px) {
  .modal-overlay:has(.modal-sheet) { align-items: flex-end; padding: 0; }
  .modal.modal-sheet { border-radius: 28px 28px 0 0; max-height: 94vh; padding: 10px 18px calc(18px + env(safe-area-inset-bottom, 0px)); }
}
.modal-sheet { background: var(--warm-cream); }
.sheet-grip { width: 44px; height: 5px; border-radius: 3px; background: #DCCFBC; margin: 0 auto 8px; }
.qb-head { border-bottom: none; padding-bottom: 0; margin-bottom: 10px; }
.qb-title { font-size: 24px; }
.modal-sheet .form-group > label { font-size: 13px; font-weight: 700; color: var(--ink); }
.qb-phone { height: 52px; font-size: 18px !important; font-weight: 700; border-color: var(--miku-blue) !important; background: #FFFFFF; }
.qb-info { margin-top: 6px; font-size: 13px; }
.qb-friend { color: #2E6B45; font-weight: 700; }
.qb-new { color: #2E6B45; font-weight: 700; }
.qb-chip-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.qb-cat { height: 48px; padding: 0 14px 0 5px; border-radius: 24px; border: 2px solid var(--border-light); background: #FFFFFF; color: var(--ink); display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; cursor: pointer; font-family: inherit; }
.qb-cat .cat-photo, .qb-cat .cat-photo-placeholder { width: 36px; height: 36px; }
.qb-cat.on { border-color: var(--miku-brown); background: var(--soft-blue-bg); }
.qb-cat-new { padding: 0 16px; border-style: dashed; border-color: #B4A08A; background: transparent; color: #6B5444; }
.qb-grid { display: grid; gap: 8px; }
.qb-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.qb-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.qb-opt { min-height: 48px; border-radius: 14px; border: 2px solid var(--border-light); background: #FFFFFF; color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0; padding: 4px; font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; position: relative; text-align: center; line-height: 1.25; }
.qb-opt.on { border-color: var(--miku-brown); background: var(--soft-yellow); }
.qb-svc.on { background: var(--soft-blue-bg); }
.qb-opt-main { font-size: 14px; font-weight: 700; }
.qb-price { font-size: 13px; font-weight: 700; color: var(--warn-red); }
.qb-ampm { font-size: 11px; font-weight: 400; color: var(--text-secondary); }
.qb-opt.on .qb-ampm { color: var(--ink); }
.qb-pick input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; cursor: pointer; }
.qb-addon { font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1.5px solid transparent; background: #F3EBDD; color: var(--ink); cursor: pointer; font-family: inherit; }
.qb-addon.on { border-color: var(--miku-brown); background: var(--soft-blue-bg); font-weight: 700; }
.qb-save { height: 56px; font-size: 16px; margin-top: 4px; }
.btn-link { background: none; border: none; color: var(--text-secondary); font-size: 13px; text-decoration: underline; cursor: pointer; font-family: inherit; }
.qb-full { display: block; margin: 10px auto 0; }
.new-kind { height: 150px; border-radius: 22px; border: 2px solid var(--miku-brown); background: var(--soft-blue-bg); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; cursor: pointer; font-family: inherit; }
.new-kind.yellow { background: var(--soft-yellow); }
.new-kind-name { font-family: var(--title-font); font-size: 24px; color: var(--ink); }
.form-group label.qb-pick { display: flex !important; flex-direction: column; align-items: center; justify-content: center; margin: 0 !important; font-size: 14px; }

/* ---------- Rooms (house cells) ---------- */
.rooms-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 8px; }
.rooms-counts { display: flex; gap: 6px; }
.rooms-count { font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; background: #FFFFFF; box-shadow: 0 1px 3px rgba(74,47,34,0.08); }
.rooms-count.blue { background: var(--soft-blue-bg); box-shadow: none; }
.rooms-count b { font-size: 16px; font-weight: 900; }
.rooms-legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-secondary); margin-bottom: 14px; }
.rooms-legend span { display: flex; align-items: center; gap: 5px; }
.rooms-legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.lg-full { background: #CDE6F8; } .lg-soon { background: var(--soft-yellow); } .lg-empty { background: #EFE7DA; }
.rooms-group { margin-bottom: 16px; }
.rooms-group-name { font-size: 14px; font-weight: 700; }
.rooms-group-sum { margin-left: auto; font-size: 12px; color: var(--text-secondary); }
.house-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
@media (min-width: 769px) { .house-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); } }
.house { height: 104px; border: none; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; padding: 0 3px 9px; min-width: 0; cursor: pointer; font-family: inherit; color: var(--ink);
  clip-path: polygon(50% 0, 100% 26%, 100% 100%, 0 100%, 0 26%); border-radius: 0 0 12px 12px; }
.house-full { background: #CDE6F8; }
.house-soon { background: var(--soft-yellow); }
.house-empty { background: #EFE7DA; color: #6B5444; }
.house-no { font-size: 10px; font-weight: 700; opacity: 0.6; line-height: 1; }
.house .cat-photo, .house .cat-photo-placeholder { width: 30px; height: 30px; border: 1.5px solid var(--miku-brown); }
.house-name { font-size: 12px; font-weight: 700; line-height: 1.2; max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.house-sub { font-size: 10px; line-height: 1.2; white-space: nowrap; }
.house-big { font-size: 17px; font-weight: 900; line-height: 1.1; }
.rooms-doodle { display: flex; justify-content: flex-end; margin-top: -4px; }

/* ---------- Schedule day list ---------- */
.sched-row { display: flex; gap: 10px; align-items: stretch; margin-bottom: 8px; }
.sched-time { width: 54px; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; }
.sched-time span { font-size: 11px; color: var(--text-secondary); }
.sched-time b { font-size: 15px; font-weight: 900; color: var(--ink); }
.sched-card { flex: 1; min-width: 0; display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: 18px; background: #FFFFFF; box-shadow: 0 1px 3px rgba(74,47,34,0.07); cursor: pointer; margin-bottom: 8px; }
.sched-row .sched-card { margin-bottom: 0; }
.sched-card.done { background: #F3EBDD; box-shadow: none; }
.sched-card .cat-photo, .sched-card .cat-photo-placeholder { width: 40px; height: 40px; border: 1.5px solid var(--miku-brown); }
.sched-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.sched-body b { font-size: 15px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched-body span { font-size: 12px; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sched-pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 999px; border: 1.5px solid var(--miku-brown); white-space: nowrap; flex-shrink: 0; }
.sched-pill.blue { background: var(--soft-blue-bg); } .sched-pill.yellow { background: var(--soft-yellow); }
.sched-add { width: calc(100% - 64px); margin-left: 64px; height: 48px; border-radius: 18px; border: 2px dashed var(--border-medium); background: transparent; color: var(--text-secondary); font-size: 14px; font-weight: 700; cursor: pointer; font-family: inherit; }
.schedule-view-toggle { background: #F0E6D6; border-radius: 999px; padding: 4px; gap: 4px; border: none; }
.schedule-view-toggle button { border-radius: 999px; border: none; background: transparent; color: #6B5444; font-weight: 700; min-width: 44px; }
.schedule-view-toggle button.active { background: #FFFFFF; color: var(--ink); box-shadow: 0 1px 3px rgba(74,47,34,0.12); }
#scheduleNav .btn-sm { height: 36px; }

/* ---------- More / settings lists ---------- */
.more-account { display: flex; align-items: center; gap: 12px; background: #FFFFFF; border-radius: 20px; padding: 14px; box-shadow: 0 1px 3px rgba(74,47,34,0.07); margin-bottom: 16px; }
.more-avatar { width: 48px; height: 48px; border-radius: 24px; background: var(--soft-yellow); border: 2px solid var(--miku-brown); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 900; flex-shrink: 0; }
.more-text { flex: 1; min-width: 0; display: flex; flex-direction: column; text-align: left; }
.more-text b { font-size: 15px; color: var(--ink); }
.more-text span { font-size: 12px; color: var(--text-secondary); }
.more-group-title { font-size: 12px; font-weight: 700; color: var(--text-secondary); margin: 0 0 6px 4px; }
.more-group { background: #FFFFFF; border-radius: 20px; padding: 2px 14px; box-shadow: 0 1px 3px rgba(74,47,34,0.07); margin-bottom: 16px; }
.more-row { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px 0; border: none; background: none; border-bottom: 1.5px dotted #E3D6C2; cursor: pointer; font-family: inherit; }
.more-group .more-row:last-child { border-bottom: none; }
.more-icon { width: 36px; height: 36px; border-radius: 12px; background: var(--soft-blue-bg); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.more-row:nth-child(2n) .more-icon { background: var(--soft-yellow); }
.more-arrow { color: #B4A08A; font-size: 22px; line-height: 1; }
.more-doodle { display: flex; justify-content: center; margin-top: 8px; opacity: 0.95; }
.settings-cat-item .settings-cat-icon { border-radius: 12px; }
.btn-big { height: 56px; font-size: 16px; }
