.consumer-body {
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(36, 53, 47, 0.08), rgba(244, 246, 243, 0) 280px),
    #f4f6f3;
}

.consumer-shell {
  min-height: 100vh;
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 0 0 96px;
  background: #f4f6f3;
}

.consumer-hero {
  display: grid;
  gap: 18px;
  padding: calc(env(safe-area-inset-top) + 18px) 18px 22px;
  background: #24352f;
  color: #f7fbf8;
}

.consumer-hero-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.consumer-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.consumer-brand img {
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
}

.brand-title {
  font-weight: 750;
  line-height: 1.08;
}

.brand-subtitle {
  margin-top: 3px;
  color: #c3d4cb;
  font-size: 12px;
}

.connection-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 172px;
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #dce9e2;
  font-size: 11px;
  line-height: 1.2;
}

.connection-pill span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d0a84f;
  flex: 0 0 auto;
}

.connection-pill.online span {
  background: #7cc6a5;
}

.connection-pill.offline span {
  background: #e08d7f;
}

.consumer-title {
  display: grid;
  gap: 8px;
}

.consumer-title h1 {
  max-width: 390px;
  color: #f7fbf8;
  font-size: 34px;
  line-height: 1.08;
}

.consumer-title p {
  max-width: 430px;
  color: #d7e3dc;
  font-size: 15px;
}

.consumer-title .eyebrow,
.section-kicker {
  color: #78958b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

.consumer-hero .eyebrow {
  color: #d0a84f;
}

.new-case-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 68px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background: #ffffff;
  color: #17211d;
  text-align: left;
  box-shadow: 0 18px 42px rgba(10, 18, 14, 0.18);
}

.new-case-card strong,
.new-case-card small {
  display: block;
}

.new-case-card strong {
  font-size: 15px;
}

.new-case-card small {
  margin-top: 2px;
  color: #65706a;
  font-size: 12px;
}

.new-case-icon,
.case-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: #edf3ef;
  color: #24352f;
  font-weight: 800;
}

.new-case-icon {
  background: #24352f;
  color: #fff;
  font-size: 24px;
}

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

.hero-stats div {
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.hero-stats strong,
.hero-stats span {
  display: block;
}

.hero-stats strong {
  font-size: 18px;
}

.hero-stats span {
  margin-top: 2px;
  color: #c3d4cb;
  font-size: 11px;
}

.consumer-main {
  display: grid;
  gap: 14px;
  padding: 16px 14px 0;
}

.consumer-section,
.consumer-panel {
  background: #ffffff;
  border: 1px solid #dce3dd;
  border-radius: 8px;
  box-shadow: 0 14px 38px rgba(31, 42, 37, 0.08);
  padding: 14px;
}

.section-heading,
.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.section-heading h2,
.panel-header h2 {
  margin-top: 3px;
  font-size: 20px;
}

.section-meta {
  flex: 0 0 auto;
  color: #65706a;
  font-size: 12px;
}

.quick-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.quick-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  min-height: 112px;
  padding: 12px;
  border: 1px solid #dce3dd;
  border-radius: 8px;
  background: #fff;
  color: #17211d;
  text-align: left;
}

.quick-card.active,
.quick-card:hover {
  border-color: #4f7f74;
  background: #eef5f1;
}

.case-content {
  display: grid;
  gap: 5px;
  min-width: 0;
  flex: 1 1 auto;
}

.case-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.case-category {
  color: #65706a;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.case-status {
  flex: 0 0 auto;
  max-width: 150px;
  padding: 4px 7px;
  border-radius: 8px;
  background: rgba(208, 168, 79, 0.15);
  color: #7a5a14;
  font-size: 11px;
  line-height: 1.15;
}

.quick-card strong {
  font-size: 15px;
  line-height: 1.2;
}

.case-hint,
.quick-card small {
  color: #65706a;
  font-size: 12px;
  line-height: 1.35;
}

.case-progress {
  display: block;
  width: 100%;
  height: 5px;
  overflow: hidden;
  border-radius: 8px;
  background: #edf3ef;
}

.case-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #4f7f74;
}

.consumer-form-panel,
.consumer-result,
.history-panel {
  scroll-margin-top: 12px;
}

.consumer-textarea {
  min-height: 168px;
  margin-top: 10px;
  resize: vertical;
}

.document-photo-box {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

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

.document-photo-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.document-photo-button {
  width: 100%;
  min-height: 42px;
}

.document-photo-list,
.consumer-history {
  display: grid;
  gap: 8px;
}

.document-photo-item {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 68px;
  padding: 8px;
  border: 1px solid #dce3dd;
  border-radius: 8px;
  background: #f7faf8;
}

.document-photo-item img,
.document-photo-placeholder {
  width: 56px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
  background: #eef5f1;
}

.document-photo-placeholder {
  display: grid;
  place-items: center;
  color: #65706a;
  font-size: 12px;
}

.document-photo-item strong,
.document-photo-item span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-photo-item span,
.document-photo-item small {
  color: #65706a;
  font-size: 12px;
}

.document-photo-remove {
  min-width: 34px;
  min-height: 34px;
  padding: 0;
}

.consumer-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-top: 10px;
}

.consumer-actions .primary-button {
  min-height: 48px;
}

.consumer-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.consumer-result .result-box {
  min-height: 320px;
  max-height: 62vh;
  overflow: auto;
}

.consumer-empty {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 180px;
  padding: 16px;
  border: 1px dashed #dce3dd;
  border-radius: 8px;
  background: #f7faf8;
  color: #65706a;
}

.consumer-empty.compact {
  min-height: 112px;
}

.history-item {
  width: 100%;
  padding: 11px;
  border: 1px solid #dce3dd;
  border-radius: 8px;
  background: #fff;
  color: #17211d;
  text-align: left;
}

.history-item:hover {
  border-color: #4f7f74;
}

.consumer-bottom-nav {
  position: fixed;
  left: 50%;
  right: auto;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr 72px 1fr;
  align-items: center;
  width: min(520px, 100%);
  min-height: 70px;
  padding: 8px 18px calc(env(safe-area-inset-bottom) + 8px);
  border-top: 1px solid #dce3dd;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -10px 30px rgba(31, 42, 37, 0.08);
  transform: translateX(-50%);
}

.consumer-bottom-nav button {
  min-height: 46px;
  border: 0;
  background: transparent;
  color: #65706a;
  font-size: 12px;
}

.consumer-bottom-nav button:not(.bottom-new-case) {
  display: grid;
  gap: 3px;
  place-items: center;
}

.bottom-nav-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 22px;
  border-radius: 8px;
  background: #edf3ef;
  color: #24352f;
  font-weight: 800;
}

.bottom-new-case {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: -24px auto 0;
  border-radius: 8px;
  background: #24352f !important;
  color: #fff !important;
  box-shadow: 0 10px 22px rgba(36, 53, 47, 0.26);
}

.bottom-new-case span {
  font-size: 28px;
  line-height: 1;
}

@media (min-width: 860px) {
  .consumer-body {
    background:
      linear-gradient(90deg, rgba(36, 53, 47, 0.08), rgba(244, 246, 243, 0) 44%),
      #eef2ef;
  }

  .consumer-shell {
    box-shadow: 0 0 0 1px rgba(23, 33, 29, 0.06), 0 32px 80px rgba(23, 33, 29, 0.12);
  }
}

@media (max-width: 420px) {
  .consumer-title h1 {
    font-size: 30px;
  }

  .consumer-hero,
  .consumer-main {
    padding-left: 12px;
    padding-right: 12px;
  }

  .connection-pill {
    max-width: 132px;
  }

  .case-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 5px;
  }

  .case-status {
    max-width: 100%;
  }

  .document-photo-actions,
  .consumer-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 340px) {
  .consumer-title h1 {
    font-size: 27px;
  }

  .quick-card {
    gap: 9px;
    padding: 10px;
  }

  .case-icon {
    width: 36px;
    height: 36px;
  }
}