:root {
  --paper: #ffffff;
  --warm: #efe8e1;
  --cream: #f8f6f3;
  --card: #fffdfb;
  --line: #ded1c7;
  --accent: #d1af94;
  --gold: #ffc166;
  --brand: #205d72;
  --teal: #66a5ac;
  --ink: #24424a;
  --deep: #174d60;
  --muted: #6f716f;
  --shadow: 0 20px 52px rgba(32, 93, 114, 0.13);
  color-scheme: light;
  font-family: Montserrat, "Montserrat", Avenir, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--warm);
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(255, 193, 102, 0.14), transparent 25rem),
    radial-gradient(circle at 92% 18%, rgba(102, 165, 172, 0.18), transparent 24rem),
    linear-gradient(180deg, rgba(255, 253, 251, 0.9), rgba(239, 232, 225, 0.96)),
    var(--warm);
  color: var(--ink);
}

body.is-locked {
  overflow: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1180px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 18px max(90px, env(safe-area-inset-bottom));
}

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

.brand-mark {
  display: inline-grid;
  gap: 3px;
  align-items: center;
}

.brand-mark img {
  display: block;
  width: clamp(138px, 20vw, 178px);
  height: auto;
}

.brand-name {
  color: var(--brand);
  font-size: 1.08rem;
  font-weight: 760;
  letter-spacing: 0;
}

.brand-subtitle,
.eyebrow,
.field-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
}

.brand-subtitle {
  padding-left: 52px;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.specialist-entry,
.soft-link {
  border: 1px solid rgba(32, 93, 114, 0.16);
  border-radius: 999px;
  padding: 9px 14px;
  color: var(--brand);
  background: rgba(255, 253, 251, 0.78);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 700;
}

.care-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 16px;
}

.hero-mark {
  position: absolute;
  right: 33%;
  bottom: 8px;
  z-index: 0;
  width: min(270px, 24vw);
  opacity: 0.18;
  pointer-events: none;
}

.hero-star {
  position: absolute;
  z-index: 0;
  width: 42px;
  opacity: 0.78;
  pointer-events: none;
}

.hero-star-one {
  top: 24px;
  right: min(36px, 5vw);
  left: auto;
}

.care-copy {
  position: relative;
  z-index: 1;
  overflow: hidden;
  min-height: 310px;
  border: 0;
  border-radius: 8px;
  padding: clamp(20px, 4vw, 38px);
  background:
    radial-gradient(circle at 92% 12%, rgba(255, 193, 102, 0.18), transparent 32%),
    linear-gradient(135deg, var(--brand) 0%, var(--deep) 100%);
  box-shadow: var(--shadow);
}

.care-copy > * {
  position: relative;
  z-index: 2;
}

.care-copy::after {
  position: absolute;
  right: -78px;
  bottom: -90px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 50%;
  content: "";
}

.care-copy h1 {
  max-width: 760px;
  margin: 10px 0 16px;
  color: #ffffff;
  font-size: clamp(2rem, 5vw, 4.35rem);
  line-height: 1;
  letter-spacing: 0;
  font-weight: 420;
}

.care-meta,
.admin-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.care-meta span,
.status-pill,
.mini-pill {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  border: 1px solid rgba(102, 165, 172, 0.28);
  border-radius: 999px;
  padding: 6px 10px;
  background: rgba(255, 253, 251, 0.74);
  color: var(--brand);
  font-size: 0.86rem;
  font-weight: 700;
}

.status-pill.danger,
.smart-status.danger {
  border-color: rgba(209, 175, 148, 0.62);
  background: rgba(209, 175, 148, 0.18);
  color: #7b5043;
}

.status-pill.warning,
.smart-status.warning {
  border-color: rgba(255, 193, 102, 0.7);
  background: rgba(255, 193, 102, 0.2);
  color: #7c5a1a;
}

.status-pill.soft,
.smart-status.soft {
  border-color: rgba(102, 165, 172, 0.42);
  background: rgba(102, 165, 172, 0.13);
  color: var(--brand);
}

.status-pill.ok,
.smart-status.ok {
  border-color: rgba(102, 165, 172, 0.42);
  background: rgba(255, 253, 251, 0.86);
  color: var(--brand);
}

.status-pill.muted,
.smart-status.muted {
  border-color: rgba(111, 113, 111, 0.22);
  background: rgba(111, 113, 111, 0.08);
  color: var(--muted);
}

.stage-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 28px;
}

.stage-strip div,
.care-note,
.info-block,
.upload-panel,
.chat-panel,
.profile-item,
.admin-card,
.table-wrap,
.photo-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.care-copy .eyebrow,
.care-copy .field-label {
  color: rgba(255, 255, 255, 0.72);
}

.stage-strip div {
  min-height: 104px;
  padding: 16px;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 253, 251, 0.1);
}

.stage-strip strong {
  display: block;
  margin-top: 8px;
  color: #ffffff;
  font-size: 1.12rem;
  line-height: 1.25;
}

.care-visual {
  min-height: 310px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: var(--accent);
}

.care-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.tabbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 8px 0 14px;
  background: rgba(239, 232, 225, 0.92);
  backdrop-filter: blur(16px);
}

.tab {
  display: grid;
  grid-template-columns: auto minmax(0, auto);
  justify-content: center;
  align-items: center;
  gap: 7px;
  min-height: 44px;
  border: 1px solid rgba(32, 93, 114, 0.12);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 253, 251, 0.72);
  font-size: 0.9rem;
  font-weight: 760;
}

.tab span {
  color: var(--gold);
}

.tab.is-active {
  color: #ffffff;
  border-color: var(--brand);
  background: var(--brand);
}

.tab.is-active span {
  color: var(--gold);
}

.screen {
  display: none;
  animation: lift 0.22s ease-out;
}

.screen.is-visible {
  display: block;
}

@keyframes lift {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

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

.today-board {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.today-card,
.product-card,
.journey-step,
.metric-card,
.desk-hero {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.today-card {
  position: relative;
  min-height: 180px;
  overflow: hidden;
  padding: 18px;
}

.today-card::after {
  position: absolute;
  right: 12px;
  bottom: 12px;
  width: 24px;
  height: 36px;
  background: url("./assets/venera-star-gold.png") center / contain no-repeat;
  content: "";
  opacity: 0.52;
}

.today-card.is-main {
  color: #fff;
  background:
    radial-gradient(circle at 92% 10%, rgba(255, 193, 102, 0.22), transparent 34%),
    var(--brand);
}

.today-card.is-main .eyebrow,
.today-card.is-main p {
  color: rgba(255, 255, 255, 0.76);
}

.today-card h2 {
  margin: 6px 0 10px;
  color: inherit;
  font-size: clamp(1.35rem, 2.8vw, 2.1rem);
  font-weight: 520;
  line-height: 1.08;
}

.mini-label {
  display: inline-flex;
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.next-step-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 12px;
  margin: 0 0 18px;
}

.next-step-card,
.care-snapshot article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--card);
}

.next-step-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  min-height: 156px;
  padding: clamp(18px, 3vw, 24px);
  overflow: hidden;
}

.next-step-card h2 {
  margin: 6px 0 8px;
  color: var(--brand);
  font-size: clamp(1.35rem, 2.3vw, 2rem);
  line-height: 1.08;
  font-weight: 560;
}

.next-step-card p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.next-step-card.urgent {
  border-color: rgba(209, 175, 148, 0.64);
  background:
    radial-gradient(circle at 94% 12%, rgba(255, 193, 102, 0.22), transparent 34%),
    var(--card);
}

.next-step-card.warm {
  border-color: rgba(255, 193, 102, 0.58);
  background: rgba(255, 253, 251, 0.92);
}

.next-step-card.soft,
.next-step-card.calm {
  border-color: rgba(102, 165, 172, 0.34);
  background: rgba(255, 253, 251, 0.84);
}

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

.care-snapshot article {
  display: grid;
  gap: 7px;
  min-height: 73px;
  padding: 14px;
}

.care-snapshot span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
}

.care-snapshot strong {
  color: var(--brand);
  font-size: 0.96rem;
  line-height: 1.25;
}

.care-progress,
.prescription-panel {
  margin: 18px 0;
}

.section-heading.compact {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 10px;
}

.section-heading.compact h2 {
  margin-bottom: 0;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

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

.journey-step {
  position: relative;
  display: grid;
  gap: 7px;
  min-height: 112px;
  padding: 16px;
}

.journey-step span {
  width: 18px;
  aspect-ratio: 1;
  border: 2px solid var(--accent);
  border-radius: 50%;
  background: #fff;
}

.journey-step.done span {
  border-color: var(--teal);
  background: var(--teal);
}

.journey-step.active {
  border-color: rgba(32, 93, 114, 0.42);
  background: rgba(102, 165, 172, 0.1);
}

.journey-step.active span {
  border-color: var(--gold);
  background: var(--gold);
}

.journey-step strong,
.product-card h3 {
  color: var(--brand);
  line-height: 1.25;
}

.journey-step small,
.product-card small {
  color: var(--muted);
  line-height: 1.35;
}

.product-grid {
  display: grid;
  gap: 14px;
}

.product-routine-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 253, 251, 0.76);
}

.product-routine-group header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.product-routine-group header h3 {
  margin: 4px 0 0;
  color: var(--brand);
  font-size: 1rem;
  line-height: 1.25;
}

.product-routine-group header span {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border: 1px solid rgba(102, 165, 172, 0.32);
  border-radius: 999px;
  color: var(--brand);
  background: #fff;
  font-weight: 820;
}

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

.product-card {
  position: relative;
  overflow: hidden;
  min-height: 176px;
  padding: 18px;
}

.product-card.needs-replacement {
  border-color: rgba(255, 193, 102, 0.72);
  background: rgba(255, 193, 102, 0.1);
}

.product-card::after {
  position: absolute;
  right: -34px;
  top: -34px;
  width: 104px;
  height: 104px;
  border: 1px solid rgba(255, 193, 102, 0.38);
  border-radius: 50%;
  content: "";
}

.product-card h3 {
  margin: 8px 0 8px;
  font-size: 1.12rem;
}

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

.product-status,
.product-source {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.74rem;
  font-weight: 820;
  line-height: 1;
}

.product-status {
  color: var(--brand);
  background: rgba(102, 165, 172, 0.14);
}

.product-source {
  margin-bottom: 10px;
  color: var(--deep);
  background: rgba(209, 175, 148, 0.18);
}

.product-source.manager_recommendation {
  color: #fff;
  background: var(--brand);
}

.product-source.purchase_history {
  background: rgba(102, 165, 172, 0.18);
}

.product-source.reorder_needed {
  background: rgba(255, 193, 102, 0.28);
}

.product-source.site_catalog {
  background: rgba(102, 165, 172, 0.16);
}

.product-card p {
  margin: 0 0 12px;
  color: var(--ink);
  line-height: 1.45;
}

.product-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 12px 0;
}

.product-meta span {
  border: 1px solid rgba(32, 93, 114, 0.1);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.68);
  font-size: 0.76rem;
  font-weight: 700;
}

.product-comment {
  border-left: 3px solid var(--gold);
  margin-top: 12px;
  padding-left: 10px;
}

.product-comment strong {
  color: var(--brand);
  font-size: 0.82rem;
}

.product-comment p {
  margin-top: 5px;
  color: var(--muted);
}

.product-question {
  min-height: 38px;
  border: 1px solid rgba(32, 93, 114, 0.16);
  border-radius: 999px;
  padding: 0 13px;
  color: var(--brand);
  background: #fff;
  font-weight: 800;
}

.product-question.product-finished {
  border-color: rgba(255, 193, 102, 0.62);
  color: #7c5a1a;
  background: rgba(255, 193, 102, 0.16);
}

.product-question:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.product-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.product-question-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.product-question-card.is-reorder {
  border-color: rgba(255, 193, 102, 0.62);
  background: rgba(255, 193, 102, 0.1);
}

.product-question-card + .product-question-card {
  margin-top: 10px;
}

.product-question-card h3 {
  margin: 5px 0 8px;
  color: var(--brand);
}

.product-question-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.inventory-group {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(32, 93, 114, 0.12);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 253, 251, 0.74);
}

.inventory-group + .inventory-group {
  margin-top: 12px;
}

.inventory-group header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.inventory-group header h3 {
  margin: 4px 0 0;
  color: var(--brand);
  font-size: 1rem;
  line-height: 1.25;
}

.inventory-group header > span {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border: 1px solid rgba(102, 165, 172, 0.32);
  border-radius: 999px;
  color: var(--brand);
  background: #fff;
  font-weight: 820;
}

.inventory-list {
  display: grid;
  gap: 10px;
}

.inventory-product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.inventory-product.needs-attention {
  border-color: rgba(255, 193, 102, 0.68);
  background: rgba(255, 193, 102, 0.1);
}

.inventory-product h3 {
  margin: 4px 0 8px;
  color: var(--brand);
  line-height: 1.25;
}

.inventory-product p {
  margin: 8px 0 6px;
  color: var(--ink);
  line-height: 1.45;
}

.inventory-product small {
  color: var(--muted);
  line-height: 1.38;
}

.inventory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-content: flex-start;
  justify-content: flex-end;
  max-width: 360px;
}

.consent-gate {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(248, 246, 243, 0.92);
  backdrop-filter: blur(18px);
}

.consent-gate[hidden] {
  display: none;
}

.consent-card {
  width: min(560px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: clamp(20px, 4vw, 30px);
  background: var(--card);
  box-shadow: var(--shadow);
}

.consent-card img {
  width: 154px;
  height: auto;
  margin-bottom: 18px;
}

.consent-card h2 {
  margin: 6px 0 10px;
  color: var(--brand);
  font-size: clamp(1.45rem, 4vw, 2.15rem);
  font-weight: 520;
  line-height: 1.08;
}

.consent-card p,
.consent-card small {
  color: var(--muted);
  line-height: 1.55;
}

.unlinked-gate .profile-grid {
  grid-template-columns: 1fr;
  margin: 18px 0;
}

.unlinked-gate .profile-grid.compact {
  gap: 10px;
}

.consent-form {
  display: grid;
  gap: 10px;
  margin: 18px 0 12px;
}

.consent-form label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid rgba(32, 93, 114, 0.12);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: var(--ink);
  line-height: 1.4;
}

.consent-form input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand);
}

.consent-form button:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}

.action-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--card);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 32px rgba(32, 93, 114, 0.06);
}

.action-card::after {
  position: absolute;
  right: -36px;
  bottom: -48px;
  width: 120px;
  height: 120px;
  border: 1px solid rgba(209, 175, 148, 0.28);
  border-radius: 50%;
  content: "";
}

.action-card:hover,
.action-card:focus-visible,
.specialist-entry:hover,
.soft-link:hover {
  border-color: rgba(32, 93, 114, 0.34);
  transform: translateY(-1px);
}

.action-icon {
  display: grid;
  place-items: center;
  width: 52px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(102, 165, 172, 0.12);
}

.action-icon img {
  display: block;
  max-width: 34px;
  max-height: 34px;
  object-fit: contain;
}

.action-card b {
  display: block;
  color: var(--brand);
  font-size: 1.02rem;
}

.action-card small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  line-height: 1.35;
}

.care-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  margin-top: 14px;
  padding: 18px;
}

.note-mark {
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(102, 165, 172, 0.14);
}

.note-mark img {
  display: block;
  max-width: 24px;
  max-height: 30px;
}

.care-note h2,
.section-heading h2,
.admin-card h2,
.admin-card h3 {
  margin: 4px 0 8px;
  color: var(--brand);
  letter-spacing: 0;
  font-weight: 520;
}

.care-note p,
.info-block p,
.photo-tile p,
.profile-item p,
.timeline-card p,
.empty-state {
  margin: 0;
  color: var(--muted);
  line-height: 1.52;
}

.section-heading {
  margin: 24px 0 14px;
}

.section-heading h2 {
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

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

.plan-care-layout {
  display: grid;
  gap: 14px;
}

.plan-overview-card,
.plan-care-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 253, 251, 0.82);
}

.plan-overview-card h3 {
  margin: 4px 0 10px;
  color: var(--brand);
  font-size: clamp(1.35rem, 4vw, 2rem);
  line-height: 1.12;
}

.plan-overview-card p:last-child {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.plan-care-block header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.plan-care-block header h3 {
  margin: 4px 0 0;
  color: var(--brand);
  font-size: 1.08rem;
}

.plan-care-block header span {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  height: 34px;
  border: 1px solid rgba(102, 165, 172, 0.32);
  border-radius: 999px;
  color: var(--brand);
  background: #fff;
  font-weight: 820;
}

.plan-care-list {
  margin-bottom: 12px;
}

.info-block {
  position: relative;
  overflow: hidden;
  min-height: 160px;
  padding: 18px;
}

.info-block::after {
  position: absolute;
  right: 14px;
  top: 14px;
  width: 18px;
  height: 27px;
  background: url("./assets/venera-star-gold.png") center / contain no-repeat;
  content: "";
  opacity: 0.64;
}

.info-block.is-wide {
  grid-column: 1 / -1;
}

.info-block h3 {
  margin: 0 0 12px;
  color: var(--brand);
  font-size: 1.04rem;
}

.soft-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.soft-list li {
  position: relative;
  padding-left: 18px;
  color: var(--ink);
  line-height: 1.45;
}

.soft-list li::before {
  position: absolute;
  left: 0;
  top: 0.68em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  content: "";
}

.upload-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  margin-bottom: 12px;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  border-radius: 999px;
  padding: 10px 16px;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
}

.upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.photo-rules {
  margin-bottom: 12px;
}

.photo-rule-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.9fr);
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--card);
}

.photo-rule-card h3 {
  margin: 4px 0 8px;
  color: var(--brand);
  font-weight: 520;
}

.photo-rule-card p,
.photo-rule-card small {
  color: var(--muted);
  line-height: 1.5;
}

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

.photo-tile {
  overflow: hidden;
}

.photo-tile.is-delete-requested {
  border-color: rgba(255, 193, 102, 0.72);
}

.photo-preview {
  display: grid;
  place-items: center;
  width: 100%;
  aspect-ratio: 4 / 3;
  background:
    linear-gradient(135deg, rgba(102, 165, 172, 0.2), rgba(255, 193, 102, 0.18)),
    #fff;
  color: var(--brand);
  font-weight: 800;
}

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

.photo-body {
  padding: 14px;
}

.photo-body strong {
  display: block;
  color: var(--brand);
  margin-bottom: 6px;
}

.photo-body .smart-status {
  display: inline-flex;
  width: fit-content;
  margin-bottom: 8px;
}

.photo-comment-field {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  color: var(--brand);
  font-weight: 780;
}

.photo-comment-field textarea {
  width: 100%;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  color: var(--ink);
  resize: vertical;
}

.diagnostic-photo-strip {
  margin-top: 16px;
}

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

.diagnostic-photo-grid article {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.diagnostic-photo-grid .photo-preview {
  min-height: auto;
  aspect-ratio: 4 / 3;
}

.diagnostic-photo-grid strong {
  color: var(--brand);
  font-size: 0.86rem;
  line-height: 1.25;
}

.diagnostic-photo-grid small {
  color: var(--muted);
  line-height: 1.35;
}

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

.reminder-card,
.reminder-log {
  border: 1px solid rgba(32, 93, 114, 0.12);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.66);
}

.reminder-card header {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.reminder-card h3 {
  margin: 4px 0 0;
  color: var(--brand);
  line-height: 1.15;
}

.reminder-card p {
  margin: 12px 0;
  color: var(--muted);
  line-height: 1.45;
}

.reminder-card.danger {
  border-color: rgba(209, 175, 148, 0.62);
  background: rgba(209, 175, 148, 0.1);
}

.reminder-card.warning {
  border-color: rgba(255, 193, 102, 0.62);
  background: rgba(255, 193, 102, 0.12);
}

.reminder-card.ok {
  background: rgba(102, 165, 172, 0.09);
}

.reminder-meta {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.reminder-log {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
}

.reminder-log article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.reminder-log strong {
  color: var(--brand);
}

.reminder-log span,
.reminder-log small {
  color: var(--muted);
  font-weight: 700;
}

.chat-panel {
  display: grid;
  gap: 10px;
  min-height: 320px;
  max-height: 52vh;
  overflow: auto;
  padding: 14px;
}

.message {
  width: min(78%, 560px);
  border-radius: 18px;
  padding: 12px 14px;
  line-height: 1.42;
}

.message.client {
  justify-self: end;
  border-bottom-right-radius: 6px;
  background: var(--deep);
  color: #fff;
}

.message.specialist {
  justify-self: start;
  border: 1px solid rgba(102, 165, 172, 0.22);
  border-bottom-left-radius: 6px;
  background: var(--card);
  color: var(--ink);
}

.message time {
  display: block;
  margin-top: 6px;
  opacity: 0.68;
  font-size: 0.74rem;
}

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 48px;
  gap: 10px;
  margin-top: 10px;
}

.chat-form input {
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 18px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.chat-form button,
.primary-button {
  display: inline-grid;
  place-items: center;
  min-height: 48px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-card {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 16px;
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  padding: 16px;
  background: var(--card);
}

.timeline-date {
  color: var(--brand);
  font-weight: 800;
}

.timeline-card h3 {
  margin: 0 0 6px;
  color: var(--ink);
}

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

.profile-item {
  padding: 16px;
}

.profile-item strong {
  display: block;
  margin-top: 6px;
  color: var(--brand);
  font-size: 1.06rem;
  line-height: 1.35;
}

.admin-shell {
  width: min(1320px, 100%);
  margin: 0 auto;
  padding: 22px 18px 48px;
}

.admin-shell .topbar {
  position: sticky;
  top: 0;
  z-index: 8;
  padding-block: 8px 14px;
  background: rgba(239, 232, 225, 0.9);
  backdrop-filter: blur(16px);
}

.admin-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 14px;
  border: 1px solid rgba(32, 93, 114, 0.14);
  border-radius: 999px;
  padding: 5px;
  background: rgba(255, 253, 251, 0.7);
}

.admin-switch button {
  min-height: 40px;
  border: 0;
  border-radius: 999px;
  padding: 0 16px;
  background: transparent;
  color: var(--brand);
  font-weight: 800;
}

.admin-switch button.is-active {
  background: var(--brand);
  color: #fff;
}

.access-denied-panel {
  display: grid;
  min-height: 58vh;
  align-items: center;
}

.access-denied-panel[hidden] {
  display: none;
}

.access-denied-panel .admin-card {
  max-width: 760px;
  margin: 34px auto;
  padding: clamp(24px, 5vw, 46px);
  text-align: left;
}

.access-denied-panel h1 {
  max-width: 680px;
  margin: 10px 0 14px;
  color: var(--brand);
  font-size: clamp(2rem, 4vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.access-denied-panel p {
  max-width: 640px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.55;
}

body[data-access="denied"] .admin-switch,
body[data-access="denied"] .owner-panel,
body[data-access="denied"] .care-desk,
body[data-access="denied"] .task-queue,
body[data-access="denied"] .admin-layout {
  display: none;
}

.owner-panel {
  display: block;
  margin-bottom: 14px;
}

body[data-admin-mode="care"] .owner-panel {
  display: none;
}

body[data-admin-mode="owner"] .care-desk,
body[data-admin-mode="owner"] .task-queue,
body[data-admin-mode="owner"] .admin-layout {
  display: none;
}

.quick-assignment-panel {
  margin: 0 0 14px;
}

body[data-admin-mode="owner"]:has(.admin-card[data-admin-section]:target) .owner-panel {
  display: none;
}

body[data-admin-mode="owner"]:has(.admin-card[data-admin-section]:target) .care-desk,
body[data-admin-mode="owner"]:has(.admin-card[data-admin-section]:target) .task-queue {
  display: block;
}

body[data-admin-mode="owner"]:has(.admin-card[data-admin-section]:target) .admin-layout {
  display: grid;
}

.owner-hero {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  padding: clamp(22px, 4vw, 34px);
  color: #fff;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 193, 102, 0.2), transparent 32%),
    linear-gradient(135deg, var(--brand), var(--deep));
  box-shadow: var(--shadow);
}

.owner-hero::after {
  position: absolute;
  right: -82px;
  bottom: -96px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  content: "";
}

.owner-hero .eyebrow,
.owner-hero p {
  color: rgba(255, 255, 255, 0.76);
}

.owner-hero h1 {
  max-width: 760px;
  margin: 8px 0 12px;
  font-size: clamp(2rem, 4vw, 3.7rem);
  font-weight: 440;
  line-height: 1;
}

.owner-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
  gap: 14px;
  margin-top: 14px;
}

.owner-grid .is-wide {
  grid-column: 1 / -1;
}

.admin-layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 14px;
}

.care-desk {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.85fr);
  gap: 14px;
  margin-bottom: 14px;
}

.desk-hero {
  position: relative;
  overflow: hidden;
  padding: 20px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 10%, rgba(255, 193, 102, 0.2), transparent 32%),
    var(--brand);
}

.desk-hero::after {
  position: absolute;
  right: -60px;
  bottom: -78px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  content: "";
}

.desk-hero .eyebrow,
.desk-hero p {
  color: rgba(255, 255, 255, 0.76);
}

.desk-hero h1 {
  position: relative;
  z-index: 1;
  margin: 8px 0 10px;
  font-size: clamp(1.6rem, 3vw, 2.6rem);
  font-weight: 460;
  line-height: 1;
}

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

.desk-main {
  display: grid;
  gap: 10px;
}

.product-alert-panel {
  border: 1px solid rgba(209, 175, 148, 0.58);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 193, 102, 0.1);
}

.product-alert-panel.is-calm {
  border-color: rgba(102, 165, 172, 0.22);
  background: rgba(102, 165, 172, 0.08);
}

.product-alert-panel header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.product-alert-panel h2 {
  margin: 4px 0 0;
  color: var(--brand);
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.12;
}

.product-alert-panel header > span {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 34px;
  border: 1px solid rgba(209, 175, 148, 0.62);
  border-radius: 999px;
  color: var(--brand);
  background: #fff;
  font-weight: 820;
}

.product-alert-list {
  display: grid;
  gap: 8px;
}

.product-alert-item {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid rgba(32, 93, 114, 0.12);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: rgba(255, 253, 251, 0.86);
  text-align: left;
}

.product-alert-controls {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.product-alert-controls select,
.product-alert-controls textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
}

.product-alert-controls textarea {
  min-height: 74px;
  resize: vertical;
}

.product-alert-item span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 750;
}

.product-alert-item strong {
  color: var(--brand);
  line-height: 1.2;
}

.product-alert-item small {
  color: var(--muted);
  line-height: 1.35;
}

.metric-card {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 142px;
  padding: 16px;
  color: var(--ink);
  text-align: left;
}

.metric-card.is-active {
  border-color: rgba(32, 93, 114, 0.42);
  background: rgba(102, 165, 172, 0.12);
  box-shadow: 0 10px 24px rgba(32, 93, 114, 0.1);
}

.metric-card span {
  color: var(--brand);
  font-size: 2.1rem;
  font-weight: 520;
  line-height: 1;
}

.metric-card strong {
  color: var(--brand);
}

.metric-card small {
  color: var(--muted);
  line-height: 1.35;
}

.task-queue {
  margin: 0 0 14px;
}

.task-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: var(--card);
}

.task-panel > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.task-panel h2 {
  margin: 4px 0 0;
  color: var(--brand);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.12;
}

.task-panel > header > span {
  display: inline-grid;
  place-items: center;
  min-width: 42px;
  height: 38px;
  border: 1px solid rgba(102, 165, 172, 0.32);
  border-radius: 999px;
  color: var(--brand);
  background: #fff;
  font-weight: 820;
}

.task-list {
  display: grid;
  gap: 9px;
}

.task-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(32, 93, 114, 0.12);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.66);
}

.task-item.danger {
  border-color: rgba(209, 175, 148, 0.58);
  background: rgba(209, 175, 148, 0.12);
}

.task-item.warning {
  border-color: rgba(255, 193, 102, 0.62);
  background: rgba(255, 193, 102, 0.11);
}

.task-item h3 {
  margin: 7px 0 5px;
  color: var(--brand);
  line-height: 1.2;
}

.task-item p {
  margin: 0;
  color: var(--ink);
  line-height: 1.42;
}

.task-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-weight: 700;
}

.admin-focus {
  margin-top: 16px;
  border-left: 3px solid var(--gold);
  padding: 10px 0 10px 14px;
}

.admin-focus strong {
  color: var(--brand);
}

.admin-focus p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.client-history-list {
  display: grid;
  gap: 10px;
}

.client-history-item {
  display: grid;
  grid-template-columns: minmax(92px, 0.22fr) minmax(0, 1fr);
  gap: 12px;
  border: 1px solid rgba(32, 93, 114, 0.12);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.68);
}

.client-history-item.warning {
  border-color: rgba(255, 193, 102, 0.62);
  background: rgba(255, 193, 102, 0.1);
}

.client-history-item time {
  color: var(--muted);
  font-weight: 760;
}

.client-history-item strong {
  color: var(--brand);
}

.client-history-item p {
  margin: 5px 0 0;
  color: var(--ink);
  line-height: 1.42;
}

.export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 16px;
}

.work-focus-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(160px, auto);
  gap: 16px;
  align-items: center;
  margin-top: 16px;
  border: 1px solid rgba(102, 165, 172, 0.34);
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 253, 251, 0.82);
}

.work-focus-card .primary-button {
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.work-focus-card h3 {
  margin: 6px 0 8px;
  color: var(--brand);
  font-size: clamp(1.25rem, 2vw, 1.7rem);
  font-weight: 560;
  line-height: 1.12;
}

.work-focus-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.48;
}

.telegram-bind-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 16px 0;
  border: 1px solid rgba(32, 93, 114, 0.14);
  border-radius: 8px;
  padding: 16px;
  background: rgba(102, 165, 172, 0.08);
}

.telegram-bind-card.is-linked {
  background: rgba(255, 193, 102, 0.12);
}

.telegram-bind-card h3 {
  margin: 4px 0 8px;
  color: var(--brand);
}

.telegram-bind-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.work-focus-card.danger {
  border-color: rgba(209, 175, 148, 0.62);
  background: rgba(209, 175, 148, 0.12);
}

.work-focus-card.warning {
  border-color: rgba(255, 193, 102, 0.62);
  background: rgba(255, 193, 102, 0.14);
}

.work-focus-card.ok {
  background: rgba(102, 165, 172, 0.1);
}

.work-snapshot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.work-snapshot article {
  display: grid;
  gap: 5px;
  border: 1px solid rgba(32, 93, 114, 0.12);
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.62);
}

.work-snapshot span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 760;
}

.work-snapshot strong {
  color: var(--brand);
  line-height: 1.25;
}

.work-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.client-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid rgba(222, 209, 199, 0.72);
  margin-top: 16px;
  padding-top: 16px;
}

.client-tabs button {
  min-height: 38px;
  border: 1px solid rgba(32, 93, 114, 0.16);
  border-radius: 999px;
  padding: 0 13px;
  color: var(--brand);
  background: #fff;
  font-weight: 800;
}

.client-tabs button.is-active {
  border-color: var(--brand);
  color: #fff;
  background: var(--brand);
}

.admin-card.is-highlighted {
  border-color: rgba(255, 193, 102, 0.84);
  box-shadow: 0 0 0 4px rgba(255, 193, 102, 0.2);
}

.admin-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
}

.admin-card[data-admin-section] {
  display: none;
}

.admin-card[data-admin-section].is-visible {
  display: block;
}

.admin-card[data-admin-section]:target {
  display: block;
}

.admin-card::after {
  position: absolute;
  right: -28px;
  top: -34px;
  width: 112px;
  height: 112px;
  border: 1px solid rgba(102, 165, 172, 0.18);
  border-radius: 50%;
  content: "";
  pointer-events: none;
}

.manager-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.72);
}

.manager-card.is-disabled {
  opacity: 0.68;
  background: rgba(111, 113, 111, 0.06);
}

.manager-card + .manager-card {
  margin-top: 8px;
}

.manager-card strong,
.matrix-group header strong,
.matrix-client span {
  color: var(--brand);
}

.manager-card span,
.manager-card small,
.matrix-group header span,
.matrix-client small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.3;
}

.manager-card b {
  display: block;
  color: var(--brand);
  font-size: 1.55rem;
  font-weight: 520;
  text-align: right;
}

.manager-card .secondary-button {
  margin-top: 8px;
}

.employee-form {
  border-top: 1px solid rgba(222, 209, 199, 0.82);
  margin-top: 16px;
  padding-top: 16px;
}

.new-client-form {
  border-top: 1px solid rgba(222, 209, 199, 0.82);
  margin-top: 18px;
  padding-top: 16px;
}

.matrix-group {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--card);
}

.matrix-group + .matrix-group {
  margin-top: 10px;
}

.matrix-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  background: rgba(102, 165, 172, 0.1);
}

.matrix-group > div {
  display: grid;
  gap: 8px;
  padding: 10px;
}

.matrix-client {
  display: grid;
  gap: 3px;
  width: 100%;
  border: 1px solid rgba(32, 93, 114, 0.12);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  text-align: left;
}

.audit-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, auto);
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: rgba(255, 255, 255, 0.72);
}

.audit-entry + .audit-entry {
  margin-top: 8px;
}

.audit-entry strong {
  color: var(--brand);
}

.audit-entry p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.audit-entry aside {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 0.82rem;
  text-align: right;
}

.audit-entry aside span {
  color: var(--brand);
  font-weight: 800;
}

.sync-status {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.sync-status-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.sync-status-head span,
.sync-status-head b {
  color: var(--brand);
  font-weight: 800;
}

.sync-status-head b {
  border: 1px solid rgba(102, 165, 172, 0.28);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(255, 253, 251, 0.82);
  font-size: 0.82rem;
}

.sync-status p {
  margin: 0;
  color: var(--ink);
  line-height: 1.48;
}

.sync-status small {
  color: var(--muted);
  line-height: 1.4;
}

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

.sync-details div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.sync-details dt {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.sync-details dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--brand);
  font-weight: 760;
}

.catalog-preview {
  display: grid;
  gap: 8px;
}

.catalog-result-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: baseline;
  justify-content: space-between;
  border-top: 1px solid rgba(222, 209, 199, 0.72);
  padding-top: 10px;
}

.catalog-result-head strong {
  color: var(--brand);
}

.catalog-preview div {
  display: grid;
  gap: 3px;
  border-top: 1px solid rgba(222, 209, 199, 0.72);
  padding-top: 8px;
}

.catalog-preview strong {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.32;
}

.sync-status.ok,
.sync-status.syncing {
  border-color: rgba(102, 165, 172, 0.44);
  background: rgba(102, 165, 172, 0.1);
}

.sync-status.error {
  border-color: rgba(209, 175, 148, 0.58);
  background: rgba(209, 175, 148, 0.14);
}

.sync-status.saved,
.sync-status.not_configured {
  background: rgba(255, 253, 251, 0.72);
}

.client-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.client-row {
  display: grid;
  gap: 4px;
  width: 100%;
  min-height: 76px;
  border: 1px solid rgba(32, 93, 114, 0.12);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.client-row.is-active {
  border-color: var(--brand);
  background: rgba(102, 165, 172, 0.1);
  box-shadow: 0 8px 22px rgba(32, 93, 114, 0.12);
}

.client-row strong {
  color: var(--brand);
}

.client-row span {
  color: var(--muted);
  font-size: 0.86rem;
}

.client-row .smart-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  border: 1px solid rgba(102, 165, 172, 0.28);
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 800;
}

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

.admin-card.is-wide {
  grid-column: 1 / -1;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  border-bottom: 1px solid var(--line);
  padding: 11px 8px;
  text-align: left;
  vertical-align: top;
}

.data-table th {
  color: var(--muted);
  font-size: 0.8rem;
}

.editor-form {
  display: grid;
  gap: 12px;
}

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

.editor-form label {
  display: grid;
  gap: 6px;
  color: var(--brand);
  font-weight: 780;
}

.editor-form input,
.editor-form textarea,
.editor-form select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.editor-form input:focus,
.editor-form textarea:focus,
.editor-form select:focus,
.chat-form input:focus {
  border-color: rgba(32, 93, 114, 0.48);
  box-shadow: 0 0 0 3px rgba(102, 165, 172, 0.15);
}

.editor-form textarea {
  min-height: 86px;
  resize: vertical;
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.secondary-button {
  display: inline-grid;
  place-items: center;
  min-height: 42px;
  border: 1px solid rgba(32, 93, 114, 0.16);
  border-radius: 999px;
  padding: 0 15px;
  background: #fff;
  color: var(--brand);
  font-weight: 800;
  text-decoration: none;
}

.secondary-button.compact {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.82rem;
}

.secondary-button.danger {
  border-color: rgba(209, 175, 148, 0.54);
  color: #7b5043;
}

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

.secondary-button.as-link {
  width: fit-content;
}

.invite-box {
  display: grid;
  grid-template-columns: minmax(180px, auto) 190px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}

.qr-card {
  display: grid;
  gap: 8px;
  justify-items: center;
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.qr-card img {
  display: block;
  width: min(170px, 42vw);
  aspect-ratio: 1;
}

.qr-card figcaption {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.invite-link {
  overflow-wrap: anywhere;
  margin: 12px 0 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  color: var(--brand);
  background: rgba(255, 255, 255, 0.72);
  font-weight: 700;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 10;
  max-width: min(420px, calc(100vw - 36px));
  border-radius: 8px;
  padding: 13px 15px;
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow);
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: 0.2s ease;
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 900px) {
  .care-hero,
  .next-step-panel,
  .admin-layout,
  .admin-grid,
  .care-desk,
  .owner-grid {
    grid-template-columns: 1fr;
  }

  .care-visual {
    min-height: 220px;
  }

  .home-grid,
  .diagnostic-photo-grid,
  .reminder-board,
  .photo-grid,
  .profile-grid,
  .today-board,
  .product-grid,
  .product-routine-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .today-card.is-main {
    grid-column: 1 / -1;
  }

  .next-step-card {
    grid-template-columns: 1fr;
  }

  .work-focus-card,
  .telegram-bind-card,
  .inventory-product,
  .client-history-item,
  .task-item,
  .work-snapshot {
    grid-template-columns: 1fr;
  }

  .journey-track,
  .desk-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .app-shell {
    padding-inline: 12px;
  }

  .hero-star-one {
    top: 16px;
    right: 14px;
    width: 34px;
  }

  .hero-mark {
    right: -18px;
    bottom: 18px;
    width: 180px;
    opacity: 0.12;
  }

  .care-copy {
    min-height: auto;
  }

  .care-copy h1 {
    font-size: clamp(2rem, 12vw, 3.2rem);
  }

  .stage-strip,
  .plan-layout,
  .form-grid,
  .invite-box,
  .sync-details,
  .audit-entry,
  .photo-rule-card,
  .reminder-log article,
  .client-history-item,
  .inventory-product,
  .task-item,
  .home-grid,
  .today-board,
  .care-snapshot,
  .journey-track,
  .product-grid,
  .product-routine-list,
  .desk-metrics,
  .owner-grid,
  .reminder-board,
  .diagnostic-photo-grid,
  .photo-grid,
  .profile-grid,
  .upload-panel {
    grid-template-columns: 1fr;
  }

  .today-card {
    min-height: auto;
  }

  .section-heading.compact {
    display: block;
  }

  .metric-card {
    min-height: 108px;
  }

  .admin-switch {
    display: grid;
    width: 100%;
  }

  .inventory-actions {
    justify-content: flex-start;
    max-width: none;
  }

  .owner-hero h1 {
    font-size: clamp(2rem, 10vw, 2.8rem);
  }

  .tabbar {
    position: fixed;
    inset: auto 0 0;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    padding: 8px max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    border-top: 1px solid var(--line);
    background: rgba(255, 253, 251, 0.96);
  }

  .tab {
    min-height: 54px;
    border: 0;
    border-radius: 0;
    background: transparent;
    font-size: 0.72rem;
  }

  .tab b {
    display: block;
  }

  .tab.is-active {
    border-radius: 8px;
  }

  .timeline-card {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .specialist-entry {
    padding-inline: 11px;
    font-size: 0.8rem;
  }

  .message {
    width: min(92%, 560px);
  }
}
