:root {
  --forest-950: #092b25;
  --forest-900: #123f36;
  --forest-800: #185245;
  --forest-700: #1f6756;
  --forest-100: #dfece7;
  --forest-50: #eff6f3;
  --gold-600: #b48743;
  --gold-500: #c9a15c;
  --gold-200: #ead8b6;
  --gold-100: #f5ecdc;
  --cream: #f8f5ef;
  --canvas: #eae7df;
  --surface: #ffffff;
  --ink: #17221f;
  --muted: #66726e;
  --line: #e3e7e4;
  --success: #2e8067;
  --success-soft: #e6f3ed;
  --warning: #9b6a22;
  --warning-soft: #fbf0d9;
  --danger: #b74b4b;
  --danger-soft: #fbeaea;
  --info: #3d6d84;
  --info-soft: #e8f1f5;
  --shadow-soft: 0 18px 55px rgba(9, 43, 37, 0.11);
  --shadow-phone: 0 32px 90px rgba(9, 43, 37, 0.2);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 26px;
  --font-sans: Inter, Manrope, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-display: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 0%, rgba(201, 161, 92, 0.16), transparent 24rem),
    radial-gradient(circle at 92% 12%, rgba(31, 103, 86, 0.14), transparent 28rem),
    var(--canvas);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

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

button,
a { touch-action: manipulation; }

button { cursor: pointer; }

button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(201, 161, 92, 0.55);
  outline-offset: 2px;
}

.board-header {
  position: sticky;
  z-index: 100;
  top: 0;
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(380px, 1.4fr) minmax(280px, 1fr);
  gap: 32px;
  align-items: center;
  padding: 22px clamp(20px, 4vw, 72px);
  color: #fff;
  background: rgba(9, 43, 37, 0.96);
  border-bottom: 1px solid rgba(234, 216, 182, 0.25);
  backdrop-filter: blur(18px);
}

.board-brand,
.app-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-seal {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--gold-200);
  border: 1.5px solid var(--gold-500);
  border-radius: 50%;
  font: 700 14px/11px var(--font-display);
  text-align: center;
}

.board-brand b,
.board-brand small,
.app-brand b,
.app-brand small { display: block; }

.board-brand b { font-size: 17px; }
.board-brand small { margin-top: 3px; color: #a9bbb5; font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; }
.board-heading h1 { margin: 1px 0 3px; font: 600 clamp(26px, 3vw, 42px)/1.05 var(--font-display); }
.board-heading p { margin: 0; color: #b8c6c1; font-size: 12px; }
.board-heading .eyebrow { color: var(--gold-200); font-size: 9px; font-weight: 800; letter-spacing: 0.24em; }

.board-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.filter-button,
.single-back {
  min-height: 44px;
  padding: 0 16px;
  color: #d6e1dd;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  transition: 180ms ease;
}

.filter-button:hover,
.filter-button.active,
.single-back:hover {
  color: var(--forest-950);
  background: var(--gold-200);
  border-color: var(--gold-200);
}

.screen-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(390px, 1fr));
  gap: 40px 30px;
  align-items: start;
  padding: 48px clamp(18px, 4vw, 72px) 70px;
}

.screen-grid.single-mode {
  display: grid;
  min-height: calc(100vh - 115px);
  place-items: start center;
  padding-top: 34px;
}

.screen-card {
  display: grid;
  justify-items: center;
  gap: 12px;
  min-width: 0;
}

.screen-card[hidden] { display: none; }

.screen-meta {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  align-items: center;
  width: min(100%, 390px);
}

.screen-number {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #fff;
  background: var(--forest-900);
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
}

.screen-meta b,
.screen-meta small { display: block; }
.screen-meta b { font-size: 13px; }
.screen-meta small { margin-top: 2px; color: var(--muted); font-size: 10px; }

.group-pill {
  padding: 6px 9px;
  color: var(--forest-800);
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(18, 63, 54, 0.12);
  border-radius: 999px;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.phone {
  position: relative;
  width: 390px;
  height: 844px;
  overflow: hidden;
  color: var(--ink);
  background: var(--surface);
  border: 8px solid #0a1714;
  border-radius: 44px;
  box-shadow: var(--shadow-phone);
}

.phone::before {
  position: absolute;
  z-index: 60;
  top: 8px;
  left: 50%;
  width: 102px;
  height: 25px;
  content: "";
  transform: translateX(-50%);
  background: #0a1714;
  border-radius: 0 0 16px 16px;
}

.phone-shell {
  display: grid;
  grid-template-rows: 30px 62px minmax(0, 1fr) 70px;
  height: 100%;
  background: var(--cream);
}

.phone-shell.no-nav { grid-template-rows: 30px 62px minmax(0, 1fr); }
.phone-shell.centered { grid-template-rows: 30px minmax(0, 1fr); background: var(--forest-950); }

.status-bar {
  z-index: 65;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  color: var(--ink);
  background: var(--surface);
  font-size: 10px;
  font-weight: 800;
}

.centered .status-bar { color: #fff; background: transparent; }
.status-icons { display: flex; align-items: center; gap: 5px; }
.status-icons svg { width: 14px; height: 14px; }

.app-header {
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.app-brand { gap: 8px; }
.app-brand .brand-seal { width: 34px; height: 34px; font-size: 10px; line-height: 8px; }
.app-brand b { font-size: 12px; }
.app-brand small { margin-top: 1px; color: var(--muted); font-size: 8px; letter-spacing: 0.09em; text-transform: uppercase; }

.header-actions { display: flex; gap: 6px; }
.icon-button,
.back-button {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  color: var(--forest-900);
  background: var(--forest-50);
  border: 0;
  border-radius: 50%;
}
.icon-button svg,
.back-button svg { width: 19px; height: 19px; }
.notification-button { position: relative; }
.notification-button::after {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  content: "";
  background: var(--gold-500);
  border: 2px solid #fff;
  border-radius: 50%;
}

.screen-content {
  min-height: 0;
  overflow: hidden;
  padding: 18px 16px 20px;
}

.screen-content.scrollable { overflow-y: auto; scrollbar-width: none; }
.screen-content.scrollable::-webkit-scrollbar { display: none; }

.page-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.page-title h1 { margin: 0; color: var(--forest-950); font: 700 24px/1.08 var(--font-display); letter-spacing: -0.03em; }
.page-title p { margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.45; }

.overline { margin: 0 0 6px; color: var(--gold-600); font-size: 8px; font-weight: 900; letter-spacing: 0.18em; text-transform: uppercase; }
.section-label { margin: 17px 0 9px; color: var(--forest-950); font-size: 12px; font-weight: 850; }
.section-label-row { display: flex; align-items: center; justify-content: space-between; margin: 17px 0 9px; }
.section-label-row .section-label { margin: 0; }
.section-link { color: var(--forest-700); font-size: 9px; font-weight: 800; }

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  color: #fff;
  background: linear-gradient(145deg, var(--forest-950), var(--forest-800));
  border-radius: 22px;
  box-shadow: 0 14px 35px rgba(9, 43, 37, 0.2);
}
.hero-card::after {
  position: absolute;
  right: -20px;
  bottom: -46px;
  width: 150px;
  height: 150px;
  content: "";
  border: 1px solid rgba(234, 216, 182, 0.38);
  border-radius: 50%;
  box-shadow: inset 0 0 0 26px rgba(255, 255, 255, 0.025), inset 0 0 0 54px rgba(255, 255, 255, 0.02);
}
.hero-card .overline { color: var(--gold-200); }
.hero-card h2 { max-width: 270px; margin: 0; font: 600 25px/1.08 var(--font-display); }
.hero-card p { max-width: 260px; margin: 9px 0 0; color: #c7d4cf; font-size: 10px; line-height: 1.5; }

.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.action-card {
  display: flex;
  min-height: 88px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 13px;
  color: var(--forest-950);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 17px;
  text-align: left;
}
.action-card svg { width: 22px; height: 22px; color: var(--gold-600); }
.action-card b { display: block; margin-top: 7px; font-size: 11px; }
.action-card small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }

.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.kpi-card { padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; }
.kpi-card small { display: block; min-height: 21px; color: var(--muted); font-size: 7px; line-height: 1.35; }
.kpi-card b { display: block; margin-top: 4px; color: var(--forest-900); font-size: 20px; }

.list { display: grid; gap: 9px; }
.list-card,
.detail-card,
.form-card,
.summary-card,
.setting-card,
.empty-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
}
.list-card { padding: 12px; }
.list-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.list-card h3 { margin: 0; color: var(--forest-950); font-size: 12px; line-height: 1.25; }
.list-card p { margin: 4px 0 0; color: var(--muted); font-size: 9px; line-height: 1.45; }
.list-card strong { display: block; margin-top: 8px; color: var(--forest-900); font-size: 13px; }

.badge,
.chip,
.property-label,
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 999px;
  font-weight: 800;
}
.badge { min-height: 26px; padding: 0 8px; font-size: 8px; letter-spacing: 0.05em; }
.badge.success { color: var(--success); background: var(--success-soft); }
.badge.warning { color: var(--warning); background: var(--warning-soft); }
.badge.danger { color: var(--danger); background: var(--danger-soft); }
.badge.info { color: var(--info); background: var(--info-soft); }
.badge.dark { color: #fff; background: var(--forest-900); }
.count-badge { min-width: 28px; height: 28px; padding: 0 8px; color: #fff; background: var(--forest-800); font-size: 9px; }

.chips { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { min-height: 44px; padding: 0 12px; color: var(--muted); background: #f1f3f1; border: 1px solid transparent; font-size: 9px; }
.chip.active { color: var(--forest-900); background: var(--forest-100); border-color: #b8d2c8; }
.chip.gold { color: #76551e; background: var(--gold-100); }

.primary-button,
.secondary-button,
.ghost-button,
.danger-button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border-radius: 14px;
  font-size: 10px;
  font-weight: 850;
  transition: transform 160ms ease, background 160ms ease;
}
.primary-button:active,
.secondary-button:active,
.ghost-button:active,
.danger-button:active { transform: scale(0.98); }
.primary-button svg,
.secondary-button svg,
.ghost-button svg,
.danger-button svg { width: 17px; height: 17px; flex: 0 0 auto; }
.primary-button { color: #fff; background: var(--forest-900); border: 1px solid var(--forest-900); }
.secondary-button { color: var(--forest-950); background: var(--gold-200); border: 1px solid var(--gold-200); }
.ghost-button { color: var(--forest-900); background: var(--surface); border: 1px solid var(--line); }
.danger-button { color: var(--danger); background: var(--danger-soft); border: 1px solid #f3cece; }
.full { width: 100%; }
.button-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.button-stack { display: grid; gap: 8px; margin-top: 14px; }

.bottom-nav {
  z-index: 40;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  align-items: center;
  padding: 5px 7px 9px;
  background: rgba(255, 255, 255, 0.95);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.nav-item {
  display: grid;
  min-width: 0;
  min-height: 50px;
  place-items: center;
  align-content: center;
  gap: 3px;
  color: #7b8581;
  background: transparent;
  border: 0;
  border-radius: 12px;
  font-size: 8px;
}
.nav-item svg { width: 19px; height: 19px; }
.nav-item.active { color: var(--forest-900); background: var(--forest-50); font-weight: 800; }
.nav-item.primary-nav { color: #fff; background: var(--forest-900); }

.stepper { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 4px 0 15px; }
.stepper i { height: 4px; background: #dfe4e1; border-radius: 999px; }
.stepper i.done { background: var(--gold-500); }
.step-label { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; color: var(--muted); font-size: 8px; }

.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.choice-card {
  display: grid;
  min-height: 88px;
  place-items: center;
  align-content: center;
  gap: 7px;
  color: var(--forest-950);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  font-size: 10px;
  font-weight: 800;
  text-align: center;
}
.choice-card svg { width: 24px; height: 24px; color: var(--gold-600); }
.choice-card.selected { color: var(--forest-900); background: var(--forest-50); border: 2px solid var(--forest-700); }

.field-group { margin-bottom: 11px; }
.field-label { display: block; margin: 0 0 6px; color: var(--forest-950); font-size: 9px; font-weight: 850; }
.field,
.select-field,
.text-area {
  width: 100%;
  min-height: 46px;
  padding: 0 13px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 13px;
  font-size: 11px;
  outline: none;
}
.text-area { min-height: 72px; padding-top: 11px; resize: none; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.field-with-icon { position: relative; }
.field-with-icon svg { position: absolute; top: 14px; left: 12px; width: 17px; height: 17px; color: var(--muted); }
.field-with-icon .field { padding-left: 38px; }
.helper { margin: 5px 0 0; color: var(--muted); font-size: 9px; line-height: 1.4; }
.validation { color: var(--danger); }

.form-card { padding: 14px; }
.form-card + .form-card { margin-top: 10px; }
.form-card-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.form-card-title b { font-size: 11px; }

.summary-card { overflow: hidden; }
.summary-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; background: var(--forest-900); color: #fff; }
.summary-head b { font-size: 11px; }
.summary-head button { min-height: 44px; padding: 0 12px; color: var(--gold-200); background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.13); border-radius: 10px; font-size: 9px; }
.summary-head button svg { width: 14px; height: 14px; vertical-align: middle; }
.summary-body { padding: 12px 14px; }
.summary-line { display: grid; grid-template-columns: 100px 1fr; gap: 8px; padding: 7px 0; border-bottom: 1px solid #eef0ef; font-size: 9px; }
.summary-line:last-child { border: 0; }
.summary-line span { color: var(--muted); }
.summary-line b { text-align: right; }

.success-panel,
.state-panel {
  display: grid;
  height: 100%;
  place-items: center;
  align-content: center;
  padding: 28px;
  text-align: center;
}
.success-icon,
.state-icon {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  color: #fff;
  background: var(--forest-800);
  border: 8px solid var(--forest-100);
  border-radius: 50%;
}
.success-icon svg,
.state-icon svg { width: 34px; height: 34px; }
.success-panel h1,
.state-panel h1 { margin: 20px 0 8px; color: var(--forest-950); font: 700 26px/1.1 var(--font-display); }
.success-panel p,
.state-panel p { max-width: 270px; margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.success-panel .button-stack,
.state-panel .button-stack { width: 100%; max-width: 290px; margin-top: 22px; }

.intro-panel { display: grid; height: 100%; align-content: center; padding: 34px 24px; color: #fff; }
.intro-panel .brand-seal { width: 76px; height: 76px; font-size: 21px; line-height: 17px; }
.intro-panel h1 { max-width: 300px; margin: 24px 0 8px; font: 600 34px/1.04 var(--font-display); }
.intro-panel > p { margin: 0; color: #b8c8c2; font-size: 11px; line-height: 1.55; }
.language-options { display: grid; gap: 10px; margin-top: 28px; }
.language-card { display: flex; min-height: 62px; align-items: center; justify-content: space-between; padding: 0 16px; color: #fff; background: rgba(255, 255, 255, 0.07); border: 1px solid rgba(255, 255, 255, 0.12); border-radius: 17px; }
.language-card.selected { color: var(--forest-950); background: var(--gold-200); border-color: var(--gold-200); }
.language-card b { font-size: 12px; }
.language-card small { display: block; margin-top: 3px; opacity: 0.72; font-size: 8px; }
.language-card svg { width: 18px; height: 18px; flex: 0 0 auto; }

.property-card { display: grid; grid-template-columns: 112px 1fr; overflow: hidden; min-height: 128px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.property-photo { position: relative; min-height: 128px; overflow: hidden; background: linear-gradient(145deg, #b8d3ca, #466e62); }
.property-photo.alt { background: linear-gradient(145deg, #e3d2b2, #7d6747); }
.property-photo.blue { background: linear-gradient(145deg, #bfd5de, #516c79); }
.property-photo::before {
  position: absolute;
  right: 12px;
  bottom: 0;
  left: 12px;
  height: 80px;
  content: "";
  background: linear-gradient(135deg, transparent 0 24%, rgba(255,255,255,.75) 25% 28%, transparent 29% 42%, rgba(255,255,255,.58) 43% 47%, transparent 48%), linear-gradient(to top, rgba(9,43,37,.55), transparent);
  clip-path: polygon(0 100%, 0 55%, 20% 30%, 35% 50%, 55% 12%, 75% 45%, 100% 25%, 100% 100%);
}
.property-photo .photo-count { position: absolute; z-index: 2; right: 8px; bottom: 8px; padding: 4px 6px; color: #fff; background: rgba(9, 43, 37, 0.72); border-radius: 7px; font-size: 7px; }
.property-photo .photo-count svg { width: 10px; height: 10px; vertical-align: middle; }
.property-info { min-width: 0; padding: 11px; }
.property-label { min-height: 23px; padding: 0 8px; color: var(--forest-900); background: var(--forest-100); font-size: 8px; letter-spacing: 0.06em; }
.property-info h3 { margin: 7px 0 3px; font-size: 11px; }
.property-info p { margin: 3px 0; color: var(--muted); font-size: 9px; }
.property-info strong { display: block; margin-top: 8px; color: var(--forest-950); font-size: 13px; }
.property-meta { display: flex; gap: 8px; margin-top: 7px; color: var(--muted); font-size: 8px; }
.property-meta svg { width: 10px; height: 10px; vertical-align: middle; }

.match-card { padding: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; }
.match-top { display: grid; grid-template-columns: 58px 1fr auto; gap: 10px; align-items: center; }
.score-ring {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  background: conic-gradient(var(--forest-700) var(--score), var(--forest-100) 0);
  border-radius: 50%;
}
.score-ring::before { grid-area: 1 / 1; width: 44px; height: 44px; content: ""; background: #fff; border-radius: 50%; }
.score-ring b { z-index: 1; grid-area: 1 / 1; color: var(--forest-900); font-size: 13px; }
.match-copy b { display: block; font-size: 10px; }
.match-copy small { display: block; margin-top: 4px; color: var(--muted); font-size: 9px; }

.compare-block { display: grid; grid-template-columns: 1fr 28px 1fr; align-items: stretch; gap: 8px; }
.compare-card { padding: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; }
.compare-card.found { background: var(--forest-50); border-color: #c8ddd5; }
.compare-card h3 { margin: 0 0 10px; font-size: 10px; }
.compare-card p { margin: 5px 0; color: var(--muted); font-size: 8px; }
.compare-card b { color: var(--ink); }
.compare-divider { display: grid; place-items: center; }
.compare-divider span { display: grid; width: 28px; height: 28px; place-items: center; color: #fff; background: var(--forest-900); border-radius: 50%; font-size: 8px; font-weight: 900; }

.search-field { position: relative; margin-bottom: 10px; }
.search-field .field { padding-left: 40px; }
.search-field svg { position: absolute; z-index: 2; top: 14px; left: 13px; width: 18px; height: 18px; color: var(--muted); }
.filter-row { display: flex; gap: 7px; overflow: hidden; margin-bottom: 12px; }
.filter-row svg,
.chip svg { width: 12px; height: 12px; vertical-align: middle; }

.media-grid { display: grid; grid-template-columns: 1.15fr 0.85fr; grid-template-rows: 95px 95px; gap: 7px; }
.media-tile { position: relative; display: grid; place-items: center; overflow: hidden; color: #fff; background: linear-gradient(145deg, #bcd8cf, #426c60); border-radius: 14px; }
.media-tile:first-child { grid-row: 1 / 3; }
.media-tile.alt { background: linear-gradient(145deg, #d6c5a5, #715d40); }
.media-tile svg { width: 24px; height: 24px; opacity: 0.86; }
.upload-tile { color: var(--forest-900); background: var(--forest-50); border: 1px dashed #8cb5a6; }
.upload-tile small { font-size: 8px; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: #e9ecea; border-radius: 14px; margin-bottom: 12px; }
.tab { min-height: 44px; color: var(--muted); background: transparent; border: 0; border-radius: 10px; font-size: 10px; font-weight: 750; }
.tab.active { color: #fff; background: var(--forest-900); }

.details-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.detail-item { padding: 10px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.detail-item span { display: block; color: var(--muted); font-size: 8px; }
.detail-item b { display: block; margin-top: 4px; font-size: 10px; }

.comment { padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; }
.comment + .comment { margin-top: 8px; }
.comment-head { display: flex; justify-content: space-between; }
.comment-head b { font-size: 10px; }
.comment-head span { color: var(--muted); font-size: 8px; }
.comment p { margin: 8px 0 0; font-size: 9px; line-height: 1.5; }

.banner { display: flex; align-items: flex-start; gap: 9px; padding: 11px; color: var(--forest-900); background: var(--gold-100); border: 1px solid var(--gold-200); border-radius: 14px; font-size: 8px; line-height: 1.45; }
.banner svg { width: 17px; height: 17px; flex: 0 0 auto; }

.setting-card { overflow: hidden; }
.setting-row { display: flex; min-height: 58px; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 13px; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border: 0; }
.setting-row > svg { width: 18px; height: 18px; flex: 0 0 auto; color: var(--muted); }
.setting-copy { display: flex; align-items: center; gap: 10px; }
.setting-copy > svg { width: 19px; height: 19px; color: var(--gold-600); }
.setting-copy b { display: block; font-size: 10px; }
.setting-copy small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.switch { position: relative; width: 42px; height: 24px; flex: 0 0 auto; background: #d8ddda; border-radius: 999px; }
.switch::after { position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; content: ""; background: #fff; border-radius: 50%; box-shadow: 0 2px 6px rgba(0,0,0,.18); }
.switch.on { background: var(--forest-700); }
.switch.on::after { left: 21px; }

.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.admin-tile { min-height: 98px; padding: 13px; text-align: left; color: var(--forest-950); background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.admin-tile svg { width: 22px; height: 22px; color: var(--gold-600); }
.admin-tile b { display: block; margin-top: 12px; font-size: 10px; }
.admin-tile small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }

.access-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.access-row:last-child { border: 0; }
.access-row b { display: block; font-size: 10px; }
.access-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; }
.access-actions { display: flex; gap: 6px; }
.mini-button { display: grid; width: 44px; height: 44px; place-items: center; border: 0; border-radius: 12px; }
.mini-button svg { width: 17px; height: 17px; }
.mini-button.approve { color: var(--success); background: var(--success-soft); }
.mini-button.reject { color: var(--danger); background: var(--danger-soft); }

.chart-card { padding: 13px; background: var(--surface); border: 1px solid var(--line); border-radius: 17px; }
.chart-head { display: flex; align-items: center; justify-content: space-between; }
.chart-head b { font-size: 10px; }
.chart-head span { color: var(--success); font-size: 8px; font-weight: 800; }
.bar-chart { display: flex; height: 120px; align-items: end; gap: 8px; padding: 16px 2px 0; border-bottom: 1px solid var(--line); }
.bar-chart i { flex: 1; height: var(--height); min-height: 8px; background: linear-gradient(to top, var(--forest-800), #83b5a6); border-radius: 5px 5px 0 0; }
.chart-labels { display: flex; justify-content: space-between; margin-top: 6px; color: var(--muted); font-size: 8px; }

.profile-card { display: grid; place-items: center; padding: 18px; text-align: center; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; }
.avatar { display: grid; width: 70px; height: 70px; place-items: center; color: #fff; background: linear-gradient(145deg, var(--forest-800), var(--forest-950)); border: 5px solid var(--forest-100); border-radius: 50%; font: 600 22px var(--font-display); }
.profile-card h2 { margin: 11px 0 3px; font-size: 14px; }
.profile-card p { margin: 0; color: var(--muted); font-size: 9px; }

.sheet-overlay { position: absolute; z-index: 80; inset: 0; display: flex; align-items: flex-end; background: rgba(9, 43, 37, 0.35); }
.bottom-sheet { width: 100%; padding: 14px 16px 22px; background: #fff; border-radius: 24px 24px 0 0; box-shadow: 0 -18px 45px rgba(9,43,37,.18); }
.sheet-handle { width: 38px; height: 4px; margin: 0 auto 15px; background: #d8ddda; border-radius: 999px; }
.bottom-sheet h2 { margin: 0 0 4px; font: 700 20px var(--font-display); }
.bottom-sheet > p { margin: 0 0 14px; color: var(--muted); font-size: 8px; }

.empty-card { display: grid; min-height: 250px; place-items: center; align-content: center; padding: 25px; text-align: center; }
.empty-card .state-icon { width: 64px; height: 64px; border-width: 6px; }
.empty-card .state-icon svg { width: 26px; height: 26px; }
.empty-card h2 { margin: 14px 0 6px; font-size: 14px; }
.empty-card p { margin: 0; color: var(--muted); font-size: 8px; line-height: 1.5; }

.state-stack { display: grid; gap: 10px; }
.inline-state { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 15px; }
.inline-state svg { width: 22px; height: 22px; color: var(--forest-700); }
.inline-state b { display: block; font-size: 9px; }
.inline-state small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.35; }
.inline-state.error svg { color: var(--danger); }
.inline-state.warning svg { color: var(--warning); }

.skeleton { position: relative; overflow: hidden; background: #e6eae8; border-radius: 8px; }
.skeleton::after { position: absolute; inset: 0; content: ""; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.75), transparent); animation: shimmer 1.4s infinite; }
.skeleton.line { height: 10px; }
.skeleton.line.short { width: 55%; }
.skeleton.block { height: 95px; margin-top: 12px; border-radius: 15px; }

.single-controls { position: fixed; z-index: 200; top: 20px; left: 20px; }

.board-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px clamp(20px, 4vw, 72px); color: #9eada8; background: var(--forest-950); font-size: 10px; }

@keyframes shimmer { to { transform: translateX(100%); } }

@media (max-width: 1040px) {
  .board-header { grid-template-columns: 1fr auto; }
  .board-heading { grid-column: 1 / -1; grid-row: 2; }
  .screen-grid { grid-template-columns: repeat(auto-fit, minmax(370px, 1fr)); }
}

@media (max-width: 560px) {
  .board-header { position: relative; grid-template-columns: 1fr; gap: 16px; }
  .board-heading { grid-column: auto; grid-row: auto; }
  .board-controls { justify-content: flex-start; }
  .screen-grid { display: block; padding: 28px 0 50px; }
  .screen-card { margin-bottom: 34px; }
  .screen-meta { padding: 0 16px; }
  .phone { width: 100%; max-width: 390px; height: 844px; border-right-width: 0; border-left-width: 0; border-radius: 0; }
  .phone::before { display: none; }
  .board-footer { align-items: flex-start; flex-direction: column; }
}

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