:root {
  color-scheme: light;
  --ink: #101513;
  --muted: #65706b;
  --line: #d9dfdc;
  --paper: #ffffff;
  --soft: #f3f6f4;
  --accent: #163f35;
  --accent-hover: #0d3028;
  --danger: #a32c2c;
  --shadow: 0 24px 70px rgba(20, 37, 32, 0.16);
  font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: #e7ecef;
}

button,
input,
select { font: inherit; }

button,
a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

.login-page {
  display: grid;
  place-items: center;
  padding: 4vh 4vw;
  background: #dde5ea;
}

.login-frame {
  position: relative;
  width: min(1520px, 94vw);
  min-height: min(880px, 90vh);
  overflow: hidden;
  border: 6px solid #101311;
  border-radius: 42px;
  background: #d7e0e3 url("/assets/hotel-hero.png") center / cover no-repeat;
  box-shadow: var(--shadow);
}

.brand-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 34px 52px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 16px;
}

.brand-note {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.login-copy {
  position: relative;
  z-index: 2;
  width: min(760px, 76%);
  margin: 7vh auto 0;
  text-align: center;
  text-shadow: 0 2px 20px rgba(255, 255, 255, 0.78);
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: #2a4a41;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.login-copy h1 {
  margin: 0;
  font-size: clamp(54px, 6.4vw, 102px);
  font-weight: 770;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.login-copy > p:last-child {
  margin: 28px 0 0;
  color: #25332f;
  font-size: clamp(16px, 1.5vw, 23px);
}

.login-dock {
  position: absolute;
  z-index: 3;
  right: 5%;
  bottom: 5.5%;
  left: 5%;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 0;
  padding: 13px 14px 13px 28px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 20px 55px rgba(15, 25, 22, 0.22);
  backdrop-filter: blur(16px);
}

.dock-field {
  display: grid;
  min-width: 0;
  padding: 6px 24px;
  border-right: 1px solid var(--line);
}

.dock-field span,
.field > span:first-child {
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.dock-field input {
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-weight: 650;
}

.primary-button,
.secondary-button,
.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 12px;
  font-weight: 720;
  text-decoration: none;
  cursor: pointer;
  transition: transform 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

.primary-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  padding: 0 24px;
}

.primary-button:hover { background: var(--accent-hover); }
.primary-button:active,
.secondary-button:active { transform: translateY(1px); }

.login-button {
  min-width: 154px;
  min-height: 66px;
  border-radius: 999px;
}

.secondary-button {
  border: 1px solid #bfc9c5;
  background: white;
  color: var(--ink);
  padding: 0 18px;
}

.secondary-button:hover { border-color: var(--accent); }

.text-button {
  min-height: 38px;
  border: 0;
  background: transparent;
  color: var(--accent);
  padding: 0 10px;
}

.form-message {
  min-height: 20px;
  margin: 12px 0 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
}

.form-message.is-error { color: var(--danger); }

.login-message {
  position: absolute;
  z-index: 4;
  right: 8%;
  bottom: 2.2%;
  left: 8%;
  margin: 0;
  text-align: center;
}

.workspace-page {
  min-height: 100vh;
  background: #edf1f3 url("/assets/hotel-hero.png") center top / 100% auto no-repeat fixed;
}

.workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 76px;
  padding: 0 max(24px, 5vw);
  border-bottom: 1px solid rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.workspace-brand { font-size: 15px; }

.account-area {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 14px;
}

.workspace-shell {
  width: min(1220px, calc(100% - 36px));
  margin: 0 auto;
  padding: 56px 0 80px;
}

.workspace-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 30px;
  padding: 34px 38px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 16px 50px rgba(30, 46, 40, 0.1);
  backdrop-filter: blur(18px);
}

.workspace-intro h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 62px);
  letter-spacing: -0.045em;
  line-height: 1;
}

.workspace-intro p:last-child {
  margin: 16px 0 0;
  color: var(--muted);
}

.intro-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 10px;
}

.panel {
  margin-top: 18px;
  padding: 30px;
  border: 1px solid rgba(215, 223, 219, 0.95);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 12px 38px rgba(35, 49, 44, 0.08);
}

.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
}

.section-heading h2,
.import-panel h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -0.025em;
}

.hotel-badge {
  padding: 9px 13px;
  border: 1px solid #bfd2ca;
  border-radius: 999px;
  background: #edf6f2;
  color: var(--accent);
  font-size: 13px;
  font-weight: 750;
}

.record-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
  gap: 14px;
  align-items: end;
}

.record-form.has-hotel-select { grid-template-columns: repeat(5, minmax(0, 1fr)) auto; }

.field { display: grid; }

.field input,
.field select,
.filters input,
.filters select {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 11px;
  outline: 0;
  background: white;
  color: var(--ink);
  padding: 0 13px;
}

.field input:focus,
.field select:focus,
.filters input:focus,
.filters select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(22, 63, 53, 0.1); }

.money-input {
  display: flex;
  align-items: center;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: white;
}

.money-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(22, 63, 53, 0.1); }
.money-input b { padding-left: 13px; }
.money-input input { min-height: 46px; border: 0; box-shadow: none !important; }

.form-actions { display: flex; align-items: center; gap: 6px; }
.form-actions .primary-button { white-space: nowrap; }

.price-sync-bar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 10px 9px 13px;
  border: 1px solid #c7ddd5;
  border-radius: 12px;
  background: rgba(237, 246, 242, 0.92);
}

.price-sync-copy { margin-right: auto; color: var(--muted); font-size: 12px; line-height: 1.4; }
.price-sync-copy strong { display: block; color: var(--ink); font-size: 14px; }
.sync-option {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
  font-weight: 700;
  white-space: nowrap;
}
.sync-option input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.price-sync-bar .primary-button { min-height: 40px; white-space: nowrap; }
.sync-status { display: block; margin-top: 3px; color: #2a755f; font-size: 10px; font-weight: 700; white-space: nowrap; }

.records-heading { align-items: end; }

.filters {
  display: flex;
  gap: 8px;
  align-items: center;
}

.filters select { min-width: 142px; }
.filters input { min-width: 155px; }
.compact-button { min-height: 48px; }

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
}

table {
  width: 100%;
  min-width: 840px;
  border-collapse: collapse;
  background: white;
}

th,
td {
  padding: 15px 16px;
  border-bottom: 1px solid #e8ecea;
  text-align: left;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  background: #f5f7f6;
  color: #4a5651;
  font-size: 12px;
  letter-spacing: 0.04em;
}

tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafcfb; }
.price-cell { color: var(--accent); font-weight: 800; }
.empty-cell { padding: 34px; color: var(--muted); text-align: center; }

.table-action {
  min-height: 32px;
  margin-right: 6px;
  border: 0;
  border-radius: 8px;
  background: #edf3f0;
  color: var(--accent);
  padding: 0 10px;
  font-weight: 700;
  cursor: pointer;
}

.table-action.danger { background: #f8eeee; color: var(--danger); }
.table-action.danger.is-confirming { background: var(--danger); color: #fff; }

.accounts-panel .section-heading { margin-bottom: 18px; }
.section-note { margin: 8px 0 0; color: var(--muted); }

.account-list {
  display: grid;
  gap: 12px;
}

.account-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) minmax(150px, 1fr) minmax(190px, 1.2fr) auto minmax(210px, 1.1fr);
  gap: 14px;
  align-items: end;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fafcfb;
}

.account-hotel { display: grid; gap: 5px; align-self: center; }
.account-hotel strong { font-size: 16px; }
.account-hotel span,
.account-meta,
.account-status,
.account-loading { color: var(--muted); font-size: 12px; }
.account-enabled { display: flex; align-items: center; gap: 8px; min-height: 48px; white-space: nowrap; }
.account-enabled input { width: 18px; height: 18px; accent-color: var(--accent); }
.account-save-area { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px 10px; align-items: center; }
.account-save-area .account-meta { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account-save-area .account-status { grid-column: 1 / -1; min-height: 16px; }
.account-status.is-error,
.account-loading.is-error { color: var(--danger); }
.account-loading { margin: 0; padding: 20px; text-align: center; }

.import-panel {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
}

.import-panel p { margin: 8px 0 0; color: var(--muted); }
.upload-actions { display: flex; align-items: center; gap: 10px; }
.upload-actions input { max-width: 260px; }
.import-panel .form-message { grid-column: 1 / -1; margin: 0; }

[hidden] { display: none !important; }

@media (max-width: 980px) {
  .record-form,
  .record-form.has-hotel-select { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-actions { align-self: end; }
  .records-heading { align-items: start; flex-direction: column; }
  .account-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-hotel,
  .account-save-area { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .login-page { display: block; padding: 0; background: #dce4e8; }
  .login-frame {
    width: 100%;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    background-position: 42% center;
    box-shadow: none;
  }
  .brand-bar { padding: 24px 22px; }
  .brand-note { display: none; }
  .login-copy { width: calc(100% - 40px); margin-top: 13vh; }
  .login-copy h1 { font-size: clamp(48px, 15vw, 76px); }
  .login-copy > p:last-child { margin-top: 20px; font-size: 16px; }
  .login-dock {
    right: 18px;
    bottom: 48px;
    left: 18px;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 18px;
    border-radius: 24px;
  }
  .dock-field { padding: 8px 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .login-button { width: 100%; min-height: 54px; }
  .login-message { bottom: 18px; }

  .workspace-header { min-height: 66px; padding: 0 18px; }
  .workspace-brand span:last-child { display: none; }
  .account-area { font-size: 12px; }
  .workspace-shell { width: calc(100% - 24px); padding: 22px 0 50px; }
  .workspace-intro { display: block; padding: 24px 20px; border-radius: 18px; }
  .workspace-intro h1 { font-size: 38px; }
  .workspace-intro p:last-child { line-height: 1.65; }
  .intro-actions { margin-top: 22px; }
  .intro-actions a { flex: 1; padding: 0 10px; font-size: 13px; }
  .panel { padding: 22px 18px; border-radius: 18px; }
  .section-heading { display: block; }
  .hotel-badge { display: inline-flex; margin-top: 14px; }
  .record-form,
  .record-form.has-hotel-select { grid-template-columns: 1fr; }
  .form-actions .primary-button { flex: 1; }
  .price-sync-bar { align-items: stretch; flex-wrap: wrap; }
  .price-sync-copy { width: 100%; margin-right: 0; }
  .sync-option { flex: 1; }
  .price-sync-bar .primary-button { width: 100%; }
  .filters { width: 100%; flex-wrap: wrap; }
  .filters select,
  .filters input { min-width: 0; flex: 1 1 140px; }
  .filters .compact-button { flex: 0 0 auto; }
  .table-wrap { margin-right: -18px; margin-left: -18px; border-right: 0; border-left: 0; border-radius: 0; }
  th, td { padding: 13px 12px; }
  .account-row { grid-template-columns: 1fr; padding: 14px; }
  .account-hotel,
  .account-save-area { grid-column: auto; }
  .account-save-area { grid-template-columns: 1fr; }
  .account-save-area .secondary-button { width: 100%; }
  .account-save-area .account-status { grid-column: auto; }
  .import-panel { grid-template-columns: 1fr; }
  .upload-actions { align-items: stretch; flex-direction: column; }
  .upload-actions input { max-width: 100%; }
}

/* Final competition workspace: compact, translucent and mobile-first. */
.market-page .workspace-header { min-height: 64px; }
.market-shell { padding-top: 18px; }
.market-topline {
  gap: 16px;
  padding: 14px 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .86);
}
.market-topline h1 { font-size: clamp(24px, 3vw, 34px); }
.market-top-actions { flex: 1 1 680px; justify-content: flex-end; }
.market-name-picker { min-width: 290px; }
.market-name-picker input {
  width: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--line);
  border-radius: 10px; background: rgba(255,255,255,.9);
}
.market-tabs { margin-top: 12px; padding: 7px; background: rgba(255,255,255,.88); }
.market-tabs button { min-height: 38px; padding: 0 16px; white-space: nowrap; }
.alert-count { display: inline-grid; min-width: 20px; height: 20px; margin-left: 4px; place-items: center; border-radius: 999px; background: #fff7df; color: #9a5a00; font-size: 11px; }
.market-page-heading {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 18px;
  margin-bottom: 16px; padding: 20px 22px; border-radius: 18px;
  background: rgba(255,255,255,.92); box-shadow: 0 10px 32px rgba(22,63,53,.08);
}
.market-page-heading h2 { margin: 0; font-size: 28px; }
.market-page-heading p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.collection-completion {
  display: grid; flex: 0 0 145px; min-height: 92px; align-content: center; gap: 6px;
  padding: 11px 13px; border: 1px solid #bce7d3; border-radius: 14px; background: rgba(232,249,240,.92);
}
.collection-completion span { color: var(--muted); font-size: 12px; }
.collection-completion strong { font-size: 22px; }
.collection-completion i { height: 7px; overflow: hidden; border-radius: 999px; background: #dceee6; }
.collection-completion i b { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .25s ease; }
.market-collection-grid { grid-template-columns: minmax(0, 1fr); }
.market-panel { background: rgba(255,255,255,.94); }
.market-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.market-stats > div { min-height: 88px; padding: 14px 16px; background: rgba(255,255,255,.94); }
.market-stats strong { font-size: 22px; }
.market-alert-list { display: grid; gap: 10px; }
.market-alert-item { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfb; }
.market-alert-item div { display: grid; gap: 4px; }
.market-alert-item span { color: var(--muted); font-size: 12px; }
.market-alert-item.is-price_drop b { color: #bb3c2d; }
.market-alert-item.is-price_rise b { color: #1671c8; }
.market-alert-item.is-sold_out b { color: #9a5a00; }

@media (max-width: 760px) {
  .market-page .workspace-header { min-height: 54px; }
  .market-page .workspace-nav { order: 0; width: auto; }
  .market-page .workspace-brand span:last-child { display: none; }
  .market-page .account-area { font-size: 12px; }
  .market-shell { width: calc(100% - 16px); padding-top: 8px; }
  .market-topline { padding: 10px; }
  .market-topline > div:first-child { display: none; }
  .market-top-actions { display: grid; flex-basis: auto; grid-template-columns: 1fr; gap: 8px; }
  .market-name-picker { min-width: 0; }
  .market-window { min-height: 38px; padding: 9px 10px; font-size: 11px; }
  .market-tabs { margin-top: 8px; }
  .market-tabs button { min-height: 34px; padding: 0 12px; font-size: 12px; }
  .market-page-heading { align-items: stretch; flex-direction: column; padding: 14px; }
  .market-page-heading h2 { font-size: 23px; }
  .collection-completion { width: 132px; min-height: 82px; flex-basis: auto; padding: 9px 11px; }
  .collection-completion strong { font-size: 22px; }
  .market-collection-grid { grid-template-columns: 1fr; }
  .market-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-stats > div { min-height: 76px; padding: 11px; }
  .market-summary-table th:first-child, .market-summary-table td:first-child { min-width: 112px; max-width: 112px; }
  .market-summary-table th:not(:first-child), .market-summary-table td:not(:first-child) { min-width: 44px; padding: 8px 3px; font-size: 10px; }
  .market-cell-detail { display: none; }
  .market-alert-item { align-items: flex-start; flex-direction: column; }
}

/* Competition-circle module — follows the approved two-panel collection template. */
.workspace-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  margin-right: 22px;
}

.workspace-nav a {
  padding: 9px 12px;
  border-radius: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 720;
  text-decoration: none;
}

.workspace-nav a[aria-current="page"] {
  color: var(--accent);
  background: #eaf1ee;
}

.market-shell { padding-top: 34px; }

.market-topline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 28px 32px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 42px rgba(30, 46, 40, 0.09);
  backdrop-filter: blur(18px);
}

.market-topline h1 {
  margin: 0;
  font-size: clamp(34px, 4.6vw, 56px);
  letter-spacing: -0.05em;
  line-height: 1;
}

.market-topline p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.market-top-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: flex-end;
  gap: 10px;
}

.market-hotel-picker {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.market-hotel-picker select,
.market-field input,
.market-field select,
.market-field textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font: inherit;
}

.market-hotel-picker select { min-width: 150px; }
.market-field textarea { min-height: 84px; padding-top: 10px; resize: vertical; }

.market-hotel-picker select:focus,
.market-field input:focus,
.market-field select:focus,
.market-field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(22, 63, 53, 0.1);
}

.market-window {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid #bfd2ca;
  border-radius: 10px;
  color: var(--accent);
  background: #edf6f2;
  font-size: 13px;
  font-weight: 750;
  white-space: nowrap;
}

.market-live {
  min-height: 21px;
  margin: 12px 2px 0;
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
}

.market-live.is-error { color: var(--danger); }

.market-tabs {
  display: flex;
  gap: 5px;
  margin: 0;
  padding: 5px;
  border: 1px solid rgba(215, 223, 219, 0.95);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 8px 24px rgba(35, 49, 44, 0.06);
}

.market-tabs button,
.market-segmented button {
  min-height: 40px;
  border: 0;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  padding: 0 18px;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.market-tabs button[aria-selected="true"],
.market-segmented button[aria-pressed="true"] {
  color: #fff;
  background: var(--accent);
}

.market-view { margin-top: 18px; }

.market-collection-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, .82fr);
  gap: 18px;
}

.market-panel { min-width: 0; margin-top: 0; padding: 22px; border-radius: 18px; }
.market-section-heading { margin-bottom: 18px; }
.market-section-heading h2 { font-size: 20px; }
.market-table-wrap { border-radius: 11px; }
.market-task-table { min-width: 540px; }
.market-task-table th,
.market-task-table td { padding: 12px 11px; }

.market-task-row.is-selected td { background: #edf6f2; }
.market-task-row.is-own-hotel td { background: #e9f6f1; }
.market-task-row.is-own-hotel td:first-child { box-shadow: inset 4px 0 0 var(--accent); }
.market-task-name { display: grid; gap: 3px; }
.market-task-name strong { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.market-task-name strong em {
  display: inline-flex; margin-left: 6px; padding: 2px 6px; border-radius: 999px;
  color: #fff; background: var(--accent); font-size: 9px; font-style: normal; vertical-align: middle;
}
.market-task-name small { color: var(--muted); font-size: 11px; }

.market-platforms {
  display: inline-flex;
  gap: 4px;
  color: var(--muted);
  font-size: 11px;
}

.market-status {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 28px;
  padding: 0 9px;
  border-radius: 999px;
  color: #8b5a19;
  background: #fff6dc;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.market-status.is-ready { color: #16623f; background: #e4f5eb; }
.market-status.is-error { color: var(--danger); background: #f8eeee; }

.own-price-collection {
  margin-bottom: 16px; padding: 12px 16px; border: 1px solid #bcdacf;
  border-radius: 14px; background: rgba(238,248,244,.92);
}

.market-platform-picker { display: block; min-width: 96px; }
.market-platform-picker select {
  width: 100%;
  min-height: 34px;
  padding: 0 28px 0 9px;
  border: 1px solid #ccd9d4;
  border-radius: 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, .96);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
}
.own-price-heading { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 10px; }
.own-price-heading > div { min-width: 0; display: flex; align-items: center; gap: 12px; }
.own-price-heading h2 { margin: 0; font-size: 17px; white-space: nowrap; }
.own-price-heading p { margin: 0; color: var(--muted); font-size: 11px; white-space: nowrap; }
.own-price-track {
  display: grid; grid-template-columns: repeat(15, minmax(72px, 1fr)); overflow-x: auto;
  border: 1px solid #d6dfdc; border-radius: 12px; background: #fff;
}
.own-price-day { min-width: 72px; padding: 9px 6px; border-right: 1px solid #e3e9e7; text-align: center; }
.own-price-day:last-child { border-right: 0; }
.own-price-day time { display: block; color: var(--muted); font-size: 10px; }
.own-price-day strong { display: block; margin-top: 5px; font-size: 16px; }
.own-price-day small { display: block; margin-top: 2px; color: #2a7560; font-size: 9px; }
.own-price-day.is-empty strong { color: #98a49f; font-size: 11px; }
.own-price-day.is-empty small { color: #98a49f; }
.batch-collection-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 18px;
  margin-bottom: 16px;
  padding: 14px 16px;
  border: 1px solid #bdd9cf;
  border-radius: 14px;
  background: rgba(255, 255, 255, .94);
  box-shadow: 0 8px 24px rgba(22, 63, 53, .06);
}
.batch-collection-copy { display: grid; gap: 3px; }
.batch-collection-copy strong { font-size: 16px; }
.batch-collection-copy span { color: var(--muted); font-size: 12px; }
.batch-collection-actions { display: flex; align-items: center; gap: 8px; }
.batch-results { display: grid; grid-column: 1 / -1; gap: 7px; }
.batch-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 11px;
  border-radius: 10px;
  background: #f3f6f5;
}
.batch-result span { display: grid; gap: 2px; }
.batch-result small { color: var(--muted); font-size: 10px; }
.batch-result.is-success { background: #e8f7ef; }
.batch-result.is-error { background: #fff0ee; }
.market-collection-cell { display: grid; min-width: 150px; align-items: start; gap: 7px; }
.market-collection-cell > .market-status { width: max-content; }
.market-row-actions { display: flex; align-items: center; justify-content: flex-start; gap: 6px; }
.batch-row-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
}
.batch-file-label { color: #fff; background: var(--accent); cursor: pointer; white-space: nowrap; }
.batch-file-label.is-disabled { opacity: .55; pointer-events: none; }
.market-status.is-selected { color: #155c92; background: #e7f2fb; }
.market-status.is-muted { color: var(--muted); background: #f0f3f1; }

.market-footnote {
  margin: 14px 2px 0;
  color: var(--muted);
  font-size: 12px;
}

.market-dropzone {
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 28px 18px;
  border: 1.5px dashed #82a397;
  border-radius: 14px;
  background: #f1f7f4;
  text-align: center;
}

.market-dropzone.is-disabled { filter: grayscale(.25); opacity: .66; }
.market-dropzone > span { color: var(--muted); font-size: 12px; line-height: 1.6; }
.market-dropzone input { max-width: 100%; color: var(--muted); font-size: 12px; }

.market-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.market-file-trigger { min-height: 44px; }
.market-file-trigger.is-disabled { opacity: .55; pointer-events: none; }

.capture-feedback {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px 12px;
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid #bed8cf;
  border-radius: 12px;
  background: #edf7f3;
}
.capture-feedback-icon { color: var(--accent); font-size: 15px; }
.capture-feedback strong,
.capture-feedback span { display: block; }
.capture-feedback strong { font-size: 13px; }
.capture-feedback div span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.capture-feedback-progress {
  grid-column: 1 / -1;
  height: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: #d9e7e2;
}
.capture-feedback-progress b { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--accent); transition: width .2s ease; }
.capture-feedback.is-success,
.capture-feedback.is-confirmed { border-color: #9ed6bd; background: #e7f7ee; }
.capture-feedback.is-error { border-color: #efb9b3; background: #fff0ee; }
.capture-feedback.is-error .capture-feedback-icon,
.capture-feedback.is-error strong { color: var(--danger); }
.market-capture-panel.is-busy { cursor: progress; }
.name-verification-banner {
  display: grid;
  gap: 3px;
  margin-top: 10px;
  padding: 11px 13px;
  border: 1px solid #efd397;
  border-radius: 10px;
  background: #fff8e8;
}
.name-verification-banner strong { color: #7a5400; font-size: 12px; }
.name-verification-banner span { color: #6d6250; font-size: 11px; line-height: 1.5; }

.market-toast {
  position: fixed;
  z-index: 20;
  right: 16px;
  bottom: max(16px, env(safe-area-inset-bottom));
  max-width: min(420px, calc(100% - 32px));
  padding: 12px 16px;
  border-radius: 12px;
  color: #fff;
  background: #176548;
  box-shadow: 0 12px 30px rgba(15, 35, 29, .24);
  font-size: 13px;
  font-weight: 750;
}
.market-toast.is-error { background: #a32c2c; }
.market-toast.is-warning { background: #966112; }

.dropzone-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: #dceae4;
}

.dropzone-icon svg { width: 24px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.market-inline-actions { display: flex; gap: 8px; }
.market-inline-actions .primary-button,
.market-inline-actions .secondary-button { min-height: 40px; border-radius: 10px; padding: 0 15px; }

.market-empty-state {
  margin-top: 14px;
  padding: 26px 12px;
  color: var(--muted);
  background: #fafcfb;
  border-radius: 12px;
  text-align: center;
  font-size: 13px;
  line-height: 1.7;
}

.recognition-editor { margin-top: 18px; }
.recognition-meta-grid,
.market-settings-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.market-field { display: grid; gap: 6px; }
.market-field > span,
.market-checkbox-group legend { color: var(--muted); font-size: 12px; font-weight: 680; }
.market-wide { grid-column: 1 / -1; }

.freshness-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
  padding: 11px 12px;
  border-radius: 10px;
  color: #76541b;
  background: #fff6dc;
  font-size: 12px;
}

.freshness-banner.is-current { color: #16623f; background: #e4f5eb; }
.freshness-banner.is-stale { color: var(--danger); background: #f8eeee; }
.recognition-table { min-width: 650px; }
.recognition-table th,
.recognition-table td { padding: 9px; }
.recognition-table input,
.recognition-table select { min-height: 36px; border: 1px solid var(--line); border-radius: 8px; padding: 0 8px; background: #fff; }
.recognition-table input[type="date"] { min-width: 145px; }
.recognition-table input[type="number"] { width: 105px; }

.market-editor-actions,
.market-form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.market-spacer { flex: 1; }

.market-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.market-segmented {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.market-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.market-stats > div {
  padding: 18px 20px;
  border: 1px solid rgba(215, 223, 219, 0.95);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 24px rgba(35, 49, 44, 0.06);
}

.market-stats span { display: block; color: var(--muted); font-size: 12px; }
.market-stats strong { display: block; margin-top: 4px; font-size: 24px; }
.market-legend { display: flex; flex-wrap: wrap; gap: 9px; color: var(--muted); font-size: 11px; }
.market-legend span { padding: 4px 7px; border-radius: 7px; background: #f2f5f3; }
.market-legend .legend-own { color: #16623f; background: #e4f5eb; }
.market-legend .legend-low { color: #8d2f2f; background: #fbe9e8; }

.market-summary-table { min-width: max(900px, 100%); table-layout: auto; }
.market-summary-table th,
.market-summary-table td { padding: 11px 10px; font-size: 12px; text-align: center; }
.market-summary-table th:first-child,
.market-summary-table td:first-child { position: sticky; left: 0; z-index: 2; min-width: 210px; text-align: left; }
.market-summary-table th:first-child { z-index: 3; background: #f5f7f6; }
.market-summary-table td:first-child { background: #fff; }
.market-summary-table tr.is-own td { background: #eaf6ef; }
.market-summary-table tr.is-own td:first-child { background: #eaf6ef; }
.market-summary-table td.is-low { background: #fbe9e8; color: #8d2f2f; }
.market-summary-table td.is-high { background: #edf7f1; color: #16623f; }
.market-cell-main { display: block; font-weight: 780; }
.market-cell-detail { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; }

.market-settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.market-special-panel { grid-column: 1 / -1; }
.market-checkbox-group { margin: 0; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; }
.market-checkbox-group label,
.market-toggle { display: inline-flex; align-items: center; gap: 6px; margin-right: 12px; font-size: 12px; }
.market-checkbox-group input,
.market-toggle input { width: 16px; height: 16px; accent-color: var(--accent); }
.month-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-top: 8px; }
.month-grid label { margin: 0; }
.market-form-actions { justify-content: flex-end; align-self: end; }
.market-admin-list { display: grid; gap: 8px; margin-top: 18px; }
.market-admin-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 11px; background: #fafcfb; }
.market-admin-row strong { display: block; font-size: 13px; }
.market-admin-row small { display: block; margin-top: 3px; color: var(--muted); }
.market-admin-actions { display: flex; gap: 5px; }

@media (max-width: 900px) {
  .market-topline { align-items: flex-start; flex-direction: column; }
  .market-top-actions { width: 100%; justify-content: space-between; }
  .market-settings-grid { grid-template-columns: 1fr; }
  .market-special-panel { grid-column: auto; }
  .month-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .workspace-nav { order: 3; width: 100%; margin: 0; justify-content: center; }
  .workspace-header { flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }
  .market-shell { padding-top: 18px; }
  .market-topline { padding: 23px 19px; }
  .market-topline h1 { font-size: 38px; }
  .market-top-actions { align-items: stretch; flex-direction: column; }
  .market-hotel-picker select { width: 100%; }
  .market-window { white-space: normal; }
  .market-tabs { overflow-x: auto; }
  .market-tabs button { flex: 1 0 auto; }
  .market-collection-grid { grid-template-columns: minmax(0, 1fr); }
  .own-price-collection { padding: 11px 12px; }
  .own-price-heading > div { display: block; }
  .own-price-heading p { display: none; }
  .own-price-track { grid-template-columns: repeat(15, 72px); }
  .batch-collection-bar { grid-template-columns: 1fr; padding: 12px; }
  .batch-collection-actions { display: grid; grid-template-columns: .7fr 1.3fr; }
  .batch-collection-actions button { width: 100%; }
  .batch-results { grid-column: 1; }
  .market-task-table { min-width: 0; table-layout: fixed; }
  .market-task-table th,
  .market-task-table td { padding: 10px 6px; }
  .market-task-table th:nth-child(1) { width: 40%; }
  .market-task-table th:nth-child(2) { width: 24%; }
  .market-task-table th:nth-child(3) { width: 36%; }
  .market-task-name strong { display: block; max-width: 100%; }
  .market-platforms { font-size: 11px; white-space: normal; }
  .market-platform-picker { min-width: 0; }
  .market-platform-picker select { min-height: 38px; padding-right: 20px; padding-left: 6px; font-size: 11px; }
  .market-collection-cell { min-width: 0; }
  .market-row-actions { align-items: stretch; flex-direction: column; }
  .market-row-actions .table-action { min-height: 34px; margin-right: 0; padding: 0 6px; text-align: center; }
  .market-panel { padding: 18px 15px; }
  .market-table-wrap { margin-right: -15px; margin-left: -15px; }
  .market-summary-bar { align-items: stretch; flex-direction: column; }
  .market-summary-bar .primary-button { width: 100%; }
  .market-stats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    padding: 7px 3px;
    border: 1px solid rgba(215, 223, 219, 0.95);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 8px 24px rgba(35, 49, 44, 0.06);
  }
  .market-stats > div {
    min-width: 0;
    min-height: 58px;
    padding: 8px 3px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    text-align: center;
  }
  .market-stats > div + div { border-left: 1px solid var(--line); }
  .market-stats span { overflow: hidden; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
  .market-stats strong { margin-top: 5px; font-size: 15px; white-space: nowrap; }
  .market-cell-detail { display: block; margin-top: 1px; font-size: 8px; white-space: nowrap; }
  .recognition-meta-grid,
  .market-settings-form { grid-template-columns: 1fr; }
  .market-wide { grid-column: auto; }
  .market-editor-actions { flex-wrap: wrap; }
  .market-spacer { display: none; }
  .market-editor-actions .primary-button,
  .market-editor-actions .secondary-button { flex: 1; }
  .month-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .market-admin-row { align-items: flex-start; flex-direction: column; }
  .workspace-page {
    background-color: #edf2f1;
    background-image: linear-gradient(180deg, #dfe9e7 0, #edf2f1 240px, #edf2f1 100%);
    background-attachment: scroll;
  }
  .workspace-header,
  .market-topline,
  .market-tabs,
  .market-page-heading { backdrop-filter: none; }
  .market-dropzone { padding: 18px 12px; }
  .market-file-trigger { width: 100%; }
  .market-inline-actions { display: none; }
  .capture-feedback { position: sticky; bottom: 8px; z-index: 5; }
  .market-toast { right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); max-width: calc(100% - 16px); }
}
