:root {
  --cwa-primary: #12c4be;
  --cwa-primary-soft: #ecfeff;
  --cwa-sidebar: #0b1414;
  --cwa-bg: #f4f7fb;
  --cwa-surface: #ffffff;
  --cwa-border: #e8eef4;
  --cwa-text: #0f172a;
  --cwa-muted: #64748b;
  --cwa-soft: #94a3b8;
  --cwa-sky: #12c4be;
  --cwa-blue: #12c4be;
  --cwa-hero: linear-gradient(135deg, #12c4be 0%, #3eefe6 100%);
  --cwa-btn: linear-gradient(135deg, #067a76 0%, #12c4be 100%);
  --cwa-sidebar-w: 248px;
  --cwa-sidebar-collapsed: 72px;
  --cwa-topbar: 52px;
  --cwa-pad: clamp(12px, 1.6vw, 18px);
  --gap: 12px;
  --radius: 12px;
  --type: 0.78rem;
  --type-sm: 0.7rem;
  --type-xs: 0.64rem;
  --title: 1.05rem;
  --kpi: 1.15rem;
  --chart: 120px;
  --ctrl: 34px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-s: env(safe-area-inset-left, 0px);
  --safe-e: env(safe-area-inset-right, 0px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
}

html { -webkit-text-size-adjust: 100%; font-size: 14px; }

body {
  font-family: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--cwa-text);
  background: var(--cwa-bg);
  -webkit-font-smoothing: antialiased;
}

body[data-lang="en"] { font-family: Inter, "IBM Plex Sans Arabic", system-ui, sans-serif; }

button, input, select, textarea { font: inherit; }
a { color: inherit; }
img { max-width: 100%; display: block; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  border: 0;
}

/* ========== LOGIN ========== */
.login-page {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3.2vw, 40px);
  background:
    radial-gradient(ellipse 70% 50% at 12% 8%, rgba(18, 196, 190, 0.28), transparent 55%),
    radial-gradient(ellipse 50% 40% at 92% 88%, rgba(62, 239, 230, 0.14), transparent 50%),
    linear-gradient(160deg, #050808 0%, #0a1414 55%, #061010 100%);
}
.login-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.92fr) minmax(380px, 1.2fr);
  width: min(1100px, 100%);
  min-height: min(620px, calc(100dvh - 48px));
  border-radius: 28px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.login-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  color: #f8fafc;
  background:
    radial-gradient(circle at 18% 16%, rgba(18, 196, 190, 0.34), transparent 46%),
    radial-gradient(circle at 88% 88%, rgba(62, 239, 230, 0.16), transparent 42%),
    linear-gradient(165deg, #000 0%, #071212 100%);
}
.login-hero__glow {
  position: absolute;
  inset: auto -80px -80px auto;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(18, 196, 190, 0.2);
  filter: blur(10px);
}
[dir="rtl"] .login-hero__glow { inset: auto auto -80px -80px; }
.login-hero__content { position: relative; z-index: 1; width: 100%; }
.login-hero__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 0.45rem; margin-bottom: 1.35rem; }
.login-hero__logo {
  width: 56px; height: 56px; border-radius: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
}
.login-hero__wordmark {
  height: 54px; width: auto; max-width: min(100%, 280px);
  object-fit: contain; background: transparent;
}
.login-hero__title { margin: 0; font-size: clamp(1.25rem, 2.4vw, 1.6rem); font-weight: 700; letter-spacing: -0.02em; }
.login-hero__tagline { margin: 0; color: rgba(248, 250, 252, 0.68); font-size: 0.82rem; }
.login-hero__lead { margin: 0 0 1.25rem; font-size: 0.95rem; line-height: 1.65; color: rgba(248, 250, 252, 0.88); }
.login-hero__features {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem;
}
.login-hero__features li {
  margin: 0;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(248, 250, 252, 0.92);
  font-size: 0.8rem;
  line-height: 1.45;
}

.login-panel {
  display: flex; flex-direction: column;
  justify-content: center;
  gap: 1rem;
  padding: clamp(1.35rem, 3.2vw, 2.6rem) clamp(1.4rem, 3.6vw, 3rem);
  background: #f7fbfb;
}
.login-lang {
  display: inline-flex; align-items: center; gap: 0.25rem;
  align-self: flex-end;
  padding: 0.2rem; border-radius: 999px;
  background: #fff; border: 1px solid #dbe7e6;
}
.login-lang__btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 4.8rem; min-height: 32px; padding: 0.35rem 0.75rem; border: 0;
  border-radius: 999px; font-size: 0.75rem; font-weight: 600; color: #64748b;
  background: transparent; cursor: pointer;
}
.login-lang__btn:hover { color: #067a76; background: #ecfeff; }
.login-lang__btn.is-active {
  color: #041111; background: var(--cwa-btn); box-shadow: 0 3px 10px rgba(18, 196, 190, 0.28);
}

.login-card {
  width: 100%;
  max-width: none;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.login-card__head { margin-bottom: 1.35rem; }
.login-card__head h1 { margin: 0 0 0.3rem; font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 700; letter-spacing: -0.02em; }
.login-card__head p { margin: 0; color: var(--cwa-muted); font-size: 0.92rem; }
.login-label { display: block; font-weight: 600; color: #334155; margin-bottom: 0.35rem; font-size: 0.875rem; }
.login-field { margin-bottom: 0.95rem; }
.login-input {
  width: 100%; min-height: 48px; border-radius: 12px; border: 1px solid #c9d6d5;
  padding: 0.65rem 0.95rem; background: #fff; color: var(--cwa-text);
}
.login-input:focus {
  outline: 0; border-color: #12c4be; background: #fff;
  box-shadow: 0 0 0 4px rgba(18, 196, 190, 0.16);
}
.login-error {
  display: none; margin: 0 0 0.75rem; padding: 0.7rem 0.85rem;
  border-radius: 12px; background: #fef2f2; color: #b91c1c; font-size: 0.875rem;
}
.login-error.is-on { display: block; }
.login-btn {
  width: 100%; min-height: 48px; margin-top: 0.35rem; border: 0; border-radius: 12px;
  font-weight: 700; color: #041111; background: var(--cwa-btn);
  box-shadow: 0 10px 22px rgba(18, 196, 190, 0.28); cursor: pointer;
}
.login-btn:hover { transform: translateY(-1px); filter: brightness(1.03); }
.login-hint { margin: 0.9rem 0 0; color: var(--cwa-muted); font-size: 0.78rem; line-height: 1.55; }
.login-links {
  display: flex; flex-wrap: wrap; gap: 0.55rem 1rem;
  margin: 0.85rem 0 0;
  font-size: 0.82rem; font-weight: 600; color: #067a76;
}
.login-links a { text-decoration: none; }
.login-links a:hover { text-decoration: underline; }
.login-footer { margin: 0; color: #94a3b8; font-size: 0.75rem; }

@media (max-width: 860px) {
  .login-page { padding: 12px; align-items: stretch; }
  .login-shell {
    grid-template-columns: 1fr;
    min-height: auto;
    border-radius: 22px;
  }
  .login-hero { padding: 1.35rem 1.25rem 1.15rem; }
  .login-hero__features { display: none; }
  .login-hero__lead { margin-bottom: 0; }
  .login-panel { padding: 1.25rem 1.15rem 1.4rem; }
}

@media (max-width: 480px) {
  .login-page { padding: 0; }
  .login-shell { border-radius: 0; min-height: 100dvh; }
  .login-hero__wordmark { height: 44px; }
  .login-lang__btn { min-width: 4.4rem; }
}

/* ========== SHELL ========== */
.app {
  display: flex;
  align-items: stretch;
  min-height: 100dvh;
  background: var(--cwa-bg);
}

.sidebar {
  position: relative;
  inset-inline-start: 0;
  width: var(--cwa-sidebar-w);
  min-height: 100dvh;
  z-index: 1001;
  display: flex; flex-direction: column;
  flex-shrink: 0;
  background: var(--cwa-sidebar);
  box-shadow: 4px 0 24px rgba(61, 90, 128, 0.12);
  transition: width 0.25s cubic-bezier(0.4, 0, 0.2, 1), transform 0.25s ease;
}
[dir="rtl"] .sidebar { box-shadow: -4px 0 24px rgba(61, 90, 128, 0.12); }
.sidebar.is-collapsed { width: var(--cwa-sidebar-collapsed); }

.sidebar__brand {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.sidebar__logo {
  width: auto; height: 28px; max-width: 128px;
  border-radius: 0; flex-shrink: 0; object-fit: contain; background: transparent;
}
.sidebar.is-collapsed .sidebar__logo { height: 20px; max-width: 44px; }
.sidebar__brand-text { display: flex; flex-direction: column; color: #f8fafc; line-height: 1.3; min-width: 0; }
.sidebar__brand-text strong { font-size: 0.92rem; font-weight: 700; white-space: nowrap; }
.sidebar__brand-text span { font-size: 0.75rem; color: rgba(248, 250, 252, 0.65); white-space: nowrap; }
.world-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 10px 10px 4px;
  flex-shrink: 0;
}
.world-tabs[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.world-tabs[hidden] { display: none !important; }
.world-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 48px;
  padding: 8px 4px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.06);
  color: #cfe8f6;
  font-size: 0.68rem;
  font-weight: 800;
  cursor: pointer;
}
.world-tab i { font-size: 0.92rem; }
.world-tab:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }
.world-tab.is-active {
  background: rgba(96, 165, 250, 0.32);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.45);
}
.sidebar.is-collapsed .world-tabs {
  grid-template-columns: 1fr;
  padding: 8px 8px 0;
}
.sidebar.is-collapsed .world-tab { min-height: 36px; padding: 8px 0; }
.sidebar.is-collapsed .world-tab span { display: none; }
.desk-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 0 10px 8px;
  flex-shrink: 0;
}
.desk-tabs[data-count="2"] { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.desk-tabs[hidden] { display: none !important; }
.desk-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 40px;
  padding: 6px 4px;
  border: 0;
  border-radius: 10px;
  background: rgba(18, 196, 190, 0.08);
  color: #d7f6f3;
  font-size: 0.66rem;
  font-weight: 800;
  cursor: pointer;
}
.desk-tab i { font-size: 0.82rem; }
.desk-tab:hover { background: rgba(18, 196, 190, 0.18); color: #fff; }
.desk-tab.is-active {
  background: rgba(18, 196, 190, 0.38);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.35);
}
.sidebar.is-collapsed .desk-tabs {
  grid-template-columns: 1fr;
  padding: 4px 8px 8px;
}
.sidebar.is-collapsed .desk-tab { min-height: 32px; padding: 6px 0; }
.sidebar.is-collapsed .desk-tab span { display: none; }
.rep-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}
.rep-grid > .rep-table {
  min-height: 380px;
  display: flex;
  flex-direction: column;
}
.rep-grid .table-wrap { flex: 1; }
.rep-section { display: flex; flex-direction: column; gap: 10px; }
.rep-section__title {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 800;
  color: #0f766e;
}
.rep-welcome {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 16px 20px;
  border-radius: 18px;
  color: #f4fffe;
  background:
    radial-gradient(ellipse 70% 120% at 100% 0%, rgba(62, 239, 230, 0.28), transparent 55%),
    linear-gradient(135deg, #042423 0%, #0f766e 100%);
}
.rep-welcome h1 { margin: 4px 0 0; font-size: 1.2rem; color: #fff; }
.rep-welcome p { margin: 0; color: rgba(244, 255, 254, 0.78); max-width: 28rem; }
.rep-money {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.rep-money__card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 176px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid #d7e8e6;
  background: #fff;
  text-align: start;
  font: inherit;
  cursor: pointer;
  color: inherit;
}
.rep-money__card.tone-green { background: #f3fdf7; border-color: #bbf7d0; }
.rep-money__card.tone-amber { background: #fffbeb; border-color: #fde68a; }
.rep-money__head { display: flex; align-items: center; gap: 10px; }
.rep-money__icon {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center; flex-shrink: 0;
}
.tone-green .rep-money__icon { background: #d1fae5; color: #047857; }
.tone-amber .rep-money__icon { background: #fef3c7; color: #b45309; }
.rep-money__head strong { display: block; font-size: 0.95rem; }
.rep-money__head span { display: block; font-size: var(--type-xs); color: #64748b; }
.money-stack { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.money-stack li {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
  font-variant-numeric: tabular-nums;
  font-size: 1.02rem;
}
.money-stack strong { color: #0f172a; }
.money-stack__empty { margin: 0; color: #94a3b8; }
.rep-stats {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.rep-stats--few { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.rep-stat {
  min-height: 128px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--cwa-border);
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  text-align: start;
  font: inherit;
  cursor: pointer;
  color: inherit;
}
.rep-stat__icon {
  width: 34px; height: 34px; border-radius: 11px;
  display: grid; place-items: center; font-size: 0.85rem;
}
.rep-stat__n {
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}
.rep-stat__l { font-size: var(--type-sm); font-weight: 700; color: #64748b; }
.rep-stat:hover, .rep-money__card:hover {
  border-color: #12c4be;
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.08);
}
.cell-clip {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash .table,
.rep-table .table {
  table-layout: fixed;
  min-width: 0;
  width: 100%;
}
.rep-table .table th,
.rep-table .table td {
  height: 44px;
  max-height: 44px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  vertical-align: middle;
}
.rep-table .card__head {
  flex-wrap: wrap;
  gap: 10px;
}
.rep-table__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-inline-start: auto;
  min-width: min(100%, 16rem);
}
.rep-table__filters .seek {
  flex: 1;
  min-width: 10rem;
  max-width: 18rem;
  margin: 0;
}
.rep-table__filters select {
  min-height: var(--ctrl);
  min-width: 8.5rem;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  padding: 0 10px;
  color: var(--cwa-text);
}
.table-seek {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}
.table-seek .seek {
  flex: 1;
  margin: 0;
  max-width: none;
}
.table tbody tr.is-jump { cursor: pointer; }
.table tbody tr.is-jump:hover { background: #ecfeff; }

.sidebar.is-collapsed .sidebar__brand-text,
.sidebar.is-collapsed .sidebar__section,
.sidebar.is-collapsed .sidebar__item span,
.sidebar.is-collapsed .sidebar__footer-btn span { display: none; }
.sidebar.is-collapsed .sidebar__item { justify-content: center; padding: 12px 8px; }

.sidebar__nav { flex: 1 0 auto; overflow: visible; padding: 12px 10px; }
.sidebar__section {
  margin: 18px 8px 8px;
  padding: 6px 10px;
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.03em;
  text-transform: none; color: #9fd4f5;
  background: rgba(125, 211, 252, 0.1);
  border-radius: 8px;
}
.sidebar__item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  margin: 1px 0; padding: 8px 10px; border: 0; border-radius: 10px;
  background: transparent; color: #e8f0fa; font-size: 0.8rem;
  text-align: start; cursor: pointer;
}
.sidebar__item i { width: 18px; text-align: center; font-size: 0.88rem; flex-shrink: 0; }
.sidebar__item:hover { background: rgba(255, 255, 255, 0.08); color: #fff; }
.sidebar__item.is-active {
  background: rgba(96, 165, 250, 0.28); color: #fff;
  box-shadow: inset 3px 0 0 #7dd3fc;
}
[dir="rtl"] .sidebar__item.is-active { box-shadow: inset -3px 0 0 #7dd3fc; }

.sidebar__footer {
  margin-top: auto;
  padding: 10px 10px calc(56px + var(--safe-b));
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex; flex-direction: column; gap: 6px;
}
.sidebar__footer-btn,
.sidebar__toggle {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px; background: rgba(255, 255, 255, 0.06);
  color: #e8f0fa; font-size: 0.8125rem; cursor: pointer;
}
.sidebar__footer-btn:hover,
.sidebar__toggle:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.sidebar__footer-btn.is-active { background: rgba(96, 165, 250, 0.28); color: #fff; }
.sidebar__footer-btn[hidden] { display: none !important; }
.sidebar__toggle {
  position: absolute; bottom: calc(16px + var(--safe-b));
  inset-inline-start: 50%; transform: translateX(-50%);
  width: 36px; height: 36px; padding: 0; justify-content: center;
}
[dir="rtl"] .sidebar__toggle { transform: translateX(50%); }

.backdrop {
  display: none; position: fixed; inset: 0; z-index: 1000;
  background: rgba(15, 23, 42, 0.45);
}

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: var(--cwa-topbar);
  padding: calc(8px + var(--safe-t)) var(--cwa-pad) 8px;
  background: var(--cwa-sidebar); color: #fff;
}
.topbar__menu {
  width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.15);
  border-radius: 12px; background: rgba(255,255,255,.08); color: #fff; cursor: pointer;
}
.topbar__title { font-weight: 700; font-size: 0.95rem; }
.topbar__meta { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; color: rgba(248,250,252,.8); }

.workspace {
  flex: 1;
  min-width: 0;
  min-height: 100dvh;
}

.page {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  padding: var(--cwa-pad);
  padding-bottom: calc(var(--cwa-pad) + var(--safe-b) + 16px);
  max-width: 1440px;
  margin: 0 auto;
}
.page > * { min-width: 0; }

/* ========== DASHBOARD ========== */
@keyframes dashIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}
.dash { display: flex; flex-direction: column; gap: 14px; }
.dash-hero {
  display: flex; align-items: center; justify-content: space-between; gap: var(--gap);
  padding: 16px 18px;
  border-radius: 18px;
  background: #fff;
  color: var(--cwa-text);
  border: 1px solid #d7e8e6;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.04);
  flex-wrap: wrap;
}
.dash-hero--welcome {
  align-items: stretch;
  padding: 22px 24px;
  border: 0;
  color: #f4fffe;
  background:
    radial-gradient(ellipse 70% 90% at 100% 0%, rgba(62, 239, 230, 0.32), transparent 55%),
    radial-gradient(ellipse 50% 80% at 0% 110%, rgba(18, 196, 190, 0.22), transparent 52%),
    linear-gradient(135deg, #031c1b 0%, #0b3d3a 52%, #0f766e 100%);
  box-shadow: 0 18px 40px rgba(4, 36, 35, 0.18);
}
.dash-hero__copy { min-width: min(100%, 16rem); flex: 1; }
.dash-kicker {
  margin: 0 0 8px;
  font-size: 0.72rem;
  font-weight: 800;
  color: #7ee8e2;
}
.dash-hero__brand { display: flex; align-items: center; gap: 14px; min-width: 0; }
.dash-hero__brand img { height: 44px; width: auto; max-width: 200px; object-fit: contain; }
.dash-hero h1 { margin: 0 0 4px; font-size: var(--title); font-weight: 700; }
.dash-hero--welcome h1 { font-size: 1.28rem; color: #fff; letter-spacing: -0.02em; }
.dash-hero p { margin: 0; color: var(--cwa-muted); font-size: var(--type); }
.dash-hero--welcome p { color: rgba(244, 255, 254, 0.78); max-width: 36rem; }
.dash-hero__kpis { display: flex; gap: 10px; flex-wrap: wrap; }
.dash-hero--welcome .dash-hero__kpis { align-items: stretch; }
.dash-hero-kpi {
  text-align: center; padding: 10px 16px; border-radius: 14px;
  background: #f4faf9; border: 1px solid #d7e8e6; min-width: 96px; color: #0f766e;
}
.dash-hero--welcome .dash-hero-kpi {
  min-width: 124px;
  text-align: start;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  color: #fff;
  backdrop-filter: blur(10px);
}
.dash-hero-kpi strong { display: block; font-size: var(--kpi); font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.dash-hero--welcome .dash-hero-kpi strong { font-size: 1.28rem; }
.dash-hero-kpi span { font-size: var(--type-xs); opacity: 0.85; }
.dash-hero--welcome .dash-worlds { margin: 12px 0 0; }
.dash-hero--welcome .chip {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
  color: #e8fffc;
}
.dash-hero--welcome .chip.is-on {
  background: #12c4be;
  border-color: #12c4be;
  color: #042f2e;
}
.dash-worlds { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; }
.dash-dock {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--cwa-border);
  border-radius: 16px;
}
.dash-dock .chip { min-height: 36px; border-radius: 12px; }
.chip--market { background: #042423; border-color: #042423; color: #7ee8e2; }
.chip--market:hover { background: #0b3d3a; border-color: #0b3d3a; color: #fff; }
.dash-name { display: flex; align-items: center; gap: 10px; min-width: 0; }
.dash-name__av {
  width: 30px; height: 30px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  background: #ccfbf1; color: #0f766e; font-weight: 800; font-size: 0.78rem;
}
.dash-name strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.listing-contact { margin: 8px 0 12px; }
button.dash-hero-kpi { font: inherit; cursor: pointer; }

.kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
}
.dash .kpis { grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); }
.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.tenant-pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: stretch; }
.tenant-pair .card { min-height: 0; }
.card__head i { margin-inline-end: 8px; color: #0f766e; }
.tenant-files { padding: 0 16px 16px; }
.tenant-files strong { display: block; margin-bottom: 8px; font-size: 0.8rem; color: #0f766e; }
.tenant-kpis { margin-top: 0; }
.card .form-grid { padding: 16px; }
.card .form-grid .form-grid, .tenant-box .form-grid { padding: 0; }
.kpi {
  padding: 16px; border-radius: 18px; background: #fff;
  border: 1px solid var(--cwa-border); box-shadow: 0 2px 8px rgba(61, 90, 128, 0.05);
  transition: box-shadow 0.2s ease, border-color 0.2s ease; min-width: 0;
  animation: dashIn 0.35s ease both;
}
.kpi:hover { box-shadow: 0 10px 22px rgba(15, 118, 110, 0.08); border-color: #cde8e4; }
.kpi__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; gap: 8px; }
.kpi__icon {
  width: 36px; height: 36px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 0.9rem; flex-shrink: 0;
}
.kpi__value {
  font-size: 1.28rem; font-weight: 800; line-height: 1.15;
  font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.kpi__label { display: block; font-weight: 700; color: #475569; font-size: var(--type-sm); }
.kpi__hint { display: block; margin-top: 6px; font-size: var(--type-xs); color: var(--cwa-soft); }
.tone-blue .kpi__icon { background: #ccfbf1; color: #0f766e; }
.tone-green .kpi__icon { background: #d1fae5; color: #059669; }
.tone-cyan .kpi__icon { background: #e0f2fe; color: #0284c7; }
.tone-amber .kpi__icon { background: #fef3c7; color: #d97706; }
.tone-purple .kpi__icon { background: #ede9fe; color: #7c3aed; }
.tone-red .kpi__icon { background: #fee2e2; color: #dc2626; }

.charts {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap);
}
.data-row {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.85fr); gap: var(--gap);
  align-items: start;
}
.data-row__side { display: grid; gap: var(--gap); min-width: 0; }
.panels { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: var(--gap); }
.kpis > *, .charts > *, .data-row > *, .panels > *, .card, .table-wrap { min-width: 0; }

.card {
  background: #fff; border: 1px solid var(--cwa-border); border-radius: 18px;
  box-shadow: 0 2px 10px rgba(61, 90, 128, 0.05); overflow: hidden;
}
.dash .card { border-radius: 18px; }
form.card { overflow: visible; }
.charts .card { display: flex; flex-direction: column; min-height: 248px; }
.card__head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 14px 16px; border-bottom: 1px solid #eef4f3; background: #fff;
}
.card__head h2 { margin: 0; font-size: var(--type); font-weight: 700; color: #334155; }
.badge {
  font-size: var(--type-xs); font-weight: 600; padding: 4px 10px; border-radius: 999px;
  background: #ccfbf1; color: #0f766e; white-space: nowrap;
}

.bars { display: flex; align-items: flex-end; justify-content: space-around; gap: 8px; padding: 16px 16px 14px; flex: 1; }
.bars__col { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; max-width: 72px; border: 0; background: transparent; padding: 0; color: inherit; }
.bars__col.is-jump { cursor: pointer; }
.bars__value { font-size: var(--type-xs); font-weight: 700; color: #475569; margin-bottom: 6px; font-variant-numeric: tabular-nums; }
.bars__track { width: 100%; height: var(--chart); display: flex; align-items: flex-end; justify-content: center; }
.bars__fill {
  width: 56%; max-width: 24px; border-radius: 7px 7px 3px 3px; min-height: 4px;
  background: linear-gradient(180deg, #12c4be, #067a76);
}
.bars__label { margin-top: 8px; font-size: var(--type-xs); font-weight: 600; color: #64748b; text-align: center; }

.pipe { display: flex; flex-direction: column; gap: 10px; padding: 16px; flex: 1; justify-content: center; }
.pipe__row {
  display: grid; grid-template-columns: minmax(4.5rem, 0.7fr) minmax(0, 1.6fr) auto;
  gap: 10px; align-items: center; width: 100%;
  border: 0; background: transparent; padding: 4px 0; color: inherit; font: inherit; text-align: start;
}
.pipe__row.is-jump { cursor: pointer; }
.pipe__row:hover .pipe__name { color: #0f766e; }
.pipe__name { font-size: var(--type-sm); font-weight: 700; color: #475569; }
.pipe__track {
  height: 10px; border-radius: 999px; background: #eef4f3; overflow: hidden;
}
.pipe__track i { display: block; height: 100%; border-radius: 999px; min-width: 0; }
.pipe__n { font-weight: 800; font-variant-numeric: tabular-nums; color: #0f172a; font-size: var(--type); min-width: 1.5rem; }

.trend { padding: 12px 16px 14px; flex: 1; display: flex; flex-direction: column; }
.trend__legend { display: flex; gap: 14px; margin-bottom: 10px; font-size: var(--type-sm); color: #64748b; flex-wrap: wrap; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 999px; margin-inline-end: 4px; }
.dot-a { background: #5eead4; }
.dot-b { background: #38bdf8; }
.trend__grid { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; flex: 1; min-height: var(--chart); }
.trend__col { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.trend__pair { display: flex; align-items: flex-end; gap: 4px; height: var(--chart); }
.trend__bar { width: 10px; border-radius: 999px; min-height: 3px; }
.trend__bar.a { background: linear-gradient(180deg, #5eead4, #0f766e); }
.trend__bar.b { background: linear-gradient(180deg, #7dd3fc, #0284c7); }

.donut-wrap { display: flex; align-items: center; gap: 16px; padding: 16px; }
.donut { width: 112px; height: 112px; border-radius: 50%; position: relative; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(15, 118, 110, 0.08); }
.donut__hole {
  position: absolute; inset: 18px; border-radius: 50%; background: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 0 0 6px #fff;
}
.donut__hole strong { font-size: 1.15rem; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.donut__hole span { font-size: var(--type-xs); color: var(--cwa-soft); }
.legend { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 0; }
.legend li { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: var(--type-sm); }
.legend li.is-jump { cursor: pointer; border-radius: 8px; }
.legend li.is-jump:hover { background: #f8fafc; }
.legend__dot { width: 10px; height: 10px; border-radius: 999px; flex-shrink: 0; }
.legend__name { flex: 1; color: #475569; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.legend__val { font-weight: 600; color: #334155; font-size: var(--type-sm); font-variant-numeric: tabular-nums; }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; border-collapse: collapse; font-size: var(--type); min-width: 36rem; border: 1px solid #b7cfcb; }
.data-row .table { min-width: 28rem; }
.table th {
  text-align: start; padding: 8px 10px; font-size: var(--type-xs); font-weight: 700;
  color: #0f3d3a; background: #e7f2f0;
  border-bottom: 1px solid #b7cfcb;
}
body[data-lang="en"] .table th { text-transform: uppercase; letter-spacing: 0.03em; }
.table td { padding: 8px 10px; color: #334155; border-bottom: 1px solid #d5e3e1; }
.table tbody tr:nth-child(odd) { background: #fff; }
.table tbody tr:nth-child(even) { background: #f2f6f5; }
.table tbody tr:hover { background: #e5f4f1; }
.stage { display: inline-block; padding: 3px 8px; border-radius: 999px; background: #ccfbf1; color: #0f766e; font-size: var(--type-xs); font-weight: 600; }
.money { font-weight: 700; color: #059669; font-variant-numeric: tabular-nums; }

.mini { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; }
.mini__item {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  border-radius: 14px; background: #f6fbfa; border: 1px solid #e7f2f0; min-width: 0;
}
.mini__item i {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 0.75rem; flex-shrink: 0;
}
.mini__item strong { display: block; font-size: 0.95rem; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.mini__item span { font-size: var(--type-xs); color: var(--cwa-soft); }
button.mini__item { font: inherit; text-align: start; width: 100%; cursor: pointer; }
.kpi.is-jump, .dash-hero-kpi.is-jump { cursor: pointer; }
.tone-blue i { background: #ccfbf1; color: #0f766e; }
.tone-green i { background: #d1fae5; color: #059669; }
.tone-cyan i { background: #e0f2fe; color: #0284c7; }
.tone-amber i { background: #fef3c7; color: #d97706; }
.tone-purple i { background: #ede9fe; color: #7c3aed; }

.quick { display: flex; flex-wrap: wrap; gap: 8px; padding: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 0 12px; min-height: 32px; border: 1px solid var(--cwa-border); border-radius: 999px;
  background: #fff; color: #334155; font-size: var(--type-sm); cursor: pointer;
}
.chip:hover { border-color: #93c5fd; background: #dbeafe; color: #1d4ed8; }
.chip.is-on { background: #12c4be; border-color: #12c4be; color: #042f2e; font-weight: 700; }

.placeholder {
  background: #fff; border: 1px solid var(--cwa-border); border-radius: 16px;
  padding: 28px 22px; color: var(--cwa-muted); line-height: 1.8;
}
.placeholder h2 { margin: 0 0 8px; color: var(--cwa-text); font-size: 1.15rem; }

.credit { text-align: center; padding: 18px 16px 8px; font-size: 0.8125rem; color: var(--cwa-soft); }

@media (max-width: 1200px) {
  .data-row { grid-template-columns: 1fr; }
  .data-row__side { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 1100px) {
  .kpis, .kpis-3, .kpis-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .charts, .panels, .tenant-pair, .rep-grid, .rep-money { grid-template-columns: 1fr; }
  .rep-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .rep-stats--few { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 991px) {
  .sidebar {
    position: fixed;
    top: 0; bottom: 0;
    width: min(86vw, 300px);
    min-height: 0;
    transform: translateX(-105%);
  }
  .sidebar__nav { overflow-y: auto; flex: 1; }
  [dir="rtl"] .sidebar { transform: translateX(105%); }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar.is-collapsed { width: min(86vw, 300px); }
  .sidebar.is-collapsed .sidebar__brand-text,
  .sidebar.is-collapsed .sidebar__section,
  .sidebar.is-collapsed .sidebar__item span,
  .sidebar.is-collapsed .sidebar__footer-btn span,
  .sidebar.is-collapsed .world-tab span,
  .sidebar.is-collapsed .desk-tab span { display: flex; }
  .sidebar.is-collapsed .world-tabs,
  .sidebar.is-collapsed .desk-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .sidebar.is-collapsed .sidebar__item { justify-content: flex-start; padding: 10px 12px; }
  .sidebar.is-collapsed .sidebar__brand-text { display: flex; }
  .workspace, .app.is-collapsed .workspace { padding-inline-start: 0; }
  .backdrop.is-on { display: block; }
  .sidebar__toggle { display: none; }
}
@media (min-width: 992px) {
  .topbar { display: none; }
}
@media (max-width: 768px) {
  .data-row, .data-row__side { grid-template-columns: 1fr; }
  .dash-hero, .dash-hero--welcome { padding: 16px; }
  .dash-hero-kpi { min-width: 88px; padding: 8px 12px; }
  .dash-hero--welcome .dash-hero-kpi { min-width: calc(50% - 6px); }
  .pipe__row { grid-template-columns: 1fr auto; }
  .pipe__track { grid-column: 1 / -1; }
  .rep-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rep-grid > .rep-table { min-height: 0; }
}
@media (max-width: 520px) {
  .kpis, .kpis-3, .kpis-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini { grid-template-columns: 1fr; }
  .fx-wallets { grid-template-columns: 1fr; }
  .bars { padding: 12px 10px 10px; }
  .trend__bar { width: 8px; }
}

.ops-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--gap); flex-wrap: wrap;
}
.ops-head h1 { margin: 0 0 4px; font-size: var(--title); }
.ops-head p { margin: 0; color: var(--cwa-muted); font-size: var(--type); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--ctrl); padding: 0 14px; border: 0; border-radius: 12px;
  font-weight: 600; cursor: pointer; font-size: var(--type);
}
.btn-primary { color: #041111; background: var(--cwa-btn); box-shadow: 0 8px 18px rgba(18, 196, 190, 0.28); }
.btn-soft { background: #fff; color: #334155; border: 1px solid #e2e8f0; }
.btn-danger { background: #fee2e2; color: #b91c1c; }
.filters {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end;
}
.filters label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: var(--type-sm); font-weight: 700; color: #475569;
}
.filters input, .filters select, .field input, .field select, .field textarea {
  min-height: var(--ctrl); border: 1px solid #cbd5e1; border-radius: 12px;
  background: #fff; padding: 0.5rem 0.75rem; color: var(--cwa-text); width: 100%;
}
.filters input { max-width: 280px; }
.filters select { width: auto; min-width: 140px; }
.seek {
  display: flex; align-items: center; gap: 10px;
  min-height: var(--ctrl); padding: 0 14px;
  border: 1px solid #cbd5e1; border-radius: 12px; background: #fff;
  flex: 1; min-width: min(100%, 18rem);
}
.seek i { color: #0f766e; flex-shrink: 0; }
.seek input, .filters .seek input {
  border: 0; outline: 0; padding: 0; min-height: 0; width: 100%; max-width: none; background: transparent;
}
.card__head .seek { flex: 1; max-width: 22rem; margin-inline-start: auto; }
.who { display: flex; align-items: center; gap: 10px; min-width: 0; }
.who__av {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center;
  background: #ccfbf1; color: #0f766e; font-weight: 800; font-size: 0.75rem;
}
.who strong { font-weight: 700; color: #0f172a; }
.table tbody tr[data-open] { cursor: pointer; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: var(--type-sm); font-weight: 700; color: #475569; }
.field.is-need input, .field.is-need select, .field.is-need textarea {
  background: #fee2e2;
  border-color: #f87171;
}
.field .need-msg { color: #b91c1c; font-size: 0.8rem; }
.form-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--gap);
}
.form-grid.is-simple { max-width: 720px; }
.form-stack { display: flex; flex-direction: column; gap: var(--gap); }
.form-stack .form-grid { padding: 16px; }
.line-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.line-pick__col { display: flex; flex-direction: column; gap: 8px; padding: 14px; border: 1px solid #e2e8f0; border-radius: 12px; background: #f8fafc; }
.line-pick__col h3 { margin: 0 0 4px; font-size: 0.9rem; }
.line-check { display: flex; align-items: flex-start; gap: 8px; font-size: 0.9rem; cursor: pointer; }
.line-check input { margin-top: 3px; width: 16px; height: 16px; }
.line-mini { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
@media (max-width: 720px) { .line-pick { grid-template-columns: 1fr; } }
.form-grid .wide { grid-column: 1 / -1; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.check { display: flex; gap: 8px; align-items: center; font-size: 0.9rem; padding: 6px 0; }
.check input { width: 18px; height: 18px; }
.pill {
  display: inline-flex; align-items: center; padding: 3px 8px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; white-space: nowrap;
}
.pill-car { background: #dbeafe; color: #1d4ed8; }
.pill-aqar { background: #d1fae5; color: #047857; }
.pill-both { background: #ede9fe; color: #6d28d9; }
.pill-active { background: #d1fae5; color: #047857; }
.pill-trial { background: #fef3c7; color: #b45309; }
.pill-suspended { background: #fee2e2; color: #b91c1c; }
.pill-cancelled, .pill-archived { background: #e2e8f0; color: #475569; }
.pill-verified { background: #dbeafe; color: #1d4ed8; }
.pill-pending { background: #fef3c7; color: #b45309; }
.pill-rejected { background: #fee2e2; color: #b91c1c; }
.pill-available, .pill-published, .pill-paid, .pill-won, .pill-completed { background: #d1fae5; color: #047857; }
.pill-reserved, .pill-due, .pill-qualified, .pill-scheduled, .pill-offplan, .pill-medium { background: #fef3c7; color: #b45309; }
.pill-rented, .pill-assigned, .pill-proposition { background: #dbeafe; color: #1d4ed8; }
.pill-sold, .pill-closed { background: #ede9fe; color: #6d28d9; }
.pill-maintenance, .pill-in_progress, .pill-construction, .pill-negotiation { background: #e0e7ff; color: #4338ca; }
.pill-unavailable, .pill-draft, .pill-ended, .pill-lost, .pill-refunded, .pill-inactive { background: #e2e8f0; color: #475569; }
.pill-new { background: #e0f2fe; color: #0369a1; }
.pill-high { background: #fee2e2; color: #b91c1c; }
.pill-low { background: #f1f5f9; color: #475569; }
.pill-pay-draft { background: #999999; color: #fff; }
.pill-pay-active { background: #0033ff; color: #fff; }
.pill-pay-upcoming { background: #ffff33; color: #111; }
.pill-pay-due_today { background: #ffcc00; color: #111; }
.pill-pay-overdue { background: #ff0000; color: #fff; }
.pill-pay-paid { background: #33ff33; color: #111; }
.pill-pay-deferred { background: #cc00cc; color: #fff; }
.pill-pay-partial { background: #00ccff; color: #111; }
.pill-pay-cancelled { background: #000; color: #fff; }
.pill-pay-refunded { background: #e2e8f0; color: #475569; }
.pill-pay-remain { background: #f59e0b; color: #111; }
.sheet {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15, 23, 42, 0.45);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 8vh 16px; overflow: auto;
}
.sheet__card { width: min(720px, 100%); max-height: 84vh; overflow: auto; }
.sheet__card .card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.btn-sm { min-height: 34px; padding: 0 10px; font-size: 0.78rem; border-radius: 10px; }
.flash {
  padding: 10px 14px; border-radius: 12px;
  background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; font-weight: 600;
}
.flash.is-err { background: #fef2f2; color: #991b1b; border-color: #fecaca; }
.save-fail {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0; padding: 12px 16px;
  background: #9f1239; color: #fff; font-weight: 700; font-size: 0.88rem; line-height: 1.45;
  position: sticky; top: var(--cwa-topbar); z-index: 40;
}
.save-fail[hidden] { display: none; }
.save-fail span { flex: 1; }
.save-fail__x {
  border: 0; background: rgba(255,255,255,.16); color: #fff; cursor: pointer;
  width: 28px; height: 28px; border-radius: 8px; font-size: 1rem; line-height: 1;
}
.action-row { display: flex; gap: 8px; flex-wrap: wrap; }
.form-hint { margin: 0; color: var(--cwa-muted); font-size: 0.8rem; }
.tenant-box {
  background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 14px; margin-bottom: 4px;
}
.tenant-box strong { display: block; margin-bottom: 4px; }
.photo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px;
  padding: 0 16px 16px;
}
.photo-grid img { width: 100%; height: 120px; object-fit: cover; border-radius: 12px; border: 1px solid var(--cwa-border); }
.photo-tile { position: relative; margin: 0; }
.photo-del {
  position: absolute; top: 6px; inset-inline-end: 6px;
  width: 26px; height: 26px; border: 0; border-radius: 999px;
  background: rgba(15, 23, 42, 0.72); color: #fff; font-size: 1rem; cursor: pointer; line-height: 1;
}
.photo-cover {
  position: absolute; bottom: 8px; inset-inline-start: 8px;
  background: #12c4be; color: #041111; font-size: 0.68rem; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
}
.photo-uploader { padding: 16px; }
.photo-drop {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; min-height: 140px; padding: 20px; text-align: center;
  border: 1.5px dashed #9fd8d4; border-radius: 16px; background: #f4faf9; color: #0f766e; cursor: pointer;
}
.photo-drop.is-over { background: #ccfbf1; border-color: #12c4be; }
.photo-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-drop i { font-size: 1.4rem; }
.photo-drop strong { font-size: 0.92rem; }
.photo-drop span { font-size: 0.78rem; color: #5c7472; }
.name-with-photo { display: flex; align-items: center; gap: 10px; }
.row-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: #f1f5f9; }
.row-thumb.is-empty { display: grid; place-items: center; color: #94a3b8; }
.detail-cover { width: min(280px, 100%); height: 160px; object-fit: cover; border-radius: 12px; flex-shrink: 0; }
.pay-row { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pay-row select, .pay-row input {
  min-height: 34px; border: 1px solid #e2e8f0; border-radius: 10px; padding: 0 8px; max-width: 140px;
}
.pay-collect {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  min-width: 16rem; padding: 4px 0;
}
.pay-collect label {
  display: flex; flex-direction: column; gap: 4px;
  font-size: 0.72rem; font-weight: 700; color: #64748b;
}
.pay-collect select, .pay-collect input[type="number"], .pay-collect input[type="text"], .pay-collect input[type="date"], .pay-collect input:not([type]) {
  min-height: 34px; border: 1px solid #e2e8f0; border-radius: 10px; padding: 0 8px; width: 100%; max-width: none;
  font: inherit; color: #0f172a; background: #fff;
}
.pay-collect .wide { grid-column: 1 / -1; }
.pay-collect button { justify-self: start; }
.pay-collect .pay-mode {
  flex-direction: row; align-items: center; gap: 8px;
  font-size: 0.85rem; font-weight: 800; color: #0f172a;
}
.pay-collect .pay-mode input { width: auto; min-height: 18px; }
.pay-due-edit {
  min-height: 34px; border: 1px solid #cbd5e1; border-radius: 10px;
  padding: 0 8px; max-width: 11rem; font: inherit; background: #fff;
}
.pay-how { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pay-how span {
  font-size: 0.72rem; font-weight: 700; color: #0f766e;
  background: #f0fdfa; border: 1px solid #99f6e4; border-radius: 999px; padding: 2px 8px;
}
tr.is-overdue td { background: #fff7ed; }
.kpi.tone-red { background: #fef2f2; }
.market-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse 80% 50% at 100% 0%, rgba(18, 196, 190, 0.12), transparent 50%),
    radial-gradient(ellipse 60% 40% at 0% 20%, rgba(62, 239, 230, 0.1), transparent 46%),
    #f4faf9;
}
.market-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px clamp(16px, 3vw, 32px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid #d7e8e6;
  backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 5;
}
.market-brand { display: flex; align-items: center; text-decoration: none; }
.market-brand img { height: 36px; width: auto; max-width: 168px; object-fit: contain; background: transparent; }
.market-nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.market-nav a, .market-nav button {
  border: 0; background: transparent; cursor: pointer;
  font-weight: 600; text-decoration: none; color: #334155;
  min-height: 36px; padding: 0 10px; border-radius: 999px;
}
.market-nav a:hover, .market-nav button:hover { background: #ecfeff; color: #067a76; }
.market-nav .lang-btn.is-active, .market-nav a.is-on { background: #ecfeff; color: #067a76; }
.market-nav .mk-login {
  background: var(--cwa-btn); color: #041111; padding: 0 14px;
  box-shadow: 0 6px 16px rgba(18, 196, 190, 0.22);
}
.market-nav .mk-login:hover { color: #041111; filter: brightness(1.04); }
.market-main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 64px; flex: 1; }

.site-foot {
  margin-top: auto;
  background:
    radial-gradient(ellipse 70% 80% at 100% 0%, rgba(18, 196, 190, 0.18), transparent 55%),
    linear-gradient(180deg, #071211 0%, #041111 100%);
  color: #d7eeeb;
  padding: 36px clamp(16px, 3vw, 32px) 28px;
}
.site-foot__in {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 28px;
}
.site-foot__brand img { height: 34px; width: auto; max-width: 160px; display: block; margin-bottom: 12px; }
.site-foot__brand p { margin: 0; color: #8fb8b3; font-size: 0.88rem; line-height: 1.65; max-width: 22rem; }
.site-foot h3 {
  margin: 0 0 12px;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5eead4;
}
.site-foot nav { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.site-foot a {
  color: #e9fffd;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}
.site-foot a:hover { color: #5eead4; }
.site-foot__copy {
  width: min(1180px, 100%);
  margin: 22px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.08);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  color: #7fa39e;
  font-size: 0.78rem;
}
.site-foot__copy a { color: #9ee8df; font-weight: 700; }

.legal-page { display: flex; flex-direction: column; min-height: 100dvh; }
.legal-page .t-en { display: none; }
html[lang="en"] .legal-page .t-ar { display: none; }
html[lang="en"] .legal-page .t-en { display: revert; }
html[lang="en"] .legal-page p.t-en,
html[lang="en"] .legal-page h1.t-en,
html[lang="en"] .legal-page h2.t-en,
html[lang="en"] .legal-page h3.t-en,
html[lang="en"] .legal-page ul.t-en,
html[lang="en"] .legal-page ol.t-en,
html[lang="en"] .legal-page div.t-en { display: block; }
.legal-main { width: min(920px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 56px; flex: 1; }
.legal-hero {
  padding: 26px 26px 22px;
  border-radius: 22px;
  margin-bottom: 18px;
  color: #042423;
  background:
    radial-gradient(circle at 12% 20%, rgba(255,255,255,0.42), transparent 46%),
    linear-gradient(135deg, #12c4be 0%, #067a76 100%);
  box-shadow: 0 18px 40px rgba(6, 122, 118, 0.18);
}
.legal-hero .kicker {
  margin: 0 0 6px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(4, 36, 35, 0.72);
}
.legal-hero h1 { margin: 0 0 8px; font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -0.03em; }
.legal-hero p { margin: 0; max-width: 40rem; line-height: 1.7; color: rgba(4, 36, 35, 0.82); }
.legal-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
}
.legal-tile {
  background: #fff;
  border: 1px solid #d7e8e6;
  border-radius: 16px;
  padding: 14px 14px 12px;
  box-shadow: 0 8px 24px rgba(6, 122, 118, 0.06);
}
.legal-tile i {
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  background: #ecfeff; color: #0f766e; margin-bottom: 8px;
}
.legal-tile strong { display: block; font-size: 0.9rem; }
.legal-tile span { display: block; margin-top: 4px; color: #5b6b73; font-size: 0.78rem; line-height: 1.5; }
.legal-card {
  background: #fff;
  border: 1px solid #d7e8e6;
  border-radius: 20px;
  padding: 22px 24px 28px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.04);
}
.legal-card h2 {
  margin: 22px 0 8px;
  font-size: 1.05rem;
  color: #0f766e;
}
.legal-card h2:first-child { margin-top: 0; }
.legal-card p, .legal-card li { color: #334155; line-height: 1.75; }
.legal-card ul, .legal-card ol { padding-inline-start: 1.2rem; }
.legal-card a { color: #0f766e; font-weight: 700; }
.legal-cta {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  margin-top: 18px; padding: 14px 16px; border-radius: 14px;
  background: #ecfeff; border: 1px solid #b8ebe6;
}
.legal-cta a.btn {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 40px; padding: 0 14px; border-radius: 999px;
  background: var(--cwa-btn, linear-gradient(135deg, #12c4be, #3eefe6));
  color: #041111 !important; text-decoration: none; font-weight: 800;
}
.legal-steps { display: grid; gap: 10px; margin: 12px 0 0; }
.legal-step {
  display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start;
  padding: 12px 14px; border-radius: 14px; background: #f7fbfb; border: 1px solid #e4f1ef;
}
.legal-step b {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: #12c4be; color: #042423;
}
.faq { margin: 0; }
.faq details {
  border-bottom: 1px solid #e4f1ef; padding: 12px 0;
}
.faq summary { cursor: pointer; font-weight: 700; color: #0f172a; }
.faq p { margin: 8px 0 0; }

@media (max-width: 860px) {
  .legal-tiles { grid-template-columns: 1fr 1fr; }
  .site-foot__in { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 520px) {
  .legal-tiles { grid-template-columns: 1fr; }
}

.mk-intro { margin-bottom: 22px; }
.mk-intro h1 { margin: 0 0 6px; font-size: clamp(1.6rem, 3vw, 2.1rem); letter-spacing: -0.03em; }
.mk-intro p { margin: 0; color: #5b6b73; font-size: 1rem; max-width: 42rem; line-height: 1.6; }
.mk-worlds { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 20px 0 0; }
.mk-world {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 16px; border-radius: 16px; text-align: start;
  border: 1px solid #d7e8e6; background: #fff; cursor: pointer; color: #0f172a;
}
.mk-world i {
  width: 42px; height: 42px; border-radius: 12px;
  display: grid; place-items: center; background: #ecfeff; color: #0f766e;
}
.mk-world strong { display: block; font-size: 0.95rem; }
.mk-world span { display: block; color: #64748b; font-size: 0.78rem; margin-top: 2px; }
.mk-world.is-on { border-color: #12c4be; box-shadow: 0 0 0 3px rgba(18, 196, 190, 0.16); }
a.mk-world { text-decoration: none; color: inherit; }
.mk-halls {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  margin-top: 14px;
}
.mk-halls > span { font-weight: 700; color: #0f172a; }
.mk-halls .mk-chip { text-decoration: none; display: inline-flex; align-items: center; }
.mk-dock {
  display: flex; flex-wrap: wrap; gap: 10px; align-items: center;
  padding: 12px; margin-bottom: 18px; border-radius: 18px;
  background: #fff; border: 1px solid #d7e8e6;
}
.mk-search {
  flex: 1 1 220px; display: flex; align-items: center; gap: 8px;
  min-height: 46px; padding: 0 14px; border-radius: 12px; background: #f4faf9; border: 1px solid #d7e8e6;
}
.mk-search i { color: #0f766e; }
.mk-search input { flex: 1; border: 0; background: transparent; min-width: 0; min-height: 44px; }
.mk-search input:focus { outline: 0; }
.mk-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.mk-chip {
  min-height: 38px; padding: 0 12px; border-radius: 999px; border: 1px solid #d7e8e6;
  background: #fff; color: #475569; font-weight: 600; cursor: pointer;
}
.mk-chip.is-on { background: #12c4be; border-color: #12c4be; color: #041111; }
.mk-dock input.mk-extra {
  min-height: 46px; width: 120px; border: 1px solid #d7e8e6; border-radius: 12px;
  background: #f4faf9; padding: 0 12px;
}
.mk-count { margin: 0 0 14px; color: #5b6b73; font-size: 0.88rem; font-weight: 600; }
.mk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.mk-card {
  background: #fff; border: 1px solid #d7e8e6; border-radius: 20px; overflow: hidden;
  text-decoration: none; display: flex; flex-direction: column; color: inherit;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.mk-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08); }
.mk-card__media {
  position: relative; height: 210px; background: #e8f3f2;
  display: grid; place-items: center; color: #7a9090; font-size: 2rem;
}
.mk-card__media img { width: 100%; height: 210px; object-fit: cover; }
.mk-card__kind, .mk-card__sec {
  position: absolute; top: 12px; padding: 4px 10px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 700; background: rgba(255,255,255,0.94);
}
.mk-card__kind { inset-inline-start: 12px; color: #0f766e; }
.mk-card__sec { inset-inline-end: 12px; color: #334155; }
.mk-card__body { padding: 14px 16px 16px; display: grid; gap: 6px; }
.mk-card__body strong { font-size: 1rem; line-height: 1.35; }
.mk-card__meta { color: #64748b; font-size: 0.82rem; }
.mk-card__seller { display: block; margin-top: 4px; color: #0f766e; font-size: 0.75rem; font-weight: 600; }
.mk-card__body em { font-style: normal; color: #0f766e; font-weight: 800; font-size: 1.05rem; }
.mk-empty {
  grid-column: 1 / -1; padding: 48px 20px; text-align: center; color: #64748b;
  background: #fff; border: 1px dashed #cfe3e1; border-radius: 18px;
}

.mk-back {
  display: inline-flex; align-items: center; gap: 8px; margin-bottom: 16px;
  color: #067a76; font-weight: 700; text-decoration: none;
}
.mk-detail {
  display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.8fr);
  gap: 20px; align-items: start;
}
.mk-gallery { background: #fff; border: 1px solid #d7e8e6; border-radius: 22px; overflow: hidden; }
.mk-gallery__main { width: 100%; height: min(420px, 52vw); object-fit: cover; display: block; background: #e8f3f2; }
.mk-gallery__ph {
  height: min(320px, 50vw); display: grid; place-items: center; color: #7a9090; font-size: 3rem; background: #e8f3f2;
}
.mk-gallery__row { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 6px; padding: 8px; }
.mk-gallery__row img { width: 100%; height: 88px; object-fit: cover; border-radius: 10px; }
.mk-info, .mk-side {
  background: #fff; border: 1px solid #d7e8e6; border-radius: 22px; padding: 22px;
}
.mk-info h1 { margin: 0 0 6px; font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
.mk-info > p { margin: 0 0 10px; color: #64748b; }
.mk-price { margin: 0 0 12px !important; color: #0f766e !important; font-size: 1.45rem; font-weight: 800; }
.mk-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0; }
.mk-facts div { padding: 12px; border-radius: 14px; background: #f4faf9; }
.mk-facts dt { font-size: 0.72rem; color: #64748b; font-weight: 700; }
.mk-facts dd { margin: 4px 0 0; font-weight: 700; }
.mk-info .mk-desc { margin: 0; line-height: 1.7; color: #334155; }
.mk-side { display: grid; gap: 18px; }
.mk-side h2 { margin: 0 0 12px; font-size: 1rem; }
.mk-side .form-grid { grid-template-columns: 1fr; padding: 0; }
.mk-side .flash { margin: 0; }

@media (max-width: 860px) {
  .mk-worlds { grid-template-columns: 1fr; }
  .mk-detail { grid-template-columns: 1fr; }
  .mk-dock input.mk-extra { width: 100%; }
}
@media (max-width: 480px) {
  .market-main { width: calc(100% - 20px); padding-top: 18px; }
  .mk-card__media, .mk-card__media img { height: 180px; }
}
.lifecycle {
  background: #fff; border: 1px solid var(--cwa-border); border-radius: 18px;
  padding: 16px 16px 14px;
}
.lifecycle__head {
  display: flex; justify-content: space-between; gap: var(--gap); align-items: center;
  flex-wrap: wrap; margin-bottom: 14px;
}
.lifecycle__head h2 { margin: 0 0 2px; font-size: var(--type); }
.lifecycle__head p { margin: 0; color: var(--cwa-muted); font-size: var(--type-sm); }
.lifecycle__steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(108px, 1fr)); gap: 8px;
}
.lifecycle__steps button {
  width: 100%; border: 1px solid #e7f2f0; background: #f7fbfa; border-radius: 14px;
  padding: 10px; cursor: pointer; text-align: start; min-height: 72px;
}
.lifecycle__steps em {
  width: 22px; height: 22px; border-radius: 999px;
  display: grid; place-items: center;
  font-style: normal; font-size: 0.68rem; color: #64748b; font-weight: 800;
  background: #e2e8f0;
}
.lifecycle__steps em i { font-size: 0.62rem; }
.lifecycle__steps strong { display: block; font-size: var(--type-sm); margin: 8px 0 2px; color: #0f172a; }
.lifecycle__steps span { color: #0f766e; font-weight: 700; font-size: var(--type); }
.lifecycle__steps .is-done button { background: #ecfdf5; border-color: #a7f3d0; }
.lifecycle__steps .is-done em { background: #10b981; color: #fff; }
.lifecycle__steps .is-next button { background: #ecfeff; border-color: #67e8f9; box-shadow: 0 0 0 3px rgba(18, 196, 190, .12); }
.lifecycle__steps .is-next em { background: #12c4be; color: #042f2e; }
.row-link { cursor: pointer; }
.detail-hero {
  display: flex; justify-content: space-between; gap: var(--gap); flex-wrap: wrap;
  padding: 16px 18px; border-radius: var(--radius); background: #fff;
  border: 1px solid var(--cwa-border);
}
.detail-hero h2 { margin: 0 0 4px; font-size: var(--title); }
.detail-hero p { margin: 0; color: var(--cwa-muted); }
.badge-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.meta-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px;
  padding: 18px;
}
.meta-grid dt { font-size: 0.72rem; color: var(--cwa-soft); font-weight: 700; }
.meta-grid dd { margin: 2px 0 0; color: #0f172a; font-weight: 600; word-break: break-word; }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.tab {
  border: 1px solid #e2e8f0; background: #fff; color: #475569;
  border-radius: 999px; min-height: var(--ctrl); padding: 0 14px; cursor: pointer; font-weight: 600; font-size: var(--type);
}
.tab.is-on { background: #12c4be; color: #041111; border-color: #12c4be; }
.empty { padding: 28px; text-align: center; color: var(--cwa-muted); }
.guide-list { margin: 0; padding: 4px 18px 14px; }
.guide-list li { margin: 0 0 8px; color: #334155; line-height: 1.45; }
.estate-map td { white-space: normal; vertical-align: top; line-height: 1.45; }
.clickable tbody tr { cursor: pointer; }
.clickable tbody tr:hover { background: #eff6ff; }
.view-cell { display: flex; align-items: center; gap: 10px; }
.view-open {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-width: 34px; height: 34px; padding: 0 8px; border-radius: 10px;
  background: #eff6ff; color: #1d4ed8; flex: 0 0 auto;
}
.view-open.is-text { min-width: auto; padding: 0 10px; font-size: 0.78rem; font-weight: 700; }
.view-open.is-edit { background: #fff7ed; color: #c2410c; border: 0; cursor: pointer; min-width: auto; padding: 0 10px; font-size: 0.78rem; font-weight: 700; }
.view-open em { font-style: normal; }
.name-link { color: #1d4ed8; text-decoration: underline; text-underline-offset: 3px; }
.view-sub { color: #94a3b8; font-size: 0.75rem; }
.col-view { width: 1%; white-space: nowrap; display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.status-edit {
  min-width: 140px; font-weight: 700; cursor: pointer;
}
.books-hero {
  display: flex; align-items: flex-end; justify-content: space-between; gap: var(--gap); flex-wrap: wrap;
  padding: 16px 18px; border-radius: var(--radius);
  background: linear-gradient(135deg, #041111 0%, #0b2a28 100%);
  color: #e7fffd; border: 1px solid #12c4be55;
}
.books-hero span { display: block; font-size: var(--type-sm); color: #9ee8e4; margin-bottom: 2px; }
.books-hero strong { font-size: var(--kpi); font-weight: 800; color: #3eefe6; font-variant-numeric: tabular-nums; }
.books-hero p { margin: 0; max-width: 280px; color: #a7f3d0; font-size: var(--type-sm); line-height: 1.4; }
.books-hero.is-down strong { color: #fda4af; }
.books-bars {
  display: flex; align-items: stretch; gap: 8px; height: calc(var(--chart) + 28px); padding: 12px 16px 0;
}
.books-bar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.books-bar span { display: flex; align-items: flex-end; justify-content: center; gap: 4px; height: var(--chart); width: 100%; }
.books-bar i { display: block; width: 42%; max-width: 20px; border-radius: 7px 7px 2px 2px; }
.books-bar i.in, .books-legend i.in { background: #12c4be; }
.books-bar i.out, .books-legend i.out { background: #fb7185; }
.books-bar em { font-size: var(--type-xs); color: var(--cwa-muted); font-style: normal; }
.books-legend { display: flex; gap: 16px; padding: 10px 16px 14px; margin: 0; color: #64748b; font-size: var(--type-sm); }
.books-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 6px; vertical-align: -1px; }
.books-split { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: var(--gap); }
.ledger-in { color: #059669; font-weight: 700; }
.ledger-out { color: #dc2626; font-weight: 700; }
@media (max-width: 960px) {
  .books-split { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .form-grid, .meta-grid { grid-template-columns: 1fr; }
  .filters input, .filters select { max-width: none; width: 100%; }
}
.combo { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.combo select, .combo input { flex: 1; min-width: 140px; }
.combo__row {
  display: flex; align-items: center; gap: 8px; width: 100%;
  border: 1px solid var(--cwa-border); border-radius: 10px; padding: 0 10px; background: #fff;
}
.combo__row input { border: 0; outline: 0; padding: 8px 0; width: 100%; }
.combo__row i { color: var(--cwa-muted); }
.map-box { width: 100%; height: 220px; border: 0; border-radius: 12px; margin-top: 8px; }
.pay-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.pager {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px; font-size: var(--type-sm); color: #64748b; flex-wrap: wrap;
  border-top: 1px solid #f1f5f9; background: #fafbfd;
}
.pager em { font-style: normal; font-weight: 700; color: #334155; }
.pager button:disabled { opacity: 0.4; cursor: default; }
.pager__nums { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.pager__n {
  min-width: 32px; height: 32px; padding: 0 8px; border: 1px solid #e2e8f0; border-radius: 10px;
  background: #fff; color: #334155; font: inherit; font-weight: 700; cursor: pointer;
}
.pager__n.is-on { background: #12c4be; border-color: #12c4be; color: #042f2e; }
.pager__gap { padding: 0 4px; color: #94a3b8; }
a.tel { color: #0f766e; font-weight: 700; text-decoration: none; }
a.tel:hover { text-decoration: underline; }
.story { margin: 0; padding: 0; list-style: none; font-size: 0.75rem; color: #64748b; }
.story li { display: flex; gap: 8px; }
.story time { min-width: 76px; color: #94a3b8; }
.is-hidden, [hidden] { display: none !important; }

.deed {
  background: #fff;
  border: 1px solid #cde8e6;
  border-radius: 18px;
  padding: 22px 22px 18px;
  margin-bottom: 14px;
  box-shadow: 0 10px 30px rgba(6, 80, 78, 0.06);
  position: relative;
}
.deed::before {
  content: "";
  position: absolute;
  inset-inline-start: 0; top: 18px; bottom: 18px;
  width: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #12c4be, #3eefe6);
}
.deed__head {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 12px; padding-bottom: 14px; margin-bottom: 14px;
  border-bottom: 1px dashed #cde8e6;
}
.deed__brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.deed__brand img { height: 36px; width: auto; }
.deed__stamp {
  text-align: center; padding: 8px 16px; border: 1.5px solid #12c4be;
  border-radius: 12px; color: #067a76; min-width: 140px;
}
.deed__stamp strong { display: block; font-size: 1.05rem; }
.deed__stamp em { font-style: normal; font-size: 0.72rem; color: #5c7472; }
.deed__no { text-align: end; }
.deed__no span { display: block; font-size: 0.72rem; color: var(--cwa-muted); }
.deed__no b { font-size: 1.05rem; }
.deed__dates, .deed__block dl, .deed__parties section {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px 16px;
}
.deed__dates { margin-bottom: 16px; }
.deed__parties {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px;
}
.deed__parties section, .deed__block {
  background: #f4faf9; border: 1px solid #dff3f1; border-radius: 14px; padding: 12px 14px;
}
.deed h3 { margin: 0 0 10px; font-size: 0.82rem; color: #067a76; letter-spacing: 0.02em; }
.deed dt { font-size: 0.7rem; color: var(--cwa-muted); margin: 0 0 2px; }
.deed dd { margin: 0; font-weight: 600; }
.deed__note { margin: 0; color: #334155; white-space: pre-wrap; }
.deed__empty { margin: 0; color: var(--cwa-muted); font-size: 0.85rem; }
.deed__docs { display: flex; flex-wrap: wrap; gap: 10px; }
.deed__docs img { width: 120px; height: 80px; object-fit: cover; border-radius: 10px; border: 1px solid var(--cwa-border); }
.deed--preview { opacity: 0.96; }
.deed__seals {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px;
  padding-top: 14px; border-top: 1px dashed #cde8e6;
}
.deed__sign {
  min-height: 90px; display: grid; align-content: end; gap: 4px;
  padding: 10px 12px; border: 1px dashed #9ad8d4; border-radius: 12px; text-align: center;
}
.deed__seal { width: 54px; height: 54px; margin: 0 auto 6px; opacity: 0.9; }
.deed__sign span { font-size: 0.72rem; color: #067a76; }
.deed__sign em { font-style: normal; font-weight: 700; }
.amenity-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.col-picker { position: relative; background: #fff; }
.col-picker summary { cursor: pointer; list-style: none; padding: 8px 12px; border: 1px solid var(--cwa-border); border-radius: 10px; background: #fff; }
.col-picker summary::-webkit-details-marker { display: none; }
.col-picker:not([open]) .check { display: none !important; }
.col-picker[open] { z-index: 12; }
.col-picker[open] summary { border-color: #12c4be; border-radius: 10px 10px 0 0; }
.col-picker[open] .check {
  display: flex; gap: 8px; padding: 6px 12px;
  border-inline: 1px solid var(--cwa-border); background: #fff;
}
.col-picker[open] .check:last-of-type {
  border-bottom: 1px solid var(--cwa-border); border-radius: 0 0 10px 10px; padding-bottom: 10px;
}
.deed-list { display: grid; gap: 10px; }
.deed-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  background: #fff; border: 1px solid #d7ecea; border-radius: 16px; padding: 14px 16px;
  cursor: pointer;
}
.deed-card:hover { border-color: #12c4be; box-shadow: 0 8px 20px rgba(18, 196, 190, 0.1); }
.deed-card__mark {
  background: #12c4be; color: #042f2e; font-size: 0.72rem; font-weight: 800;
  padding: 8px 10px; border-radius: 10px; white-space: nowrap;
}
.deed-card p { margin: 4px 0 0; color: var(--cwa-muted); font-size: 0.82rem; }
.deed-card__parties { color: #0f766e !important; }
.deed-card__meta { text-align: end; display: grid; gap: 4px; justify-items: end; }
.deed-card__meta span { font-size: 0.75rem; color: var(--cwa-muted); }
.role-board {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px;
  margin-bottom: 16px;
}
.role-card {
  background: #fff; border: 1px solid #d7ecea; border-radius: 16px; padding: 14px;
}
.role-card i { color: #12c4be; margin-bottom: 8px; }
.role-card strong { display: block; margin-bottom: 6px; }
.role-card p { margin: 0; color: var(--cwa-muted); font-size: 0.8rem; line-height: 1.45; }
.role-perms { display: flex; flex-wrap: wrap; gap: 6px; }
.role-perms .chip { cursor: default; font-size: 0.72rem; }

@media (max-width: 768px) {
  .deed__parties, .deed-card { grid-template-columns: 1fr; }
  .deed-card__meta { text-align: start; justify-items: start; }
}

.sched-plan {
  border: 1px solid #d7ecea;
  border-radius: 14px;
  padding: 14px 16px;
  background: #f7fbfb;
}
.sched-plan__head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px;
}
.sched-plan__head h3 { margin: 0 0 4px; font-size: 0.98rem; }
.sched-plan__head p { margin: 0; color: var(--cwa-muted); font-size: 0.82rem; }
.sched-sum { margin: 0 0 10px; font-weight: 700; font-size: 0.86rem; }
.sched-sum.is-ok { color: #0d7370; }
.sched-sum.is-bad { color: #9b2c2c; }
.sched-table input, .sched-table select { width: 100%; }
.sched-upload {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 10px; border-radius: 8px; border: 1px dashed #0d7370;
  background: #fff; cursor: pointer; font-size: 0.78rem; font-weight: 700; color: #0d7370;
}
.sched-upload.is-off { opacity: 0.35; pointer-events: none; }
.sched-upload input { display: none; }
.check-thumb { display: inline-block; margin-top: 4px; font-size: 0.75rem; font-weight: 700; }
.extras-box, .consume-box {
  border: 1px solid #d7ecea; border-radius: 12px; padding: 12px 14px; background: #fff;
}
.extras-box strong, .consume-box strong { display: block; margin-bottom: 4px; }
.extras-box p, .consume-box p { margin: 0 0 10px; color: var(--cwa-muted); font-size: 0.82rem; }
.consume-row { display: grid; grid-template-columns: 1.4fr 0.55fr 0.7fr 1fr; gap: 8px; margin-bottom: 8px; }
.kanban {
  display: grid; grid-template-columns: repeat(6, minmax(150px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px;
}
.kanban--mnt { grid-template-columns: repeat(6, minmax(150px, 1fr)); }
.mnt-src, .party-modes, .seg {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.mnt-src button, .party-modes button, .seg button {
  border: 1px solid #d7ecea; background: #fff; border-radius: 10px; padding: 8px 12px;
  cursor: pointer; font-weight: 700; color: #115e59;
}
.mnt-src button.is-on, .party-modes button.is-on, .seg button.is-on {
  background: #0f766e; color: #fff; border-color: #0f766e;
}
.mnt-src button:disabled, .party-modes button:disabled {
  opacity: 0.45; cursor: not-allowed;
}
.mnt-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 12px 14px; border: 1px solid #d7ecea; border-radius: 12px; background: #f8fffe;
}
.mnt-card strong { font-size: 0.95rem; }
.mnt-card span { color: var(--cwa-muted); font-size: 0.82rem; }
.mnt-contracts { display: flex; flex-direction: column; gap: 8px; }
.mnt-contract {
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 12px; border: 1px solid #d7ecea; border-radius: 10px; background: #fff; cursor: pointer;
}
.mnt-contract:has(input:checked) { border-color: #0f766e; background: #f0fdfa; }
.mnt-bearers { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 8px; }
.mnt-bearer {
  display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px; border: 1px solid #d7ecea; border-radius: 12px; background: #fff; cursor: pointer;
}
.mnt-bearer:has(input:checked) { border-color: #0f766e; background: #f0fdfa; }
.mnt-bearer span { color: var(--cwa-muted); font-size: 0.78rem; }
.mnt-preview {
  padding: 10px 12px; border-radius: 10px; background: #ecfdf5; color: #065f46; font-weight: 700;
}
.mnt-pipe {
  display: flex; gap: 6px; list-style: none; margin: 0 0 14px; padding: 0; overflow-x: auto;
}
.mnt-pipe li {
  flex: 1 0 auto; display: flex; align-items: center; gap: 6px;
  padding: 8px 10px; border-radius: 999px; background: #f4f8f7; color: var(--cwa-muted);
  font-size: 0.78rem; font-weight: 700; white-space: nowrap;
}
.mnt-pipe li span {
  width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center;
  background: #d7ecea; color: #115e59; font-size: 0.72rem;
}
.mnt-pipe li.is-done { background: #ecfdf5; color: #065f46; }
.mnt-pipe li.is-on { background: #0f766e; color: #fff; }
.mnt-pipe li.is-on span { background: #fff; color: #0f766e; }
.kanban__card em.is-late { color: #b91c1c; font-weight: 800; }
.kanban__col {
  background: #f4f8f7; border: 1px solid #d7ecea; border-radius: 12px; padding: 10px; min-height: 180px;
}
.kanban__col header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.kanban__col header em { font-style: normal; color: var(--cwa-muted); font-size: 0.78rem; }
.kanban__card {
  display: block; width: 100%; text-align: start; margin: 0 0 8px; padding: 10px;
  border: 1px solid #d7ecea; border-radius: 10px; background: #fff; cursor: pointer;
}
.kanban__card strong { display: block; font-size: 0.86rem; }
.kanban__card span, .kanban__card em { display: block; font-size: 0.75rem; color: var(--cwa-muted); font-style: normal; }
@media (max-width: 1100px) { .kanban { grid-template-columns: repeat(3, minmax(180px, 1fr)); } }
@media (max-width: 720px) {
  .kanban {
    display: flex; grid-template-columns: none;
    overflow-x: auto; scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch; gap: 12px; padding-bottom: 12px;
  }
  .kanban__col {
    flex: 0 0 min(86vw, 320px); scroll-snap-align: start;
    max-height: 70vh; overflow-y: auto;
  }
  .consume-row { grid-template-columns: 1fr 1fr; }
}
.unit-mark { font-style: normal; color: #0f766e; font-weight: 700; margin-inline-start: 4px; }
.pay-deposit-opt {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start;
  padding: 10px 12px; border: 1px solid #0f766e; border-radius: 12px; background: #f0fdfa;
}
.learn-hero {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 18px 20px; border-radius: 16px; color: #042423;
  background:
    radial-gradient(circle at 12% 20%, rgba(255,255,255,0.45), transparent 42%),
    linear-gradient(135deg, #12c4be 0%, #067a76 100%);
}
.learn-hero h1 { margin: 4px 0 6px; font-size: 1.35rem; letter-spacing: -0.03em; }
.learn-hero p { margin: 0; max-width: 38rem; color: rgba(4, 36, 35, 0.78); font-size: 0.86rem; }
.learn-kicker {
  display: inline-block; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: #064e4b;
}
.learn-stats { display: flex; gap: 8px; }
.learn-stats div {
  min-width: 92px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,0.22);
  border: 1px solid rgba(255,255,255,0.28);
}
.learn-stats b { display: block; font-size: 1.2rem; line-height: 1.1; }
.learn-stats span { display: block; margin-top: 2px; font-size: 0.68rem; font-weight: 700; color: #064e4b; }
.learn-feat {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 0 0 14px; padding: 14px 16px; border-radius: 14px; text-decoration: none; color: inherit;
  background: #fff; border: 1px solid #b8ebe6; box-shadow: 0 8px 24px rgba(6, 122, 118, 0.08);
}
.learn-feat strong { display: block; margin: 2px 0 4px; font-size: 1rem; }
.learn-feat p { margin: 0; color: var(--cwa-muted); font-size: 0.8rem; max-width: 46rem; }
.learn-feat__cta {
  display: inline-flex; align-items: center; gap: 8px; flex-shrink: 0;
  padding: 9px 14px; border-radius: 10px; font-size: 0.8rem; font-weight: 800;
  color: #042423; background: var(--cwa-btn);
}
.learn-grid {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 380px); gap: 14px; align-items: start;
}
.learn-lib {
  background: #fff; border: 1px solid var(--cwa-border); border-radius: 16px;
  box-shadow: 0 2px 10px rgba(61, 90, 128, 0.05); overflow: hidden;
}
.learn-lib__bar {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; flex-wrap: wrap;
  padding: 14px 16px; border-bottom: 1px solid #eef2f6; background: #f8fbfb;
}
.learn-lib__bar h2 { margin: 0; font-size: 0.95rem; }
.learn-lib__bar p { margin: 2px 0 0; color: var(--cwa-muted); font-size: 0.72rem; }
.learn-search {
  position: relative; min-width: min(280px, 100%);
}
.learn-search i {
  position: absolute; top: 50%; inset-inline-start: 10px; transform: translateY(-50%);
  color: #94a3b8; font-size: 0.75rem;
}
.learn-search input {
  width: 100%; height: 36px; padding: 0 12px; padding-inline-start: 30px;
  border: 1px solid #dbe4ea; border-radius: 10px; background: #fff;
}
.learn-sec { padding: 12px 16px 4px; }
.learn-sec h3 {
  margin: 0 0 8px; font-size: 0.72rem; font-weight: 800; color: #0f766e;
  letter-spacing: 0.04em; text-transform: uppercase;
}
.learn-tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-bottom: 8px; }
.learn-tile {
  display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center;
  min-height: 0; padding: 10px 11px; border-radius: 12px; text-align: start; text-decoration: none;
  border: 1px solid #e8eef2; background: #fbfefe; color: inherit; cursor: pointer; width: 100%;
  font: inherit; appearance: none; -webkit-appearance: none;
}
.learn-tile:hover { border-color: #12c4be; background: #ecfeff; }
.learn-tile__icon {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  background: #ccfbf1; color: #0f766e; font-size: 0.85rem;
}
.learn-tile__body { min-width: 0; }
.learn-tile__body strong { display: block; font-size: 0.82rem; line-height: 1.3; }
.learn-tile__body em {
  display: block; margin-top: 2px; color: var(--cwa-muted); font-style: normal;
  font-size: 0.7rem; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.learn-tile__meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.learn-tile__meta code {
  font-size: 0.62rem; font-weight: 700; color: #0f766e; background: #ecfeff;
  border: 1px solid #b8ebe6; padding: 1px 6px; border-radius: 999px;
}
.learn-tile__go {
  display: inline-flex; align-items: center; gap: 4px; font-size: 0.68rem; font-weight: 800; color: #0f766e; white-space: nowrap;
}
.learn-empty { margin: 0; padding: 18px 16px 20px; color: var(--cwa-muted); font-size: 0.82rem; }
.tutor {
  position: sticky; top: 12px; display: flex; flex-direction: column;
  min-height: 560px; max-height: calc(100vh - 88px);
  background: #fff; border: 1px solid var(--cwa-border); border-radius: 16px;
  box-shadow: 0 2px 10px rgba(61, 90, 128, 0.05); overflow: hidden;
}
.tutor-head {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-bottom: 1px solid #eef2f6; background: #f8fbfb;
}
.tutor-head h2 { margin: 0; font-size: 0.92rem; }
.tutor-head small { display: block; color: #0f766e; font-size: 0.68rem; font-weight: 700; }
.tutor-head .btn { margin-inline-start: auto; }
.tutor-avatar {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: var(--cwa-btn); color: #042423;
}
.tutor-hint { margin: 0; padding: 8px 14px 0; color: var(--cwa-muted); font-size: 0.74rem; }
.tutor-log {
  flex: 1; min-height: 180px; overflow: auto;
  padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: #f4f8f8;
}
.tutor-empty {
  margin: auto; text-align: center; max-width: 18rem; color: var(--cwa-muted);
}
.tutor-empty__mark {
  width: 48px; height: 48px; margin: 0 auto 10px; border-radius: 14px; display: grid; place-items: center;
  background: #ccfbf1; color: #0f766e; font-size: 1.1rem;
}
.tutor-empty p { margin: 0; font-size: 0.8rem; line-height: 1.55; }
.tutor-msg { max-width: 92%; padding: 9px 11px; border-radius: 12px; }
.tutor-msg p { margin: 0; white-space: pre-wrap; font-size: 0.8rem; }
.tutor-msg.is-bot { background: #fff; border: 1px solid #d7ecea; align-self: flex-start; }
.tutor-msg.is-me { background: #067a76; color: #fff; align-self: flex-end; }
.tutor-links { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.tutor-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 0; }
.tutor-chips__label {
  width: 100%; font-size: 0.66rem; font-weight: 800; color: #64748b; letter-spacing: 0.04em;
}
.tutor-chip {
  border: 1px solid #d7ecea; background: #fff; color: #0f766e; border-radius: 999px;
  padding: 4px 9px; font-size: 0.7rem; font-weight: 700; cursor: pointer; font-family: inherit;
}
.tutor-chip:hover { background: #ecfeff; }
.tutor-chip.is-on { background: #0f766e; color: #fff; border-color: #0f766e; }
.emap-hero {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 18px 20px; border-radius: 16px; color: #042423;
  background:
    radial-gradient(circle at 88% 10%, rgba(255,255,255,0.4), transparent 42%),
    linear-gradient(135deg, #12c4be 0%, #067a76 100%);
}
.emap-hero h1 { margin: 4px 0 6px; font-size: 1.3rem; letter-spacing: -0.03em; }
.emap-hero p { margin: 0 0 12px; max-width: 42rem; color: rgba(4, 36, 35, 0.78); font-size: 0.86rem; }
.emap-links { display: flex; flex-wrap: wrap; gap: 6px; }
.emap-verdict {
  background: #fff; border: 1px solid var(--cwa-border); border-radius: 14px;
  padding: 14px 16px; margin: 0 0 12px; box-shadow: 0 2px 10px rgba(61, 90, 128, 0.05);
}
.emap-verdict h2 { margin: 0 0 6px; font-size: 0.95rem; }
.emap-verdict p { margin: 0; color: #334155; font-size: 0.84rem; line-height: 1.6; }
.emap-filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.emap-list { display: grid; gap: 8px; }
.emap-card {
  background: #fff; border: 1px solid var(--cwa-border); border-radius: 14px;
  padding: 12px 14px 14px; box-shadow: 0 2px 8px rgba(61, 90, 128, 0.04);
}
.emap-card__top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.emap-card__top h3 { margin: 0; font-size: 0.92rem; }
.emap-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.emap-cols section { background: #f8fbfb; border: 1px solid #e8f0ef; border-radius: 10px; padding: 10px 12px; }
.emap-cols span { display: block; margin-bottom: 4px; font-size: 0.66rem; font-weight: 800; color: #0f766e; letter-spacing: 0.04em; text-transform: uppercase; }
.emap-cols p { margin: 0; color: #334155; font-size: 0.8rem; line-height: 1.55; }
.emap-badge {
  display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: 0.68rem; font-weight: 800; white-space: nowrap;
}
.emap-badge.is-full { background: #d1fae5; color: #047857; }
.emap-badge.is-same { background: #ccfbf1; color: #0f766e; }
.emap-badge.is-skip { background: #f1f5f9; color: #475569; }
.emap-foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.emap-foot article {
  background: #fff; border: 1px solid var(--cwa-border); border-radius: 14px; padding: 14px 14px 6px;
}
.emap-foot h2 { margin: 0 0 6px; font-size: 0.88rem; }
@media (max-width: 900px) {
  .emap-cols, .emap-foot { grid-template-columns: 1fr; }
}
.tutor-form { display: flex; gap: 8px; align-items: flex-end; padding: 12px 14px 14px; }
.tutor-form .field { flex: 1; margin: 0; }
.tutor-form textarea { min-height: 52px; resize: vertical; }
@media (max-width: 1100px) {
  .learn-tiles { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .learn-grid { grid-template-columns: 1fr; }
  .tutor { position: static; max-height: none; }
  .learn-feat { flex-direction: column; align-items: flex-start; }
  .tutor-form { flex-direction: column; align-items: stretch; }
}
.fx-wallets {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px;
}
.fx-wallet {
  background: #fff; border: 1px solid #d7ecea; border-radius: 14px; padding: 14px 16px;
}
.fx-wallet.is-home { border-color: #0d7370; background: #e6f5f4; }
.fx-wallet span { display: block; font-size: 0.78rem; font-weight: 700; color: #5b6c6a; }
.fx-wallet strong { display: block; margin: 4px 0 2px; font-size: 1.15rem; }
.fx-wallet em { font-style: normal; font-size: 0.72rem; color: #0d7370; font-weight: 700; }
.fx-card #fx-preview { display: block; padding-top: 10px; font-size: 1.05rem; }
@media (max-width: 800px) { .fx-wallets { grid-template-columns: 1fr 1fr; } }

.topbar__bell {
  position: relative;
  width: 38px; height: 38px; border: 1px solid rgba(255,255,255,.16);
  border-radius: 12px; background: rgba(255,255,255,.1); color: #fff;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.topbar__bell em {
  position: absolute; top: -4px; inset-inline-end: -4px;
  min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
  background: #fb7185; color: #fff; font-style: normal; font-size: 0.62rem; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.topbar__bell.is-hot { background: #be123c; border-color: #fb7185; }

.filters.rem-filters { margin: 0 0 14px; }
.rem-table tr[data-rem-open], .rem-table tr[data-rem-open-type] { cursor: pointer; }
.rem-hero {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; flex-wrap: wrap;
  margin: 0 0 14px; padding: 18px 20px; border-radius: 16px; color: #fff;
  background:
    radial-gradient(circle at 12% 0%, rgba(255,255,255,0.18), transparent 40%),
    linear-gradient(135deg, #0f766e 0%, #115e59 52%, #7f1d1d 160%);
}
.rem-hero h1 { margin: 4px 0 6px; font-size: 1.3rem; }
.rem-hero p { margin: 0 0 6px; max-width: 40rem; color: rgba(255,255,255,0.86); font-size: 0.86rem; }
.rem-hero small { color: rgba(255,255,255,0.7); font-size: 0.74rem; }
.rem-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.rem-stat {
  min-width: 88px; text-align: center; padding: 10px 14px; border-radius: 12px;
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.1);
  color: #fff; cursor: pointer; font-family: inherit;
}
.rem-stat b { display: block; font-size: 1.25rem; }
.rem-stat span { font-size: 0.72rem; }
.rem-stat.is-on, .rem-stat:hover { background: rgba(255,255,255,.2); }
.rem-filters { margin-bottom: 12px; }
.rem-list { display: grid; gap: 8px; }
.rem-item {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--cwa-border); border-radius: 14px;
  padding: 12px 14px; box-shadow: 0 2px 8px rgba(61, 90, 128, 0.04);
}
.rem-item[data-page] { cursor: pointer; }
.rem-item[data-page]:hover { border-color: #0f766e; }
.rem-item__mark {
  width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
}
.rem-item.is-overdue .rem-item__mark { background: #ffe4e6; color: #be123c; }
.rem-item.is-today .rem-item__mark { background: #ffedd5; color: #c2410c; }
.rem-item.is-soon .rem-item__mark { background: #ccfbf1; color: #0f766e; }
.rem-item.is-now .rem-item__mark { background: #e0e7ff; color: #3730a3; }
.rem-item.is-urgent { border-color: #fecdd3; }
.ntf-sev { display: inline-block; font-size: 0.68rem; font-weight: 800; padding: 2px 8px; border-radius: 999px; }
.ntf-sev.is-urgent { background: #ffe4e6; color: #be123c; }
.ntf-sev.is-normal { background: #ffedd5; color: #c2410c; }
.ntf-sev.is-info { background: #e0e7ff; color: #3730a3; }
.chip.is-urgent { color: #be123c; }
.ntf-board { display: grid; gap: 12px; margin: 0 0 16px; }
.ntf-group { background: #fff; border: 1px solid var(--cwa-border); border-radius: 16px; padding: 12px 14px 8px; }
.ntf-group h3 { margin: 0 0 8px; font-size: 0.95rem; color: #0f766e; }
.ntf-switch {
  display: grid; grid-template-columns: 40px 1fr auto auto; gap: 10px; align-items: center;
  padding: 8px 0; border-top: 1px solid #f1f5f9;
}
.ntf-switch:first-of-type { border-top: 0; }
.ntf-switch__icon {
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
}
.ntf-switch__icon.is-urgent { background: #ffe4e6; color: #be123c; }
.ntf-switch__icon.is-normal { background: #ffedd5; color: #c2410c; }
.ntf-switch__icon.is-info { background: #e0e7ff; color: #3730a3; }
.ntf-switch__txt strong { display: block; font-size: 0.88rem; }
.ntf-switch__txt small { color: #64748b; font-size: 0.72rem; }
.ntf-switch b { font-size: 0.9rem; color: #0f766e; }
.ntf-switch input { width: 18px; height: 18px; accent-color: #0f766e; }
.rem-pop__kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rem-item__body { flex: 1; min-width: 0; }
.rem-item__body strong { display: block; font-size: 0.92rem; }
.rem-item__body p, .rem-item__body small { margin: 2px 0 0; color: #64748b; font-size: 0.78rem; }
.rem-item__amt { text-align: start; flex-shrink: 0; }
.rem-item__amt b { display: block; font-size: 0.95rem; }
.rem-item__amt em { font-style: normal; font-size: 0.7rem; font-weight: 800; color: #0f766e; }
.rem-item.is-overdue .rem-item__amt em { color: #be123c; }
.rem-item.is-today .rem-item__amt em { color: #c2410c; }
.rem-empty { padding: 28px 12px; text-align: center; }
.rem-story { padding: 0 18px 8px; display: grid; gap: 8px; }
.rem-story p { margin: 0; font-size: 0.92rem; line-height: 1.65; color: #334155; }
.rem-story strong { display: inline; color: #0f766e; margin-inline-end: 6px; }

.rem-pop {
  position: fixed; inset: 0; z-index: 1200;
  display: grid; place-items: center; padding: 18px;
  background: rgba(15, 23, 42, 0.55);
}
.rem-pop[hidden] { display: none; }
.rem-pop__card {
  width: min(560px, 100%);
  background: #fff; border-radius: 20px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.28);
  overflow: hidden;
}
.rem-pop__card.is-item { width: min(480px, 100%); }
.rem-pop__facts { padding: 12px 16px 0; }
.rem-pop__head {
  position: relative; padding: 18px 20px 14px;
  background: linear-gradient(135deg, #0f766e, #115e59 70%, #9f1239);
  color: #fff;
}
.rem-pop__head h2 { margin: 4px 0 6px; font-size: 1.2rem; }
.rem-pop__head p { margin: 0; color: rgba(255,255,255,0.86); font-size: 0.86rem; }
.rem-pop__x {
  position: absolute; top: 12px; inset-inline-end: 12px;
  width: 34px; height: 34px; border: 0; border-radius: 10px;
  background: rgba(255,255,255,.16); color: #fff; cursor: pointer;
}
.rem-pop__kpis {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px;
  padding: 12px 14px 0;
}
.rem-pop__kpi {
  text-align: center; padding: 10px 8px; border-radius: 12px; background: #f8fafc; border: 1px solid #e2e8f0;
}
.rem-pop__kpi b { display: block; font-size: 1.15rem; }
.rem-pop__kpi span { font-size: 0.7rem; color: #64748b; }
.rem-pop__kpi.is-overdue b { color: #be123c; }
.rem-pop__kpi.is-today b { color: #c2410c; }
.rem-pop__kpi.is-soon b { color: #0f766e; }
.rem-pop__list { display: grid; gap: 8px; padding: 12px 14px; max-height: 42vh; overflow: auto; }
.rem-pop__list .rem-item { box-shadow: none; cursor: pointer; }
.rem-pop__more { margin: 0; text-align: center; color: #64748b; font-size: 0.8rem; font-weight: 700; }
.rem-pop__actions {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end;
  padding: 0 14px 16px;
}

button, a, .tab, .btn, .sidebar__item { touch-action: manipulation; }

@media (max-width: 991px) {
  .sidebar { padding-top: var(--safe-t); }
  .sidebar__item { min-height: 44px; padding: 12px; }
  .topbar__title {
    flex: 1; min-width: 0;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
}

@media (max-width: 768px) {
  :root {
    --ctrl: 44px;
    --cwa-pad: 12px;
    --gap: 10px;
    --type: 0.9rem;
    --type-sm: 0.8rem;
    --type-xs: 0.74rem;
    --title: 1.18rem;
    --kpi: 1.22rem;
  }
  .page { padding-inline: 12px; }
  .card__head, .ops-head, .lifecycle__head, .sched-plan__head, .books-hero, .dash-hero, .detail-hero {
    flex-wrap: wrap;
  }
  .card__head { align-items: flex-start; }
  .card__head .seek { max-width: none; width: 100%; margin-inline-start: 0; flex: 1 1 100%; }
  .filters { width: 100%; }
  .filters > * { flex: 1 1 100%; min-width: 0; }
  .filters input, .filters select, .col-picker, .col-picker summary { width: 100%; max-width: none; }
  .field input, .field select, .field textarea,
  .filters input, .filters select, .combo input, .combo select, .pay-collect input, .pay-collect select {
    font-size: 16px;
  }
  .form-actions .btn { min-height: 44px; }
  form.card .form-actions,
  .form-actions.wide {
    position: sticky; bottom: 0; z-index: 6;
    background: #fff;
    padding: 10px 4px calc(10px + var(--safe-b, 0px));
    margin-top: 8px;
    box-shadow: 0 -10px 24px rgba(15, 23, 42, 0.06);
  }
  form.card .form-actions .btn,
  .form-actions.wide .btn { flex: 1; }
  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 4px;
    margin-inline: -4px;
    padding-inline: 4px;
  }
  .tab { flex: 0 0 auto; }
  .sheet { padding: 0; align-items: flex-end; justify-content: stretch; }
  .sheet__card {
    width: 100%; max-height: min(92dvh, 100%);
    border-radius: 18px 18px 0 0;
  }
  .pay-collect, .tenant-box .form-grid { grid-template-columns: 1fr; min-width: 0; }
  .combo { flex-direction: column; align-items: stretch; }
  .combo select, .combo input { min-width: 0; width: 100%; }
  .detail-cover { width: 100%; height: 180px; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); }
  .table { min-width: 28rem; }
  .action-row .btn { min-height: 44px; }
  .ntf-switch { grid-template-columns: 36px minmax(0, 1fr) auto auto; gap: 6px; }
  .rem-item { flex-wrap: wrap; }
  .rem-item__amt { width: 100%; text-align: start; padding-inline-start: 52px; }
  .rem-pop { padding: 0; align-items: end; }
  .rem-pop__card, .rem-pop__card.is-item {
    width: 100%; border-radius: 18px 18px 0 0; max-height: min(92dvh, 100%);
  }
  .rem-pop__kpis { grid-template-columns: 1fr 1fr; }
  .deed { padding: 16px 14px 14px; }
  .learn-stats, .rem-stats { width: 100%; }
  .market-bar { flex-wrap: wrap; }
  .market-nav { width: 100%; }
  .market-nav a, .market-nav button { min-height: 44px; }
}

@media (max-width: 420px) {
  .topbar__meta span[data-i18n] { display: none; }
}

@media print {
  .sidebar, .topbar, .backdrop, .no-print, .ops-head, .action-row, .flash,
  .sidebar__footer, .sidebar__toggle, .rem-pop, .save-fail, .world-tabs, .desk-tabs { display: none !important; }
  .app, .workspace, .page { display: block; background: #fff; }
  .dash-hero--welcome, .rep-welcome {
    background: #fff !important; color: #0f172a !important; box-shadow: none; border: 1px solid #e2e8f0;
  }
  .dash-hero--welcome h1, .dash-hero--welcome p, .dash-kicker, .rep-welcome h1, .rep-welcome p { color: inherit !important; }
  .deed { box-shadow: none; break-inside: avoid; }
}
