:root {
  --bg: #f6f2ea;
  --bg-soft: #fffdf9;
  --ink: #18292d;
  --muted: rgba(24, 41, 45, 0.62);
  --muted-on-dark: rgba(255, 255, 255, 0.84);
  --line: rgba(24, 41, 45, 0.1);
  --brand-deep: #10393f;
  --brand-mid: #18717a;
  --brand-soft: #cfe8e0;
  --accent: #f0a643;
  --accent-deep: #cf8724;
  --card: rgba(255, 255, 255, 0.82);
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(circle at top left, rgba(240, 166, 67, 0.12), transparent 28%),
    radial-gradient(circle at top right, rgba(24, 113, 122, 0.12), transparent 24%),
    var(--bg);
  color: var(--ink);
  font-family: "Manrope", sans-serif;
}

a {
  color: var(--brand-mid);
}

.img-fluid {
  border-radius: 0.25rem;
}
.img-fluid2 {
  border-radius: 0.25rem;
}

.navbar-glass {
  background: rgba(246, 242, 234, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(16, 57, 63, 0.08);
}

.navbar-glass .nav-link:focus-visible,
.navbar-glass .navbar-brand:focus-visible {
  outline: 2px solid rgba(24, 113, 122, 0.55);
  outline-offset: 3px;
  border-radius: 0.25rem;
}

.btn:focus-visible,
.btn-accent:focus-visible {
  outline: 2px solid rgba(24, 113, 122, 0.6);
  outline-offset: 3px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-mid), var(--accent));
  color: #fff;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #ffbf66);
  border: 0;
  color: #1f2526;
  font-weight: 700;
}

.btn-accent:hover {
  background: linear-gradient(135deg, var(--accent-deep), var(--accent));
  color: #1f2526;
}

.hero-shell {
  position: relative;
  background:
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.12), transparent 18%),
    linear-gradient(135deg, #0d3236 0%, #155860 50%, #1b7a7c 100%);
}

.hero-shell-home {
  min-height: calc(100vh - 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.hero-copy-band {
  width: 100%;
  padding: clamp(0.5rem, 2vw, 0.5rem) 0 clamp(0.5rem, 2vw, 0.5rem);
}

.hero-copy-content {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0 clamp(0.5rem, 2vw, 0.5rem);
}

.hero-copy-content h1 {
  max-width: 18ch;
  font-size: clamp(2.5rem, 5vw, 4.75rem);
  line-height: 1.05;
}

.hero-copy-content .hero-title-compact {
  font-size: clamp(1.7rem, 2.8vw, 2.45rem);
  line-height: 1.18;
}

.hero-actions,
.hero-bullets-wide,
.hero-details-shell {
  width: 100%;
}

.hero-bullets-wide {
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
}

.hero-shell::after {
  content: "";
  position: absolute;
  inset: auto -10% -3rem auto;
  width: 18rem;
  height: 18rem;
  background: rgba(240, 166, 67, 0.18);
  filter: blur(6px);
  border-radius: 50%;
}

.py-lg-6 {
  padding-top: 5.5rem;
  padding-bottom: 5.5rem;
}

.hero-lead {
  max-width: 44rem;
  font-size: 1.1rem;
}

.eyebrow-chip,
.section-kicker,
.hero-panel-badge,
.method-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  background: rgba(255, 255, 255, 0.12);
  color: var(--brand-mid);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-shell .eyebrow-chip {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.hero-panel {
  position: relative;
  padding: 1.8rem;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: 0 2rem 4rem rgba(3, 16, 18, 0.22);
}

.hero-shot,
.doc-figure {
  margin: 0;
  overflow: hidden;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(16, 57, 63, 0.1);
}

.hero-shot {
  background: rgba(255, 255, 255, 0.16);
  box-shadow: 0 1.4rem 3rem rgba(3, 16, 18, 0.2);
}

.hero-shot-large {
  height: 100%;
}

.hero-shot img,
.doc-figure img {
  display: block;
  width: 100%;
  height: auto;
}

.hero-shot figcaption,
.doc-figure figcaption {
  padding: 0.25rem 0.3rem 0.25rem;
  font-size: 0.95rem;
  line-height: 1.55;
}

.hero-shot figcaption {
  color: var(--muted-on-dark);
}

.doc-figure figcaption {
  color: var(--muted);
}

.hero-panel-badge {
  margin-bottom: 1rem;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
}

.hero-bullets {
  display: grid;
  gap: 0.85rem;
}

.hero-bullet {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  color: rgba(255, 255, 255, 0.9);
}

.hero-bullet-mark,
.grid-list-dot {
  width: 0.75rem;
  height: 0.75rem;
  margin-top: 0.3rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), #ffd08c);
}

.grid-list-dot.warning {
  background: linear-gradient(135deg, #df8a50, #f0c778);
}

.step-line {
  display: grid;
  gap: 1rem;
}

.step-item {
  display: flex;
  gap: 1rem;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  font-weight: 800;
}

.hero-panel .step-item p {
  color: var(--muted-on-dark);
}

.step-item h3,
.surface-card h3,
.mini-method-card h3,
.app-title,
.footer-brand,
.footer-title {
  font-size: 1.05rem;
  font-weight: 800;
}

.step-item p,
.surface-card p,
.mini-method-card p,
.app-card p {
  color: var(--muted);
}

.app-card .app-description {
  color: rgba(24, 41, 45, 0.72);
}

.surface-card .doc-paragraph {
  color: rgba(24, 41, 45, 0.72);
}

.page-hero {
  background: linear-gradient(180deg, rgba(16, 57, 63, 0.08), transparent);
}

.narrow-copy {
  max-width: 52rem;
}

.section-heading {
  max-width: 44rem;
}

.section-heading h2,
.surface-card h2,
.auth-card h1,
.auth-card h2,
.admin-card h2 {
  font-weight: 800;
}

.section-heading p {
  color: var(--muted);
}

.compare-section-shell {
  width: 100%;
}

.section-contrast {
  background: linear-gradient(180deg, rgba(207, 232, 224, 0.25), rgba(255, 255, 255, 0));
}

.surface-card,
.auth-card,
.tariff-card,
.admin-card,
.metric-card {
  padding: 1.25rem;
  border-radius: 0.25rem;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 1.1rem 2.6rem rgba(18, 33, 36, 0.08);
}

.metric-card {
  padding: 0.75rem;
}

.notice-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(240, 166, 67, 0.12));
}

.grid-list {
  display: grid;
  gap: 0.9rem;
}

.grid-list.compact {
  gap: 0.75rem;
}

.grid-list-item {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
}

.mini-title {
  margin-bottom: 0.35rem;
  color: var(--brand-deep);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tariff-card {
  position: relative;
  overflow: hidden;
}

.tariff-card::before,
.tariff-choice-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(24, 113, 122, 0.04), rgba(240, 166, 67, 0.06));
  pointer-events: none;
}

.tariff-card.featured,
.tariff-choice-card.featured {
  background: linear-gradient(135deg, rgba(16, 57, 63, 0.96), rgba(21, 88, 96, 0.95));
  color: #fff;
}

.tariff-card.featured p,
.tariff-card.featured .mini-title,
.tariff-card.featured .text-secondary-emphasis,
.tariff-choice-card.featured .text-secondary-emphasis,
.tariff-choice-card.featured .small {
  color: rgba(255, 255, 255, 0.84) !important;
}

.price-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.55rem 0.95rem;
  background: rgba(16, 57, 63, 0.08);
  color: var(--brand-deep);
  font-weight: 800;
  white-space: nowrap;
}

.tariff-card.featured .price-pill,
.tariff-choice-card.featured .price-pill {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

.app-card,
.quick-link-card {
  display: block;
  height: 100%;
  padding: 1.1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  text-decoration: none;
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.programs-panel-compact {
  padding: 0.7rem;
}

.programs-panel-compact .section-kicker {
  margin-bottom: 0.35rem;
  padding: 0.24rem 0.55rem;
  font-size: 0.64rem;
}

.programs-panel-compact h2 {
  margin-bottom: 0.65rem !important;
  font-size: 1.02rem;
  line-height: 1.2;
}

.app-card-compact-home {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border-radius: 0.65rem;
}

.app-card-copy-compact {
  min-width: 0;
}

.app-title-compact-home {
  margin-bottom: 0.05rem;
  font-size: 0.84rem;
  line-height: 1.2;
}

.programs-panel-compact .app-card p {
  font-size: 0.76rem;
  line-height: 1.2;
}

.doc-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.doc-figure {
  padding: 0.1rem 0.1rem 0.1rem;
  background: rgba(255, 255, 255, 0.82);
}

.doc-figure img {
  border-radius: 0.25rem;
  background: rgba(16, 57, 63, 0.04);
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center;
}

.doc-figure-compact img {
  aspect-ratio: auto;
}

.doc-outline-card {
  display: flex;
  flex-direction: column;
}

.doc-compare-grid,
.doc-subsection-stack {
  display: grid;
  gap: 1.25rem;
}

.doc-compare-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
}

.doc-compare-card,
.doc-subsection {
  padding: 0.25rem;
  border-radius: 0.25rem;
  background: rgba(16, 57, 63, 0.04);
  border: 1px solid rgba(16, 57, 63, 0.06);
}

.doc-compare-media {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.doc-compare-media-vertical {
  grid-template-columns: 1fr;
}

.doc-outline-number,
.doc-nav-number,
.doc-step-label,
.doc-shot-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.25rem;
  font-weight: 800;
  letter-spacing: 0.05em;
}

.doc-outline-number {
  width: 2.35rem;
  height: 2.35rem;
  margin-bottom: 0.85rem;
  background: linear-gradient(135deg, var(--brand-mid), var(--accent));
  color: #fff;
}

.doc-outline-copy {
  color: var(--muted);
}

.doc-mini-link {
  margin-top: auto;
  color: var(--brand-deep);
  font-weight: 700;
  text-decoration: none;
}

.doc-mini-link-center {
  display: block;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.doc-note-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.92), rgba(207, 232, 224, 0.3));
}

.doc-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 1.5rem;
}

.doc-nav-vertical {
  flex-direction: column;
  align-items: flex-start;
}

.doc-nav a {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.95rem;
  border-radius: 999px;
  background: rgba(16, 57, 63, 0.08);
  color: var(--brand-deep);
  font-weight: 700;
  text-decoration: none;
}

.doc-nav-number,
.doc-step-label,
.doc-shot-label {
  min-width: 2.1rem;
  padding: 0.35rem 0.35rem;
  background: rgba(24, 113, 122, 0.12);
  color: var(--brand-deep);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.doc-step-label-wide {
  display: flex;
  width: 100%;
}

.doc-step-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.doc-step-card h3 {
  margin-bottom: 0.7rem;
}

.doc-step-card p {
  color: var(--muted);
}

.doc-subsection-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1rem;
}

.doc-subsection-head h3 {
  margin: 0;
}

.doc-line-list {
  display: grid;
  gap: 0.75rem;
}

.doc-line-item {
  padding: 0.85rem 1rem;
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(16, 57, 63, 0.08);
}

.doc-footnotes {
  color: var(--muted);
  font-size: 0.95rem;
}

.doc-figure figcaption {
  display: grid;
  gap: 0.55rem;
}

.connection-article,
.connection-block,
#file-browser {
  scroll-margin-top: 6rem;
}

.app-card-media {
  display: block;
  width: auto;
  max-width: 100%;
  height: 2.75rem;
  margin-bottom: 0.85rem;
}

.app-card-media-compact-home {
  height: 1.55rem;
  margin-bottom: 0;
  flex: 0 0 auto;
}

.app-card:hover,
.quick-link-card:hover {
  transform: translateY(-3px);
  border-color: rgba(24, 113, 122, 0.24);
  box-shadow: 0 1rem 2rem rgba(24, 41, 45, 0.08);
}

.quick-link-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: inherit;
}

.quick-link-title {
  font-weight: 800;
  color: var(--brand-deep);
}

.method-badge {
  background: rgba(16, 57, 63, 0.08);
}

.instruction-list {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.8rem;
  color: var(--muted);
}

.auth-card {
  background: rgba(255, 255, 255, 0.88);
}

.tariff-choice {
  cursor: pointer;
}

.tariff-choice-card {
  position: relative;
  display: block;
  padding: 1.2rem;
  border-radius: 1.1rem;
  border: 1px solid rgba(16, 57, 63, 0.12);
  background: rgba(255, 255, 255, 0.86);
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.tariff-choice-card.active {
  border-color: rgba(24, 113, 122, 0.65);
  box-shadow: 0 0 0 0.22rem rgba(24, 113, 122, 0.18);
  transform: translateY(-2px);
}

.sticky-card {
  position: sticky;
  top: 6rem;
}

.password-toggle-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.85rem;
  min-width: 2.85rem;
  padding: 0;
  cursor: pointer;
  border: 1px solid rgba(16, 57, 63, 0.12);
  border-left: 0;
  border-top-right-radius: 0.85rem;
  border-bottom-right-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.86);
  color: rgba(24, 41, 45, 0.58);
  transition: color 160ms ease, background-color 160ms ease;
}

.password-toggle-icon-btn svg {
  width: 1rem;
  height: 1rem;
}

.password-toggle-icon-btn:hover,
.password-toggle-icon-btn:focus-visible,
.password-toggle-icon-btn.is-visible {
  background: rgba(24, 113, 122, 0.08);
  color: rgba(24, 41, 45, 0.92);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.status-new {
  background: rgba(240, 166, 67, 0.16);
  color: #87530d;
}

.status-active {
  background: rgba(31, 153, 101, 0.16);
  color: #146844;
}

.status-paused {
  background: rgba(106, 115, 126, 0.16);
  color: #48525d;
}

.status-deleted {
  background: rgba(195, 74, 74, 0.16);
  color: #8b2f2f;
}

.status-admin {
  background: rgba(24, 113, 122, 0.16);
  color: var(--brand-mid);
}

.status-user {
  background: rgba(16, 57, 63, 0.08);
  color: var(--brand-deep);
}

.admin-note-box,
.surface-subcard {
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(16, 57, 63, 0.04);
  border: 1px solid rgba(16, 57, 63, 0.06);
}

.mini-method-card {
  height: 100%;
  padding: 1.2rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.metric-card {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.metric-card strong {
  font-size: 2rem;
  line-height: 1;
}

.metric-label {
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-card {
  background: rgba(255, 255, 255, 0.9);
}

.admin-meta {
  display: grid;
  gap: 0.55rem;
  color: var(--muted);
}

.admin-filter-box {
  min-width: min(100%, 18rem);
}

.admin-grid-page {
  display: grid;
  gap: 1rem;
}

.admin-grid-note {
  max-width: 32rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  background: rgba(16, 57, 63, 0.05);
  border: 1px solid rgba(16, 57, 63, 0.08);
  color: var(--muted);
}

.admin-grid-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.admin-grid-tab {
  padding: 0.75rem 1.2rem;
  border: 1px solid rgba(16, 57, 63, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  color: var(--brand-deep);
  font-weight: 700;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.admin-grid-tab.is-active {
  background: rgba(24, 113, 122, 0.12);
  border-color: rgba(24, 113, 122, 0.4);
  transform: translateY(-1px);
}

.admin-grid-shell {
  display: grid;
  gap: 1rem;
  padding: 0.25rem;
}

.admin-grid-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-end;
}

.admin-grid-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  flex: 1 1 24rem;
  justify-content: flex-start;
}

.admin-grid-toolbar-actions .form-control {
  width: min(100%, 18rem);
  margin-left: auto;
}

.admin-grid-filter-input {
  margin-left: auto;
}

.admin-grid-feedback {
  margin-bottom: 0;
}

.admin-grid-panel[hidden] {
  display: none !important;
}

.admin-grid-tab {
  cursor: pointer;
}

.admin-grid-tab:focus-visible {
  outline: 2px solid rgba(24, 113, 122, 0.55);
  outline-offset: 2px;
}

.admin-grid-frame {
  width: 100%;
  height: min(72vh, 760px);
  min-height: 420px;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid rgba(16, 57, 63, 0.08);
  background: #fff;
}

.admin-grid-overlay {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 8rem;
  color: var(--muted);
  font-weight: 700;
}

.admin-grid-frame .ag-root-wrapper {
  border: 0 !important;
  border-radius: 1rem;
  overflow: hidden;
}

.admin-grid-frame .ag-header-cell-label {
  font-weight: 800;
}

.admin-grid-frame .ag-floating-filter-input,
.admin-grid-frame .ag-text-field-input,
.admin-grid-frame .ag-picker-field-wrapper {
  border-radius: 0.6rem;
}

.admin-grid-frame .ag-row-pinned {
  background: rgba(240, 166, 67, 0.08);
}

.admin-grid-frame .ag-row-pinned .ag-cell {
  font-weight: 600;
}

.admin-grid-frame .ag-cell.ag-cell-inline-editing {
  box-shadow: inset 0 0 0 2px rgba(24, 113, 122, 0.2);
}

.admin-grid-cell-id,
.admin-grid-cell-code,
.admin-grid-cell-date,
.admin-grid-cell-number {
  font-variant-numeric: tabular-nums;
}

.admin-grid-cell-id,
.admin-grid-cell-code {
  font-weight: 700;
}

.admin-grid-cell-number {
  justify-content: flex-end;
}

.admin-grid-frame .ag-cell.admin-grid-cell-number input {
  text-align: right;
}

.admin-grid-cell-comments {
  line-height: 1.2;
}

@media (max-width: 991.98px) {
  .admin-grid-toolbar-actions {
    width: 100%;
  }

  .admin-grid-toolbar-actions .form-control {
    width: 100%;
  }

  .admin-grid-frame {
    min-height: 28rem;
  }
}

@media (max-width: 575.98px) {
  .admin-grid-tabs {
    display: grid;
  }

  .admin-grid-tab {
    justify-content: center;
    text-align: center;
  }

  .admin-grid-toolbar-actions .btn {
    width: 100%;
  }
}

.footer-shell {
  border-top: 1px solid rgba(16, 57, 63, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.74), rgba(207, 232, 224, 0.2));
}

.footer-brand {
  color: var(--brand-deep);
}

.footer-title {
  margin-bottom: 1rem;
  color: var(--brand-deep);
}

.footer-links {
  display: grid;
  gap: 0.7rem;
}

.footer-links a,
.footer-links span {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--brand-mid);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  color: var(--muted);
  border-top: 1px solid rgba(16, 57, 63, 0.08);
}

.instruction-page {
  display: grid;
  gap: 0.5rem;
  padding: 0.25rem 0 2rem;
}

.instruction-doc-card {
  padding: clamp(0.5rem, 2vw, 0.75rem);
  border-radius: 0.35rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 242, 234, 0.92)),
    #fff;
  border: 1px solid rgba(16, 57, 63, 0.1);
  box-shadow: 0 1rem 2.2rem rgba(18, 33, 36, 0.08);
}

.instruction-doc-card-rdp {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(207, 232, 224, 0.18)),
    #fff;
}

.instruction-doc-file {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1rem;
  padding: 0.32rem 0.7rem;
  border-radius: 999px;
  background: rgba(16, 57, 63, 0.08);
  color: var(--brand-deep);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.instruction-doc-block[id],
.instruction-topic[id] {
  scroll-margin-top: 6rem;
}

.instruction-toc {
  display: grid;
  gap: 0.55rem;
}

.instruction-toc-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  padding: 0.25rem 0.8rem;
  border-radius: 0.3rem;
  background: rgba(16, 57, 63, 0.04);
  border: 1px solid rgba(16, 57, 63, 0.06);
  color: var(--brand-deep);
  font-weight: 700;
  text-decoration: none;
}

.instruction-toc-item:hover {
  background: rgba(24, 113, 122, 0.08);
}

.instruction-toc-sub {
  margin-left: 1.2rem;
}

.instruction-toc-number {
  min-width: 3.2rem;
  color: var(--brand-mid);
  font-weight: 800;
}

.instruction-scroll-top {
  position: fixed;
  right: 1.1rem;
  bottom: 1.1rem;
  z-index: 1030;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  background: rgba(16, 57, 63, 0.38);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 0.75rem 1.8rem rgba(18, 33, 36, 0.18);
  transition: background 180ms ease, transform 180ms ease;
}

.instruction-scroll-top:hover {
  background: rgba(16, 57, 63, 0.56);
  transform: translateY(-2px);
}

.instruction-doc-block + .instruction-doc-block {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid rgba(16, 57, 63, 0.08);
}

.instruction-doc-title {
  margin: 0 0 1rem;
  color: var(--brand-deep);
  font-size: clamp(1.45rem, 2.5vw, 2.25rem);
  line-height: 1.15;
  font-weight: 800;
}

.instruction-topic + .instruction-topic {
  margin-top: 1.4rem;
}

.instruction-topic-title {
  margin: 0 0 0.85rem;
  color: var(--brand-deep);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  line-height: 1.25;
  font-weight: 800;
}

.instruction-copy {
  display: grid;
  gap: 0.75rem;
}

.instruction-copy p,
.instruction-note-card p,
.instruction-table-copy p {
  margin: 0;
  color: rgba(24, 41, 45, 0.76);
  line-height: 1.6;
}

.instruction-copy + .instruction-visual-step,
.instruction-visual-step + .instruction-copy,
.instruction-visual-step + .instruction-visual-step {
  margin-top: 0.95rem;
}

.instruction-visual-step,
.instruction-table-row {
  display: grid;
  /* grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr); */
  grid-template-columns: minmax(0, 1.38fr) minmax(220px, 0.68fr);
  gap: 1rem;
  align-items: start;
}

.instruction-shot {
  margin: 0;
  overflow: hidden;
  border-radius: 0.3rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(16, 57, 63, 0.08);
  box-shadow: 0 0.8rem 1.8rem rgba(18, 33, 36, 0.08);
}

.instruction-shot a {
  display: block;
}

.instruction-shot img {
  display: block;
  width: 100%;
  height: auto;
}

.instruction-note-card {
  margin-bottom: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 0.3rem;
  background: rgba(16, 57, 63, 0.05);
  border-left: 4px solid var(--brand-mid);
}

.instruction-table {
  display: grid;
  gap: 0.95rem;
}

.instruction-table-row {
  padding: 0.9rem;
  border-radius: 0.3rem;
  background: rgba(16, 57, 63, 0.04);
  border: 1px solid rgba(16, 57, 63, 0.06);
}

.instruction-table-copy {
  display: grid;
  gap: 0.65rem;
  align-content: start;
}

.instruction-table-media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 576px) and (max-width: 991.98px) {
  .doc-compare-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991.98px) {
  .hero-shell-home {
    min-height: auto;
  }

  .hero-copy-content h1 {
    max-width: 100%;
  }

  .sticky-card {
    position: static;
  }

  .doc-compare-grid {
    grid-template-columns: 1fr;
  }

  .hero-shell::after {
    width: 11rem;
    height: 11rem;
  }

  .instruction-visual-step,
  .instruction-table-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .surface-card,
  .auth-card,
  .tariff-card,
  .admin-card,
  .metric-card {
    padding: 0.75rem;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .instruction-doc-card {
    padding: 0.5rem;
  }

  .instruction-table-row {
    padding: 0.75rem;
  }

  .instruction-table-media-grid {
    grid-template-columns: 1fr;
  }
}

body.lightbox-open {
  overflow: hidden;
}

.instructions-page {
  padding-bottom: 2rem;
}

.instructions-shell {
  display: grid;
  grid-template-columns: minmax(240px, 290px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.instructions-sidebar,
.instructions-main {
  min-width: 0;
}

.instructions-sidebar {
  /* position: sticky; */
  top: 6rem;
  align-self: start;
}

.instructions-sidebar-card {
  display: grid;
  gap: 0.9rem;
  height: calc(100vh - 7rem);
  max-height: calc(100vh - 7rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding-left: 0.3rem;
  border-radius: 0.35rem;
  background: linear-gradient(180deg, rgba(16, 57, 63, 0.96), rgba(21, 88, 96, 0.94));
  color: #fff;
  box-shadow: 0 1rem 2.4rem rgba(18, 33, 36, 0.14);
}

.instructions-sidebar-kicker {
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.76);
}

.instructions-sidebar-title {
  margin: 0;
  font-size: 1.45rem;
  font-weight: 800;
  line-height: 1.15;
}

.instructions-sidebar-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.5;
}

.instructions-nav {
  display: grid;
  gap: 0;
}

.instructions-nav-link {
  display: block;
  padding: 0;
  border-radius: 0.28rem;
  color: rgba(255, 255, 255, 0.96);
  text-decoration: none;
  line-height: 2;
}

.instructions-nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
}

.instructions-nav-sub {
  padding-left: 1.1rem;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.95rem;
}

.instructions-main {
  display: grid;
  gap: 1rem;
}

.instructions-hero,
.instructions-section {
  padding: 1rem;
  border-radius: 0.35rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(246, 242, 234, 0.92)),
    #fff;
  border: 1px solid rgba(16, 57, 63, 0.1);
  box-shadow: 0 1rem 2.2rem rgba(18, 33, 36, 0.08);
}

.instructions-hero-kicker,
.instructions-section-number {
  /* color: var(--brand-mid); */
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.instructions-section-number {
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.15;
}

.instructions-hero-title {
  margin: 0.3rem 0 0.75rem;
  color: var(--brand-deep);
  font-size: clamp(1.6rem, 2.6vw, 2.4rem);
  line-height: 1.12;
  font-weight: 800;
}

.instructions-hero-copy,
.instructions-section-copy,
.instructions-step-copy p,
.instructions-note p,
.instructions-fold-body p {
  margin: 0;
  color: rgba(24, 41, 45, 0.76);
  line-height: 1.6;
}

.instructions-section[id],
.instructions-step[id],
.instructions-note[id],
.instructions-fold[id] {
  scroll-margin-top: 6rem;
}

.instructions-section + .instructions-section {
  margin-top: 0;
}

.instructions-section-head {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.9rem;
  align-items: start;
  margin-bottom: 1rem;
}

.instructions-section-title {
  margin: 0 0 0.35rem;
  color: var(--brand-deep);
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.15;
  font-weight: 800;
}

.instructions-step,
.instructions-note,
.instructions-fold {
  margin-top: 0.9rem;
}

.instructions-step {
  display: grid;
  /* grid-template-columns: minmax(0, 1fr) minmax(210px, 290px); */
  grid-template-columns: minmax(0, 1fr) minmax(60px, 120px);
  gap: 0,5rem;
  column-gap: 0.5rem;
  align-items: start;
  padding: 0.5rem;
  border-radius: 0.3rem;
  background: rgba(16, 57, 63, 0.04);
  border: 1px solid rgba(16, 57, 63, 0.06);
}

.instructions-step-copy {
  display: grid;
  gap: 0.5rem;
}

.instructions-step-title,
.instructions-note-title {
  margin: 0;
  color: var(--brand-deep);
  font-size: 1.08rem;
  font-weight: 800;
  line-height: 1.3;
}

.instructions-urlbox {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-radius: 0.3rem;
  background: transparent;
  border: 0;
}

.instructions-url {
  padding: 0;
  color: var(--brand-deep);
  font-size: 0.95rem;
  word-break: break-all;
}

.instructions-copy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0.25rem;
  width: auto;
  height: auto;
  padding: 0.08rem;
  background: transparent;
  color: rgba(24, 41, 45, 0.48);
  font-weight: 700;
  font-size: 1.05rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.18s ease, opacity 0.18s ease;
}

.instructions-copy-btn:hover,
.instructions-copy-btn:focus-visible {
  color: rgba(24, 41, 45, 0.72);
}

.instructions-copy-btn:focus-visible {
  outline: 2px solid rgba(24, 113, 122, 0.2);
  outline-offset: 0.08rem;
}

.instructions-copy-btn:disabled {
  opacity: 0.78;
}

.instructions-copy-btn.is-copied {
  color: var(--brand-mid);
}

.instructions-copy-btn.is-copy-error {
  color: #b45836;
}

.instructions-warning {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.8rem 0.85rem;
  border-radius: 0.3rem;
  background: rgba(240, 166, 67, 0.16);
  border: 1px solid rgba(240, 166, 67, 0.32);
  color: #6b430a;
  line-height: 1.55;
}

.instructions-warning-wide {
  grid-column: 1 / -1;
  margin-top: 1rem;
}

.instructions-warning-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: rgba(240, 166, 67, 0.92);
  color: #fff;
  font-weight: 800;
}

.instructions-thumb,
.instructions-thumb-stack {
  min-width: 0;
}

.instructions-thumb-stack {
  display: grid;
  gap: 0.75rem;
}

.instructions-thumb {
  display: grid;
  gap: 0.35rem;
  justify-items: stretch;
  width: min(160px, 100%);
  padding: 0.28rem;
  border: 1px solid rgba(16, 57, 63, 0.08);
  border-radius: 0.3rem;
  background: rgba(255, 255, 255, 0.98);
  cursor: zoom-in;
  box-shadow: 0 0.75rem 1.5rem rgba(18, 33, 36, 0.08);
}

.instructions-thumb img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.2rem;
}

.instructions-thumb-hint {
  color: var(--brand-mid);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
}

.instructions-note {
  padding: 0.9rem 1rem;
  border-radius: 0.3rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(16, 57, 63, 0.08);
}

.instructions-fold {
  overflow: hidden;
  border-radius: 0.3rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(16, 57, 63, 0.08);
}

.instructions-fold summary {
  cursor: pointer;
  padding: 0.95rem 1rem;
  color: var(--brand-deep);
  font-weight: 800;
  list-style: none;
}

.instructions-fold summary::-webkit-details-marker {
  display: none;
}

.instructions-fold summary::after {
  content: "+";
  float: right;
}

.instructions-fold[open] summary::after {
  content: "−";
}

.instructions-fold-body {
  padding: 0 1rem 1rem;
}

.instructions-lightbox[hidden] {
  display: none;
}

.instructions-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1060;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.2rem;
  background: rgba(7, 18, 20, 0.78);
  backdrop-filter: blur(6px);
}

.instructions-lightbox-panel {
  position: relative;
  width: min(100%, 960px);
  max-height: 100%;
  padding: 1rem;
  border-radius: 0.4rem;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 1.4rem 3rem rgba(18, 33, 36, 0.24);
}

.instructions-lightbox-close {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  border: 0;
  background: rgba(16, 57, 63, 0.08);
  color: var(--brand-deep);
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 999px;
  font-size: 1.4rem;
  line-height: 1;
}

.instructions-lightbox-image {
  display: block;
  width: 100%;
  max-height: calc(100vh - 9rem);
  object-fit: contain;
}

.instructions-lightbox-caption {
  margin-top: 0.8rem;
  color: rgba(24, 41, 45, 0.76);
  line-height: 1.5;
}

.chat-page {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  gap: 1rem;
  height: calc(100vh - 8.5rem);
  min-height: calc(100vh - 8.5rem);
}

.chat-sidebar,
.chat-main {
  height: 100%;
  min-height: 0;
  max-height: calc(100vh - 8.5rem);
  padding: 0;
  overflow-x: hidden;
  overflow-y: auto;
  background: rgba(255, 255, 255, 0.88);
}

.chat-sidebar {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
}

.chat-main {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
}

.chat-sidebar-top,
.chat-main-header,
.chat-composer-toolbar {
  padding: 1rem 1rem 0;
}

.chat-main-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}

.chat-main-actions,
.chat-contact-toolbar,
.chat-mode-switch,
.chat-order-buttons,
.chat-format-buttons,
.chat-send-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
}

.chat-contact-toolbar {
  justify-content: space-between;
  padding: 0 0.8rem 0.85rem;
}

.chat-mode-button,
.chat-order-button,
.chat-format-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(16, 57, 63, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--brand-deep);
  font-weight: 800;
  padding: 0.5rem 0.85rem;
  transition: background-color 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.chat-mode-button,
.chat-order-button {
  width: 2.65rem;
  height: 2.65rem;
  padding: 0;
}

.chat-mode-button svg,
.chat-order-button svg {
  width: 1.1rem;
  height: 1.1rem;
}

.chat-mode-button.is-active,
.chat-mode-button:hover,
.chat-order-button:hover,
.chat-format-button:hover {
  background: rgba(24, 113, 122, 0.12);
  border-color: rgba(24, 113, 122, 0.35);
  transform: translateY(-1px);
}

.chat-order-button:disabled,
.chat-mode-button:disabled,
.chat-format-button:disabled {
  opacity: 0.45;
  transform: none;
}

.chat-contact-filter {
  display: block;
  width: auto;
  margin: 0 0.8rem 1rem;
}

.chat-contact-list,
.chat-messages {
  overflow: visible;
}

.chat-contact-list {
  display: grid;
  align-content: start;
  align-items: start;
  grid-auto-rows: max-content;
  gap: 0.3rem;
  padding: 0 0.8rem 0.8rem;
  border-radius: 0.25rem;
}

.chat-contact-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.15rem;
  align-self: start;
  align-items: flex-start;
  width: 100%;
  padding: 0.85rem 0.95rem;
  border: 1px solid rgba(16, 57, 63, 0.08);
  border: 1px solid rgba(16, 57, 63, 0.08);
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.68);
  color: inherit;
  text-align: left;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.chat-contact-card:hover,
.chat-contact-card.is-active {
  border-color: rgba(24, 113, 122, 0.32);
  background: rgba(207, 232, 224, 0.34);
  transform: translateY(-1px);
}

.chat-contact-card-main,
.chat-contact-card-meta,
.chat-contact-card-top {
  display: grid;
  gap: 0.2rem;
}

.chat-contact-card-top {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: center;
}

.chat-contact-card-top span,
.chat-contact-card-meta span,
.chat-contact-card-preview,
.chat-empty-state span,
.chat-message-meta-line,
.chat-message-status-line,
.chat-file-caption span,
.chat-draft-file-copy span {
  color: rgba(24, 41, 45, 0.64);
}

.chat-contact-card-preview {
  font-size: 0.94rem;
  line-height: 1.4;
}

.chat-contact-card-meta {
  justify-items: end;
  font-size: 0.8rem;
}

.chat-unread-badge,
.chat-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.6rem;
  padding: 0.75rem 0.45rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand-mid), var(--accent));
  color: #fff;
  font-weight: 800;
  font-size: 0.75rem;
}

.chat-status-pill {
  background: rgba(195, 74, 74, 0.16);
  color: #8b2f2f;
}

.chat-feedback {
  margin: 0 1rem 1rem;
}

.chat-empty-state {
  display: grid;
  gap: 0.3rem;
  padding: 1rem;
  border-radius: 1rem;
  background: rgba(16, 57, 63, 0.05);
  border: 1px solid rgba(16, 57, 63, 0.08);
}

.chat-empty-state strong {
  color: var(--brand-deep);
}

.chat-empty-state-wide {
  margin: 1rem;
}

.chat-messages {
  min-height: 20rem;
  display: grid;
  gap: 0.95rem;
  align-content: start;
  padding: 1rem;
  background:
    radial-gradient(circle at top left, rgba(240, 166, 67, 0.08), transparent 28%),
    radial-gradient(circle at bottom right, rgba(24, 113, 122, 0.1), transparent 24%),
    rgba(255, 253, 249, 0.74);
}

.chat-message-row {
  display: grid;
  gap: 0.3rem;
}

.chat-message-row.is-own {
  justify-items: end;
}

.chat-message-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  align-items: center;
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
  color: rgba(24, 41, 45, 0.72);
}

.chat-message-body-line {
  display: flex;
  gap: 0.65rem;
  align-items: flex-end;
}

.chat-message-row.is-own .chat-message-body-line {
  flex-direction: row-reverse;
}

.chat-message-card {
  position: relative;
  display: grid;
  gap: 0.75rem;
  width: min(100%, 44rem);
  padding: 0.95rem 1rem;
  border-radius: 0.25rem;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(16, 57, 63, 0.08);
  box-shadow: 0 0.8rem 1.6rem rgba(18, 33, 36, 0.06);
}

.chat-message-row.is-own .chat-message-card {
  background: linear-gradient(135deg, rgba(207, 232, 224, 0.82), rgba(255, 255, 255, 0.96));
}

.chat-message-row.is-blocked .chat-message-card {
  background: linear-gradient(135deg, rgba(240, 166, 67, 0.12), rgba(255, 255, 255, 0.96));
}

.chat-message-card-actions {
  flex: 0 0 auto;
  display: flex;
  justify-content: flex-end;
}

.chat-message-card-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
}

.chat-message-copy {
  color: var(--brand-deep);
  line-height: 1.55;
  word-break: break-word;
}

.chat-message-copy strong {
  font-weight: 800;
}

.chat-message-copy em {
  font-style: italic;
}

.chat-message-copy u {
  text-decoration-thickness: 0.08em;
}

.chat-message-select {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
}

.chat-message-select input {
  width: 1.1rem;
  height: 1.1rem;
  margin: 0;
  cursor: pointer;
  accent-color: var(--brand-mid);
}

.chat-message-menu {
  position: relative;
}

.chat-message-menu summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border-radius: 999px;
  background: rgba(16, 57, 63, 0.06);
  color: var(--brand-deep);
  list-style: none;
  cursor: pointer;
}

.chat-message-menu summary::-webkit-details-marker {
  display: none;
}

.chat-message-menu-icon {
  width: 1rem;
  height: 1rem;
  transition: transform 160ms ease;
}

.chat-message-menu[open] .chat-message-menu-icon {
  transform: rotate(180deg);
}

.chat-message-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  z-index: 5;
  display: none;
  min-width: 12rem;
  padding: 0.45rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(16, 57, 63, 0.08);
  box-shadow: 0 1rem 2rem rgba(18, 33, 36, 0.14);
}

.chat-message-menu[open] .chat-message-menu-list {
  display: grid;
  gap: 0.2rem;
}

.chat-message-menu-list button {
  width: 100%;
  padding: 0.55rem 0.7rem;
  border: 0;
  border-radius: 0.7rem;
  background: transparent;
  color: var(--brand-deep);
  text-align: left;
  font-weight: 600;
}

.chat-message-menu-list button:hover {
  background: rgba(24, 113, 122, 0.08);
}

.chat-reply-card,
.chat-context-banner {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 0.85rem;
  background: rgba(16, 57, 63, 0.06);
  border: 1px solid rgba(16, 57, 63, 0.08);
}

.chat-reply-card {
  display: grid;
  border-radius: 0.25rem;
}

.chat-context-banner {
  border-radius: 0.95rem;
}

.chat-reply-card strong,
.chat-context-banner strong {
  color: var(--brand-deep);
}

.chat-reply-card span,
.chat-context-banner div:last-child {
  color: rgba(24, 41, 45, 0.68);
  line-height: 1.45;
}

.chat-message-status-line {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  align-items: center;
  font-size: 0.78rem;
}

.chat-file-list {
  display: grid;
  gap: 0.7rem;
}

.chat-file-card,
.chat-draft-file {
  display: grid;
  gap: 0.65rem;
  padding: 0.75rem;
  border-radius: 0.95rem;
  background: rgba(16, 57, 63, 0.05);
  border: 1px solid rgba(16, 57, 63, 0.06);
}

.chat-file-card-plain {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.chat-file-preview,
.chat-draft-preview {
  display: block;
  overflow: hidden;
  border-radius: 0.8rem;
  background: rgba(255, 255, 255, 0.88);
}

.chat-file-preview img,
.chat-draft-preview img,
.chat-file-preview video,
.chat-draft-preview video,
.chat-file-preview iframe,
.chat-draft-preview iframe {
  display: block;
  width: 100%;
  max-height: 18rem;
  border: 0;
  object-fit: cover;
}

.chat-file-preview-frame video,
.chat-draft-preview-frame video,
.chat-file-preview-frame iframe,
.chat-draft-preview-frame iframe {
  aspect-ratio: 16 / 10;
  max-height: none;
}

.chat-file-preview-generic,
.chat-draft-preview-generic {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 4.2rem;
  min-width: 4.2rem;
  padding: 1rem;
  color: var(--brand-deep);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.chat-file-caption,
.chat-draft-file-copy {
  display: grid;
  gap: 0.2rem;
}

.chat-file-caption a {
  color: var(--brand-mid);
  font-weight: 700;
  text-decoration: none;
}

.chat-composer {
  display: grid;
  gap: 0.75rem;
  padding-bottom: 1rem;
  border-top: 1px solid rgba(16, 57, 63, 0.08);
  background: rgba(255, 255, 255, 0.94);
}

.chat-draft-files,
.chat-upload-progress {
  margin: 0 1rem;
}

.chat-upload-progress {
  height: 0.75rem;
}

.chat-editor-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: flex-end;
  padding: 0 1rem;
}

.chat-send-stack {
  display: flex;
  gap: 0.65rem;
  align-items: center;
}

.chat-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  padding: 0;
  border: 1px solid rgba(16, 57, 63, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-deep);
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.chat-icon-btn svg {
  width: 1.2rem;
  height: 1.2rem;
}

.chat-icon-btn:hover,
.chat-icon-btn:focus-visible,
.chat-icon-btn.is-active {
  background: rgba(24, 113, 122, 0.1);
  border-color: rgba(24, 113, 122, 0.35);
  color: var(--brand-mid);
  transform: translateY(-1px);
}

.chat-icon-btn:disabled {
  opacity: 0.45;
  background: rgba(16, 57, 63, 0.04);
  color: rgba(24, 41, 45, 0.52);
  transform: none;
}

.chat-icon-btn-dark {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
  color: #fff;
}

.chat-icon-btn-dark:hover,
.chat-icon-btn-dark:focus-visible,
.chat-icon-btn-dark.is-active {
  background: var(--brand-mid);
  border-color: var(--brand-mid);
  color: #fff;
}

.chat-icon-btn-dark:disabled {
  background: rgba(16, 57, 63, 0.3);
  border-color: rgba(16, 57, 63, 0.18);
  color: rgba(255, 255, 255, 0.85);
}

.chat-editor {
  min-height: 3.5rem;
  max-height: 11rem;
  overflow-y: auto;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(16, 57, 63, 0.12);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
  line-height: 1.55;
  word-break: break-word;
}

.chat-editor:empty::before {
  content: attr(data-placeholder);
  color: rgba(24, 41, 45, 0.44);
}

.chat-editor.is-disabled {
  background: rgba(16, 57, 63, 0.04);
}

.chat-editor-shell.is-dragover,
.chat-editor-shell.is-dragover .chat-editor {
  border-color: rgba(24, 113, 122, 0.45);
  background: rgba(207, 232, 224, 0.22);
}

@media (max-width: 991.98px) {
  .chat-page {
    grid-template-columns: 1fr;
    height: auto;
    min-height: auto;
  }

  .chat-sidebar,
  .chat-main {
    height: auto;
    max-height: none;
    min-height: auto;
    overflow-y: visible;
  }

  .chat-contact-list {
    overflow-y: auto;
    max-height: 32vh;
  }

  .chat-messages {
    overflow-y: auto;
    min-height: 42vh;
    max-height: 52vh;
  }

  .chat-editor-shell {
    grid-template-columns: 1fr;
  }

  .chat-main-actions {
    width: 100%;
  }

  .chat-main-actions .chat-icon-btn {
    flex: 0 0 auto;
  }

  .instructions-shell {
    grid-template-columns: 1fr;
  }

  .instructions-sidebar {
    position: static;
    top: auto;
  }

  .instructions-sidebar-card {
    height: auto;
    max-height: none;
    overflow: visible;
  }

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

@media (max-width: 575.98px) {
  .chat-sidebar-top,
  .chat-main-header,
  .chat-composer-toolbar,
  .chat-editor-shell,
  .chat-draft-files,
  .chat-upload-progress,
  .chat-messages,
  .chat-contact-list {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  .chat-contact-toolbar {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
    gap: 0.75rem;
  }

  .chat-contact-filter {
    margin-left: 0.8rem;
    margin-right: 0.8rem;
  }

  .chat-mode-switch,
  .chat-order-buttons,
  .chat-format-buttons,
  .chat-send-stack,
  .chat-main-actions {
    width: 100%;
  }

  .chat-format-button,
  .chat-send-stack .btn:not(.chat-attach-icon-btn),
  .chat-main-actions .btn {
    flex: 1 1 auto;
  }

  .chat-mode-button,
  .chat-order-button {
    flex: 0 0 auto;
  }

  .chat-send-stack .chat-icon-btn,
  .chat-main-actions .chat-icon-btn {
    flex: 0 0 auto;
  }

  .chat-message-body-line {
    flex-direction: column;
    align-items: stretch;
  }

  .chat-message-row.is-own .chat-message-body-line {
    flex-direction: column;
  }

  .chat-message-card,
  .chat-message-row.is-own .chat-message-card {
    width: 100%;
  }

  .instructions-hero,
  .instructions-section,
  .instructions-sidebar-card {
    padding: 0.85rem;
  }

  .instructions-urlbox {
    flex-direction: column;
    align-items: stretch;
  }

  .instructions-warning {
    grid-template-columns: 1fr;
  }

  .instructions-lightbox {
    padding: 0.8rem;
  }

  .instructions-lightbox-panel {
    padding: 0.75rem;
  }
}
