:root {
  color-scheme: light;
  --ink: #202522;
  --muted: #737a75;
  --faint: #9aa09c;
  --line: #e6e8e3;
  --line-strong: #d8dcd5;
  --paper: #f5f6f2;
  --card: #ffffff;
  --sidebar: #121816;
  --sidebar-soft: #202724;
  --gold: #b9854f;
  --gold-strong: #9e6e3c;
  --gold-soft: #f3e9dd;
  --green: #4c8065;
  --green-soft: #e6f0ea;
  --red: #b75d58;
  --red-soft: #f8e9e7;
  --blue: #5c7794;
  --blue-soft: #e8eef4;
  --violet: #79688e;
  --violet-soft: #eeeaf2;
  --shadow: 0 12px 36px rgba(31, 41, 35, .06);
  --radius: 18px;
  font-family: 'Segoe UI', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  padding-top: env(safe-area-inset-top);
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }

.icon { display: inline-block; flex: none; vertical-align: middle; }
.muted { color: var(--muted); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  z-index: 20;
  inset: 0 auto 0 0;
  width: 244px;
  padding: 28px 18px 20px;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 20% 5%, rgba(185, 133, 79, .15), transparent 24%),
    var(--sidebar);
  color: #d7ddd9;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 0 8px 24px;
  border: 0;
  background: none;
  color: white;
  text-align: left;
  cursor: pointer;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(218, 176, 124, .52);
  border-radius: 50%;
  color: #d5a66f;
}

.brand strong { display: block; font-size: 16px; letter-spacing: .03em; }
.brand small { display: block; margin-top: 3px; color: #7f8a84; font-size: 8px; letter-spacing: .22em; }

.main-nav { display: grid; gap: 5px; }
.main-nav button, .sidebar-bottom > button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  height: 47px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #929d97;
  font-size: 14px;
  cursor: pointer;
  transition: .18s ease;
}

.main-nav button:hover, .sidebar-bottom > button:hover { background: rgba(255, 255, 255, .045); color: #e6e9e7; }
.main-nav button.active, .sidebar-bottom > button.active { background: var(--sidebar-soft); color: #f4f4f0; }
.main-nav button.active::before, .sidebar-bottom > button.active::before { content: ''; position: absolute; left: 0; width: 3px; height: 21px; border-radius: 0 4px 4px 0; background: #c89964; }
.main-nav button.active .icon, .sidebar-bottom > button.active .icon { color: #d2a56f; }

.sidebar-bottom { margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .07); }
.sync-mini { display: flex; align-items: center; gap: 8px; margin: 16px 12px 0; color: #66716b; font-size: 10px; }
.sync-mini.synced { color: #81a28e; }

.main { min-height: 100vh; margin-left: 244px; }
.topbar {
  height: 104px;
  padding: 26px 38px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(218, 221, 215, .78);
  background: rgba(245, 246, 242, .88);
  backdrop-filter: blur(16px);
}

.topbar h1 { margin: 0; font-size: 23px; font-weight: 650; letter-spacing: -.02em; }
.topbar p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.today-chip { padding-right: 16px; border-right: 1px solid var(--line-strong); color: var(--muted); font-size: 12px; }
.avatar-button { width: 39px; height: 39px; border: 1px solid #cbd0ca; border-radius: 50%; background: #e0e4de; color: #49514c; font-weight: 700; cursor: pointer; }

.page { max-width: 1560px; margin: 0 auto; padding: 30px 38px 52px; }
.card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.eyebrow { color: var(--gold-strong); font-size: 9px; font-weight: 700; letter-spacing: .18em; }
.section-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.section-head h3 { margin: 5px 0 0; font-size: 17px; }
.section-head p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }

.button {
  min-height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: .17s ease;
}
.button:hover { transform: translateY(-1px); }
.button-primary { border-color: var(--gold); background: var(--gold); color: white; box-shadow: 0 7px 18px rgba(158, 110, 60, .17); }
.button-primary:hover { background: var(--gold-strong); }
.button-quiet { border-color: var(--line-strong); background: white; color: #4c534f; }
.button-quiet:hover { border-color: #b9beb8; background: #fafbf8; }
.button-small { min-height: 32px; padding: 0 12px; }
.button-danger-quiet { border-color: #eed1ce; background: #fff8f7; color: var(--red); }
.text-button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 0; border: 0; background: none; color: var(--gold-strong); font-size: 11px; cursor: pointer; }
.icon-button { display: inline-grid; place-items: center; width: 34px; height: 34px; padding: 0; border: 1px solid transparent; border-radius: 9px; background: transparent; color: #727975; cursor: pointer; }
.icon-button:hover { border-color: var(--line); background: #f6f7f4; color: var(--ink); }
.icon-button.accent { background: var(--gold-soft); color: var(--gold-strong); }

.page-actions { min-height: 44px; margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.page-intro { margin: 0; color: var(--muted); font-size: 12px; }
.action-cluster, .button-row { display: flex; align-items: center; gap: 10px; }
.button-row > div, .modal-actions > div { display: flex; gap: 9px; }

.hero-row { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(280px, .75fr); gap: 18px; }
.hero-card {
  position: relative;
  min-height: 224px;
  padding: 34px 36px;
  overflow: hidden;
  border-radius: 21px;
  background:
    radial-gradient(circle at 83% 30%, rgba(203, 160, 105, .18), transparent 30%),
    linear-gradient(130deg, #19211e, #101513);
  color: white;
  box-shadow: 0 18px 42px rgba(21, 28, 25, .15);
}
.hero-card h2 { max-width: 520px; margin: 11px 0 7px; font-size: clamp(23px, 2.2vw, 31px); font-weight: 600; letter-spacing: -.025em; }
.hero-card p { max-width: 490px; margin: 0 0 23px; color: #aab3ae; font-size: 12px; line-height: 1.7; }
.hero-card .button { position: relative; z-index: 2; }
.hero-aperture { position: absolute; right: 6%; top: 50%; transform: translateY(-50%) rotate(7deg); color: rgba(218, 178, 128, .12); }
.quick-actions { padding: 25px; }
.quick-grid { margin-top: 21px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-grid button { min-height: 63px; display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fafbf8; color: #4d5550; font-size: 11px; cursor: pointer; }
.quick-grid button:hover { border-color: #d4bea6; background: #fffdf9; }
.quick-grid button span { display: grid; place-items: center; width: 31px; height: 31px; border-radius: 9px; background: var(--gold-soft); color: var(--gold-strong); }

.metric-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.metric-card { min-height: 119px; padding: 22px; display: flex; align-items: center; gap: 15px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.metric-icon { display: grid; place-items: center; width: 43px; height: 43px; border-radius: 12px; }
.metric-icon.gold { background: var(--gold-soft); color: var(--gold-strong); }
.metric-icon.blue { background: var(--blue-soft); color: var(--blue); }
.metric-icon.green { background: var(--green-soft); color: var(--green); }
.metric-icon.violet { background: var(--violet-soft); color: var(--violet); }
.metric-card small { display: block; color: var(--muted); font-size: 10px; }
.metric-card strong { display: block; margin: 3px 0 1px; font-size: 20px; white-space: nowrap; }
.metric-card p { margin: 0; color: var(--faint); font-size: 9px; }
.dashboard-grid { margin-top: 18px; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(270px, .7fr); gap: 18px; }
.schedule-preview, .progress-card { min-height: 310px; padding: 25px; }
.timeline-list { margin-top: 18px; }
.timeline-item { min-height: 50px; display: grid; grid-template-columns: 42px 10px minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.timeline-item time { text-align: center; }
.timeline-item time strong { display: block; font-size: 17px; }
.timeline-item time span { color: var(--muted); font-size: 9px; }
.timeline-item > i { position: relative; width: 8px; height: 8px; border: 2px solid var(--gold); border-radius: 50%; background: white; }
.timeline-item > i::after { content: ''; position: absolute; top: 8px; left: 2px; width: 1px; height: 43px; background: var(--line); }
.timeline-item:last-child > i::after { display: none; }
.timeline-item > div strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.timeline-item > div span { color: var(--muted); font-size: 10px; }
.soft-label { display: inline-block; padding: 5px 8px; border-radius: 7px; background: #f1f3ef; color: var(--muted); font-size: 9px; white-space: nowrap; }
.progress-card .section-head { margin-bottom: 24px; }
.progress-line { margin: 16px 0; }
.progress-line > div:first-child { margin-bottom: 6px; display: flex; justify-content: space-between; color: var(--muted); font-size: 10px; }
.progress-line strong { color: var(--ink); }
.progress-track { height: 5px; overflow: hidden; border-radius: 4px; background: #eceeea; }
.progress-track i { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--gold); }
.progress-track i.expense { background: var(--red); }

.empty-state { min-height: 220px; padding: 32px 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; color: #a2a8a4; text-align: center; }
.empty-state > .icon { color: #c4c9c4; }
.empty-state h3 { margin: 13px 0 5px; color: #555d58; font-size: 15px; }
.empty-state p { max-width: 360px; margin: 0 0 15px; color: var(--muted); font-size: 11px; line-height: 1.7; }

.legend { display: flex; gap: 18px; color: var(--muted); font-size: 10px; }
.legend span { display: flex; align-items: center; gap: 6px; }
.dot { width: 7px; height: 7px; border-radius: 50%; }
.dot.confirmed { background: var(--gold); }
.dot.draft { background: var(--blue); }
.dot.conflict { background: var(--red); }
.dot.cancelled { background: #b8bcb8; }
.calendar-layout { display: grid; grid-template-columns: minmax(620px, 1.65fr) minmax(280px, .62fr); gap: 18px; }
.calendar-card { padding: 22px 22px 17px; }
.calendar-toolbar { height: 48px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: start; }
.calendar-toolbar > div { display: flex; gap: 3px; }
.calendar-toolbar h2 { margin: 8px 0 0; font-size: 16px; font-weight: 600; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-weekdays span { padding: 10px 0; color: var(--faint); font-size: 9px; text-align: center; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); overflow: hidden; border: solid var(--line); border-width: 1px 0 0 1px; border-radius: 12px; }
.calendar-day { position: relative; min-height: 84px; padding: 10px; border: solid var(--line); border-width: 0 1px 1px 0; background: white; text-align: left; cursor: pointer; }
.calendar-day:hover { z-index: 1; background: #fbfaf7; box-shadow: inset 0 0 0 1px #e2c9a9; }
.calendar-day.outside { background: #fafbf8; color: #bfc3bf; }
.calendar-day > span { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 50%; font-size: 11px; }
.calendar-day.today > span { background: var(--ink); color: white; font-weight: 700; }
.calendar-day.selected { background: #fdf9f3; box-shadow: inset 0 0 0 2px #d7ad7b; }
.calendar-day > div { position: absolute; left: 12px; bottom: 10px; display: flex; align-items: center; gap: 4px; }
.event-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); }
.event-dot.draft { background: var(--blue); }
.event-dot.cancelled { background: #c3c6c3; }
.event-dot.conflict { background: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.calendar-day small { color: var(--muted); font-size: 8px; }
.day-panel { padding: 24px; }
.day-panel-head { display: flex; align-items: center; justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.day-panel-head h3 { margin: 5px 0 0; font-size: 16px; }
.day-events { margin-top: 18px; display: grid; gap: 12px; }
.day-event { position: relative; min-height: 116px; padding: 16px 8px 16px 15px; display: grid; grid-template-columns: 48px minmax(0, 1fr) 30px; gap: 13px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fdfdfa; }
.day-event::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--gold); }
.day-event.draft::before { background: var(--blue); }
.day-event.cancelled { opacity: .62; }
.day-event.cancelled::before { background: #aeb3ae; }
.day-event.sync-conflict::before { background: var(--red); }
.event-time { padding-top: 3px; text-align: right; }
.event-time strong, .event-time span { display: block; font-size: 11px; }
.event-time span { margin-top: 4px; color: var(--faint); font-size: 9px; }
.event-main h4 { margin: 9px 0 3px; font-size: 12px; }
.event-main p { margin: 0; color: var(--muted); font-size: 10px; }
.event-main small { display: block; margin-top: 7px; color: var(--faint); font-size: 9px; }
.item-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.day-event .item-actions { flex-direction: column; justify-content: flex-start; }

/* Availability calendar and selected-day timeline */
.schedule-workspace { display: grid; gap: 18px; }
.schedule-actions .legend { flex-wrap: wrap; }
.slot-key { width: 16px; height: 8px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(32, 37, 34, .06); }
.slot-key.free, .mini-slot.free { background: #45a67c; }
.slot-key.draft, .mini-slot.draft { background: #e2ad4c; }
.slot-key.occupied, .mini-slot.occupied { background: #d66b68; }
.slot-key.conflict, .mini-slot.conflict { background: #6387aa; }
.availability-calendar { padding: 24px; }
.availability-calendar .calendar-toolbar { height: 64px; align-items: start; }
.calendar-month-title { text-align: center; }
.calendar-month-title > span { color: var(--gold-strong); font-size: 7px; font-weight: 700; letter-spacing: .18em; }
.availability-calendar .calendar-toolbar h2 { margin: 4px 0 0; font-family: Georgia, 'Times New Roman', serif; font-size: 20px; }
.availability-calendar .calendar-weekdays { gap: 6px; }
.availability-calendar .calendar-weekdays span { padding: 7px 0 11px; font-size: 9px; font-weight: 600; }
.availability-calendar .calendar-grid { gap: 6px; overflow: visible; border: 0; border-radius: 0; }
.availability-calendar .calendar-day { min-height: 112px; padding: 10px; display: grid; grid-template-columns: 1fr 36px; grid-template-rows: 1fr auto; gap: 5px 8px; overflow: hidden; border: 1px solid rgba(87, 102, 93, .14); border-radius: 11px; }
.availability-calendar .calendar-day.capacity-free { background: #e6f3eb; }
.availability-calendar .calendar-day.capacity-partial { background: #f7ecd6; }
.availability-calendar .calendar-day.capacity-busy { background: #f6dedc; }
.availability-calendar .calendar-day.outside { background: #f4f5f2; opacity: .54; }
.availability-calendar .calendar-day:hover { z-index: 1; filter: brightness(.985); box-shadow: inset 0 0 0 1px #c99861, 0 7px 18px rgba(38, 47, 42, .08); }
.availability-calendar .calendar-day.selected { box-shadow: inset 0 0 0 3px var(--ink), 0 7px 20px rgba(30, 37, 33, .12); }
.availability-calendar .calendar-day > .calendar-date-number { align-self: center; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; font-family: Georgia, 'Times New Roman', serif; font-size: 19px; }
.availability-calendar .calendar-day.today > .calendar-date-number { background: var(--ink); color: white; font-weight: 700; }
.calendar-slot-bars { width: 36px !important; height: auto !important; display: grid !important; grid-template-rows: repeat(6, 1fr); place-items: stretch !important; align-self: stretch; gap: 2px; border-radius: 0 !important; background: transparent !important; color: inherit !important; font-weight: 400 !important; }
.mini-slot { display: block; min-height: 9px; border-radius: 4px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25); }
.calendar-event-count { grid-column: 1 / -1; color: #68736c !important; font-size: 7px !important; text-align: left; }
.day-agenda-card { padding: 24px; overflow: hidden; }
.day-agenda-card .day-panel-head { gap: 20px; }
.day-navigation { display: flex; align-items: center; gap: 12px; }
.day-navigation > div { min-width: 205px; text-align: center; }
.day-navigation h3 { margin: 4px 0 0; font-family: Georgia, 'Times New Roman', serif; font-size: 18px; }
.day-summary { display: flex; align-items: center; gap: 18px; color: var(--muted); font-size: 9px; }
.day-summary span { white-space: nowrap; }
.day-summary strong { margin-right: 3px; color: var(--ink); font-size: 14px; }
.day-slot-strip { padding: 20px 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 9px; overflow-x: auto; }
.day-slot { min-width: 100px; min-height: 86px; padding: 12px 8px; display: grid; place-items: center; gap: 2px; border: 0; border-radius: 12px; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.day-slot:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(30, 38, 34, .11); }
.day-slot.free { background: #dff2e8; color: #327858; }
.day-slot.draft { background: #f7e9c8; color: #8b6425; }
.day-slot.occupied { background: #f5dcda; color: #9e4f4b; }
.day-slot.conflict { background: #dfe9f2; color: #4f7191; }
.day-slot strong { font-family: Georgia, 'Times New Roman', serif; font-size: 17px; }
.day-slot span { font-size: 9px; }
.day-slot small { margin-top: 2px; font-size: 7px; font-weight: 700; letter-spacing: .08em; }
.agenda-timeline { position: relative; min-width: 0; margin: 3px 0 5px; overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fcfcfa; }
.agenda-hour { position: absolute; left: 0; right: 0; height: 1px; display: grid; grid-template-columns: 62px 1fr; align-items: center; }
.agenda-hour time { padding-right: 12px; color: var(--faint); font-size: 8px; text-align: right; transform: translateY(-50%); }
.agenda-hour i { height: 1px; background: var(--line); }
.agenda-events-layer { position: absolute; inset: 0 8px 0 62px; }
.agenda-event { position: absolute; z-index: 2; min-height: 46px; padding: 10px 62px 9px 13px; overflow: hidden; border: 1px solid rgba(145, 95, 45, .13); border-radius: 10px; background: #f2d5ad; box-shadow: 0 5px 14px rgba(54, 43, 29, .07); }
.agenda-event.draft { border-color: #c9d7e5; background: #dce9f4; }
.agenda-event.cancelled { border-style: dashed; background: #eceeeb; opacity: .68; }
.agenda-event.sync-conflict { border-color: #d3a7a4; background: #f2d1cf; }
.agenda-event.no-show { border-style: dashed; border-color: #d3a7a4; background: #f7e7e5; opacity: .78; }
.agenda-event-head { display: flex; align-items: center; gap: 7px; color: #5f492f; font-size: 9px; }
.agenda-event-head span { padding: 2px 5px; border-radius: 8px; background: rgba(183, 93, 88, .14); color: var(--red); font-size: 7px; }
.agenda-event h4 { margin: 4px 0 2px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.agenda-event p { margin: 0; overflow: hidden; color: #6f675d; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.agenda-event-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 2px; }
.agenda-event-actions button { width: 25px; height: 25px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 7px; background: rgba(255, 255, 255, .52); color: #655c51; cursor: pointer; }
.agenda-empty { position: absolute; z-index: 1; inset: 0 0 0 62px; display: grid; place-content: center; color: #8da093; text-align: center; pointer-events: none; }
.agenda-empty span { font-family: Georgia, 'Times New Roman', serif; font-size: 23px; }
.agenda-empty p { margin: 5px 0 0; font-size: 9px; }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 20px; background: #eff1ee; color: #68706b; font-size: 8px; font-weight: 600; white-space: nowrap; }
.pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-confirmed, .status-shooting, .active-package { background: var(--green-soft); color: var(--green); }
.status-draft { background: var(--blue-soft); color: var(--blue); }
.status-post { background: var(--violet-soft); color: var(--violet); }
.status-completed { background: var(--gold-soft); color: var(--gold-strong); }
.status-cancelled { color: #8e9590; }
.status-conflict { background: var(--red-soft); color: var(--red); }

.segmented { padding: 4px; display: flex; gap: 3px; border: 1px solid var(--line); border-radius: 11px; background: white; }
.segmented button { min-height: 32px; padding: 0 12px; display: flex; align-items: center; gap: 6px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 10px; cursor: pointer; }
.segmented button span { min-width: 17px; padding: 2px 4px; border-radius: 8px; background: #eff1ed; color: var(--faint); font-size: 8px; }
.segmented button.active { background: var(--ink); color: white; box-shadow: 0 4px 10px rgba(32, 37, 34, .13); }
.segmented button.active span { background: rgba(255, 255, 255, .13); color: #dfe3df; }
.segmented.compact button { padding: 0 15px; }
.search-box { width: min(280px, 25vw); height: 40px; padding: 0 12px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); border-radius: 10px; background: white; color: var(--faint); }
.search-box input { min-width: 0; width: 100%; border: 0; outline: none; background: transparent; color: var(--ink); font-size: 11px; }
.order-summary-strip { margin-bottom: 16px; padding: 15px 20px; display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: 14px; background: #ebece7; }
.order-summary-strip > div { padding: 0 18px; border-right: 1px solid #d7dad4; }
.order-summary-strip > div:first-child { padding-left: 0; }
.order-summary-strip > div:last-child { border-right: 0; }
.order-summary-strip small { display: block; color: var(--muted); font-size: 9px; }
.order-summary-strip strong { display: block; margin-top: 3px; font-size: 15px; }
.orders-list { display: grid; gap: 10px; }
.order-card { min-height: 145px; padding: 19px 22px; display: grid; grid-template-columns: 65px minmax(0, 1fr) 155px; gap: 23px; align-items: stretch; }
.order-date { display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 1px solid var(--line); }
.order-date strong { font-size: 26px; line-height: 1; }
.order-date span { margin-top: 3px; color: var(--muted); font-size: 9px; text-transform: uppercase; }
.order-date small { margin-top: 11px; color: var(--gold-strong); font-size: 10px; }
.order-title-row { display: flex; align-items: center; justify-content: space-between; }
.order-title-row > div:first-child { display: flex; align-items: center; gap: 8px; }
.order-number { color: var(--faint); font-size: 9px; }
.order-body h3 { margin: 10px 0 6px; font-size: 15px; }
.order-client { margin: 0; display: flex; align-items: center; gap: 6px; color: #525a55; font-size: 11px; }
.order-client span { margin-left: 5px; color: var(--faint); }
.order-meta { margin-top: 13px; display: flex; align-items: center; flex-wrap: wrap; gap: 15px; color: var(--muted); font-size: 9px; }
.order-meta span { display: flex; align-items: center; gap: 5px; }
.order-money { display: flex; flex-direction: column; align-items: flex-end; justify-content: center; border-left: 1px solid var(--line); }
.order-money small { color: var(--muted); font-size: 9px; }
.order-money strong { margin: 4px 0 1px; font-size: 19px; }
.order-money > span { font-size: 9px; }
.warn-text, .amount.expense { color: var(--red) !important; }
.success-text, .amount.income { color: var(--green) !important; }

.customer-stats { display: flex; gap: 20px; color: var(--muted); font-size: 11px; }
.customer-stats strong { color: var(--ink); font-size: 16px; }
.customer-grid { display: grid; grid-template-columns: repeat(3, minmax(270px, 1fr)); gap: 15px; }
.customer-card { padding: 21px; }
.customer-head { display: grid; grid-template-columns: 44px minmax(0, 1fr) 34px; align-items: center; gap: 11px; }
.customer-avatar { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: linear-gradient(145deg, #e9ddcd, #cba675); color: white; font-weight: 700; }
.customer-head h3 { margin: 0; font-size: 14px; }
.customer-head p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.contact-line { margin: 16px 0; padding: 9px 10px; display: flex; align-items: center; gap: 7px; border-radius: 8px; background: #f6f7f4; color: #5c645f; font-size: 10px; text-decoration: none; }
.customer-metrics { padding: 12px 0; display: grid; grid-template-columns: .7fr 1fr 1fr; border: solid var(--line); border-width: 1px 0; }
.customer-metrics.customer-metrics-four { grid-template-columns: repeat(4, 1fr); }
.customer-metrics > div { min-width: 0; padding: 0 8px; border-right: 1px solid var(--line); }
.customer-metrics > div:first-child { padding-left: 0; }
.customer-metrics > div:last-child { padding-right: 0; border-right: 0; }
.customer-metrics strong { display: block; overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.customer-metrics span { display: block; margin-top: 2px; color: var(--faint); font-size: 8px; }
.customer-risk strong, .attendance-badge.no_show { color: var(--red) !important; }
.customer-value-line { margin-top: 12px; display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 8px; }
.customer-value-line strong { color: var(--ink); font-size: 10px; }
.customer-services { margin-top: 9px; display: flex; flex-wrap: wrap; gap: 5px; }
.customer-services span { padding: 4px 7px; border-radius: 6px; background: var(--green-soft); color: var(--green); font-size: 8px; }
.customer-services.empty { color: var(--faint); font-size: 8px; }
.customer-note { min-height: 35px; margin: 13px 0; display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.7; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.customer-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.customer-foot > span { color: var(--faint); font-size: 8px; }
.customer-foot > div { display: flex; gap: 9px; }
.history-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.history-summary > div { padding: 16px 12px; border-radius: 11px; background: #f5f7f3; text-align: center; }
.history-summary strong { display: block; font-size: 17px; }
.history-summary span { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.history-services { margin: 18px 0; padding: 14px; border: 1px solid var(--line); border-radius: 11px; }
.history-services h4 { margin: 0 0 10px; font-size: 10px; }
.history-services span { min-height: 31px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 9px; }
.history-services span:last-child { border-bottom: 0; }
.history-services strong { color: var(--green); }
.booking-history { margin-top: 18px; display: grid; }
.booking-history article { min-height: 67px; display: grid; grid-template-columns: 76px minmax(0, 1fr) 76px 85px; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); }
.booking-history time { font-size: 9px; }
.booking-history time small { display: block; margin-top: 3px; color: var(--faint); }
.booking-history h4 { margin: 0 0 4px; font-size: 11px; }
.booking-history p { margin: 0; color: var(--muted); font-size: 8px; }
.booking-history > article > strong { text-align: right; font-size: 11px; }
.attendance-badge { justify-self: start; padding: 4px 7px; border-radius: 12px; background: #eef1ed; color: var(--muted); font-size: 8px; white-space: nowrap; }
.attendance-badge.attended { background: var(--green-soft); color: var(--green); }
.attendance-badge.no_show { background: var(--red-soft); }

.finance-metrics { margin-bottom: 16px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.finance-card { min-height: 123px; padding: 22px; display: flex; align-items: center; gap: 14px; border: 1px solid var(--line); border-radius: 15px; background: white; }
.finance-card > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; }
.finance-card.income > span { background: var(--green-soft); color: var(--green); }
.finance-card.expense > span { background: var(--red-soft); color: var(--red); }
.finance-card.expense.cny > span { background: var(--gold-soft); color: var(--gold-strong); }
.finance-card.net > span { background: var(--gold-soft); color: var(--gold-strong); }
.finance-card small { display: block; color: var(--muted); font-size: 9px; }
.finance-card strong { display: block; margin: 3px 0; font-size: 21px; }
.finance-card p { margin: 0; color: var(--faint); font-size: 8px; }
.ledger-layout { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(260px, .55fr); gap: 16px; }
.ledger-table-card, .category-card { padding: 22px; }
.ledger-table { margin-top: 17px; }
.ledger-row { min-height: 61px; display: grid; grid-template-columns: minmax(170px, 1.2fr) minmax(150px, 1fr) 70px 65px 90px 62px; align-items: center; gap: 12px; border-bottom: 1px solid var(--line); font-size: 9px; }
.ledger-row:last-child { border-bottom: 0; }
.ledger-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.ledger-row > span:first-child strong { display: block; color: var(--ink); font-size: 11px; }
.ledger-row > span:first-child small { display: block; margin-top: 3px; overflow: hidden; color: var(--faint); font-size: 8px; text-overflow: ellipsis; }
.ledger-row > .amount { text-align: right; font-size: 11px; }
.ledger-header { min-height: 31px; color: var(--faint); }
.ledger-header > span { font-size: 8px; }
.category-bars { margin-top: 23px; display: grid; gap: 21px; }
.category-bars > div > div:first-child { margin-bottom: 7px; display: flex; justify-content: space-between; color: var(--muted); font-size: 9px; }
.category-bars strong { font-size: 10px; }
.currency-breakdown + .currency-breakdown { margin-top: 25px; padding-top: 21px; border-top: 1px solid var(--line); }
.currency-breakdown h4 { margin: 20px 0 -8px; color: var(--muted); font-size: 10px; letter-spacing: .04em; }

.package-grid { display: grid; grid-template-columns: repeat(3, minmax(270px, 1fr)); gap: 16px; }
.package-card { position: relative; padding: 25px; overflow: hidden; }
.package-card.inactive { opacity: .65; }
.package-top { display: flex; align-items: center; justify-content: space-between; }
.package-index { color: #d3d7d2; font-size: 26px; font-weight: 700; letter-spacing: -.05em; }
.package-card h3 { margin: 18px 0 7px; font-size: 17px; }
.package-card > p { min-height: 36px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.65; }
.package-price { display: block; margin: 18px 0 8px; color: var(--gold-strong); font-size: 25px; }
.package-price small { color: var(--muted); font-size: 9px; font-weight: 400; }
.package-duration { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 9px; }
.package-card ul { min-height: 119px; margin: 19px 0; padding: 17px 0; display: grid; gap: 10px; border: solid var(--line); border-width: 1px 0; list-style: none; }
.package-card li { display: flex; align-items: center; gap: 8px; color: #59615c; font-size: 10px; }
.package-card li .icon { color: var(--green); }
.package-actions { display: flex; align-items: center; gap: 5px; }
.package-actions .button { margin-right: auto; }
.pricing-section-head { margin: 20px 0 13px; display: flex; align-items: flex-end; justify-content: space-between; }
.pricing-section-head h2 { margin: 4px 0 0; font-size: 18px; }
.pricing-section-head > span { color: var(--faint); font-size: 9px; }
.service-section-head { margin-top: 36px; padding-top: 25px; border-top: 1px solid var(--line-strong); }
.service-item-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.service-item-card { min-height: 150px; padding: 19px; display: grid; grid-template-columns: 43px minmax(0, 1fr) 165px; align-items: center; gap: 15px; }
.service-item-card.inactive { opacity: .62; }
.service-item-icon { width: 43px; height: 43px; display: grid; place-items: center; border-radius: 12px; background: var(--gold-soft); color: var(--gold-strong); }
.service-item-main > div > span { color: var(--gold-strong); font-size: 8px; }
.service-item-main h3 { margin: 3px 0 5px; font-size: 14px; }
.service-item-main > p { margin: 0 0 9px; color: var(--muted); font-size: 9px; }
.service-item-main > strong { font-size: 16px; }
.service-item-main > strong small { color: var(--faint); font-size: 8px; font-weight: 400; }
.service-sales { margin-top: 8px; display: flex; gap: 12px; color: var(--faint); font-size: 8px; }
.service-item-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 4px; }
.service-item-actions > .pill { flex-basis: 100%; margin-left: auto; width: max-content; }

.review-list { display: grid; gap: 13px; }
.review-card { min-height: 204px; padding: 23px; display: grid; grid-template-columns: 75px minmax(0, 1fr) 70px; gap: 24px; }
.review-score { display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 1px solid var(--line); }
.review-score strong { color: var(--gold-strong); font-size: 34px; line-height: 1; }
.review-score span { color: var(--faint); font-size: 9px; }
.review-score small { margin-top: 10px; color: var(--muted); font-size: 8px; }
.review-meta { display: flex; align-items: center; gap: 9px; color: var(--faint); font-size: 8px; }
.review-content h3 { margin: 10px 0 15px; font-size: 15px; }
.review-columns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.review-columns > div { padding: 11px 13px; border-radius: 9px; background: #f7f8f5; }
.review-columns small { color: var(--gold-strong); font-size: 8px; font-weight: 600; }
.review-columns p { margin: 5px 0 0; display: -webkit-box; overflow: hidden; color: var(--muted); font-size: 9px; line-height: 1.6; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.tags { margin-top: 11px; display: flex; flex-wrap: wrap; gap: 6px; }
.tags span { padding: 4px 7px; border-radius: 5px; background: var(--gold-soft); color: var(--gold-strong); font-size: 8px; }

.album-grid { display: grid; grid-template-columns: repeat(3, minmax(270px, 1fr)); gap: 17px; }
.album-card { overflow: hidden; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow); cursor: pointer; transition: .2s ease; }
.album-card:hover { transform: translateY(-3px); box-shadow: 0 17px 40px rgba(31, 41, 35, .1); }
.album-cover { position: relative; height: 180px; overflow: hidden; background: linear-gradient(135deg, #303b36, #151b18); }
.album-cover-pattern { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 70% 20%, rgba(192, 147, 92, .18), transparent 40%); color: rgba(224, 190, 147, .25); }
.album-cover > span { position: absolute; left: 15px; top: 14px; padding: 5px 8px; border-radius: 8px; background: rgba(16, 21, 19, .68); color: #dfe3df; font-size: 8px; backdrop-filter: blur(8px); }
.album-hover { position: absolute; inset: auto 0 0; padding: 30px 17px 14px; display: flex; align-items: center; justify-content: space-between; background: linear-gradient(transparent, rgba(11, 15, 13, .74)); color: white; font-size: 10px; opacity: 0; transform: translateY(8px); transition: .2s ease; }
.album-card:hover .album-hover { opacity: 1; transform: none; }
.album-info { padding: 17px 18px 11px; display: flex; align-items: flex-start; justify-content: space-between; }
.album-info span { color: var(--gold-strong); font-size: 8px; }
.album-info h3 { margin: 5px 0 3px; font-size: 14px; }
.album-info p { margin: 0; color: var(--muted); font-size: 9px; }
.album-counts { padding: 10px 18px 15px; display: flex; flex-wrap: wrap; gap: 10px; border-top: 1px solid var(--line); }
.album-counts span { display: flex; align-items: center; gap: 4px; color: var(--faint); font-size: 8px; }
.album-counts i { width: 5px; height: 5px; border-radius: 50%; background: #8d9791; }
.album-counts .category-selected { background: var(--blue); }
.album-counts .category-retouched { background: var(--gold); }
.album-detail-head { margin-bottom: 24px; display: grid; grid-template-columns: 130px minmax(0, 1fr) auto; align-items: center; gap: 18px; }
.back-button { display: inline-flex; align-items: center; gap: 5px; width: max-content; padding: 0; border: 0; background: none; color: var(--muted); font-size: 10px; cursor: pointer; }
.album-detail-head span { color: var(--gold-strong); font-size: 8px; }
.album-detail-head h2 { margin: 4px 0 3px; font-size: 20px; }
.album-detail-head p { margin: 0; color: var(--muted); font-size: 10px; }
.photo-category-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.photo-category { min-height: 95px; padding: 16px; display: grid; grid-template-columns: 42px minmax(0, 1fr) auto 18px; align-items: center; gap: 11px; border: 1px solid var(--line); border-radius: 14px; background: white; text-align: left; cursor: pointer; transition: .18s ease; }
.photo-category:hover, .photo-category.active { border-color: #d3b28c; box-shadow: 0 10px 25px rgba(34, 41, 37, .07); transform: translateY(-2px); }
.photo-category > span { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: #eef0ed; color: #65706a; }
.photo-category.selected > span { background: var(--blue-soft); color: var(--blue); }
.photo-category.retouched > span { background: var(--gold-soft); color: var(--gold-strong); }
.photo-category h3 { margin: 0; font-size: 12px; }
.photo-category p { margin: 3px 0 0; color: var(--muted); font-size: 8px; }
.photo-category > strong { font-size: 17px; }
.photo-category > .icon { color: var(--faint); }
.photo-workspace { margin-top: 17px; padding: 23px; }
.photo-workspace .section-head { align-items: center; padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.photo-grid { margin-top: 18px; display: grid; grid-template-columns: repeat(5, minmax(130px, 1fr)); gap: 12px; }
.photo-item { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fafbf8; }
.photo-thumb { position: relative; aspect-ratio: 4/3; display: grid; place-items: center; overflow: hidden; background: #e9ece7; color: #a3aaa5; }
.photo-thumb img { position: absolute; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
.photo-thumb.loaded img { opacity: 1; }
.photo-thumb.loaded .photo-placeholder { display: none; }
.photo-info { padding: 10px; }
.photo-info > strong { display: block; overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.photo-info > span { display: block; margin: 3px 0 7px; color: var(--faint); font-size: 7px; }
.photo-info > div { display: flex; align-items: center; gap: 4px; }
.photo-info select { min-width: 0; flex: 1; height: 27px; border: 1px solid var(--line); border-radius: 6px; background: white; color: var(--muted); font-size: 7px; }
.album-guide { min-height: 190px; margin-top: 17px; display: flex; align-items: center; justify-content: center; gap: 16px; border: 1px dashed #cfd4ce; border-radius: 15px; color: #a1a8a3; }
.album-guide h3 { margin: 0 0 4px; color: #636a66; font-size: 14px; }
.album-guide p { margin: 0; font-size: 10px; }

.settings-grid { display: grid; grid-template-columns: 1fr 1.2fr; align-items: start; gap: 16px; }
.settings-card { padding: 25px; }
.settings-card .section-head { margin-bottom: 20px; }
.sync-card { grid-row: span 2; }
.settings-explain { margin: -5px 0 18px; color: var(--muted); font-size: 10px; line-height: 1.7; }
.sync-state { display: inline-flex; align-items: center; gap: 6px; color: var(--faint); font-size: 9px; }
.sync-state i { width: 7px; height: 7px; border-radius: 50%; background: #aeb4af; }
.sync-state.online { color: var(--green); }
.sync-state.online i { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.sync-detail { margin-top: 20px; padding-top: 14px; display: flex; flex-wrap: wrap; gap: 13px; border-top: 1px solid var(--line); color: var(--faint); font-size: 8px; }
.storage-location { margin: 0 0 16px; padding: 13px 14px; display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fafbf8; color: var(--gold-dark); }
.storage-location > div { min-width: 0; display: grid; gap: 2px; }
.storage-location span, .storage-location small { color: var(--faint); font-size: 8px; }
.storage-location strong { overflow: hidden; color: var(--ink); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.storage-warning { margin: 0 0 14px; padding: 10px 12px; border-radius: 9px; background: #fff3e3; color: #8b5b25; font-size: 9px; line-height: 1.55; }
.storage-note { display: block; margin-top: 12px; line-height: 1.55; }

.modal {
  width: min(570px, calc(100vw - 28px));
  max-height: min(90vh, 850px);
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 19px;
  background: white;
  color: var(--ink);
  box-shadow: 0 28px 90px rgba(8, 12, 10, .28);
}
.modal.modal-wide { width: min(760px, calc(100vw - 28px)); }
.modal::backdrop { background: rgba(13, 18, 16, .6); backdrop-filter: blur(5px); }
.modal-head { min-height: 83px; padding: 21px 25px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 18px; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 9px; }
.modal-body { max-height: calc(90vh - 83px); padding: 24px 25px; overflow-y: auto; }
.form-stack { display: grid; gap: 16px; }
.form-grid { display: grid; gap: 13px; }
.form-grid.two { grid-template-columns: 1fr 1fr; }
.form-grid.three { grid-template-columns: 1fr 1fr 1fr; }
.form-stack label, .settings-card label { display: grid; gap: 7px; color: #555d58; font-size: 10px; font-weight: 600; }
.form-stack input:not([type=checkbox]):not([type=radio]), .form-stack select, .form-stack textarea,
.settings-card input:not([type=checkbox]):not([type=radio]), .settings-card select, .settings-card textarea, .quote-text {
  width: 100%;
  min-height: 41px;
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  outline: none;
  background: #fcfdfa;
  color: var(--ink);
  font-size: 11px;
  font-weight: 400;
  transition: .15s ease;
}
.settings-card form { display: grid; gap: 15px; }
.form-stack textarea, .settings-card textarea, .quote-text { resize: vertical; line-height: 1.6; }
.form-stack input:focus, .form-stack select:focus, .form-stack textarea:focus,
.settings-card input:focus, .settings-card select:focus, .settings-card textarea:focus { border-color: #c69a68; box-shadow: 0 0 0 3px var(--gold-soft); background: white; }
.field-hint { color: var(--faint); font-size: 8px; font-weight: 400; }
.form-section { padding: 16px; display: grid; gap: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fafbf8; }
.form-section-title { display: flex; align-items: center; justify-content: space-between; }
.form-section-title strong { font-size: 11px; }
.form-section-title span { color: var(--faint); font-size: 8px; }
.checkbox-row { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 8px !important; cursor: pointer; }
.checkbox-row input { width: 16px; height: 16px; accent-color: var(--gold); }
.checkbox-row span { font-weight: 400; }
.modal-actions { margin-top: 5px; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); }
.type-toggle { padding: 4px; display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border-radius: 11px; background: #f0f2ee; }
.type-toggle label { cursor: pointer; }
.type-toggle input { position: absolute; opacity: 0; }
.type-toggle span { min-height: 37px; display: flex; align-items: center; justify-content: center; gap: 7px; border-radius: 8px; color: var(--muted); }
.type-toggle input:checked + span { background: white; color: var(--ink); box-shadow: 0 3px 9px rgba(28, 36, 32, .09); }
.action-list { display: grid; gap: 6px; }
.action-list button { min-height: 65px; padding: 10px 12px; display: grid; grid-template-columns: 36px minmax(0, 1fr) 20px; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 11px; background: white; text-align: left; cursor: pointer; }
.action-list button:hover { background: #fafbf8; border-color: #d2b897; }
.action-list button > .icon:first-child { padding: 8px; box-sizing: content-box; border-radius: 9px; background: var(--gold-soft); color: var(--gold-strong); }
.action-list button > span strong { display: block; font-size: 11px; }
.action-list button > span small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.action-list button > .icon:last-child { color: var(--faint); }
.action-list button.danger > .icon:first-child { background: var(--red-soft); color: var(--red); }
.action-list button.danger strong { color: var(--red); }
.conflict-box { padding: 8px 5px; text-align: center; }
.conflict-box > .icon { color: var(--gold-strong); }
.conflict-box h3 { margin: 13px 0 6px; }
.conflict-box p { max-width: 420px; margin: 0 auto; color: var(--muted); font-size: 10px; line-height: 1.75; }
.conflict-choices { margin-top: 21px; display: flex; flex-wrap: wrap; justify-content: center; gap: 9px; }

.toast-region { position: fixed; z-index: 100; right: 20px; top: 20px; display: grid; gap: 8px; pointer-events: none; }
.toast { min-width: 220px; max-width: 360px; min-height: 46px; padding: 11px 14px; display: flex; align-items: center; gap: 9px; border: 1px solid #dce7df; border-radius: 11px; background: rgba(255, 255, 255, .96); color: #4c5d52; box-shadow: 0 12px 35px rgba(21, 31, 25, .15); font-size: 10px; opacity: 0; transform: translateY(-8px); transition: .22s ease; backdrop-filter: blur(10px); }
.toast.visible { opacity: 1; transform: none; }
.toast.error { border-color: #efd5d2; color: var(--red); }
.mobile-nav { display: none; scrollbar-width: none; }
.mobile-nav::-webkit-scrollbar { display: none; }

@media (max-width: 1180px) {
  .sidebar { width: 212px; }
  .main { margin-left: 212px; }
  .page, .topbar { padding-left: 25px; padding-right: 25px; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .customer-grid, .package-grid, .album-grid { grid-template-columns: 1fr 1fr; }
  .photo-category-grid { grid-template-columns: 1fr 1fr; }
  .photo-grid { grid-template-columns: repeat(4, minmax(120px, 1fr)); }
  .ledger-layout { grid-template-columns: 1fr; }
  .finance-metrics { grid-template-columns: 1fr 1fr; }
  .category-card { min-height: auto; }
  .calendar-layout { grid-template-columns: 1fr; }
  .day-panel { margin-top: 16px; }
}

@media (max-width: 900px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding-bottom: 72px; }
  .topbar { height: 86px; padding: 19px 22px 15px; }
  .topbar h1 { font-size: 20px; }
  .topbar p, .today-chip { display: none; }
  .page { padding: 22px 20px 35px; }
  .mobile-nav { position: fixed; z-index: 30; inset: auto 0 0; height: calc(66px + env(safe-area-inset-bottom)); padding: 6px 8px env(safe-area-inset-bottom); display: flex; align-items: stretch; overflow-x: auto; border-top: 1px solid #2c3430; background: rgba(18, 24, 22, .97); backdrop-filter: blur(16px); }
  .mobile-nav button { flex: 0 0 73px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: 9px; background: transparent; color: #7f8983; font-size: 8px; }
  .mobile-nav button.active { background: #252d29; color: #d9b083; }
  .hero-row, .dashboard-grid, .calendar-layout, .settings-grid { grid-template-columns: 1fr; }
  .calendar-layout { display: block; }
  .day-panel { margin-top: 16px; }
  .sync-card { grid-row: auto; }
  .calendar-card { overflow-x: auto; }
  .calendar-card > * { min-width: 690px; }
  .schedule-actions { gap: 12px; }
  .day-agenda-card .day-panel-head { align-items: flex-start; flex-direction: column; }
  .day-summary { width: 100%; justify-content: flex-end; }
  .day-slot-strip { grid-template-columns: repeat(6, minmax(105px, 1fr)); }
  .order-card { grid-template-columns: 55px minmax(0, 1fr); }
  .order-money { grid-column: 2; padding-top: 12px; align-items: flex-start; border: solid var(--line); border-width: 1px 0 0; }
  .review-card { grid-template-columns: 65px minmax(0, 1fr) 58px; }
  .ledger-table { overflow-x: auto; }
  .ledger-row { min-width: 790px; }
}

@media (max-width: 640px) {
  .page { padding: 17px 13px 28px; }
  .topbar { padding-left: 15px; padding-right: 15px; }
  .hero-card { min-height: 235px; padding: 28px 23px; }
  .hero-aperture { right: -45px; }
  .hero-card p { max-width: 75%; }
  .quick-actions { padding: 20px; }
  .metric-grid, .finance-metrics { grid-template-columns: 1fr 1fr; gap: 9px; }
  .metric-card, .finance-card { min-height: 105px; padding: 14px; gap: 10px; }
  .metric-icon, .finance-card > span { width: 36px; height: 36px; }
  .metric-card strong, .finance-card strong { font-size: 16px; }
  .stack-mobile { align-items: stretch; flex-direction: column; }
  .stack-mobile .action-cluster { width: 100%; }
  .stack-mobile .search-box { width: 100%; flex: 1; }
  .segmented { max-width: 100%; overflow-x: auto; }
  .segmented button { flex: 1 0 auto; }
  .order-summary-strip { grid-template-columns: 1fr 1fr; gap: 14px 0; }
  .order-summary-strip > div:nth-child(2) { border-right: 0; }
  .order-card { padding: 16px 12px; gap: 13px; }
  .order-meta { gap: 8px; }
  .customer-grid, .package-grid, .service-item-grid, .album-grid { grid-template-columns: 1fr; }
  .service-item-card { grid-template-columns: 38px minmax(0, 1fr); }
  .service-item-actions { grid-column: 1 / -1; justify-content: flex-start; }
  .service-item-actions > .pill { flex-basis: auto; margin: 0 auto 0 0; }
  .history-summary { grid-template-columns: 1fr 1fr; }
  .booking-history article { padding: 10px 0; grid-template-columns: 65px minmax(0, 1fr) 70px; }
  .booking-history > article > strong { grid-column: 2 / -1; }
  .review-card { padding: 17px 12px; grid-template-columns: 50px minmax(0, 1fr) 52px; gap: 10px; }
  .review-columns { grid-template-columns: 1fr; }
  .review-score strong { font-size: 27px; }
  .photo-category-grid { grid-template-columns: 1fr; }
  .album-detail-head { grid-template-columns: 1fr auto; }
  .album-detail-head .back-button { grid-column: 1 / -1; }
  .photo-workspace { padding: 16px; }
  .photo-workspace .section-head { align-items: stretch; flex-direction: column; }
  .photo-grid { grid-template-columns: 1fr 1fr; }
  .settings-grid { gap: 12px; }
  .settings-card { padding: 19px; }
  .form-grid.two, .form-grid.three { grid-template-columns: 1fr; }
  .form-section-title { align-items: flex-start; flex-direction: column; gap: 3px; }
  .modal-head { min-height: 72px; padding: 17px 18px; }
  .modal-body { padding: 18px; max-height: calc(90vh - 72px); }
  .modal-actions { gap: 8px; }
  .page-actions:not(.stack-mobile) { align-items: flex-start; }
  .schedule-actions { align-items: stretch !important; flex-direction: column; }
  .schedule-actions .button { align-self: flex-start; }
  .availability-calendar { padding: 15px; }
  .availability-calendar > * { min-width: 0; }
  .availability-calendar .calendar-toolbar { height: 60px; grid-template-columns: auto 1fr; gap: 8px; }
  .availability-calendar .calendar-toolbar > span { display: none; }
  .availability-calendar .calendar-toolbar .button-small { padding: 0 8px; }
  .availability-calendar .calendar-toolbar h2 { font-size: 16px; }
  .availability-calendar .calendar-weekdays, .availability-calendar .calendar-grid { gap: 3px; }
  .availability-calendar .calendar-weekdays span { padding-bottom: 7px; font-size: 7px; }
  .availability-calendar .calendar-day { min-height: 83px; padding: 5px; grid-template-columns: 1fr; grid-template-rows: 25px 1fr; gap: 3px; }
  .availability-calendar .calendar-day > .calendar-date-number { justify-self: center; width: 25px; height: 25px; font-size: 14px; }
  .calendar-slot-bars { width: 100% !important; min-width: 0; gap: 1px; }
  .mini-slot { min-height: 4px; border-radius: 2px; }
  .calendar-event-count { display: none; }
  .day-agenda-card { padding: 17px 12px; }
  .day-navigation { width: 100%; justify-content: space-between; gap: 5px; }
  .day-navigation > div { min-width: 0; }
  .day-navigation h3 { font-size: 15px; }
  .day-summary { justify-content: space-between; gap: 8px; }
  .agenda-events-layer { right: 4px; left: 53px; }
  .agenda-hour { grid-template-columns: 53px 1fr; }
  .agenda-hour time { padding-right: 8px; font-size: 7px; }
  .agenda-event { padding-right: 35px; padding-left: 9px; }
  .agenda-event-actions button:last-child { display: none; }
  .agenda-event-actions { right: 5px; }
  .agenda-empty { left: 53px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
/* Account entry: isolated from the business workspace until authentication. */
.auth-screen { min-height: 100dvh; display: grid; place-items: center; padding: 28px 16px; background: #f4f3ef; }
.program-update-notice { position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); width: max-content; max-width: calc(100% - 32px); padding: 12px 20px; border-radius: 12px; background: #243a30; color: white; z-index: 10000; box-shadow: 0 6px 24px #0002; }
.auth-card { width: min(100%, 500px); padding: 36px; }
.auth-card h1 { margin: 14px 0; font-size: 28px; }
.auth-card p { color: #697268; line-height: 1.8; }
.auth-card form { display: grid; gap: 18px; margin-top: 24px; }
.auth-card label { display: grid; gap: 8px; }
.auth-card input { min-width: 0; width: 100%; min-height: 46px; padding: 10px 12px; border: 1px solid #dce1da; border-radius: 10px; background: #fcfcfa; font: inherit; }
.auth-card input:focus { outline: 2px solid #b89869; outline-offset: 2px; }
.auth-card details { border-top: 1px solid #e2e5df; padding-top: 16px; }
.auth-card details label { margin-top: 16px; }
.auth-card summary { cursor: pointer; color: #587362; }
body[aria-busy="true"] button { cursor: progress; }
@media (max-width: 600px) { .auth-card { padding: 24px; } }
