:root {
  --forest-950: #141d1a;
  --forest-900: #1e2f2a;
  --forest-800: #26403a;
  --forest-700: #2f4f47;
  --forest-600: #3d6b5e;
  --forest-100: #e6eeeb;
  --forest-50: #f2f6f4;
  --bg: #f4f4f2;
  --surface: #ffffff;
  --surface-alt: #ededea;
  --border: #e4e4e0;
  --ink: #1a1f1d;
  --ink-2: #5f6763;
  --ink-3: #8e9592;
  --st-available: #1f7a52;
  --st-available-bg: #e3f2ea;
  --st-soon: #8a5a06;
  --st-soon-bg: #fbf0dc;
  --st-rented: #5f6763;
  --st-rented-bg: #ededea;
  --st-stale: #b4461a;
  --st-stale-bg: #fbe8df;
  --st-error: #b42318;
  --st-error-bg: #fde7e5;
  --st-info: #2f5f8a;
  --st-info-bg: #e4eef7;
  --grad-primary: linear-gradient(135deg, #2f4f47 0%, #141d1a 100%);
  --overlay-photo: linear-gradient(180deg, rgba(20, 29, 26, 0) 38%, rgba(20, 29, 26, 0.88) 100%);
  --glass-bg: rgba(20, 29, 26, 0.72);
  --glass-border: rgba(255, 255, 255, 0.62);
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(20, 29, 26, 0.04), 0 4px 12px rgba(20, 29, 26, 0.05);
  --sh-2: 0 8px 28px rgba(20, 29, 26, 0.1);
  --sh-3: 0 16px 48px rgba(20, 29, 26, 0.16);
  --font: "Be Vietnam Pro", -apple-system, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --dur-base: 200ms;
  --sidebar-w: 264px;
  --panel-w: 480px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(61, 107, 94, 0.08), transparent 34vw),
    linear-gradient(180deg, #f8f8f5 0%, var(--bg) 42%, #efefea 100%);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

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

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  box-shadow: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--forest-600);
  outline-offset: 2px;
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) minmax(0, 1fr) var(--panel-w);
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin: 16px 0 16px 16px;
  padding: 20px 14px;
  border: 1px solid rgba(228, 228, 224, 0.7);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 20px 60px rgba(20, 29, 26, 0.06);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--forest-900);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid rgba(61, 107, 94, 0.3);
  border-radius: 14px;
  background: linear-gradient(145deg, #ffffff 0%, #e9f0ec 100%);
  color: var(--forest-700);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), var(--sh-1);
}

.new-chat,
.primary-button,
.secondary-button,
.soft-button {
  min-height: 44px;
  border: 0;
  border-radius: var(--r-pill);
  transition: transform var(--dur-base) var(--ease-out), background var(--dur-base) var(--ease-out);
}

.new-chat,
.primary-button {
  padding: 0 20px;
  background: var(--grad-primary);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(30, 47, 42, 0.22);
}

.new-chat:active,
.primary-button:active,
.secondary-button:active,
.soft-button:active,
.icon-button:active {
  transform: scale(0.98);
}

.secondary-button,
.soft-button {
  padding: 0 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--ink);
  font-weight: 500;
}

.soft-button {
  background: transparent;
  border-color: transparent;
  color: var(--forest-700);
}

.nav-list,
.recent {
  display: grid;
  gap: 8px;
}

.nav-item,
.recent button {
  min-height: 44px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: #68736e;
  text-align: left;
  padding: 0 16px;
}

.nav-item.active,
.recent button:hover {
  background: rgba(230, 238, 235, 0.86);
  color: var(--forest-900);
  font-weight: 600;
}

.recent {
  margin-top: auto;
}

.recent p,
.eyebrow {
  margin: 0;
  color: var(--forest-600);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.recent button {
  color: var(--ink-2);
  font-size: 13px;
}

.profile-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border-radius: var(--r-lg);
  background: rgba(255, 255, 255, 0.78);
  box-shadow: var(--sh-1);
}

.profile-pill strong,
.profile-pill span {
  display: block;
}

.profile-pill strong {
  font-size: 14px;
}

.profile-pill span {
  color: var(--ink-2);
  font-size: 12px;
}

.avatar {
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border-radius: 50%;
  background: var(--forest-100);
  color: var(--forest-800);
  font-weight: 700;
}

.main {
  position: relative;
  min-width: 0;
  padding: 22px clamp(20px, 3vw, 40px) 128px;
  overflow: hidden;
}

.mobile-topbar {
  display: none;
}

.sidebar-close {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font-size: 18px;
}

.view {
  display: none;
  max-width: 880px;
  margin: 0 auto;
}

.view.active {
  display: block;
}

.chat-wrap {
  max-width: 760px;
  margin: 0 auto;
}

.hero-prompt {
  position: relative;
  padding: 28px 0 20px;
  text-align: center;
}

.hero-prompt::before {
  position: absolute;
  top: 0;
  left: 50%;
  width: min(620px, 84vw);
  height: 170px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(230, 238, 235, 0.95) 0%, rgba(230, 238, 235, 0) 68%);
  content: "";
  pointer-events: none;
  z-index: -1;
}

.hero-prompt h1 {
  margin: 10px 0 12px;
  color: var(--forest-700);
  font-size: clamp(30px, 3.4vw, 42px);
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.hero-prompt p:last-child {
  max-width: 620px;
  margin: 0 auto;
  color: var(--ink-2);
}

.quick-prompts,
.chip-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.featured-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.visual-card {
  position: relative;
  min-height: 156px;
  overflow: hidden;
  border: 0;
  border-radius: 26px;
  background: var(--forest-50);
  color: #fff;
  text-align: left;
  box-shadow: 0 16px 44px rgba(20, 29, 26, 0.14);
}

.visual-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 320ms var(--ease-out);
}

.visual-card::after {
  position: absolute;
  inset: 0;
  background: var(--overlay-photo);
  content: "";
}

.visual-card:hover img {
  transform: scale(1.04);
}

.visual-card span,
.visual-card strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-left: 14px;
}

.visual-card span {
  width: fit-content;
  margin-top: 14px;
  padding: 5px 10px;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-pill);
  background: var(--glass-bg);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(16px);
}

.visual-card strong {
  position: absolute;
  right: 14px;
  bottom: 14px;
  left: 14px;
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.today-card {
  min-height: 104px;
  padding: 14px;
  border: 1px solid rgba(228, 228, 224, 0.78);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.78)),
    var(--surface);
  box-shadow: 0 14px 40px rgba(20, 29, 26, 0.07);
}

.today-card.primary {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    var(--grad-primary);
  box-shadow: 0 22px 54px rgba(20, 29, 26, 0.2);
}

.today-card span {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--forest-50);
  color: var(--forest-700);
  font-size: 12px;
  font-weight: 700;
}

.today-card.primary span {
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
}

.today-card strong {
  display: block;
  margin-top: 8px;
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.today-card p {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 14px;
}

.today-card.primary p {
  color: rgba(255, 255, 255, 0.78);
}

.light-button {
  min-height: 44px;
  margin-top: 10px;
  padding: 0 15px;
  border: 0;
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--forest-900);
  font-weight: 700;
}

.quick-prompts button,
.chip {
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(20, 29, 26, 0.04);
  backdrop-filter: blur(12px);
}

.chip.active {
  background: var(--forest-900);
  border-color: var(--forest-900);
  color: #fff;
}

.conversation {
  display: grid;
  gap: 22px;
  margin-top: 20px;
}

.ai-message {
  color: var(--ink);
}

.user-message {
  justify-self: end;
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 20px 20px 6px 20px;
  background: var(--forest-100);
}

.ai-thinking {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  font-size: 14px;
}

.dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--forest-600);
  animation: pulse 1s infinite ease-in-out;
}

.dot:nth-child(2) {
  animation-delay: 150ms;
}

.dot:nth-child(3) {
  animation-delay: 300ms;
}

.task-card,
.confirm-card,
.post-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 20px;
  border: 1px solid rgba(228, 228, 224, 0.78);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 38px rgba(20, 29, 26, 0.07);
  backdrop-filter: blur(14px);
}

.post-thumb {
  width: 86px;
  height: 70px;
  object-fit: cover;
  border-radius: 16px;
}

.task-card span,
.confirm-card span {
  display: block;
  margin-top: 4px;
  color: var(--ink-2);
  font-size: 13px;
}

.state-card {
  display: grid;
  grid-column: 1 / -1;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: var(--sh-1);
}

.state-card strong {
  color: var(--forest-900);
  font-size: 17px;
  line-height: 1.35;
}

.state-card p {
  margin: 0;
  color: var(--ink-2);
  font-size: 15px;
}

.state-card button {
  width: fit-content;
  min-height: 44px;
  margin-top: 4px;
}

.state-card.is-error {
  border-color: var(--st-error);
  background: var(--st-error-bg);
}

.state-card.is-error strong {
  color: var(--st-error);
}

@media (max-width: 767px) {
  .state-card button {
    width: 100%;
  }
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 920px;
  margin-bottom: 18px;
}

.page-head h2 {
  margin: 4px 0 0;
  color: var(--forest-700);
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.smart-search-panel {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid rgba(228, 228, 224, 0.76);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(230, 238, 235, 0.94), rgba(255, 255, 255, 0.82)),
    var(--surface);
  box-shadow: 0 18px 48px rgba(20, 29, 26, 0.08);
}

.smart-search-copy span,
.match-card span {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--forest-700);
  font-size: 12px;
  font-weight: 700;
}

.smart-search-copy strong {
  display: block;
  margin-top: 5px;
  color: var(--forest-900);
  font-size: 19px;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

.smart-search-box {
  display: flex;
  min-height: 52px;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 8px 16px;
  border: 1px solid rgba(61, 107, 94, 0.18);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--sh-1);
}

.smart-search-box input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.intent-chip-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.intent-chip-row button {
  min-height: 44px;
  flex: 0 0 auto;
  padding: 0 13px;
  border: 1px solid rgba(61, 107, 94, 0.14);
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, 0.72);
  color: var(--forest-800);
  font-weight: 600;
}

.search-row {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.filter-button {
  min-width: 104px;
}

.search-box {
  display: flex;
  min-height: 48px;
  flex: 1;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(228, 228, 224, 0.7);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--sh-1);
  backdrop-filter: blur(14px);
  color: var(--ink-2);
}

.search-box input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
}

.filter-summary {
  min-height: 32px;
  margin: 0 0 8px;
  color: var(--ink-2);
  font-size: 13px;
}

.match-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) repeat(2, minmax(0, 0.9fr));
  gap: 12px;
  margin-top: 10px;
}

.match-card {
  min-height: 132px;
  padding: 16px;
  border: 1px solid rgba(228, 228, 224, 0.76);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 32px rgba(20, 29, 26, 0.06);
}

.match-card:first-child {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--grad-primary);
}

.match-card:first-child span {
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.86);
}

.match-card strong {
  display: block;
  margin-top: 12px;
  font-size: 18px;
  line-height: 1.25;
}

.match-card p {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 13px;
}

.match-card:first-child p {
  color: rgba(255, 255, 255, 0.78);
}

.match-card .secondary-button {
  margin-top: 12px;
  background: #fff;
}

.icon-button,
.composer-icon,
.send-button,
.modal-close {
  display: grid;
  width: 44px;
  min-width: 44px;
  height: 44px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  box-shadow: var(--sh-2);
}

.listing-list {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.listing-list.large {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.listing-row {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  min-height: 108px;
  padding: 12px 14px 12px 12px;
  border: 1px solid rgba(228, 228, 224, 0.72);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 10px 30px rgba(20, 29, 26, 0.06);
  backdrop-filter: blur(14px);
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out), border-color 200ms var(--ease-out);
}

.listing-row:hover {
  transform: translateY(-2px);
  border-color: rgba(61, 107, 94, 0.22);
  box-shadow: 0 18px 44px rgba(20, 29, 26, 0.1);
}

.listing-photo {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: var(--forest-50);
  aspect-ratio: 1;
}

.listing-photo.large {
  aspect-ratio: 4 / 3;
  border-radius: var(--r-lg);
}

.listing-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listing-card-large {
  overflow: hidden;
  border-radius: 26px;
  cursor: pointer;
}

.large-photo-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  box-shadow: 0 16px 44px rgba(20, 29, 26, 0.12);
}

.large-photo-wrap img {
  transition: transform 320ms var(--ease-out);
}

.listing-card-large:hover .large-photo-wrap img {
  transform: scale(1.04);
}

.photo-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 12px;
  background: var(--overlay-photo);
}

.photo-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.trust-pill {
  min-height: 24px;
  padding: 4px 9px;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-pill);
  background: var(--glass-bg);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  backdrop-filter: blur(16px);
}

.photo-bottom {
  color: #fff;
}

.photo-bottom strong {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 17px;
}

.photo-bottom span {
  color: rgba(255, 255, 255, 0.86);
  font-size: 13px;
}

.card-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 4px 0;
}

.card-action-row .soft-button {
  min-height: 34px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.72);
}

.disabled-reason {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--surface-alt);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 700;
}

.listing-info {
  min-width: 0;
}

.listing-title {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  margin: 0 0 4px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.listing-title span {
  color: var(--ink-2);
  font-weight: 500;
}

.listing-meta,
.trust-line,
.detail-meta {
  color: var(--ink-2);
  font-size: 13px;
}

.trust-line.stale {
  color: var(--st-stale);
}

.price {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  white-space: nowrap;
  color: var(--forest-900);
}

.listing-side {
  display: grid;
  justify-items: end;
  gap: 10px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  min-height: 24px;
  padding: 0 9px;
  border-radius: var(--r-sm);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.status-badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.status-available {
  background: var(--st-available-bg);
  color: var(--st-available);
}

.status-soon {
  background: var(--st-soon-bg);
  color: var(--st-soon);
}

.status-rented {
  background: var(--st-rented-bg);
  color: var(--st-rented);
}

.status-stale,
.status-expired,
.status-paused {
  background: var(--st-stale-bg);
  color: var(--st-stale);
}

.detail-panel {
  min-width: 0;
  border-left: 1px solid rgba(228, 228, 224, 0.7);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: -18px 0 60px rgba(20, 29, 26, 0.08);
  overflow-y: auto;
  backdrop-filter: blur(18px);
}

.empty-detail {
  padding: 36px;
}

.empty-detail h2 {
  margin: 6px 0;
  color: var(--forest-700);
}

.detail-hero {
  position: relative;
  min-height: 430px;
  overflow: hidden;
  color: #fff;
}

.detail-hero img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.detail-hero::after {
  position: absolute;
  inset: 0;
  background: var(--overlay-photo);
  content: "";
}

.detail-hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 430px;
  flex-direction: column;
  justify-content: flex-end;
  padding: 28px;
}

.detail-hero h2 {
  margin: 12px 0 6px;
  font-size: 34px;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.glass-actions {
  position: absolute;
  z-index: 2;
  top: 18px;
  right: 18px;
  display: flex;
  gap: 10px;
}

.detail-back {
  position: absolute;
  z-index: 2;
  top: 18px;
  left: 18px;
}

.glass-button,
.glass-label {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-pill);
  background: var(--glass-bg);
  color: #fff;
  text-shadow: 0 1px 2px rgba(20, 29, 26, 0.68);
  backdrop-filter: blur(16px) saturate(140%);
}

.glass-button {
  width: 44px;
  height: 44px;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(20, 29, 26, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.glass-label {
  width: fit-content;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
}

.detail-body {
  display: grid;
  gap: 18px;
  padding: 24px 24px 34px;
}

.info-block {
  padding: 20px;
  border: 1px solid rgba(228, 228, 224, 0.76);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: var(--sh-1);
}

.info-block h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.info-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.info-list div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--ink-2);
}

.info-list strong {
  color: var(--ink);
  font-weight: 600;
}

.workflow-grid,
.client-grid,
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.workflow-card,
.client-card,
.admin-card {
  padding: 22px;
  border: 1px solid rgba(228, 228, 224, 0.76);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 14px 38px rgba(20, 29, 26, 0.07);
  backdrop-filter: blur(14px);
}

.admin-card.featured {
  grid-column: span 2;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.2);
  background: var(--grad-primary);
  box-shadow: 0 22px 54px rgba(20, 29, 26, 0.18);
}

.workflow-card span {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 50%;
  background: var(--forest-100);
  color: var(--forest-800);
  font-weight: 700;
}

.admin-card span,
.parsed-card span {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--forest-50);
  color: var(--forest-700);
  font-size: 12px;
  font-weight: 700;
}

.admin-card.featured span {
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.84);
}

.workflow-card strong,
.client-card strong,
.admin-card strong {
  display: block;
  margin-top: 14px;
}

.workflow-card p,
.client-card p,
.admin-card p {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 14px;
}

.admin-card.featured p {
  color: rgba(255, 255, 255, 0.78);
}

.share-demo {
  margin-top: 18px;
}

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 16px;
}

.service-grid,
.ops-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px;
}

.service-card {
  overflow: hidden;
  border: 1px solid rgba(228, 228, 224, 0.76);
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 38px rgba(20, 29, 26, 0.07);
}

.service-cover {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  color: #fff;
}

.service-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 360ms var(--ease-out);
}

.service-cover::after {
  position: absolute;
  inset: 0;
  background: var(--overlay-photo);
  content: "";
}

.service-card:hover .service-cover img {
  transform: scale(1.04);
}

.service-cover span,
.service-cover strong {
  position: relative;
  z-index: 1;
}

.service-cover span {
  display: inline-flex;
  width: fit-content;
  min-height: 28px;
  align-items: center;
  margin: 14px 0 0 14px;
  padding: 0 10px;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-pill);
  background: var(--glass-bg);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(16px);
}

.service-cover strong {
  position: absolute;
  right: 16px;
  bottom: 16px;
  left: 16px;
  display: block;
  font-size: 20px;
  line-height: 1.25;
}

.service-body {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.service-body p {
  margin: 0;
  color: var(--ink-2);
  font-size: 13px;
}

.service-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.service-meta span {
  min-height: 28px;
  padding: 5px 10px;
  border-radius: var(--r-pill);
  background: var(--forest-50);
  color: var(--forest-700);
  font-size: 12px;
  font-weight: 700;
}

.ops-card {
  padding: 20px;
  border: 1px solid rgba(228, 228, 224, 0.76);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
  box-shadow: 0 14px 38px rgba(20, 29, 26, 0.07);
}

.ops-card.featured {
  grid-column: span 2;
  color: #fff;
  background: var(--grad-primary);
}

.ops-card span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border-radius: var(--r-pill);
  background: var(--forest-50);
  color: var(--forest-700);
  font-size: 12px;
  font-weight: 700;
}

.ops-card.featured span {
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.84);
}

.ops-card strong {
  display: block;
  margin-top: 14px;
  font-size: 24px;
  line-height: 1.2;
}

.ops-card p {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 14px;
}

.ops-card.featured p {
  color: rgba(255, 255, 255, 0.78);
}

.timeline-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.timeline-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
  color: var(--ink-2);
  font-size: 13px;
}

.timeline-item strong {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.reel-card {
  display: grid;
  gap: 12px;
}

.reel-frame {
  position: relative;
  overflow: hidden;
  aspect-ratio: 9 / 16;
  border: 0;
  border-radius: 28px;
  background: var(--forest-50);
  color: #fff;
  text-align: left;
  box-shadow: 0 18px 48px rgba(20, 29, 26, 0.16);
}

.reel-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 420ms var(--ease-out);
}

.reel-frame::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 29, 26, 0.18) 0%, rgba(20, 29, 26, 0.05) 42%, rgba(20, 29, 26, 0.9) 100%);
  content: "";
}

.reel-frame:hover img {
  transform: scale(1.05);
}

.reel-play {
  position: absolute;
  z-index: 1;
  top: 14px;
  right: 14px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
}

.reel-caption {
  position: absolute;
  z-index: 1;
  right: 16px;
  bottom: 16px;
  left: 16px;
}

.reel-caption span {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--glass-border);
  border-radius: var(--r-pill);
  background: var(--glass-bg);
  font-size: 12px;
  font-weight: 700;
  backdrop-filter: blur(16px);
}

.reel-caption strong {
  display: block;
  margin-top: 10px;
  font-size: 20px;
  line-height: 1.22;
}

.reel-card footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--ink-2);
  font-size: 13px;
}

.video-script {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.script-step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border-radius: 18px;
  background: var(--forest-50);
}

.script-step span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: var(--forest-900);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.script-step strong {
  display: block;
  color: var(--forest-900);
}

.script-step p {
  margin: 2px 0 0;
  color: var(--ink-2);
  font-size: 13px;
}

.composer {
  position: fixed;
  z-index: 20;
  right: calc(var(--panel-w) + 48px);
  bottom: 24px;
  left: calc(var(--sidebar-w) + 48px);
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 760px;
  margin: 0 auto;
  padding: 9px;
  border-radius: var(--r-xl);
  border: 1px solid rgba(228, 228, 224, 0.76);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 54px rgba(20, 29, 26, 0.14);
  backdrop-filter: blur(20px);
}

.composer textarea {
  min-height: 36px;
  max-height: 160px;
  flex: 1;
  resize: none;
  border: 0;
  outline: 0;
  padding: 8px 0;
  background: transparent;
  color: var(--ink);
}

.composer-icon,
.send-button {
  box-shadow: none;
}

.send-button {
  background: var(--forest-900);
  color: #fff;
}

.bottom-nav {
  display: none;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 29, 26, 0.4);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal {
  position: relative;
  width: min(640px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow-y: auto;
  border-radius: var(--r-xl);
  border: 1px solid rgba(228, 228, 224, 0.76);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--sh-3);
  padding: 30px;
}

.modal-close {
  position: sticky;
  top: 0;
  right: 0;
  z-index: 2;
  float: right;
  margin: -16px -16px 8px 12px;
}

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

.field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.field[hidden] {
  display: none;
}

.field label {
  color: var(--ink-2);
  font-size: 13px;
}

.field.wide,
.parsed-card,
.custom-fields,
.modal-note {
  grid-column: 1 / -1;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0 14px;
  background: var(--surface);
  color: var(--ink);
}

.field select {
  appearance: none;
  overflow: hidden;
  padding-right: 34px;
  text-overflow: ellipsis;
  white-space: nowrap;
  background:
    linear-gradient(45deg, transparent 50%, var(--ink-2) 50%) calc(100% - 18px) 54% / 6px 6px no-repeat,
    linear-gradient(135deg, var(--ink-2) 50%, transparent 50%) calc(100% - 13px) 54% / 6px 6px no-repeat,
    var(--surface);
}

.field textarea {
  min-height: 88px;
  padding: 12px 14px;
  resize: vertical;
}

.parsed-card {
  padding: 16px;
  border: 1px solid rgba(61, 107, 94, 0.14);
  border-radius: 20px;
  background: linear-gradient(180deg, var(--forest-50), #fff);
}

.parsed-card strong {
  display: block;
  margin-top: 10px;
  color: var(--forest-900);
}

.parsed-card p,
.modal-note {
  margin: 8px 0 0;
  color: var(--ink-2);
  font-size: 14px;
}

.custom-fields {
  display: grid;
  gap: 10px;
}

.custom-field-row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr) auto;
  gap: 8px;
}

.custom-field-row input {
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 0 12px;
}

.mini-stat-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.mini-stat {
  padding: 12px;
  border-radius: 18px;
  background: var(--forest-50);
}

.mini-stat strong {
  display: block;
  color: var(--forest-900);
  font-size: 18px;
}

.mini-stat span {
  color: var(--ink-2);
  font-size: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.modal-warning {
  margin: 12px 0;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--st-stale-bg);
  color: var(--st-stale);
  font-weight: 600;
}

.toast {
  position: fixed;
  z-index: 110;
  bottom: 24px;
  left: 24px;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: var(--r-pill);
  background: var(--forest-950);
  color: #fff;
  box-shadow: var(--sh-3);
}

.toast button {
  min-height: 30px;
  margin-left: 10px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--forest-900);
  font-weight: 700;
}

.modal-backdrop:not([hidden]) ~ .toast {
  top: calc(16px + env(safe-area-inset-top));
  right: calc(100px + env(safe-area-inset-right, 0px));
  bottom: auto;
  max-width: calc(100vw - 124px);
}

.toast[hidden] {
  display: none;
}

.post-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.post-preview-card {
  position: relative;
  overflow: hidden;
  min-height: 280px;
  margin: 16px 0;
  border-radius: 26px;
  color: #fff;
  box-shadow: 0 18px 48px rgba(20, 29, 26, 0.16);
}

.post-preview-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-preview-card::after {
  position: absolute;
  inset: 0;
  background: var(--overlay-photo);
  content: "";
}

.post-preview-card > div {
  position: absolute;
  z-index: 1;
  right: 18px;
  bottom: 18px;
  left: 18px;
  display: grid;
  gap: 8px;
}

.post-preview-card strong,
.post-preview-card span {
  display: block;
}

.post-preview-card strong {
  font-size: 22px;
  line-height: 1.25;
}

.post-preview-card span {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.post-tabs button {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  background: var(--surface);
}

.post-tabs button.active {
  background: var(--forest-900);
  color: #fff;
}

.post-output {
  white-space: pre-wrap;
  padding: 14px;
  border-radius: var(--r-md);
  background: linear-gradient(180deg, var(--forest-50), #fff);
  color: var(--ink);
}

@keyframes pulse {
  0%,
  80%,
  100% {
    opacity: 0.3;
    transform: scale(0.7);
  }

  40% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (max-width: 1199px) {
  .app-shell {
    grid-template-columns: var(--sidebar-w) minmax(0, 1fr);
  }

  .detail-panel {
    position: fixed;
    z-index: 50;
    top: 0;
    right: 0;
    width: min(480px, 92vw);
    height: 100vh;
    transform: translateX(100%);
    transition: transform 320ms var(--ease-out);
  }

  .detail-panel.open {
    transform: translateX(0);
  }

  .composer {
    right: 24px;
    left: calc(var(--sidebar-w) + 48px);
  }

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

@media (max-width: 767px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    z-index: 60;
    top: 0;
    left: 0;
    width: min(320px, 86vw);
    height: 100vh;
    margin: 0;
    border-radius: 0;
    transform: translateX(-105%);
    transition: transform 320ms var(--ease-out);
    overflow-y: auto;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay {
    position: fixed;
    z-index: 55;
    inset: 0;
    background: rgba(20, 29, 26, 0.4);
  }

  .sidebar-overlay[hidden] {
    display: none;
  }

  .sidebar-close {
    display: grid;
    margin-left: auto;
  }

  .main {
    min-height: 100vh;
    padding: 62px 16px calc(24px + var(--composer-h) + env(safe-area-inset-bottom));
    overflow: visible;
  }

  .mobile-topbar {
    position: fixed;
    z-index: 30;
    top: 0;
    right: 0;
    left: 0;
    display: flex;
    height: 56px;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    background: rgba(244, 244, 242, 0.84);
    backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid var(--border);
  }

  .hero-prompt {
    padding: 12px 0 14px;
    text-align: left;
  }

  .hero-prompt::before {
    top: -18px;
    left: 12px;
    width: 260px;
    height: 190px;
    transform: none;
  }

  .hero-prompt h1 {
    max-width: 350px;
    margin: 6px 0 8px;
    font-size: 26px;
    line-height: 1.15;
  }

  .hero-prompt p:last-child {
    margin: 0;
    font-size: 15px;
    line-height: 1.5;
  }

  .quick-prompts {
    margin-right: -16px;
    padding-right: 16px;
  }

  .featured-strip {
    display: flex;
    gap: 10px;
    margin: 12px -16px 0 0;
    overflow-x: auto;
    padding-right: 16px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .visual-card {
    min-width: 210px;
    min-height: 132px;
    border-radius: 16px;
    scroll-snap-align: start;
  }

  .today-grid {
    display: flex;
    gap: 10px;
    margin: 10px -16px 0 0;
    overflow-x: auto;
    padding: 0 16px 4px 0;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .today-card {
    min-width: 200px;
    min-height: 104px;
    border-radius: 16px;
    scroll-snap-align: start;
  }

  .today-card.primary {
    min-width: 220px;
  }

  .page-head {
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 12px;
  }

  .page-head h2 {
    font-size: 22px;
  }

  .page-head .primary-button {
    flex: 0 0 auto;
    padding: 0 14px;
    white-space: nowrap;
  }

  .smart-search-panel {
    margin-right: -4px;
    margin-left: -4px;
    gap: 6px;
    margin-bottom: 8px;
    padding: 9px;
    border-radius: 16px;
  }

  .smart-search-copy span {
    min-height: 24px;
    padding: 0 8px;
  }

  .smart-search-copy strong {
    margin-top: 2px;
    font-size: 15px;
  }

  .smart-search-box {
    min-height: 44px;
    gap: 8px;
    padding: 4px 4px 4px 12px;
    border-radius: 26px;
  }

  .smart-search-box .primary-button {
    min-height: 40px;
    padding: 0 14px;
  }

  .intent-chip-row {
    margin-right: -14px;
    gap: 6px;
    padding-right: 14px;
  }

  .intent-chip-row button {
    min-height: 36px;
    padding: 0 11px;
  }

  .quick-prompts button,
  .chip,
  .intent-chip-row button {
    min-width: max-content;
    white-space: nowrap;
  }

  input,
  textarea,
  select {
    font-size: 16px;
  }

  .search-row {
    gap: 8px;
  }

  .search-box {
    min-width: 0;
    min-height: 44px;
    padding: 0 12px;
  }

  .filter-button {
    min-width: 76px;
    min-height: 44px;
    padding: 0 12px;
  }

  .match-panel {
    display: flex;
    gap: 12px;
    margin: 8px -16px 0 0;
    overflow-x: auto;
    padding-right: 16px;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  .match-card {
    min-width: 210px;
    min-height: 88px;
    padding: 10px;
    border-radius: 16px;
    scroll-snap-align: start;
  }

  .match-card span {
    min-height: 24px;
    padding: 0 8px;
  }

  .match-card strong {
    margin-top: 7px;
    font-size: 16px;
  }

  .match-card p {
    margin-top: 4px;
  }

  .match-card:first-child {
    min-width: 230px;
  }

  .listing-row {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 12px;
    min-height: 104px;
    padding: 10px;
    border-radius: 16px;
  }

  .listing-title {
    display: block;
    margin-bottom: 3px;
  }

  .listing-title span {
    display: block;
    margin-top: 1px;
    font-size: 13px;
  }

  .listing-meta,
  .trust-line,
  .detail-meta {
    font-size: 12px;
  }

  .listing-side {
    grid-column: 2;
    grid-template-columns: auto 1fr;
    align-items: center;
    justify-items: start;
    gap: 8px;
  }

  .status-badge {
    min-height: 22px;
    padding-inline: 8px;
    font-size: 11px;
  }

  .task-card,
  .confirm-card,
  .post-card {
    display: grid;
    padding: 16px;
    border-radius: 16px;
  }

  .composer {
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    left: 16px;
    max-width: none;
    align-items: center;
    gap: 6px;
    padding: 6px;
    border-radius: var(--r-pill);
  }

  .composer textarea {
    min-height: 28px;
    max-height: 120px;
    padding: 6px 0;
  }

  .bottom-nav {
    display: none;
  }

  .bottom-item {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 44px;
    height: auto;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--ink-2);
    font-size: 18px;
    line-height: 1;
  }

  .bottom-item:not(.active) {
    flex: 1 1 auto;
    min-width: 44px;
  }

  .bottom-item span {
    display: block;
    max-width: 100%;
    overflow: hidden;
    color: var(--ink-2);
    font-size: 10px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: -0.2px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .bottom-item.active {
    flex: 0 0 auto;
    align-self: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: var(--forest-900);
    color: #fff;
    box-shadow: 0 6px 16px rgba(20, 29, 26, 0.28);
  }

  .bottom-item.active span {
    display: none;
  }

  .detail-panel {
    width: 100vw;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
  }

  .modal {
    align-self: end;
    max-height: 90vh;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    padding: 28px 18px;
  }

  .form-grid,
  .mini-stat-row,
  .custom-field-row {
    grid-template-columns: 1fr;
  }

  .admin-card.featured {
    grid-column: auto;
  }

  .ops-card.featured {
    grid-column: auto;
  }
}

body.reos-sidebar-open { overflow: hidden; }
.reos-account-home { display: grid; gap: 12px; max-width: 760px; }
.reos-account-home > h3 { margin: 12px 0 0; font-size: 13px; color: var(--ink-2); }
.reos-account-identity, .reos-settings-list > button { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; width: 100%; min-height: 64px; gap: 12px; padding: 10px 12px; text-align: left; }
.reos-account-identity .reos-avatar-preview { width: 72px; height: 72px; }
.reos-account-identity span, .reos-settings-list > button span { display: flex; min-width: 0; flex-direction: column; gap: 3px; }
.reos-account-identity small, .reos-settings-list small { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reos-settings-list { overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.reos-settings-list > button { border: 0; border-bottom: 1px solid var(--border); border-radius: 0; background: transparent; }
.reos-settings-list > button:last-child { border-bottom: 0; }
.reos-account-child > header { display: grid; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 12px; margin-bottom: 16px; }
.reos-account-child > header h2 { margin: 0; font-size: 24px; }
.reos-account-child [data-account-back] { display: inline-flex; align-items: center; gap: 6px; }
.reos-overview { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }
.reos-overview > button { display: grid; grid-template-columns: minmax(0,1fr) auto; min-height: 112px; padding: 16px; text-align: left; }
.reos-overview > button strong { grid-row: 1 / 3; font-size: 24px; font-variant-numeric: tabular-nums; }
.reos-overview > button span { align-self: end; }
.reos-setting-toggle { display: grid !important; grid-template-columns: auto minmax(0,1fr); align-items: center; gap: 12px; min-height: 52px; }
.reos-setting-toggle > span { display: flex; flex-direction: column; gap: 4px; }
.reos-setting-toggle small { color: var(--ink-2); }
@media (max-width: 767px) {
  .reos-overview { grid-template-columns: 1fr; }
  .reos-card form, .reos-grid2 { grid-template-columns: 1fr; }
  .reos-actions > button.primary, .reos-card form > button.primary { width: 100%; min-height: 52px; }
  .mk-chips, .chip-row, .intent-chip-row { flex-wrap: nowrap; overflow-x: auto; }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}

/* P2 — compact workspace (<=1199px). Spacing/sizing only; no global tokens. */
@media (max-width: 1199px) {
  .smart-search-copy strong {
    display: none;
  }

  .smart-search-panel {
    gap: 8px;
    padding: 10px;
  }

  .match-card {
    min-height: 0;
    padding: 12px;
  }

  .match-card strong {
    margin-top: 8px;
  }

  .match-card p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}

@media (max-width: 767px) {
  .smart-search-panel {
    gap: 6px;
    margin-bottom: 6px;
    padding: 8px;
  }

  .page-head {
    margin-bottom: 8px;
  }

  .page-head .eyebrow {
    margin-bottom: 2px;
  }

  .search-row {
    margin-bottom: 6px;
  }

  .filter-summary {
    min-height: 0;
    margin-bottom: 4px;
  }

  .listing-list {
    gap: 12px;
    margin-top: 8px;
  }

  .listing-card-large,
  .large-photo-wrap {
    border-radius: 16px;
  }

  .listing-photo.large {
    max-height: 168px;
    aspect-ratio: auto;
    height: 168px;
  }

  .listing-photo.large img {
    object-fit: cover;
  }
}

@media (min-width: 768px) and (max-width: 1199px) {
  .page-head {
    margin-bottom: 10px;
  }

  .smart-search-panel {
    margin-bottom: 10px;
  }

  .smart-search-box {
    min-height: 48px;
    padding: 4px 4px 4px 14px;
  }

  .smart-search-box .primary-button {
    min-height: 40px;
  }

  .intent-chip-row button {
    min-height: 40px;
  }

  .search-row {
    margin-bottom: 6px;
  }

  .search-box {
    min-height: 44px;
  }

  .filter-summary {
    min-height: 0;
    margin-bottom: 6px;
  }

  .match-panel {
    margin-top: 8px;
  }

  .match-card p {
    margin-top: 4px;
  }

  .match-card .secondary-button {
    min-height: 40px;
    margin-top: 8px;
  }

  .listing-list {
    margin-top: 10px;
  }
}

@media (max-width: 767px) {
  #inventory-view.active {
    display: flex;
    flex-direction: column;
  }

  #inventory-view .match-panel {
    order: 2;
    margin-top: 12px;
  }

  #inventory-view .search-box {
    padding: 0 10px;
    gap: 8px;
  }
}

.ops-card.featured .timeline-item strong {
  color: #fff;
}

.ops-card.featured .timeline-item small,
.ops-card.featured .timeline-item p {
  color: rgba(255, 255, 255, 0.78);
}

/* P5 — droplist thông minh, trường theo loại hình, địa chỉ 2 hệ */
select.smart-native { position: absolute !important; width: 1px !important; height: 1px !important; min-height: 0 !important; padding: 0 !important; margin: -1px; border: 0 !important; clip-path: inset(50%); overflow: hidden; opacity: 0; }
.smart-select { position: relative; width: 100%; min-width: 0; }
.smart-control { position: relative; display: flex; align-items: center; }
.smart-select .smart-input { width: 100%; min-width: 0; min-height: 48px; border: 1px solid var(--border); border-radius: var(--r-md); padding: 0 60px 0 14px; background: var(--surface); color: var(--ink); font: inherit; text-overflow: ellipsis; }
.smart-select.is-open .smart-input, .smart-select .smart-input:focus { outline: 2px solid var(--st-info); outline-offset: 0; border-color: var(--st-info); }
.smart-select.is-disabled .smart-input { background: var(--surface-alt); color: var(--ink-2); cursor: not-allowed; }
.smart-clear { position: absolute; right: 30px; width: 26px; height: 26px; border: 0; border-radius: var(--r-pill); background: var(--surface-alt); color: var(--ink); font-size: 16px; line-height: 1; cursor: pointer; }
.smart-clear[hidden] { display: none; }
/* (7.15) focus rõ ràng cho nút xóa và lựa chọn đang tô sáng bằng bàn phím */
.smart-clear:focus-visible { outline: 2px solid var(--st-info); outline-offset: 1px; }
.smart-list li.is-active { outline: 2px solid var(--st-info); outline-offset: -2px; }
.smart-caret { position: absolute; right: 12px; color: var(--ink-2); pointer-events: none; font-size: 12px; }
.smart-list { position: absolute; z-index: 60; left: 0; right: 0; top: calc(100% + 4px); max-height: 260px; overflow-y: auto; margin: 0; padding: 4px; list-style: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: 0 12px 32px rgba(20, 29, 26, 0.16); }
.smart-list li { padding: 10px 12px; border-radius: var(--r-sm); cursor: pointer; color: var(--ink); }
.smart-list li.is-active { background: var(--surface-alt); }
.smart-list li.is-selected { font-weight: 600; color: var(--st-available); }
.smart-list li.smart-empty, .smart-list li.smart-more { cursor: default; color: var(--ink-2); font-size: 13px; }
.type-fields, .address-fields { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.address-fields { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.type-fields:empty { display: none; }
.address-block { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--bg); }
.address-head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.address-badge { font-size: 12px; color: var(--st-info); background: var(--st-info-bg); border-radius: var(--r-pill); padding: 2px 10px; }
.address-hint { grid-column: 1 / -1; margin: 0; font-size: 13px; color: var(--st-info); }
.address-fields .field.wide { grid-column: 1 / -1; }
.chip-field { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip-field legend { width: 100%; margin-bottom: 6px; }
.chip-option { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface); cursor: pointer; }
.field[hidden] { display: none; }

/* P5.1 — nhãn tin mẫu/demo (quyết định 7.9-A) */
.sample-badge { display: inline-block; margin-right: 6px; padding: 1px 8px; border-radius: var(--r-pill); font-size: 11px; font-weight: 700; letter-spacing: .02em; vertical-align: middle; color: var(--st-soon); background: var(--st-soon-bg); border: 1px dashed currentColor; }
.detail-hero-content .sample-badge { margin-bottom: 6px; }
.photo-bottom .sample-badge { color: var(--st-soon); font-size: 11px; margin-bottom: 6px; }

/* ===== P7 — thanh bên có icon, nhóm thư mục, thu gọn/mở rộng (2026-10-05) ===== */
.nav-item { display: flex; align-items: center; gap: 12px; }
.nav-ico { flex: 0 0 auto; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-group { margin: 10px 16px 2px; color: var(--ink-2); font-size: 11px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.nav-list .nav-group:first-child { margin-top: 0; }
.sidebar-toggle { display: grid; width: 44px; height: 44px; margin-left: auto; place-items: center; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--ink); }
.sidebar-toggle:hover { background: var(--forest-50); }
.sidebar { overflow-y: auto; }
.app-shell { transition: grid-template-columns 240ms var(--ease-out); }

@media (min-width: 768px) {
  .app-shell.sidebar-collapsed { --sidebar-w: 88px; }
  .sidebar-collapsed .sidebar { align-items: center; padding: 16px 8px; gap: 16px; }
  .sidebar-collapsed .brand { flex-direction: column; gap: 12px; }
  .sidebar-collapsed .brand > span,
  .sidebar-collapsed .recent,
  .sidebar-collapsed .profile-pill > div:not(.avatar) { display: none; }
  .sidebar-collapsed .sidebar-toggle { margin: 0; }
  .sidebar-collapsed .new-chat { width: 44px; padding: 0; overflow: hidden; font-size: 0; }
  .sidebar-collapsed .new-chat::before { content: "+"; font-size: 22px; line-height: 44px; }
  .sidebar-collapsed .nav-list { align-items: center; }
  .sidebar-collapsed .nav-group { width: 32px; height: 1px; margin: 8px auto; overflow: hidden; background: var(--border); font-size: 0; }
  .sidebar-collapsed .nav-list .nav-group:first-child { display: none; }
  .sidebar-collapsed .nav-item { position: relative; width: 48px; justify-content: center; gap: 0; padding: 0; font-size: 0; }
  .sidebar-collapsed .nav-item:hover::after,
  .sidebar-collapsed .nav-item:focus-visible::after {
    position: absolute; z-index: 70; top: 50%; left: calc(100% + 10px); transform: translateY(-50%);
    padding: 6px 10px; border-radius: var(--r-sm); background: var(--forest-950); color: var(--surface);
    font-size: 13px; font-weight: 500; white-space: nowrap; content: attr(aria-label); pointer-events: none;
  }
  .sidebar-collapsed .profile-pill { padding: 0; border: 0; background: transparent; }
}

/* ===== P7 — Nhà đất bán / cho thuê / Dự án ===== */
.mk-view { max-width: 1120px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mk-search { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 16px; }
.mk-search-box { flex: 1 1 280px; display: flex; }
.mk-search-box input { width: 100%; min-height: 48px; padding: 0 18px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font: inherit; }
.mk-search .primary-button, .mk-search .secondary-button { padding: 0 20px; }
.mk-type-groups { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.mk-group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mk-group-label { min-width: 84px; color: var(--ink-2); font-size: 12px; font-weight: 600; }
.mk-group .chip, .mk-tabs .chip { min-height: 44px; padding: 0 14px; font-size: 14px; box-shadow: none; }
.chip.active { background: var(--forest-700); border-color: var(--forest-700); color: var(--surface); }
.mk-active { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.mk-chip { min-height: 44px; padding: 0 14px; border: 1px solid var(--forest-600); border-radius: var(--r-pill); background: var(--forest-50); color: var(--forest-900); font: inherit; font-size: 14px; }
.mk-link { min-height: 44px; border: 0; background: transparent; color: var(--forest-700); font: inherit; font-weight: 600; text-decoration: underline; cursor: pointer; }
.mk-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0 12px; }
.mk-count { margin: 0; color: var(--ink-2); font-weight: 600; }
.mk-sort { display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: 14px; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.mk-grid-1 { grid-template-columns: 1fr; }
.mk-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--sh-1); color: var(--ink); text-align: left; font: inherit; padding: 0; }
button.mk-card { cursor: pointer; }
button.mk-card:hover { box-shadow: var(--sh-2); }
.mk-thumb { display: flex; align-items: flex-end; height: 96px; padding: 12px; background: linear-gradient(135deg, var(--forest-100), var(--forest-50)); }
.mk-thumb > span:not(.st-pill) { padding: 4px 10px; border-radius: var(--r-pill); background: var(--surface); color: var(--forest-800); font-size: 12px; font-weight: 600; }
.mk-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.mk-body h3 { margin: 0; font-size: 16px; line-height: 1.35; }
.mk-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-type { padding: 2px 10px; border-radius: var(--r-pill); background: var(--st-info-bg); color: var(--st-info); font-size: 12px; font-weight: 600; }
.mk-price { margin: 0; color: var(--forest-800); font-size: 18px; font-weight: 700; }
.mk-price small { color: var(--ink-2); font-size: 13px; font-weight: 500; }
.mk-facts, .mk-addr { margin: 0; color: var(--ink-2); font-size: 14px; }
.mk-contact { display: grid; grid-template-columns: auto 1fr; gap: 10px; margin-top: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.mk-avatar { width: 40px; height: 40px; }
.mk-contact-info { display: flex; flex-direction: column; gap: 2px; font-size: 13px; color: var(--ink-2); }
.mk-contact-info strong { color: var(--ink); font-size: 14px; }
.mk-phone { display: flex; align-items: center; gap: 6px; color: var(--ink); }
.mk-phone .mk-link { min-height: 32px; padding: 0 4px; }
.mk-sample { color: var(--st-soon); font-size: 12px; font-weight: 600; }
.mk-contact-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
.mk-act { flex: 1; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.mk-empty { grid-column: 1 / -1; padding: 28px; border: 1px dashed var(--border); border-radius: var(--r-lg); background: var(--surface); text-align: center; }
.mk-filter-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; margin-bottom: 12px; }
.mk-field { display: flex; flex-direction: column; gap: 6px; color: var(--ink-2); font-size: 13px; font-weight: 600; }
.mk-field input, .mk-field select { min-height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: inherit; font-weight: 400; }
.mk-field small { color: var(--ink-2); font-weight: 400; }
.mk-hint { margin: 0 0 8px; color: var(--ink-2); font-size: 13px; }
.mk-filter-form { display: flex; flex-direction: column; gap: 14px; }
.mk-tabs { display: flex; gap: 8px; margin-bottom: 16px; overflow-x: auto; }
.mk-dl { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0 0 12px; }
.mk-dl div { padding: 12px; border-radius: var(--r-md); background: var(--forest-50); }
.mk-dl dt { color: var(--ink-2); font-size: 12px; }
.mk-dl dd { margin: 4px 0 0; font-weight: 600; }
.mk-table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--r-md); }
.mk-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.mk-table th, .mk-table td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.mk-table th button { min-height: 40px; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.mk-status { padding: 2px 8px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; }
.mk-status-available { background: var(--st-available-bg); color: var(--st-available); }
.mk-status-reserved, .mk-status-deposited { background: var(--st-soon-bg); color: var(--st-soon); }
.mk-status-closed { background: var(--st-rented-bg); color: var(--st-rented); }

/* panel phải toàn chiều cao */
.mk-sheet-root[hidden] { display: none; }
.mk-sheet-overlay { position: fixed; z-index: 80; inset: 0; background: rgba(20, 29, 26, 0.45); }
.mk-sheet { position: fixed; z-index: 81; top: 0; right: 0; display: flex; flex-direction: column; width: min(560px, 94vw); height: 100vh; background: var(--surface); box-shadow: var(--sh-3); transform: translateX(100%); transition: transform 280ms var(--ease-out); }
.mk-sheet-root.open .mk-sheet { transform: translateX(0); }
.mk-sheet-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.mk-sheet-head h2 { flex: 1; margin: 0; font-size: 18px; }
.mk-sheet-close { display: grid; width: 44px; height: 44px; place-items: center; border: 0; border-radius: 50%; background: var(--surface-alt); color: var(--ink); font-size: 20px; cursor: pointer; }
.mk-sheet-body { flex: 1; overflow-y: auto; padding: 16px 20px; }
.mk-sheet-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.mk-sheet-foot[hidden] { display: none; }
.mk-sheet-foot button { padding: 0 20px; }

@media (max-width: 767px) {
  .sidebar-toggle { display: none; }
  .mk-grid { grid-template-columns: 1fr; }
  .mk-group { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; }
  .mk-group-label { min-width: 64px; flex: 0 0 auto; }
  .mk-group .chip { flex: 0 0 auto; }
  .mk-dl { grid-template-columns: 1fr; }
}
/* 3 trang mới dùng toàn bộ bề rộng: ẩn khung chi tiết căn và ô soạn tin của Trợ lý */
.app-shell:has(.mk-view.active) { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
.app-shell:has(.mk-view.active) .detail-panel:not(.open),
.app-shell:has(.mk-view.active) .composer { display: none; }
.app-shell:has(.mk-view.active) .main { padding-bottom: 48px; }
.mk-sort { white-space: nowrap; }

/* ===================== P8 — UI nền: biểu tượng Lucide, trạng thái, bố cục 3 kích thước ===================== */
:root {
  --accent-gold: #B08D57; /* CHỈ cho viền/biểu tượng "Đã xác minh" và "Nổi bật", không dùng cho chữ */
  --st-open: #1f7a52;    --st-open-bg: #e3f2ea;
  --st-wait: #8a5a06;    --st-wait-bg: #fbf0dc;
  --st-confirm: #7a3e00; --st-confirm-bg: #fde9cc;
  --st-hold: #2f5f8a;    --st-hold-bg: #e4eef7;
  --st-deposit: #1d3f66; --st-deposit-bg: #dbe6f3;
  --st-closed: #4f5753;  --st-closed-bg: #ededea;
  --st-photo-alpha: 88%;
  --composer-h: 0px;
  --dock-h: 0px;
}
.ico { flex: 0 0 auto; width: 20px; height: 20px; vertical-align: middle; }
.ico-16 { width: 16px; height: 16px; } .ico-24 { width: 24px; height: 24px; }
.icon-button > .ico, .composer-icon > .ico, .send-button > .ico, .modal-close > .ico, .sidebar-close > .ico { width: 20px; height: 20px; }
.brand-mark { display: grid; place-items: center; border-radius: 50%; }
.brand-mark > .ico { width: 22px; height: 22px; }
.brand-mark.sm { width: 32px; height: 32px; background: var(--grad-primary); color: var(--surface); }
.brand-mark.sm > .ico { width: 18px; height: 18px; }
.search-ico { display: inline-flex; color: var(--ink-2); }
.new-chat { display: flex; align-items: center; justify-content: center; gap: 8px; }
.sidebar-collapsed .new-chat::before { content: none; }
.sidebar-collapsed .new-chat > span { display: none; }
.sidebar-collapsed .new-chat { font-size: inherit; display: grid; place-items: center; }

/* Trạng thái: viên thuốc nền nhạt + biểu tượng 16px + chữ 13px */
.st-pill { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: var(--r-pill); font-size: 13px; font-weight: 600; line-height: 16px; white-space: nowrap; }
.st-open { color: var(--st-open); background: var(--st-open-bg); }
.st-soon { color: var(--st-wait); background: var(--st-wait-bg); }
.st-confirm { color: var(--st-confirm); background: var(--st-confirm-bg); }
.st-hold { color: var(--st-hold); background: var(--st-hold-bg); }
.st-deposit { color: var(--st-deposit); background: var(--st-deposit-bg); }
.st-closed { color: var(--st-closed); background: var(--st-closed-bg); }
.st-pill.on-photo { position: absolute; top: 8px; left: 8px; color: var(--surface); }
.st-open.on-photo { background: color-mix(in srgb, var(--st-open) var(--st-photo-alpha), transparent); }
.st-soon.on-photo { background: color-mix(in srgb, var(--st-wait) var(--st-photo-alpha), transparent); }
.st-confirm.on-photo { background: color-mix(in srgb, var(--st-confirm) var(--st-photo-alpha), transparent); }
.st-hold.on-photo { background: color-mix(in srgb, var(--st-hold) var(--st-photo-alpha), transparent); }
.st-deposit.on-photo { background: color-mix(in srgb, var(--st-deposit) var(--st-photo-alpha), transparent); }
.st-closed.on-photo { background: color-mix(in srgb, var(--st-closed) var(--st-photo-alpha), transparent); }
.mk-verified { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border: 1px solid var(--accent-gold); border-radius: var(--r-pill); color: var(--ink); }
.mk-verified .ico { color: var(--accent-gold); }

/* Thẻ thị trường (P8) */
.mk-state { display: flex; gap: 16px; align-items: flex-start; padding: 24px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); color: var(--ink); }
.mk-state > .ico { color: var(--forest-700); margin-top: 2px; }
.mk-state h3 { margin: 0 0 4px; font-size: 18px; } .mk-state p { margin: 0; color: var(--ink-2); }
.mk-sub { margin: 4px 0 0; color: var(--ink-2); }
.mk-layout { display: grid; gap: 24px; }
.mk-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.mk-chips .chip { display: inline-flex; align-items: center; gap: 6px; }
.mk-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.mk-view .mk-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.mk-view .mk-thumb { position: relative; display: grid; place-items: center; aspect-ratio: 16 / 10; max-height: 168px; width: 100%; background: var(--forest-50); color: var(--forest-700); }
.mk-view .mk-body { display: flex; flex-direction: column; gap: 8px; padding: 16px; }
.mk-view .mk-body h3 { margin: 0; font-size: 16px; font-weight: 600; }
.mk-view .mk-price { margin: 0; font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.mk-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13px; color: var(--ink-2); }
.mk-specs { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; padding: 0; list-style: none; font-size: 14px; color: var(--ink-2); }
.mk-specs li, .mk-addr { display: inline-flex; align-items: center; gap: 4px; }
.mk-addr { margin: 0; font-size: 14px; color: var(--ink-2); }
.mk-contact { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; padding-top: 12px; border-top: 1px solid var(--border); }
.mk-contact-info { display: flex; flex-direction: column; gap: 4px; font-size: 14px; min-width: 0; }
.mk-role { display: inline-flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--ink-2); }
.mk-phone { display: inline-flex; align-items: center; gap: 8px; font-variant-numeric: tabular-nums; }
.mk-link { min-height: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--forest-700); text-decoration: underline; font: inherit; cursor: pointer; }
.mk-contact-actions { display: flex; gap: 8px; }
.mk-act { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-md); color: var(--ink); text-decoration: none; font-weight: 600; }

/* Vùng chạm >= 44px (B-M1/B-M2/B-M3) */
.chip, .icon-button, .composer-icon, .send-button, .modal-close, .sidebar-close, .smart-clear,
.quick-prompts button, .intent-chip-row button, .recent button, .light-button, .secondary-button, .primary-button { min-height: 44px; }
.icon-button, .composer-icon, .send-button, .modal-close, .sidebar-close, .smart-clear { min-width: 44px; }
input:not([type=checkbox]):not([type=radio]), select { min-height: 44px; }
.smart-search-box input, .search-box input { min-height: 44px; }
.mk-price, .price, [class*="price"] strong { font-variant-numeric: tabular-nums; }

/* Dock điện thoại + ngăn Thêm (demo giữ P8; Cloud P21 ẩn bằng reos-cloud.css) */
.reos-dock { display: none; }
.reos-more-root[hidden] { display: none; }
.reos-more-overlay { position: fixed; inset: 0; z-index: 90; background: rgba(20, 29, 26, 0.45); }
.reos-more { position: fixed; z-index: 91; top: 0; right: 0; bottom: 0; width: min(360px, 88vw); display: flex; flex-direction: column; gap: 4px; padding: 16px; overflow-y: auto; background: var(--surface); color: var(--ink); box-shadow: var(--sh-3); }
.reos-more header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.reos-more h2 { margin: 0; font-size: 20px; }
.reos-more .nav-group { margin: 12px 0 4px; font-size: 12px; font-weight: 600; text-transform: uppercase; color: var(--ink-2); }
.more-item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--ink); font: inherit; font-weight: 500; text-align: left; cursor: pointer; }
.more-item:hover, .more-item:focus-visible { background: var(--forest-50); }
.detail-overlay { display: none; }

/* Nội dung tối đa 1280px, căn giữa */
.main > .view { max-width: 1280px; margin-inline: auto; }
.main { padding-bottom: calc(var(--composer-h) + var(--dock-h) + 48px); }

/* Máy tính >= 1200px */
@media (min-width: 1200px) {
  .app-shell { --sidebar-w: 248px; --panel-w: 420px; }
  .app-shell.sidebar-collapsed { --sidebar-w: 72px; }
  .app-shell:not(:has(.detail-panel.open)) { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  .app-shell:not(:has(.detail-panel.open)) .detail-panel { display: none; }
  .app-shell:not(:has(.detail-panel.open)) .composer { right: 48px; }
  .mk-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nav-group { font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
}
/* Máy tính bảng 768–1199px */
@media (min-width: 768px) and (max-width: 1199px) {
  .app-shell.sidebar-collapsed { --sidebar-w: 72px; }
  .detail-panel { width: min(480px, 92vw); }
  .detail-overlay { position: fixed; inset: 0; z-index: 49; background: rgba(20, 29, 26, 0.4); }
  .app-shell:has(.detail-panel.open) .detail-overlay { display: block; }
  .mk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 768px) {
  .sidebar-collapsed .nav-item { width: 44px; min-height: 44px; }
  .sidebar-collapsed .sidebar { padding: 16px 4px; }
  .sidebar-collapsed .nav-item.show-tip::after { content: attr(aria-label); position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); padding: 6px 10px; border-radius: 8px; background: var(--forest-900); color: var(--surface); font-size: 13px; font-weight: 500; white-space: nowrap; z-index: 70; }
}
/* Điện thoại < 768px */
@media (max-width: 767px) {
  .main { padding-inline: 16px; }
  .mobile-topbar { gap: 4px; }
  .topbar-brand { display: inline-flex; align-items: center; gap: 8px; margin-right: auto; }
  .dock-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 56px; min-width: 44px; padding: 4px 2px; border: 0; border-radius: var(--r-md); background: transparent; color: var(--ink-2); font: inherit; font-size: 11px; font-weight: 600; line-height: 1.2; cursor: pointer; }
  .dock-item span { max-width: 100%; text-align: center; white-space: normal; overflow-wrap: anywhere; }
  .dock-item.active { color: var(--forest-900); background: var(--forest-50); }
  .reos-dock { position: fixed; z-index: 35; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(var(--dock-n, 5), minmax(0, 1fr)); padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); background: var(--surface); }
  .composer { bottom: calc(var(--dock-h) + 8px); }
  .detail-panel { width: 100vw; border-radius: 0; }
}
/* P8 — tinh chỉnh sau đo */
.st-open.on-photo { background: color-mix(in srgb, #155c3c var(--st-photo-alpha), transparent); }
.composer textarea { min-height: 44px; }
.primary-button, .secondary-button, .composer textarea { min-height: 44px !important; }
@media (min-width: 1200px) {
  .app-shell { --sidebar-w: 264px; }            /* cột 264 = thanh bên hiển thị 248px + lề 8px mỗi bên */
  .app-shell.sidebar-collapsed { --sidebar-w: 88px; }
}
@media (min-width: 768px) and (max-width: 1199px) {
  .app-shell.sidebar-collapsed { --sidebar-w: 88px; } /* thanh hiển thị 72px */
}
.new-chat > span { white-space: nowrap; }

/* ---------- P9 — chi tiết tin, lưu tin, hẹn xem, kiểu xem bảng ---------- */
body.reos-no-composer #composer-form { display: none !important; }
body.reos-no-composer .app-shell { --composer-h: 0px; }
.mk-act { background: var(--surface); font: inherit; cursor: pointer; }
.mk-view .mk-card { cursor: pointer; }
.mk-view .mk-card.is-open { outline: 2px solid var(--forest-700); outline-offset: -2px; }
.mk-open { all: unset; cursor: pointer; display: inline; min-height: 0; }
.mk-open:focus-visible { outline: 2px solid var(--forest-700); outline-offset: 2px; border-radius: 4px; }
.mk-save { position: absolute; top: 8px; right: 8px; display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: var(--r-pill); background: color-mix(in oklab, var(--surface) 92%, transparent); color: var(--ink); cursor: pointer; }
.mk-save.is-saved .ico { fill: currentColor; }
.mk-save.is-saved { color: var(--forest-700); }
.mk-btn { position: static; display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: auto; min-height: 44px; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; }
.mk-thumb .st-pill { position: absolute; left: 8px; top: 8px; }
.page-head:has(.mk-view-toggle) { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.mk-view-toggle { display: none; gap: 4px; }
.mk-view-toggle button { display: inline-grid; place-items: center; width: 44px; height: 44px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--ink-2); cursor: pointer; }
.mk-view-toggle button[aria-pressed="true"] { background: var(--forest-50); color: var(--forest-700); border-color: var(--forest-700); }
.mk-num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.mk-table-wrap { max-height: calc(100vh - 220px); overflow: auto; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
.mk-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.mk-table th { position: sticky; top: 0; z-index: 1; background: var(--surface-alt); text-align: left; font-weight: 600; padding: 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.mk-table td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.mk-table tr.is-open td { background: var(--forest-50); }
.mk-table .mk-open { font-weight: 600; min-height: 44px; display: inline-flex; align-items: center; }
@media (min-width: 1200px) { .mk-view-toggle { display: inline-flex; } }

.mk-detail-wrap { position: fixed; inset: 0; z-index: 40; pointer-events: none; }
.mk-detail-overlay { position: absolute; inset: 0; background: rgba(15, 23, 42, .5); pointer-events: auto; }
.mk-detail { position: absolute; top: 0; right: 0; bottom: 0; display: flex; flex-direction: column; width: 100vw; background: var(--surface); color: var(--ink); box-shadow: -8px 0 24px rgba(0, 0, 0, .18); pointer-events: auto; }
.mk-detail-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border); }
.mk-back, .mk-x { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; min-width: 44px; padding: 0 8px; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; border-radius: var(--r-md); }
.mk-x { display: none; }
.mk-detail-body { flex: 1; overflow: auto; display: flex; flex-direction: column; gap: 16px; padding: 16px 16px calc(var(--mk-bar-h, 76px) + 16px); }
.mk-detail-title { margin: 0; font-size: 20px; }
.mk-price-lg { font-size: 24px !important; font-weight: 700; margin: 0; font-variant-numeric: tabular-nums; }
.mk-detail .mk-price { margin: 0; font-variant-numeric: tabular-nums; }
.mk-detail section h3, .mk-sub-h { margin: 0 0 8px; font-size: 15px; }
.mk-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-type { display: inline-flex; align-items: center; gap: 4px; }
.mk-fields { display: grid; grid-template-columns: 1fr; gap: 0; margin: 0; border: 1px solid var(--border); border-radius: var(--r-lg); }
.mk-fields > div { display: grid; grid-template-columns: 24px minmax(0, 1fr) minmax(0, 1.2fr); gap: 8px 12px; align-items: start; padding: 12px; border-bottom: 1px solid var(--border); }
.mk-fields > div:last-child { border-bottom: 0; }
.mk-fields .ico { color: var(--forest-700); }
.mk-fields dt { color: var(--ink-2); font-size: 14px; } .mk-fields dd { margin: 0; font-weight: 600; font-size: 14px; }
.mk-amen { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 0; padding: 0; list-style: none; }
.mk-amen li { display: inline-flex; align-items: center; gap: 4px; }
.mk-desc { margin: 0; white-space: pre-line; }
.mk-sticky-bar { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 8px 12px calc(8px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--border); }
.mk-sticky-bar button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; border: 0; border-radius: var(--r-md); background: var(--forest-700); color: var(--surface); font: inherit; font-weight: 600; cursor: pointer; }
.mk-book-inline { display: none; align-self: flex-start; }
.mk-book label { display: flex; flex-direction: column; gap: 6px; }
.mk-book textarea { min-height: 88px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; background: var(--surface); color: var(--ink); }
.mk-book .mk-check { flex-direction: row; align-items: center; gap: 10px; min-height: 44px; }
.mk-book .mk-check input { width: 22px; height: 22px; min-height: 0; }
.mk-book { display: flex; flex-direction: column; gap: 14px; }
@media (min-width: 768px) {
  .mk-detail { width: min(480px, 92vw); }
  .mk-sticky-bar { display: none; }
  .mk-detail-body { padding-bottom: 24px; }
  .mk-book-inline { display: inline-flex; }
  .mk-back span { display: none; }
  .mk-back { display: none; }
  .mk-x { display: inline-flex; }
  .mk-detail-head { justify-content: flex-end; }
}
@media (min-width: 1200px) {
  .mk-detail-wrap { left: auto; width: 420px; }
  .mk-detail-overlay { display: none; }
  .mk-detail { width: 420px; box-shadow: none; border-left: 1px solid var(--border); }
  .app-shell.mk-detail-open .main { margin-right: 420px; }
}
.mk-save.is-saved, .mk-btn.mk-save.is-saved { background: var(--forest-700); color: var(--surface); border-color: var(--forest-700); }
body:has(.mk-detail-wrap) #toast, body:has(.mk-sheet-overlay) #toast { z-index: 10000; }
@media (max-width: 767px) { body:has(.mk-detail-wrap) #toast { bottom: calc(76px + 12px + env(safe-area-inset-bottom)); } }

/* P10a — Tài khoản của tôi */
.reos-subtabs { margin-bottom: 12px; flex-wrap: wrap; }
.reos-subtabs button[disabled] { opacity: .45; cursor: not-allowed; }
.reos-card h3 { margin: 18px 0 6px; font-size: 1rem; }
.reos-bell { position: relative; }
.reos-bell-n { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--danger, #b42318); color: var(--on-danger, #fff); font-size: 11px; line-height: 18px; text-align: center; }
.reos-notes { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.reos-notes li { padding: 10px 12px; border: 1px solid var(--line, #e4e4e7); border-radius: 10px; }
.reos-notes li.unread { border-color: var(--accent, #0f766e); }
.reos-note-sheet button { display:grid; width:100%; gap:4px; min-height:44px; border:0; background:transparent; color:inherit; text-align:left; font:inherit; }
.reos-note-sheet span,.reos-note-sheet small { color:var(--ink-2); }
.reos-note-all { min-height:48px; width:100%; border:0; background:transparent; color:var(--forest-700); font:inherit; font-weight:600; }
body.reos-mfa-lock .nav-list [data-view]:not([data-view="profile"]), body.reos-mfa-lock .reos-dock [data-view]:not([data-view="profile"]) { pointer-events: none; opacity: .4; }

/* ===== P11 — Tìm thông minh + bộ lọc theo loại hình (BĐS bán / cho thuê) ===== */
.mk-smart { display: flex; align-items: center; gap: 8px; min-height: 48px; margin: 0 0 16px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface); color: var(--forest-700); }
.mk-smart input { flex: 1 1 auto; min-width: 0; min-height: 44px; border: 0; background: transparent; color: var(--ink); font: inherit; font-size: 16px; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; }
.mk-smart input:focus { outline: none; }
.mk-smart:focus-within { outline: 2px solid var(--forest-700); outline-offset: 2px; }
.mk-chips .mk-n, .mk-filter-btn .mk-n { font-variant-numeric: tabular-nums; font-size: 13px; opacity: .8; }
.mk-chips .mk-n:not(:empty)::before { content: "· "; }
.mk-subtypes { margin-top: -8px; }
.mk-active { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 16px; }
.mk-fchip { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; padding: 0 0 0 14px; border: 1px solid var(--forest-700); border-radius: var(--r-pill); background: var(--forest-50); color: var(--ink); font-size: 14px; max-width: 100%; }
.mk-fchip > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mk-fchip button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--ink); cursor: pointer; }
.mk-toolbar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.mk-sort { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); }
.mk-sort select { min-height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: inherit; }
.mk-loading { display: flex; gap: 8px; align-items: center; padding: 24px; color: var(--ink-2); }
.mk-more { display: flex; justify-content: center; margin-top: 16px; }
.mk-empty .reos-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.mk-ff { display: flex; flex-direction: column; gap: 16px; }
.mk-ff fieldset { display: flex; flex-direction: column; gap: 10px; margin: 0; padding: 0; border: 0; min-width: 0; }
.mk-ff legend { margin-bottom: 6px; font-weight: 600; }
.mk-ff label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.mk-ff input, .mk-ff select { min-height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; box-sizing: border-box; width: 100%; }
.mk-pp { display: flex; flex-wrap: wrap; gap: 8px; }
.mk-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mk-p11 .mk-filter-col { display: none; }
.mk-fsheet { padding-bottom: 0 !important; }
.mk-fsheet-body { flex: 1 1 auto; }
.mk-fsheet-foot { position: sticky; bottom: 0; margin: 0 -24px; padding: 12px 24px; background: var(--surface); border-top: 1px solid var(--border); }
.mk-fsheet-foot .mk-seeall { width: 100%; min-height: 48px; }
.mk-toast { position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 9990; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; width: min(560px, calc(100vw - 24px)); box-sizing: border-box; padding: 8px 8px 8px 16px; border-radius: var(--r-lg); background: var(--ink); color: var(--surface); box-shadow: 0 12px 32px rgba(0,0,0,.25); }
.mk-toast span { flex: 1 1 160px; }
.mk-toast .mk-btn { background: var(--surface); color: var(--ink); }
.mk-toast .mk-x { display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: transparent; color: var(--surface); cursor: pointer; }
@media (max-width: 767px) { .mk-sheet-overlay .mk-fsheet { width: 100%; } }
@media (min-width: 768px) and (max-width: 1199px) { .mk-sheet-overlay .mk-fsheet { width: 480px; } }
@media (min-width: 1200px) {
  .mk-layout.mk-p11 { grid-template-columns: 280px minmax(0, 1fr); align-items: start; }
  .mk-p11 .mk-filter-col { display: block; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow: auto; padding: 16px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); }
  .mk-p11 .mk-filter-btn { display: none; }
}
.mk-view .mk-phone .mk-link { display: inline-flex; align-items: center; min-height: 44px; }
@media (max-width: 767px) { .mk-p11 .mk-main { padding-bottom: 120px; } }

/* ===== P12 — Dự án: chi tiết 3 tab, thanh tỉ lệ căn, bảng hàng ===== */
.pj-detail { display: grid; gap: 16px; min-width: 0; }
.pj-detail > .mk-back { justify-self: start; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; padding: 0 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.pj-tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); }
.pj-tabs [role=tab] { min-height: 44px; padding: 0 16px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--ink-2); font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; }
.pj-tabs [role=tab][aria-selected=true] { color: var(--ink); border-bottom-color: var(--st-open); }
.pj-panel { display: grid; gap: 16px; min-width: 0; }
.pj-panel:focus-visible { outline: 2px solid var(--st-open); outline-offset: 4px; }
.pj-stats { display: grid; gap: 12px; }
.pj-bar { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: var(--border); }
.pj-seg { display: block; height: 100%; }
.pj-seg.pj-available, .pj-dot.pj-available { background: var(--st-open); }
.pj-seg.pj-reserved, .pj-dot.pj-reserved { background: var(--st-hold); }
.pj-seg.pj-deposited, .pj-dot.pj-deposited { background: var(--st-deposit); }
.pj-seg.pj-closed, .pj-dot.pj-closed { background: var(--st-closed); }
.pj-legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 0; padding: 0; list-style: none; font-size: 14px; }
.pj-legend li { display: inline-flex; align-items: center; gap: 6px; }
.pj-dot { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.pj-ufilters { display: grid; gap: 8px; }
.pj-ufilters .chip, .mk-view-toggle [data-ldeal] { min-height: 44px; }
.mk-view-toggle [data-ldeal] { padding: 0 14px; width: auto; }
.pj-ufilters .mk-range input { min-height: 44px; }
.pj-usum { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--ink-2); }
.pj-usum strong { color: var(--ink); }
.pj-table-wrap { max-width: 100%; }
.pj-table .pj-stick { position: sticky; left: 0; z-index: 1; background: var(--surface); text-align: left; font-weight: 600; }
.pj-table thead .pj-stick { z-index: 2; background: var(--surface-alt); }
.pj-table th button { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; border: 0; background: transparent; color: var(--ink); font: inherit; font-weight: 600; cursor: pointer; padding: 0; }
.pj-table td .mk-btn { min-height: 44px; min-width: 44px; justify-content: center; }
.pj-sorti { display: inline-flex; }
.pj-sorti.pj-desc { transform: rotate(180deg); }
.pj-block h3 { margin: 8px 0; font-size: 16px; }
.pj-ucards { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.pj-ucard { display: grid; gap: 6px; padding: 12px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); }
.pj-ucard p { margin: 0; font-size: 14px; }
.pj-uc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pj-ucard .mk-btn { justify-self: start; min-height: 44px; }
.pj-card .mk-open { text-align: left; }
@media (min-width: 768px) and (max-width: 1199px) { .pj-table-wrap { max-height: none; overflow-x: auto; } }
@media (max-width: 767px) { .pj-detail { padding-bottom: 120px; } .pj-detail .page-head { flex-direction: column; align-items: flex-start; } }
.pj-card h3 .mk-open { min-height: 44px; display: inline-flex; align-items: center; }
.pj-panel, .pj-ufilters, .pj-detail { grid-template-columns: minmax(0, 1fr); }
.pj-ufilters .mk-chips { flex-wrap: wrap; overflow: visible; }
.pj-ufilters .mk-range { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pj-ufilters .mk-range input { width: 100%; min-width: 0; box-sizing: border-box; }
.reos-sheet.pj-sheet { width: min(460px, calc(100% - 40px)); }

/* ===== P14 — Hợp tác F2 ===== */
.f2-cloud > :not(.f2-host) { display: none !important; }
.f2-host { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.f2-host .page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.f2-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.f2-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); }
.f2-main { display: grid; gap: 6px; min-width: 0; flex: 1 1 260px; }
.f2-main h3 { margin: 0; font-size: 16px; }
.f2-main p { margin: 0; overflow-wrap: anywhere; }
.f2-prot, .f2-tag, .f2-st { display: inline-flex; align-items: center; gap: 6px; width: fit-content; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #e7f4ee; color: #14532d; }
.f2-prot.f2-warn { background: #fdf0d5; color: #7a4a00; }
.f2-prot.f2-off, .f2-st-declined { background: #f3e8e6; color: #7f1d1d; }
.f2-st-sent { background: #fdf0d5; color: #7a4a00; }
.f2-tag { background: #e8eefc; color: #1e3a8a; }
.f2-host .mk-phone, .f2-owner p, .f2-locked { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.f2-host .mk-link, .f2-detail .mk-link { min-height: 44px; min-width: 44px; }
.f2-host .reos-actions, .f2-row .reos-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.f2-host .mk-btn, .f2-detail .mk-btn, .f2-tabs [role=tab], .f2-host .mk-open { min-height: 44px; }
.f2-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.f2-tabs [role=tab] { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.f2-tabs [role=tab][aria-selected=true] { background: var(--ink); color: var(--surface); }
.f2-detail { display: grid; gap: 10px; }
.f2-detail h3 { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.f2-terms { display: grid; gap: 6px; margin: 0; }
.f2-terms div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 8px; }
.f2-terms dt { color: var(--ink-2); } .f2-terms dd { margin: 0; overflow-wrap: anywhere; }
.f2-locked { color: var(--ink-2); padding: 10px 12px; border: 1px dashed var(--border); border-radius: 12px; margin: 0; }
.f2-owner { padding: 10px 12px; border-radius: 12px; background: var(--surface-alt); }
.f2-owner h4 { margin: 0 0 4px; }
.f2-switch, .f2-consent, .f2-opt { display: flex !important; align-items: center; gap: 10px; min-height: 44px; flex-direction: row !important; }
.f2-switch input, .f2-consent input, .f2-opt input { width: 22px; height: 22px; flex: none; }
.f2-pick { border: 0; padding: 0; margin: 0; display: grid; gap: 6px; }
.f2-opt span { display: grid; } .f2-opt small { color: var(--ink-2); }
.f2-hist summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
.f2-hist ul { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.f2-sheet-body { display: grid; gap: 10px; padding: 0 4px; }
.f2-chips { margin-top: 4px; }
.f2-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #b45309; color: #fff; font-size: 12px; font-weight: 700; margin-left: auto; }
.sidebar-collapsed .f2-count { position: absolute; top: 4px; right: 8px; }
.mk-detail .mk-contact .mk-link { min-height: 44px; }

/* ===== P15a — sửa lỗi chặn iPhone ===== */
#reos-banner { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#reos-banner button { min-height: 44px; flex: none; padding: 0 14px; border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); color: var(--ink); font: inherit; font-weight: 600; }
body.reos-mfa-lock .nav-list [data-view]:not([data-view="profile"]), body.reos-mfa-lock .reos-dock [data-view]:not([data-view="profile"]) { pointer-events: auto; opacity: 1; }
.reos-nav-locked { position: relative; }
.reos-lock-mark { display: inline-flex; margin-left: auto; }
.reos-lock-mark .ico { width: 16px; height: 16px; }
.reos-lock-note { display: block; width: 100%; color: var(--ink-2); font-size: 11px; font-weight: 500; }
.reos-qr { width: 200px; height: 200px; padding: 10px; box-sizing: border-box; background: #fff; display: grid; place-items: center; }
.reos-qr img { display: block; width: 180px; height: 180px; }
.reos-secret { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.reos-secret code { overflow-wrap: anywhere; font-size: 15px; }
.reos-secret button, .reos-auth-link { min-height: 44px; display: inline-flex; align-items: center; }
.reos-totp-form { display: flex; flex-direction: column; gap: 12px; }
.reos-avatar-editor { position: relative; width: 96px; min-height: 96px; }
.reos-avatar-preview, .reos-avatar-preview img { width: 72px; height: 72px; border-radius: 50%; }
.reos-avatar-preview { display: grid; place-items: center; overflow: hidden; background: var(--surface-alt); font-weight: 600; }
.reos-avatar-preview img { object-fit: cover; }
.reos-file-input { position: absolute !important; width: 1px !important; height: 1px !important; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.reos-avatar-change { position: absolute; left: 42px; top: 52px; display: inline-flex !important; align-items: center; justify-content: center; min-width: 64px; min-height: 44px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--r-pill); background: var(--surface); color: var(--ink); font-size: 13px !important; font-weight: 600; cursor: pointer; }
.reos-acct input, .reos-acct select, .reos-acct textarea, .reos-usec input, .reos-usec select, .reos-usec textarea { font-size: 16px !important; }
@media (max-width: 767px) {
  .reos-card form[data-email] { display: grid; grid-template-columns: 1fr; align-items: stretch; gap: 8px; }
  .reos-card form[data-email] button { width: 100%; }
  .nav-list .reos-nav-locked { flex-wrap: wrap; }
  .reos-dock .reos-lock-note, .reos-dock .reos-lock-mark { display: none; }
}
