:root {
  --bg: #f3f6f8;
  --card: #ffffff;
  --text: #101828;
  --muted: #667085;
  --line: #d9e1ea;
  --brand: #137a6d;
  --brand-2: #7557e6;
  --soft: #eff7f5;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: .62;
}

.login-page {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(19, 122, 109, .2), rgba(117, 87, 230, .14)),
    url("https://images.unsplash.com/photo-1500530855697-b586d89ba3ee?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.icp-footer {
  position: absolute;
  right: 16px;
  bottom: 14px;
  left: 16px;
  text-align: center;
  font-size: 13px;
}

.icp-footer a {
  color: rgba(255, 255, 255, .88);
  text-decoration: none;
  text-shadow: 0 1px 4px rgba(16, 24, 40, .7);
}

.icp-footer a:hover {
  text-decoration: underline;
}

.login-card {
  width: min(460px, calc(100vw - 32px));
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(255, 255, 255, .72);
  padding: 34px;
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(16, 24, 40, .18);
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand span {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: #19a99a;
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

.brand strong {
  display: block;
  font-size: 24px;
}

.brand small,
.topbar p,
.panel-head p,
.module-card small,
.hint {
  color: var(--muted);
}

.brand.big {
  margin-bottom: 28px;
}

label {
  display: grid;
  gap: 8px;
  color: #344054;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
  color: var(--text);
  outline-color: var(--brand);
}

textarea {
  min-height: 180px;
  resize: vertical;
}

.login-card label + label,
.login-card button,
.hint {
  margin-top: 16px;
}

.primary,
.ghost {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 18px;
  font-weight: 850;
  background: #fff;
  color: #344054;
}

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

.wide {
  width: 100%;
}

.shell {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

.shell.quote-shell {
  grid-template-columns: 1fr;
}

.sidebar {
  background: #0f1726;
  color: #fff;
  padding: 28px;
}

.sidebar .brand {
  padding-bottom: 28px;
  border-bottom: 1px solid rgba(255, 255, 255, .16);
  margin-bottom: 28px;
}

.sidebar .brand strong {
  font-size: 20px;
}

.sidebar .brand small {
  color: rgba(255, 255, 255, .66);
}

nav {
  display: grid;
  gap: 10px;
}

nav button {
  border: 0;
  border-radius: 10px;
  padding: 14px 16px;
  text-align: left;
  background: transparent;
  color: rgba(255, 255, 255, .72);
  font-weight: 850;
}

nav button.active,
nav button:hover {
  color: #fff;
  background: rgba(25, 169, 154, .22);
}

.main {
  padding: 28px;
}

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

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.quote-return-btn,
.quote-home-btn {
  white-space: nowrap;
}

.topbar h1 {
  margin: 0 0 6px;
  font-size: 28px;
}

.topbar p {
  margin: 0;
}

.user-pill,
.tag,
.status {
  border-radius: 999px;
  padding: 8px 12px;
  background: var(--soft);
  color: var(--brand);
  font-weight: 850;
  white-space: nowrap;
}

.entry-grid,
.quote-choice {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.entry-card,
.choice,
.panel,
.module-card,
.phone,
.day-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, .06);
}

.entry-card {
  padding: 30px;
}

.entry-icon,
.choice span {
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: var(--brand-2);
  color: #fff;
  font-size: 28px;
  font-weight: 900;
}

.entry-icon.teal {
  background: var(--brand);
}

.entry-card h2 {
  margin: 20px 0 8px;
}

.entry-card p {
  color: var(--muted);
}

.panel {
  padding: 20px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
}

.panel-head h3 {
  margin: 0;
  font-size: 20px;
}

.panel-head p {
  margin: 4px 0 0;
}

.panel-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.steps,
.record-list,
.actions,
.input-tools,
.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.steps span,
.record-list button,
.chips span,
.chips em {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: #475467;
  font-weight: 760;
  font-style: normal;
}

.steps .done {
  background: #e7f7f3;
  color: var(--brand);
}

.choice {
  min-height: 150px;
  display: flex;
  gap: 22px;
  align-items: center;
  padding: 30px;
  border: 0;
  text-align: left;
  font-size: 28px;
  color: var(--brand-2);
}

.primary-choice {
  color: #fff;
  background: linear-gradient(135deg, #7c5cff, #a86dff);
}

.compose-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 20px;
  align-items: start;
}

.compose-layout.ai-only {
  grid-template-columns: minmax(0, 860px);
  justify-content: center;
}

.live-preview {
  position: sticky;
  top: 22px;
  display: grid;
  gap: 14px;
}

.ai-input-wrap {
  margin: 0 0 18px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(16, 24, 40, .06);
  text-align: center;
}

.ai-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  margin: 0 auto 14px;
  color: #fff;
  font-size: 30px;
  font-weight: 900;
  background: linear-gradient(135deg, #7c5cff, #21b7a8);
}

.ai-input-wrap textarea {
  margin-top: 24px;
  text-align: left;
  min-height: 220px;
  font-size: 18px;
}

.input-tools {
  margin-top: 14px;
  justify-content: flex-end;
}

.voice-input-btn.active {
  border-color: #d92d20;
  background: #fff1f0;
  color: #b42318;
}

.voice-input-note {
  margin: 10px 0 0;
  color: #667085;
  text-align: right;
  font-weight: 650;
}

.voice-input-note.listening {
  color: #b42318;
}

.ai-image-list {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-start;
  margin-top: 12px;
}

.ai-image-chip {
  position: relative;
  width: 84px;
  height: 64px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f8fafc center/cover no-repeat;
}

.ai-image-chip button {
  position: absolute;
  right: -7px;
  top: -7px;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 999px;
  background: #101828;
  color: #fff;
  font-weight: 900;
  line-height: 1;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.resource-row {
  display: grid;
  grid-template-columns: 100px 1fr auto;
  gap: 14px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.resource-layout {
  display: grid;
  grid-template-columns: 330px 1fr;
  gap: 18px;
}

.legacy-module-panel,
.legacy-resource-page {
  display: grid;
  gap: 18px;
}

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

.legacy-module-card {
  display: grid;
  grid-template-columns: 74px 1fr auto;
  gap: 10px 18px;
  align-items: center;
  min-height: 150px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  background: #fff;
  text-align: left;
  box-shadow: 0 12px 30px rgba(16, 24, 40, .06);
}

.legacy-module-card span {
  grid-row: span 3;
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 20px;
  color: #fff;
  font-size: 30px;
  font-weight: 950;
}

.legacy-module-card h4 {
  margin: 0;
  font-size: 24px;
}

.legacy-module-card textarea {
  min-height: 62px;
  padding: 0;
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  color: var(--muted);
  line-height: 1.6;
  font-weight: 700;
  resize: vertical;
}

.legacy-module-card b {
  color: #667085;
}

.legacy-module-card > button {
  grid-column: 3;
  grid-row: 1 / span 3;
  border: 0;
  background: transparent;
  color: var(--brand-2);
  font-weight: 900;
  white-space: nowrap;
}

.legacy-filter-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px 22px;
  position: relative;
}

.filter-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.filter-actions button {
  min-width: 112px;
}

.filter-actions span {
  color: var(--brand);
  font-weight: 900;
}

.empty-result {
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: #667085;
  font-weight: 850;
  padding: 26px;
  text-align: center;
}

.filter-date-label {
  position: relative;
}

.filter-date-control {
  position: relative;
}

.date-range-trigger {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  background: #fff;
  color: #101828;
  font: inherit;
  font-weight: 850;
  text-align: left;
}

.filter-calendar-panel {
  position: absolute;
  z-index: 30;
  left: 0;
  top: calc(100% + 10px);
  width: min(720px, calc(100vw - 80px));
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(16, 24, 40, .18);
}

.compact-calendar {
  min-width: 0;
}

.compact-calendar .real-date-cell {
  min-height: 78px;
}

.compact-calendar .real-date-cell small {
  min-height: 14px;
}

.real-date-cell.in-range {
  background: #effaf8;
}

.ticket-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 18px;
}

.ticket-tab {
  border: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
  padding: 12px 18px;
  background: #fff;
  color: #667085;
  font-weight: 850;
}

.ticket-tab.active {
  color: var(--brand-2);
  background: #fff;
}

.legacy-ticket-table {
  display: grid;
  gap: 12px;
}

.legacy-ticket-row {
  display: grid;
  grid-template-columns: 42px 1.5fr .8fr 1fr .9fr .7fr .7fr;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 16px;
  background: #fff;
}

.legacy-ticket-row.head {
  border: 0;
  border-radius: 8px;
  background: #f0efff;
  color: #667085;
  font-weight: 900;
}

.legacy-ticket-row strong,
.legacy-ticket-row small,
.legacy-ticket-row em {
  display: block;
}

.legacy-ticket-row small {
  color: #667085;
  margin-top: 5px;
}

.legacy-ticket-row em {
  width: max-content;
  margin-top: 8px;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f3f0ff;
  color: var(--brand-2);
  font-style: normal;
  font-size: 12px;
  font-weight: 850;
}

.legacy-actions {
  display: grid;
  gap: 8px;
}

.legacy-actions button {
  border: 0;
  background: transparent;
  color: var(--brand-2);
  font-weight: 900;
  text-align: left;
}

.resource-modules {
  display: grid;
  gap: 12px;
}

.module-card {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 6px 14px;
  padding: 16px;
  text-align: left;
  border-color: var(--line);
}

.module-card.active {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(19, 122, 109, .12);
}

.module-card span {
  grid-row: span 3;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 900;
  font-size: 24px;
}

.module-card b {
  color: var(--muted);
}

.filter-bar {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 12px;
  margin-bottom: 14px;
}

.table {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.table-head,
.table-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr .8fr .9fr .8fr;
  gap: 12px;
  padding: 14px;
  align-items: center;
}

.table-head {
  background: #f3f0ff;
  color: #667085;
  font-weight: 850;
}

.table-row + .table-row {
  border-top: 1px solid var(--line);
}

.table-row {
  cursor: pointer;
}

.table-row:hover {
  background: #f8fafc;
}

.link-action {
  border: 0;
  background: transparent;
  color: var(--brand-2);
  font-weight: 900;
}

.link-action.danger {
  color: #d92d20;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: rgba(15, 23, 38, .48);
}

.resource-modal {
  position: fixed;
  z-index: 21;
  left: 50%;
  top: 50%;
  width: min(880px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  display: grid;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 30px 90px rgba(16, 24, 40, .28);
}

.modal {
  position: fixed;
  z-index: 21;
  left: 50%;
  top: 50%;
  width: min(720px, calc(100vw - 32px));
  max-height: min(720px, calc(100vh - 32px));
  overflow: auto;
  transform: translate(-50%, -50%);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 30px 90px rgba(16, 24, 40, .28);
}

.type-manager-backdrop {
  z-index: 22;
}

.type-manager-modal {
  z-index: 23;
  width: min(680px, calc(100vw - 32px));
}

.modal-head,
.modal-foot {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.modal-foot {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.modal-head h3 {
  margin: 0;
}

.modal-body {
  overflow: auto;
  padding: 22px;
}

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

.full-label {
  margin-top: 16px;
}

.calendar-box {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 18px;
  border: 1px solid #eadcff;
  border-radius: 12px;
  padding: 16px;
  background: #fbf8ff;
}

.calendar-box p {
  margin: 5px 0 0;
  color: var(--muted);
}

.legacy-edit-section {
  display: grid;
  gap: 14px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.legacy-edit-section:last-child {
  border-bottom: 0;
  margin-bottom: 0;
}

.legacy-edit-section > strong {
  color: #101828;
  font-size: 18px;
}

.type-manager-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.type-manager-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 100px;
  gap: 12px;
  align-items: center;
}

.type-manager-row.head {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f0efff;
  color: #667085;
  font-weight: 900;
}

.type-manager-row .ghost {
  padding: 12px 14px;
}

.type-manager-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 12px;
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.tag-picker {
  display: grid;
  gap: 10px;
}

.selected-tags {
  min-height: 44px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
}

.selected-tags span,
.quick-tags button {
  border: 1px solid #d9e1ea;
  border-radius: 999px;
  padding: 7px 11px;
  background: #f8fafc;
  color: #344054;
  font-size: 13px;
  font-weight: 900;
}

.selected-tags span {
  border-color: #b7eee5;
  background: #effaf8;
  color: #137a6d;
}

.selected-tags em {
  color: #98a2b3;
  font-style: normal;
}

.quick-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.quick-tags button.active {
  border-color: #137a6d;
  background: #137a6d;
  color: #fff;
}

.custom-tag-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.custom-tag-row input {
  width: 100%;
  border: 1px dashed #b7c6d8;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  font-weight: 800;
  background: #fbfdff;
}

.legacy-ai-tools {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.photo-uploader {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

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

.photo-row > img,
.photo-uploader > img {
  width: 104px;
  height: 104px;
  max-width: 104px;
  max-height: 104px;
  flex: 0 0 104px;
  display: block;
  object-fit: cover;
  border: 1px solid #d8e0ea;
  border-radius: 12px;
  background: #f8fafc;
}

.photo-thumb {
  position: relative;
  width: 104px;
  height: 104px;
  flex: 0 0 104px;
  border: 1px solid #d8e0ea;
  border-radius: 12px;
  background: #f8fafc center/cover no-repeat;
}

.photo-thumb button {
  position: absolute;
  right: -8px;
  top: -8px;
  width: 26px;
  height: 26px;
  border: 0;
  border-radius: 999px;
  background: #101828;
  color: #fff;
  font-size: 18px;
  font-weight: 950;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(16, 24, 40, .22);
}

.photo-box {
  width: 104px;
  height: 104px;
  display: grid;
  place-items: center;
  border: 1px dashed #c8d2e0;
  border-radius: 12px;
  background: #fbfcff;
  color: #475467;
  font-weight: 900;
  text-align: center;
  background-size: cover;
  background-position: center;
}

button.photo-box {
  cursor: pointer;
}

.photo-box.uploaded {
  border-style: solid;
  border-color: #b7eee5;
}

.photo-box.scenic {
  background-image: url("https://images.unsplash.com/photo-1528127269322-539801943592?auto=format&fit=crop&w=360&q=72");
}

.photo-box.hotel {
  background-image: url("https://images.unsplash.com/photo-1566073771259-6a8506099945?auto=format&fit=crop&w=360&q=72");
}

.legacy-price-note {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 999px;
  background: #fff0cf;
  color: #915b00;
  font-weight: 900;
}

.legacy-price-table,
.traffic-box {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.traffic-box {
  display: grid;
  gap: 0;
  padding: 12px;
  margin-top: 12px;
}

.traffic-box h4 {
  margin: 0 0 10px;
}

.legacy-price-row {
  display: grid;
  grid-template-columns: .85fr 1fr 1fr 1fr 1.45fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-top: 1px solid var(--line);
}

.legacy-price-row:first-child {
  border-top: 0;
}

.legacy-price-row.head {
  background: #f0efff;
  color: #667085;
  font-weight: 900;
}

.legacy-price-row input,
.legacy-price-row select {
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font: inherit;
  font-weight: 800;
}

.price-input-group,
.quote-price-control {
  display: grid;
  grid-template-columns: auto minmax(70px, 1fr) 112px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fff;
}

.price-input-group.compact {
  grid-template-columns: auto minmax(70px, 1fr) auto;
}

.price-input-group span,
.price-input-group em,
.quote-price-control span,
.quote-price-control em {
  padding: 0 10px;
  color: #667085;
  font-style: normal;
  font-weight: 900;
}

.price-input-group input,
.price-input-group select,
.quote-price-control input {
  border: 0;
  border-radius: 0;
  padding: 9px 8px;
  outline: 0;
}

.price-input-group input,
.quote-price-control input {
  text-align: right;
  font-weight: 900;
}

.price-input-group select {
  border-left: 1px solid var(--line);
  background: #f8fafc;
}

.quote-price-control {
  margin-top: 8px;
  grid-template-columns: auto minmax(100px, 1fr) auto;
}

.quote-cost-list {
  display: grid;
  gap: 14px;
  margin: 16px 0;
}

.quote-cost-day {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}

.quote-cost-day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #f6f3ff;
}

.quote-cost-day-head strong {
  font-size: 15px;
}

.quote-cost-day-head span {
  color: var(--muted);
  font-weight: 800;
}

.quote-cost-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, 1.1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
}

.quote-cost-row small,
.quote-cost-row em {
  display: block;
  color: var(--muted);
  font-style: normal;
  font-weight: 800;
}

.quote-cost-row b {
  display: block;
  margin: 4px 0;
}

.quote-cost-calc {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto 78px auto minmax(90px, auto) auto;
  gap: 8px;
  align-items: end;
}

.quote-cost-calc label small {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.quote-cost-calc .quote-price-control {
  margin-top: 0;
  grid-template-columns: auto minmax(92px, 1fr) auto;
}

.quote-cost-calc .quote-price-control input {
  min-width: 92px;
}

.quote-cost-calc .quote-price-control em {
  white-space: nowrap;
}

.quote-cost-money-field {
  display: grid;
  grid-template-columns: auto 132px auto;
  gap: 8px;
  align-items: center;
}

.quote-cost-money-field > span {
  color: #667085;
  font-weight: 900;
}

.quote-cost-money-field em {
  white-space: nowrap;
  color: var(--muted);
  font-style: normal;
  font-weight: 900;
}

.quote-cost-value-input {
  width: 132px;
  min-width: 132px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 10px;
  outline: 0;
  text-align: right;
  font: inherit;
  font-weight: 900;
  background: #fff;
}

.quote-qty-input,
.quote-other-name {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 9px 10px;
  font: inherit;
  font-weight: 900;
  background: #fff;
}

.quote-qty-input {
  text-align: center;
}

.quote-other-name {
  margin: 4px 0;
}

.calc-mark {
  padding-bottom: 10px;
  color: var(--muted);
  font-weight: 900;
}

.quote-cost-calc > strong {
  padding-bottom: 8px;
  white-space: nowrap;
  font-size: 16px;
}

.mini-calendar {
  min-width: 430px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 6px;
}

.mini-calendar span {
  min-height: 52px;
  padding: 7px;
  border: 1px solid #eadcff;
  border-radius: 8px;
  background: #fff;
  color: #101828;
  font-weight: 900;
}

.mini-calendar small {
  display: block;
  margin-top: 4px;
  color: #b7791f;
  font-size: 11px;
  font-weight: 850;
}

.real-calendar {
  width: 100%;
  min-width: 0;
  overflow: hidden;
  border: 1px solid #eadcff;
  border-radius: 14px;
  background: #fff;
}

.real-calendar-head {
  display: grid;
  grid-template-columns: 88px 1fr 88px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: linear-gradient(135deg, #9658ff, #6579ff);
  color: #fff;
  text-align: center;
}

.real-calendar-head .ghost {
  border-color: rgba(255, 255, 255, .58);
  background: rgba(255, 255, 255, .18);
  color: #fff;
}

.calendar-picker {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.calendar-picker select {
  width: auto;
  min-width: 132px;
  border-color: rgba(255, 255, 255, .54);
  border-radius: 10px;
  padding: 10px 34px 10px 14px;
  background-color: rgba(255, 255, 255, .18);
  color: #fff;
  font-weight: 950;
  outline-color: #fff;
}

.calendar-picker option {
  color: #101828;
}

.real-calendar-week,
.real-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.real-calendar-week span {
  padding: 10px 6px;
  border-bottom: 1px solid #eadcff;
  color: #8b5cf6;
  font-size: 13px;
  font-weight: 900;
  text-align: center;
}

.real-date-cell {
  min-height: 70px;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 8px;
  border: 0;
  border-right: 1px solid #f0e8ff;
  border-bottom: 1px solid #f0e8ff;
  background: #fff;
  color: #101828;
  text-align: left;
}

.real-date-cell:nth-child(7n) {
  border-right: 0;
}

.real-date-cell b {
  font-size: 15px;
}

.real-date-cell span {
  width: max-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 2px 6px;
  background: #fff3e8;
  color: #b45309;
  font-size: 11px;
  font-weight: 900;
}

.real-date-cell small {
  color: #667085;
  font-size: 11px;
  font-weight: 850;
  line-height: 1.2;
}

.real-date-cell em {
  width: max-content;
  border-radius: 999px;
  padding: 2px 6px;
  background: #f3e8ff;
  color: #8b5cf6;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
}

.real-date-cell.muted {
  background: #fafafa;
  color: #98a2b3;
}

.real-date-cell.today {
  box-shadow: inset 0 0 0 2px #8b5cf6;
}

.real-date-cell.selected {
  box-shadow: inset 0 0 0 3px #137a6d;
}

.real-date-cell.special {
  background: #fffbf4;
}

.calendar-tip {
  margin: 0;
  padding: 10px 12px;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.calendar-day-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
  border-bottom: 1px solid #eadcff;
  padding: 12px 14px 14px;
  background: #fbf8ff;
}

.calendar-day-editor p {
  margin: 6px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.5;
}

.calendar-day-editor > div:first-child {
  grid-column: 1 / -1;
}

.calendar-day-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.calendar-day-editor input[data-calendar-range] {
  min-width: 0;
  font-weight: 850;
}

.calendar-day-editor .price-input-group {
  grid-template-columns: auto minmax(56px, 1fr) minmax(82px, .9fr);
}

.editor-layout {
  display: grid;
  grid-template-columns: 1fr 390px;
  gap: 20px;
}

.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 14px;
}

.tabs button {
  border: 0;
  border-radius: 10px;
  padding: 13px;
  background: #eee8fb;
  color: #6941c6;
  font-weight: 900;
}

.tabs button.active {
  color: #fff;
  background: linear-gradient(135deg, #9658ff, #6579ff);
}

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

.day-card {
  padding: 16px;
}

.day-card > div:first-child {
  display: flex;
  justify-content: space-between;
  color: var(--brand-2);
}

.day-card p,
.phone-day p,
.share-wrap p {
  color: #475467;
  line-height: 1.7;
}

.day-editor-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.day-edit-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  background: #fff;
  display: grid;
  gap: 12px;
}

.day-edit-head {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr);
  gap: 12px;
  align-items: center;
}

.day-edit-head b {
  color: var(--brand-2);
  font-size: 16px;
}

.day-edit-card label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-weight: 800;
}

.day-edit-card input,
.day-edit-card textarea,
.day-edit-card select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  color: #101828;
  background: #fff;
  font: inherit;
}

.day-edit-card textarea {
  min-height: 108px;
  resize: vertical;
  line-height: 1.7;
}

.schedule-date-bar {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto minmax(220px, 1fr);
  gap: 12px;
  align-items: center;
  margin: 16px 0;
  padding: 14px 16px;
  border: 1px solid #d8c7ff;
  border-radius: 12px;
  background: #f6f0ff;
}

.schedule-date-bar > span,
.schedule-date-bar > em {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  line-height: 1;
}

.schedule-date-field {
  display: grid;
  gap: 8px;
  min-width: 0;
  position: relative;
}

.schedule-date-bar label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-height: 44px;
  font-weight: 900;
  color: #344054;
}

.schedule-date-bar input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  line-height: 1;
}

.schedule-date-input {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  min-width: 0;
}

.schedule-date-input button {
  height: 44px;
  border: 1px solid #d8c7ff;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: #5b3bd6;
  font-weight: 900;
  cursor: pointer;
}

.schedule-calendar-panel {
  position: absolute;
  z-index: 28;
  left: 0;
  top: calc(100% + 8px);
  width: min(560px, calc(100vw - 72px));
  border-radius: 16px;
  box-shadow: 0 24px 80px rgba(16, 24, 40, .18);
}

.schedule-date-cell {
  min-height: 52px;
  text-align: center;
  align-content: center;
}

.schedule-date-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.schedule-date-tools button {
  border: 1px solid #d8c7ff;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  color: #5b3bd6;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.schedule-date-tools button:hover {
  background: #ede5ff;
}

.quote-basic-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(120px, .45fr) minmax(0, 1.35fr);
  gap: 12px;
  margin: 14px 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.quote-basic-panel label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: #344054;
  font-weight: 900;
}

.quote-basic-panel span {
  font-size: 13px;
}

.quote-basic-panel input {
  width: 100%;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
  color: #101828;
  background: #fff;
}

.quote-basic-panel output {
  display: flex;
  align-items: center;
  min-height: 48px;
  border: 1px solid #d8c7ff;
  border-radius: 10px;
  padding: 11px 12px;
  background: #f6f0ff;
  color: #5b3bd6;
  font-size: 18px;
  font-weight: 950;
}

.itinerary-day-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.itinerary-day-card {
  border: 1px solid #d8c7ff;
  border-radius: 12px;
  padding: 12px;
  background: #fbf9ff;
  cursor: pointer;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.itinerary-day-card.active {
  border-color: #8b5cf6;
  background: #f7f0ff;
  box-shadow: 0 0 0 2px rgba(139, 92, 246, .2);
}

.itinerary-day-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.itinerary-day-head > span {
  display: inline-grid;
  place-items: center;
  min-width: 52px;
  height: 40px;
  border-radius: 8px;
  color: #865dff;
  background: #f0e8ff;
  font-weight: 900;
}

.itinerary-day-head strong,
.itinerary-day-head small {
  display: block;
  text-align: right;
}

.itinerary-day-head small {
  color: #667085;
  font-weight: 800;
}

.itinerary-mini-card {
  position: relative;
  display: grid;
  gap: 10px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
  background: #fff;
}

.itinerary-day-summary {
  display: grid;
  gap: 8px;
  padding: 2px 0 6px;
}

.itinerary-day-summary strong {
  color: #101828;
  font-size: 16px;
  line-height: 1.45;
}

.itinerary-summary-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: #667085;
  font-weight: 900;
}

.itinerary-summary-meta span {
  min-width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #d6bbfb;
  border-radius: 7px;
  color: #8b5cf6;
  background: #f4ebff;
}

.itinerary-summary-meta em {
  min-width: 0;
  color: #667085;
  font-style: normal;
}

.itinerary-summary-meta small {
  min-width: 0;
  color: #667085;
  font-weight: 900;
}

.itinerary-day-summary p {
  margin: 0;
  color: #667085;
  font-weight: 800;
  line-height: 1.55;
}

.meal-tag-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.meal-tag-picker button {
  min-width: 48px;
  border: 1px solid #d6bbfb;
  border-radius: 9px;
  padding: 9px 14px;
  color: #8b5cf6;
  background: #fbf8ff;
  font-weight: 900;
}

.meal-tag-picker button.active {
  color: #fff;
  border-color: #8b5cf6;
  background: #8b5cf6;
}

.itinerary-mini-title {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

.itinerary-mini-title input,
.itinerary-mini-card textarea,
.itinerary-add-line select,
.itinerary-add-line input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  font: inherit;
}

.itinerary-mini-title button,
.itinerary-resource-row button,
.itinerary-add-line button {
  border: 0;
  border-radius: 8px;
  padding: 9px 10px;
  color: #667085;
  background: #f8fafc;
  font-weight: 900;
}

.itinerary-mini-card textarea {
  min-height: 92px;
  resize: vertical;
  line-height: 1.7;
}

.itinerary-resource-list {
  display: grid;
  gap: 8px;
}

.itinerary-resource-row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.itinerary-resource-row span {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.empty-resource {
  color: #98a2b3;
  font-style: normal;
}

.itinerary-add-line {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.itinerary-add-line button {
  color: #fff;
  background: var(--brand-2);
}

.itinerary-card-actions {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.itinerary-card-actions > button {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  padding: 9px 8px;
  color: #667085;
  background: transparent;
  font-weight: 900;
}

.itinerary-card-actions > button:last-of-type {
  border-right: 0;
}

.itinerary-card-actions > button:hover {
  color: #7c3aed;
  background: #f8f5ff;
}

.menu-pop {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  z-index: 8;
  min-width: 138px;
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(16, 24, 40, .16);
}

.menu-pop button {
  border: 0;
  border-radius: 8px;
  padding: 8px 10px;
  text-align: left;
  color: #344054;
  background: transparent;
  font-weight: 900;
}

.menu-pop button:hover {
  background: #f4f1ff;
}

.menu-pop .danger,
.menu-pop button.danger {
  color: #d92d20;
}

.resource-display-menu {
  min-width: 210px;
  margin-bottom: 6px;
  padding: 8px 10px 10px;
  border-bottom: 1px solid #eef2f7;
}

.resource-display-menu span {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.resource-display-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.resource-display-options button {
  width: auto;
  border: 1px solid #d8e0ea;
  border-radius: 8px;
  padding: 6px 8px;
  color: #334155;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.resource-display-options button.active {
  border-color: #0f8274;
  color: #fff;
  background: #0f8274;
}

.itinerary-edit-context {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 16px 22px 0;
  border-left: 4px solid #a855f7;
  padding: 10px 12px;
  background: #f8f3ff;
}

.itinerary-edit-context span {
  color: #667085;
  font-weight: 800;
}

.day-summary-modal {
  width: min(760px, calc(100vw - 28px));
  max-width: 760px;
}

.day-summary-body {
  display: grid;
  gap: 18px;
  padding: 20px 24px 6px;
  background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
}

.day-summary-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  border: 1px solid #eadcff;
  border-left: 4px solid #8b5cf6;
  border-radius: 16px;
  padding: 12px 14px;
  background: #f5f0ff;
  box-shadow: 0 10px 24px rgba(124, 58, 237, 0.08);
}

.day-summary-banner span {
  color: #7c3aed;
  font-weight: 950;
}

.day-summary-banner strong {
  margin-left: auto;
  color: #344054;
  font-weight: 950;
}

.day-summary-banner em {
  color: #667085;
  font-style: normal;
  font-weight: 900;
}

.day-summary-title-field,
.day-summary-copy,
.day-summary-card {
  display: grid;
  gap: 8px;
  border: 1px solid #e4e7ec;
  border-radius: 16px;
  padding: 14px;
  background: #fff;
}

.day-summary-title-field span,
.day-summary-copy span,
.day-summary-card > span,
.day-summary-card-head span {
  color: #1d2939;
  font-weight: 950;
}

.day-summary-title-field input,
.day-summary-card input,
.day-summary-copy textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 11px 12px;
  background: #fff;
  color: #101828;
  font: inherit;
  font-weight: 850;
}

.day-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 14px;
}

.day-summary-card {
  align-content: start;
  min-height: 118px;
}

.day-summary-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.day-summary-card small,
.day-summary-card-head small {
  color: #98a2b3;
  font-weight: 800;
  text-align: right;
}

.day-summary-copy textarea {
  min-height: 138px;
  resize: vertical;
  line-height: 1.7;
}

.day-summary-modal .meal-tag-picker button {
  min-width: 58px;
  min-height: 44px;
  border-radius: 13px;
  font-size: 16px;
}

.lodging-search-card {
  min-height: 0;
}

.lodging-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 112px;
  overflow: auto;
  border: 1px solid #eee7ff;
  border-radius: 12px;
  padding: 10px;
  background: #fbf8ff;
}

.lodging-suggestions button {
  border: 1px solid #eadcff;
  border-radius: 999px;
  padding: 7px 11px;
  color: #5946c9;
  background: #fff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.lodging-suggestions small {
  color: #98a2b3;
  font-weight: 800;
}

.itinerary-modal .full-field,
.itinerary-image-editor {
  display: grid;
  gap: 8px;
  margin: 16px 22px;
  color: #344054;
  font-weight: 900;
}

.itinerary-modal input,
.itinerary-modal textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

.itinerary-time-field {
  display: grid;
  gap: 8px;
  margin: 16px 22px;
  color: #344054;
  font-weight: 900;
}

.time-picker-wrap {
  position: relative;
  width: fit-content;
  max-width: 100%;
}

.time-range-control {
  display: inline-grid;
  grid-template-columns: auto auto auto auto;
  align-items: center;
  gap: 11px;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #fff;
  color: #344054;
  cursor: pointer;
  box-shadow: 0 1px 0 rgba(16, 24, 40, 0.02);
}

.time-range-control.active {
  border-color: #a855f7;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.16);
}

.time-range-control .time-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 2px solid #344054;
  border-radius: 999px;
}

.time-range-control .time-icon::before,
.time-range-control .time-icon::after {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  width: 2px;
  height: 6px;
  border-radius: 999px;
  background: #344054;
  transform-origin: bottom center;
}

.time-range-control .time-icon::after {
  top: 9px;
  height: 5px;
  transform: rotate(90deg);
}

.time-range-control .time-value {
  min-width: 44px;
  text-align: center;
  font-weight: 700;
  color: #344054;
  white-space: nowrap;
}

.time-range-control .time-value.empty {
  color: #98a2b3;
}

.time-range-control em {
  color: #667085;
  font-style: normal;
  font-weight: 800;
}

.time-picker-panel {
  position: absolute;
  z-index: 80;
  top: calc(100% + 10px);
  left: 0;
  width: min(430px, calc(100vw - 48px));
  overflow: hidden;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 42px rgba(16, 24, 40, 0.16);
}

.time-picker-panel::before {
  content: "";
  position: absolute;
  top: -7px;
  left: 116px;
  width: 14px;
  height: 14px;
  border-top: 1px solid #e5e7eb;
  border-left: 1px solid #e5e7eb;
  background: #fff;
  transform: rotate(45deg);
}

.time-picker-groups {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 18px;
}

.time-picker-group strong {
  display: block;
  margin-bottom: 10px;
  color: #475467;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.time-picker-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.time-picker-column {
  max-height: 168px;
  overflow: auto;
  border-top: 1px solid #edf0f5;
  border-bottom: 1px solid #edf0f5;
  scrollbar-width: thin;
}

.time-picker-column button {
  width: 100%;
  min-height: 32px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: #475467;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.time-picker-column button:hover {
  background: #f6f0ff;
}

.time-picker-column button.active {
  background: #f3e8ff;
  color: #7c3aed;
}

.time-picker-actions {
  display: flex;
  justify-content: flex-end;
  gap: 18px;
  border-top: 1px solid #eef0f6;
  padding: 11px 16px;
}

.time-picker-actions button {
  border: 0;
  background: transparent;
  color: #667085;
  font-weight: 700;
  cursor: pointer;
}

.time-picker-actions button:last-child {
  color: #8b5cf6;
}

@media (max-width: 520px) {
  .time-picker-panel {
    left: 50%;
    width: calc(100vw - 32px);
    transform: translateX(-50%);
  }

  .time-picker-panel::before {
    left: 50%;
    transform: translateX(-50%) rotate(45deg);
  }

  .time-picker-groups {
    gap: 12px;
    padding: 14px;
  }

  .time-picker-columns {
    gap: 8px;
  }
}

.itinerary-modal textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.7;
}

.itinerary-modal .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
}

.add-itinerary-modal {
  width: min(760px, calc(100vw - 28px));
}

.add-itinerary-body {
  display: grid;
  gap: 16px;
  max-height: min(68vh, 720px);
  overflow: auto;
  padding: 18px 22px 4px;
}

.add-itinerary-grid {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr);
  gap: 14px;
}

.add-itinerary-body .compact-field,
.add-itinerary-intro {
  display: grid;
  gap: 8px;
}

.add-itinerary-body .compact-field span,
.add-itinerary-intro span,
.add-itinerary-suggestions strong {
  color: #344054;
  font-weight: 900;
}

.add-itinerary-body input,
.add-itinerary-body select,
.add-itinerary-body textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}

.add-itinerary-body textarea {
  min-height: 104px;
  resize: vertical;
  line-height: 1.7;
}

.add-itinerary-intro {
  position: relative;
}

.add-itinerary-intro .inline-ai {
  position: absolute;
  top: 0;
  right: 0;
}

.add-itinerary-suggestions {
  display: grid;
  gap: 8px;
  border: 1px solid #eee7ff;
  border-radius: 12px;
  padding: 12px;
  background: #fbf8ff;
}

.add-itinerary-suggestions div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.add-itinerary-suggestions button {
  border: 1px solid #eadcff;
  border-radius: 999px;
  padding: 8px 12px;
  color: #5946c9;
  background: #fff;
  font-weight: 900;
}

.ai-suggestions {
  border-color: #ccfbf1;
  background: #f8fbff;
}

.ai-suggestions button {
  border-color: #ccfbf1;
  color: #0f766e;
}

.add-itinerary-modal .itinerary-image-editor {
  margin: 0;
}

.phone-itinerary-detail {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  border: 1px solid #eef0f6;
  border-radius: 12px;
  padding: 10px;
  background: #fff;
}

.phone-itinerary-detail h4 {
  margin: 0;
  font-size: 14px;
}

.phone-itinerary-detail h4 span {
  display: inline-flex;
  margin-right: 6px;
  border-radius: 999px;
  padding: 2px 7px;
  color: var(--quote-accent, #8b5cf6);
  background: color-mix(in srgb, var(--quote-accent, #8b5cf6) 13%, white);
  font-size: 11px;
}

.phone-itinerary-time {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f8fafc;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

.phone-itinerary-detail p {
  margin: 0;
  font-size: 12px;
  line-height: 1.7;
}

.phone-itinerary-images {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 6px;
}

.phone-itinerary-images.single {
  grid-template-columns: 1fr;
}

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

.phone-itinerary-images img {
  width: 100%;
  height: 86px;
  object-fit: cover;
  border-radius: 8px;
}

.phone-itinerary-images.single img {
  height: 150px;
}

.day-resource-block {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: grid;
  gap: 10px;
}

.day-resource-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.day-resource-tags em {
  color: #98a2b3;
}

.day-resource-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 10px;
  background: #f8fafc;
  color: #344054;
  font-weight: 800;
}

.day-resource-chip button {
  border: 0;
  background: transparent;
  color: #dc2626;
  font-weight: 900;
  cursor: pointer;
}

.day-add-resource {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.price-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.price-grid div {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 18px;
}

.price-grid small {
  color: var(--muted);
}

.price-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
}

.check {
  display: flex;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
}

.check input {
  width: auto;
}

.share-control-box {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  margin: 16px 0;
  background: #fbfbff;
}

.share-settings {
  display: grid;
  gap: 16px;
}

.template-row,
.cover-row,
.share-form-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 18px;
  align-items: start;
}

.template-row > span,
.cover-row > span,
.share-form-row > span {
  color: #475467;
  font-weight: 850;
  padding-top: 8px;
}

.template-list {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.template-card {
  width: 88px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  background: #fff;
  color: #475467;
  font-weight: 850;
}

.template-card.active {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(117, 87, 230, .12);
}

.template-card i {
  display: grid;
  place-items: center;
  height: 70px;
  border-radius: 8px;
  margin-bottom: 6px;
  background-size: cover;
  background-position: center;
  color: var(--brand-2);
  background-color: #f4efff;
  font-style: normal;
  font-size: 24px;
}

.template-card strong {
  display: block;
  font-size: 13px;
  text-align: center;
}

.cover-row {
  margin-top: 24px;
}

.cover-row p {
  margin: 0 0 5px;
  color: #667085;
  line-height: 1.6;
}

.upload-box {
  width: 96px;
  height: 96px;
  margin-top: 12px;
  border: 1px dashed #c7d0df;
  border-radius: 10px;
  background: #fafbff;
  color: #475467;
  font-weight: 850;
}

.copy-line {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.wechat-card-preview {
  width: min(100%, 430px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  gap: 12px;
  align-items: start;
  padding: 14px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 16px rgba(16, 24, 40, .06);
}

.wechat-card-copy {
  min-width: 0;
}

.wechat-card-copy small,
.wechat-card-copy strong,
.wechat-card-copy p {
  display: block;
}

.wechat-card-copy small {
  margin-bottom: 7px;
  color: #98a2b3;
}

.wechat-card-copy strong,
.wechat-card-copy p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wechat-card-copy p {
  margin: 8px 0 0;
  color: #667085;
  font-size: 13px;
}

.wechat-card-preview img,
.wechat-card-placeholder {
  width: 76px;
  height: 76px;
  border-radius: 8px;
  object-fit: cover;
  background: #f1ecff;
}

.wechat-card-placeholder {
  display: grid;
  place-items: center;
  color: var(--brand-2);
  font-size: 28px;
  font-weight: 900;
}

.share-to-wechat {
  width: min(100%, 430px);
  min-height: 48px;
  font-size: 16px;
}

.qr-box {
  width: 132px;
  height: 132px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  border: 1px solid #d7e0ea;
  background: #fff;
  padding: 8px;
  margin-bottom: 10px;
}

.qr-box img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.download-options {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}

.download-options label {
  display: flex;
  gap: 6px;
  align-items: center;
  font-weight: 760;
}

.download-options input {
  width: auto;
}

.display-settings {
  display: grid;
  gap: 28px;
  padding: 8px 0 18px;
}

.display-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 22px;
  align-items: start;
}

.display-row > strong {
  padding-top: 5px;
  font-size: 17px;
}

.display-row span,
.display-row a {
  color: #8a8f98;
  font-weight: 760;
}

.display-row a {
  margin-left: 8px;
  text-decoration: underline;
}

.share-edit-grid,
.share-logo-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.share-edit-grid label,
.share-logo-tools label {
  display: grid;
  gap: 6px;
  color: #344054;
  font-weight: 900;
}

.share-edit-grid input,
.share-logo-tools input,
.share-logo-tools select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 11px;
  font: inherit;
  font-weight: 850;
  background: #fff;
}

.share-logo-tools .ghost {
  align-self: end;
}

.logo-preview-img {
  width: 92px;
  height: 48px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 6px;
  background: #fff;
}

.display-options {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.display-options label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #1f2937;
  font-size: 17px;
  font-weight: 900;
}

.display-options input {
  width: 18px;
  height: 18px;
}

.group-price-editor {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.group-price-editor label {
  display: grid;
  gap: 8px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fbfbff;
}

.group-price-editor span {
  color: #1f2937;
  font-weight: 900;
}

.group-price-editor small {
  color: #667085;
  line-height: 1.45;
}

.group-price-editor .quote-price-control {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 10px;
  background: #fff;
}

.group-price-editor .quote-price-control input {
  width: 100%;
  height: 40px;
  border: 0;
  outline: 0;
  font: inherit;
  font-weight: 900;
}

.switch {
  display: block;
  width: max-content;
  margin-top: 16px;
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: #c7c7c7;
  color: #fff;
  font-weight: 900;
}

.switch.on {
  background: #a855f7;
}

.share-control-box h4 {
  margin: 0 0 6px;
}

.share-control-box p {
  margin: 0 0 12px;
  color: var(--muted);
}

.share-link {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px;
  color: var(--brand-2);
  background: #faf9ff;
}

.phone-preview {
  position: sticky;
  top: 22px;
  align-self: start;
  max-height: calc(100vh - 44px);
  overflow: auto;
  padding-right: 4px;
  scroll-behavior: smooth;
}

.preview-label {
  width: max-content;
  margin: 0 auto 10px;
  border-radius: 999px;
  padding: 8px 14px;
  background: #101828;
  color: #fff;
  font-weight: 850;
}

.section-note {
  margin: -4px 0 16px;
  color: #667085;
  line-height: 1.7;
}

.more-info-editor {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.more-info-list {
  display: grid;
  gap: 14px;
}

.more-info-item {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  background: #fff;
}

.more-info-title,
.textarea-block > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toggle {
  border: 0;
  border-radius: 999px;
  padding: 6px 12px;
  background: #e5e7eb;
  color: #667085;
  font-weight: 900;
}

.toggle.on {
  background: #eee8ff;
  color: var(--brand-2);
}

.textarea-block {
  border-radius: 12px;
  padding: 14px;
  background: #f7f8fb;
}

.textarea-block span {
  color: #475467;
  font-weight: 850;
}

.textarea-block > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.section-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.ghost.tiny {
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 13px;
}

.textarea-block textarea {
  min-height: 100px;
  margin-top: 10px;
  line-height: 1.75;
  white-space: pre-wrap;
  font-weight: 600;
}

.section-format-preview {
  display: grid;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #e4e9f0;
  border-radius: 10px;
  background: #fff;
}

.section-format-preview > strong {
  color: #667085;
  font-size: 13px;
}

.formatted-section {
  display: grid;
  gap: 10px;
}

.formatted-section p {
  margin: 0;
  color: #344054;
  font-weight: 600;
  line-height: 1.6;
}

.formatted-section ul,
.formatted-section ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.formatted-section ul {
  list-style: none;
}

.formatted-section ol {
  padding-left: 22px;
}

.formatted-section li {
  position: relative;
  color: #475467;
  font-weight: 600;
  line-height: 1.65;
}

.formatted-section ul li {
  padding-left: 18px;
}

.formatted-section li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: .72em;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--brand);
}

.formatted-section ol li::before {
  content: none;
}

.ai-chip {
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  color: var(--brand-2);
  background: #eee8ff;
  font-weight: 900;
}

.theme-panel {
  box-shadow: none;
}

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

.theme-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
  background: #fff;
  text-align: left;
}

.theme-card.active {
  border-color: var(--brand-2);
  box-shadow: 0 0 0 3px rgba(117, 87, 230, .12);
}

.theme-card span {
  display: block;
  height: 74px;
  border-radius: 8px;
  background-size: cover;
  background-position: center;
  margin-bottom: 8px;
}

.theme-card strong,
.theme-card small {
  display: block;
}

.theme-card small {
  color: var(--muted);
  margin-top: 2px;
}

.color-row {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
}

.color-dot {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 3px solid #fff;
  box-shadow: 0 0 0 1px var(--line);
}

.color-dot.active {
  box-shadow: 0 0 0 3px rgba(16, 24, 40, .18);
}

.phone {
  width: 100%;
  max-width: 370px;
  margin: 0 auto;
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  border: 1px solid #cfd7e2;
  box-shadow: 0 24px 70px rgba(16, 24, 40, .16);
}

.phone-hero {
  min-height: 210px;
  padding: 22px;
  color: #fff;
  background-size: cover;
  background-position: center;
}

.phone-hero h2 {
  padding-top: 88px;
  margin: 0 0 10px;
}

.phone-body {
  padding: 14px;
  background: #fbfbff;
}

.phone-price {
  display: grid;
  gap: 10px;
  background: #fff;
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 12px;
}

.phone-price-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
}

.phone-price-row span {
  color: #101828;
  font-weight: 900;
}

.phone-price strong {
  display: block;
  min-width: 118px;
  text-align: right;
  color: var(--quote-accent, var(--brand-2));
  font-size: 22px;
}

.phone-group-prices {
  display: grid;
  gap: 8px;
}

.phone-group-prices div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
}

.phone-group-prices span {
  color: #344054;
  font-weight: 800;
}

.phone-price > div + div,
.phone-price p {
  margin-top: 8px;
}

.phone-quote-detail {
  border-top: 1px solid #eef1f6;
  padding-top: 10px;
}

.phone-quote-detail > span {
  display: block;
  margin-bottom: 6px;
  color: #344054;
  font-weight: 900;
}

.phone-price p,
.phone-quote-detail {
  color: #667085;
  line-height: 1.5;
}

.quote-detail-editor {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.quote-detail-editor label {
  display: grid;
  gap: 8px;
}

.quote-detail-editor span {
  color: #344054;
  font-weight: 900;
}

.quote-detail-editor textarea {
  min-height: 118px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
  font-weight: 600;
  line-height: 1.6;
  color: #101828;
}

.section-format-preview.compact {
  margin-top: 0;
}

.phone-logo,
.consultant-card {
  background: #fff;
  border: 1px solid #ece7ff;
  border-radius: 16px;
  padding: 13px;
  margin-bottom: 12px;
}

.phone-logo {
  color: var(--quote-accent, #8b5cf6);
  font-weight: 950;
  text-align: center;
}

.phone-logo img {
  max-width: 120px;
  max-height: 42px;
  object-fit: contain;
}

.consultant-card span,
.consultant-card em {
  display: block;
  color: #667085;
  font-size: 12px;
  font-style: normal;
}

.consultant-card strong {
  display: block;
  margin: 4px 0;
}

.phone-day {
  scroll-margin-top: 12px;
  background: #fff;
  border: 1px solid #ece7ff;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 12px;
}

.phone-day.active,
.phone-day-focus {
  border-color: var(--quote-accent, var(--brand-2));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--quote-accent, var(--brand-2)) 18%, transparent);
}

.phone-day > span {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  background: color-mix(in srgb, var(--quote-accent, #8b5cf6) 13%, white);
  color: var(--quote-accent, #8b5cf6);
  font-weight: 900;
}

.phone-day h3 {
  margin: 10px 0 6px;
}

.phone-more {
  background: #fff;
  border: 1px solid color-mix(in srgb, var(--quote-accent, #8b5cf6) 32%, #e7e5ee);
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 12px;
}

.phone-more-tabs {
  display: grid;
  place-items: center;
  border-bottom: 2px solid color-mix(in srgb, var(--quote-accent, #8b5cf6) 70%, white);
  padding-bottom: 10px;
  margin-bottom: 12px;
  color: var(--quote-accent, #8b5cf6);
  font-weight: 900;
}

.phone-info-card {
  border: 1px solid #eef0f4;
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.phone-info-card + .phone-info-card {
  margin-top: 10px;
}

.phone-info-card h3 {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  margin: 0 0 10px;
  background: color-mix(in srgb, var(--quote-accent, #8b5cf6) 13%, white);
  color: #101828;
  font-size: 14px;
  font-weight: 900;
}

.phone-info-subsection h4 {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  margin: 10px 0 8px;
  background: color-mix(in srgb, var(--quote-accent, #8b5cf6) 13%, white);
  color: #101828;
  font-size: 13px;
  font-weight: 900;
}

.phone-info-subsection:first-child h4 {
  margin-top: 0;
}

.phone-info-card p {
  margin: 0;
  color: #475467;
  line-height: 1.7;
  font-size: 13px;
}

.phone-info-card .phone-formatted-section {
  gap: 8px;
}

.phone-info-card .phone-formatted-section p {
  color: #344054;
  font-size: 13px;
}

.phone-info-card .phone-formatted-section ul,
.phone-info-card .phone-formatted-section ol {
  gap: 7px;
}

.phone-info-card .phone-formatted-section li {
  font-size: 13px;
}

.phone-info-card .phone-formatted-section li::before {
  background: var(--quote-accent, #8b5cf6);
}

.share-wrap {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 20px;
  align-items: start;
}


.auth-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

.auth-switch button {
  border: 0;
  border-radius: 8px;
  padding: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 850;
}

.auth-switch button.active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 6px 16px rgba(16, 24, 40, .08);
}

.entry-icon.violet {
  background: #7557e6;
}

.logout-btn {
  padding-inline: 14px;
}

.form-error {
  margin: 14px 0 0;
  color: #d92d20;
  font-weight: 800;
}

.success-note {
  margin: 0 0 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #ecfdf3;
  color: #067647;
  font-weight: 800;
}

.muted-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.7;
}

.ai-config-panel.collapsed {
  padding: 16px 20px;
}

.ai-config-panel.collapsed .panel-head {
  margin-bottom: 0;
}

.ai-config-wide {
  grid-column: 1 / -1;
}

.ai-config-wide .panel-head {
  align-items: center;
}

.ai-config-form {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) minmax(180px, .7fr);
  gap: 16px;
  margin-top: 16px;
}

.ai-config-form.ai-image-config-grid {
  grid-template-columns: minmax(180px, .75fr) minmax(260px, 1.15fr) minmax(220px, 1fr) minmax(280px, 1.2fr);
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.ai-config-form label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: #344054;
  font-weight: 900;
  font-size: 15px;
}

.ai-config-form input,
.ai-config-form select {
  width: 100%;
  min-height: 52px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  background: #fff;
  color: #101828;
  font: inherit;
}

.ai-config-actions {
  justify-content: flex-end;
  margin: 14px 0 22px;
}

.ai-config-actions button {
  min-width: 240px;
}

.account-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.account-summary article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(16, 24, 40, .06);
}

.account-summary span {
  color: var(--muted);
  font-weight: 800;
}

.account-summary strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
}

.account-table {
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.account-row {
  display: grid;
  grid-template-columns: 1.3fr .6fr 1.4fr .6fr 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  background: #fff;
}

.account-row + .account-row {
  border-top: 1px solid var(--line);
}

.account-head {
  background: #f3f0ff;
  color: var(--muted);
  font-weight: 850;
}

.account-person {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.account-person small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.avatar {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--soft);
  color: var(--brand);
  font-weight: 900;
}

.permission-tags,
.row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.mini-tag,
.account-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: #f2f4f7;
  color: #475467;
  font-size: 12px;
  font-weight: 850;
}

.account-status.status-on {
  background: #ecfdf3;
  color: #067647;
}

.account-status.status-off {
  background: #fff1f3;
  color: #c01048;
}

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

.account-modal {
  width: min(820px, calc(100vw - 48px));
  max-height: calc(100vh - 40px);
  overflow: auto;
}

.account-modal .modal-head {
  padding: 20px 28px 16px;
  border-bottom: 1px solid #edf1f5;
}

.account-modal .modal-head h3 {
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: 0;
}

.account-modal .modal-head button {
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: #f2f4f7;
  color: #344054;
  font-weight: 800;
}

.account-modal .account-form-grid {
  padding: 22px 28px 0;
  gap: 16px 18px;
}

.account-modal label {
  gap: 7px;
  color: #344054;
  font-size: 13px;
  font-weight: 750;
}

.account-modal label span {
  line-height: 1;
}

.account-modal input,
.account-modal select {
  min-height: 44px;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 650;
}

.permission-box {
  display: grid;
  gap: 12px;
  margin-top: 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #f8fafc;
}

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

.check-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.check-row input {
  width: auto;
}

.account-modal .permission-box {
  margin: 18px 28px 0;
  padding: 16px;
  border-color: #e4e9f0;
  border-radius: 10px;
  background: #f8fafc;
}

.account-modal .permission-box strong {
  font-size: 15px;
}

.account-modal .check-row {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  color: #344054;
  font-size: 14px;
  font-weight: 750;
}

.account-modal .check-row input {
  inline-size: 16px;
  block-size: 16px;
  accent-color: var(--brand);
}

.account-modal .form-error {
  margin: 14px 28px 0;
}

.account-modal .modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
  padding: 18px 28px 22px;
  border-top: 1px solid #edf1f5;
  background: #fff;
}

.account-modal .modal-actions button {
  min-width: 104px;
  border-radius: 8px;
  padding: 11px 16px;
}

.theme-management-panel {
  margin-top: 18px;
}

.managed-theme-list {
  display: grid;
  gap: 14px;
}

.managed-theme-card {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.managed-theme-card.disabled {
  opacity: .62;
}

.managed-theme-cover {
  min-height: 112px;
  border-radius: 10px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 10px;
  background: #eef3f8 center/cover no-repeat;
  overflow: hidden;
}

.managed-theme-cover button {
  border: 0;
  border-radius: 999px;
  padding: 7px 12px;
  background: rgba(16, 24, 40, .78);
  color: #fff;
  font-weight: 850;
}

.managed-theme-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.managed-theme-fields label {
  gap: 6px;
  font-size: 13px;
}

.managed-theme-fields input,
.managed-theme-fields select {
  min-height: 42px;
  border-radius: 8px;
  padding: 9px 10px;
  font-weight: 700;
}

.managed-theme-fields input[type="color"] {
  padding: 4px;
}

.managed-theme-actions {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.theme-modal-body {
  display: grid;
  gap: 18px;
  padding: 22px 28px 0;
}

.theme-modal-cover {
  min-height: 180px;
}

.theme-modal .account-form-grid {
  padding: 0;
}

.ai-style-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.ai-style-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.ai-style-grid label {
  display: grid;
  gap: 8px;
  min-width: 0;
  color: #344054;
  font-weight: 900;
}

.ai-style-grid label.wide {
  grid-column: 1 / -1;
}

.ai-training-section {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  border: 1px solid #dce8e5;
  border-radius: 12px;
  padding: 14px 16px;
  background: #f4fbf9;
}

.ai-training-section.wide {
  grid-column: 1 / -1;
}

.ai-training-section h4 {
  margin: 0;
  color: #101828;
  font-size: 18px;
}

.ai-training-section p {
  margin: 0;
  color: #667085;
  line-height: 1.55;
  font-weight: 650;
}

.product-feed-section {
  border-color: rgba(19, 122, 109, .26);
  background: #eff8f6;
}

.tag-match-section {
  border-color: rgba(117, 87, 230, .22);
  background: #f7f4ff;
}

.product-line-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  grid-column: 1 / -1;
}

.product-line-toolbar strong {
  font-size: 16px;
}

.product-line-toolbar button {
  padding: 10px 16px;
}

.product-line-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  grid-column: 1 / -1;
}

.product-line-card {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  background: #fff;
}

.product-line-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.product-line-head strong {
  color: #101828;
  font-size: 16px;
}

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

.product-line-grid label.wide {
  grid-column: 1 / -1;
}

.product-line-grid input,
.product-line-grid textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  font: inherit;
  line-height: 1.55;
}

.product-line-grid textarea {
  min-height: 78px;
  resize: vertical;
}

.product-line-empty {
  grid-column: 1 / -1;
  border: 1px dashed #b9c8d8;
  border-radius: 12px;
  padding: 18px;
  background: #fbfdff;
  color: #667085;
  font-weight: 750;
}

.ai-style-grid span {
  font-size: 14px;
}

.ai-style-grid textarea {
  width: 100%;
  min-height: 132px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  resize: vertical;
  color: #101828;
  background: #fff;
  font: inherit;
  line-height: 1.7;
}

.ai-style-grid label.wide textarea {
  min-height: 96px;
}

.ai-style-preview {
  position: static;
  grid-column: 1 / -1;
}

.style-preview-box {
  display: grid;
  gap: 10px;
}

.style-preview-box strong {
  color: #101828;
}

.style-preview-box p {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfbff;
  color: #667085;
  line-height: 1.65;
}

.empty-state {
  display: grid;
  gap: 8px;
  padding: 32px;
}

@media (max-width: 980px) {
  .shell,
  .resource-layout,
  .editor-layout,
  .share-wrap,
  .compose-layout,
  .ai-style-layout,
  .ai-style-grid,
  .product-line-list,
  .product-line-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .entry-grid,
  .quote-choice,
  .form-grid,
  .ai-config-form,
  .ai-config-form.ai-image-config-grid,
  .account-summary,
  .account-form-grid,
  .managed-theme-card,
  .managed-theme-fields,
  .permission-grid,
  .day-grid,
  .day-editor-list,
  .legacy-module-grid,
  .legacy-filter-panel,
  .modal-grid {
    grid-template-columns: 1fr;
  }

  .ai-config-actions {
    justify-content: stretch;
  }

  .ai-config-actions button {
    width: 100%;
    min-width: 0;
  }

  .day-edit-head,
  .day-add-resource,
  .quote-basic-panel,
  .group-price-editor,
  .schedule-date-bar,
  .itinerary-add-line {
    grid-template-columns: 1fr;
  }

  .schedule-date-bar label {
    grid-template-columns: 1fr;
  }

  .itinerary-day-board {
    grid-template-columns: 1fr;
  }

  .ai-style-preview {
    position: static;
  }

  .managed-theme-actions {
    justify-items: start;
  }

  .itinerary-mini-title {
    grid-template-columns: 1fr;
  }

  .menu-pop {
    position: static;
    margin-top: 4px;
  }

  .itinerary-edit-context {
    display: grid;
  }

  .day-summary-grid {
    grid-template-columns: 1fr;
  }

  .day-summary-banner {
    flex-wrap: wrap;
  }

  .day-summary-banner strong {
    margin-left: 0;
  }

  .phone-itinerary-images {
    grid-template-columns: 1fr;
  }

  .table-head {
    display: none;
  }

  .table-row,
  .account-row {
    grid-template-columns: 1fr;
  }

  .account-head {
    display: none;
  }

  .account-modal .account-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-modal .permission-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .legacy-ticket-row,
  .legacy-price-row {
    grid-template-columns: 1fr;
  }

  .legacy-price-table {
    display: grid;
    gap: 12px;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .legacy-price-row.head,
  .traffic-box .legacy-price-row.head {
    display: none;
  }

  .legacy-price-row:not(.head) {
    gap: 10px;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fff;
  }

  .legacy-price-row:not(.head) > div {
    display: grid;
    gap: 6px;
  }

  .legacy-price-row:not(.head) > div::before {
    color: #667085;
    font-size: 13px;
    font-weight: 900;
  }

  .legacy-price-row:not(.head) > div:nth-child(1)::before {
    content: "价格类型";
  }

  .legacy-price-row:not(.head) > div:nth-child(2)::before {
    content: "资源类型";
  }

  .legacy-price-row:not(.head) > div:nth-child(3)::before {
    content: "默认成本价";
  }

  .legacy-price-row:not(.head) > div:nth-child(4)::before {
    content: "参考报价";
  }

  .legacy-price-row:not(.head) > div:nth-child(5)::before {
    content: "说明";
  }

  .traffic-row > div:nth-child(1)::before {
    content: "小交通类型";
  }

  .traffic-row > div:nth-child(2)::before {
    content: "价格";
  }

  .traffic-row > div:nth-child(3)::before {
    content: "是否包含";
  }

  .traffic-row > div:nth-child(4)::before {
    content: "操作";
  }

  .traffic-box {
    gap: 12px;
  }

  .quote-cost-row {
    grid-template-columns: 1fr;
  }

  .quote-cost-calc {
    grid-template-columns: 1fr;
  }

  .add-itinerary-grid {
    grid-template-columns: 1fr;
  }

  .add-itinerary-body {
    padding: 14px;
  }

  .add-itinerary-modal .modal-actions {
    flex-wrap: wrap;
  }

  .add-itinerary-modal .modal-actions button {
    flex: 1 1 100%;
  }

  .share-edit-grid,
  .share-logo-tools {
    grid-template-columns: 1fr;
  }

  .calc-mark {
    display: none;
  }

  .legacy-ticket-row.head {
    display: none;
  }

  .legacy-price-note {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    border-radius: 12px;
  }

  .legacy-price-note .ghost {
    white-space: nowrap;
  }

  .calendar-box {
    align-items: stretch;
    grid-template-columns: 1fr;
    border-radius: 12px;
  }

  .price-input-group {
    grid-template-columns: auto minmax(0, 1fr) minmax(84px, auto);
  }

  .mini-calendar {
    min-width: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .real-calendar {
    min-width: 0;
  }

  .real-calendar-head {
    grid-template-columns: 70px 1fr 70px;
  }

  .calendar-day-editor {
    grid-template-columns: 1fr;
  }

  .calendar-day-actions {
    grid-column: 1 / -1;
    flex-direction: column;
  }

  .filter-calendar-panel {
    width: min(560px, calc(100vw - 52px));
  }

  .filter-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .filter-actions button {
    width: 100%;
  }

  .compact-calendar .real-date-cell {
    min-height: 68px;
  }

  .calendar-picker {
    gap: 6px;
  }

  .calendar-picker select {
    min-width: 86px;
    padding: 8px 22px 8px 8px;
    font-size: 12px;
  }

  .real-calendar-week span {
    font-size: 11px;
    padding: 8px 2px;
  }

  .real-date-cell {
    min-height: 86px;
    padding: 6px;
  }

  .real-date-cell span,
  .real-date-cell small,
  .real-date-cell em {
    font-size: 9px;
  }
}

@media (max-width: 520px) {
  .account-modal {
    width: min(560px, calc(100vw - 24px));
  }

  .account-modal .account-form-grid,
  .account-modal .permission-grid {
    grid-template-columns: 1fr;
  }

  .account-modal .modal-head,
  .account-modal .account-form-grid,
  .account-modal .modal-actions {
    padding-left: 18px;
    padding-right: 18px;
  }

  .account-modal .permission-box {
    margin-left: 18px;
    margin-right: 18px;
  }
}


.editor-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
}

.editor-toolbar .tabs {
  margin-bottom: 0;
}

.save-template-btn {
  min-height: 46px;
  white-space: nowrap;
}

.template-editor-note {
  margin-bottom: 14px;
}

.quote-template-panel {
  margin-top: 18px;
}

.quote-template-list {
  display: grid;
  gap: 12px;
}

.quote-template-list.compact {
  gap: 10px;
}

.quote-template-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.quote-template-card strong,
.quote-template-card span,
.quote-template-card small {
  display: block;
}

.quote-template-card strong {
  margin-bottom: 5px;
}

.quote-template-card span,
.quote-template-card small,
.template-empty {
  color: var(--muted);
}

.quote-template-card small {
  margin-top: 4px;
}

.quote-template-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.quote-template-actions button {
  padding: 9px 12px;
  border-radius: 8px;
}

.template-empty {
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: #f8fafc;
  font-weight: 750;
}

@media (max-width: 760px) {
  .share-form-row,
  .copy-line {
    grid-template-columns: 1fr;
  }

  .share-form-row > span {
    padding-top: 0;
  }

  .copy-line button,
  .share-to-wechat {
    width: 100%;
    min-height: 50px;
  }

  .wechat-card-preview {
    width: 100%;
  }

  .editor-toolbar,
  .quote-template-card {
    grid-template-columns: 1fr;
  }

  .quote-template-actions {
    justify-content: flex-start;
  }
}

body input,
body select,
body textarea {
  font-weight: 500 !important;
}

body input::placeholder,
body textarea::placeholder {
  color: #98a2b3;
  font-weight: 500;
}
