:root {
  color-scheme: light;
  --bg: #eef2f5;
  --surface: #ffffff;
  --surface-2: #f4f6f8;
  --line: #d8e0e7;
  --line-strong: #aab7c2;
  --text: #17212b;
  --muted: #607080;
  --primary: #0d6b68;
  --primary-dark: #074f4d;
  --accent: #e3b630;
  --ok: #237447;
  --warn: #a96908;
  --danger: #b42318;
  --shadow: 0 12px 32px rgba(26, 38, 52, 0.10);
}

* {
  box-sizing: border-box;
}

html,
body,
#app {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  border: 0;
  cursor: pointer;
}

.icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.public-shell {
  min-height: 100vh;
  background: #f3f6f9;
  color: #14263b;
}

.public-nav {
  height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 32px;
  background: rgba(20, 38, 59, 0.96);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  position: sticky;
  top: 0;
  z-index: 10;
}

.public-logo {
  background: transparent;
  padding: 0;
}

.public-logo img {
  width: 178px;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 16px rgba(20, 38, 59, 0.10));
}

.public-nav nav {
  display: flex;
  gap: 8px;
}

.public-nav nav button {
  min-height: 38px;
  padding: 8px 12px;
  background: transparent;
  color: white;
  border-radius: 8px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.public-nav nav button:hover {
  background: rgba(255, 255, 255, 0.10);
}

.landing {
  display: grid;
  gap: 0;
}

.landing-hero {
  min-height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(340px, 0.75fr);
  gap: 42px;
  align-items: center;
  padding: 52px clamp(24px, 6vw, 86px);
  background:
    linear-gradient(115deg, rgba(13, 31, 52, 0.92), rgba(13, 31, 52, 0.78)),
    url("./assets/vortex/site-02.png");
  background-size: cover;
  background-position: center;
  color: white;
}

.landing-copy h1 {
  max-width: 870px;
  font-size: clamp(38px, 5.2vw, 72px);
  line-height: 1.03;
  text-transform: uppercase;
}

.landing-copy p {
  max-width: 700px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.80);
  font-size: 18px;
  line-height: 1.55;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: #e4bd39;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.landing-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.landing-panel {
  padding: 24px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.10);
  backdrop-filter: blur(12px);
  border-radius: 8px;
}

.landing-panel img {
  width: min(100%, 360px);
  display: block;
  margin: 0 auto 22px;
}

.landing-metrics {
  display: grid;
  gap: 10px;
}

.landing-metrics div {
  padding: 14px;
  background: rgba(255, 255, 255, 0.13);
  border-radius: 8px;
}

.landing-metrics strong,
.landing-metrics span {
  display: block;
}

.landing-metrics span {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.75);
}

.landing-section,
.landing-contact {
  display: grid;
  grid-template-columns: 1fr 0.8fr;
  gap: 32px;
  align-items: center;
  padding: 56px clamp(24px, 6vw, 86px);
  background: white;
  border-bottom: 1px solid #dfe5ea;
}

.landing-section h2,
.landing-services h2,
.landing-contact h2 {
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1.12;
}

.landing-section p,
.landing-contact p {
  color: #607080;
  line-height: 1.6;
}

.landing-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: #dfe5ea;
  padding: 1px;
}

.landing-values div {
  padding: 30px;
  background: #14263b;
  color: white;
}

.landing-values strong,
.landing-values span {
  display: block;
}

.landing-values span {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.76);
  line-height: 1.5;
}

.landing-services {
  padding: 56px clamp(24px, 6vw, 86px);
  background: #f3f6f9;
}

.landing-gallery {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr 0.85fr;
  gap: 12px;
  padding: 12px clamp(24px, 6vw, 86px) 0;
  background: #f3f6f9;
}

.landing-gallery img {
  width: 100%;
  height: 260px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid #dfe5ea;
  box-shadow: 0 14px 34px rgba(20, 38, 59, 0.10);
}

.section-head {
  max-width: 820px;
  margin-bottom: 24px;
}

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

.service-grid article {
  min-height: 142px;
  background: white;
  border: 1px solid #dfe5ea;
  border-radius: 8px;
  overflow: hidden;
}

.service-grid article img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  background: #e6ebef;
}

.service-grid article div {
  padding: 16px;
}

.service-grid strong,
.service-grid span {
  display: block;
}

.service-grid span {
  margin-top: 9px;
  color: #607080;
  line-height: 1.42;
}

.landing-contact {
  background: #e8bd32;
  color: #14263b;
}

.landing-contact p {
  color: rgba(20, 38, 59, 0.74);
}

.landing-contact-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.auth-page {
  min-height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  gap: 36px;
  align-items: center;
  padding: 48px clamp(24px, 6vw, 86px);
  background:
    linear-gradient(115deg, rgba(20, 38, 59, 0.95), rgba(20, 38, 59, 0.84)),
    url("./assets/vortex/site-03.png");
  background-size: cover;
  background-position: center;
}

.auth-brand {
  color: white;
}

.auth-brand img {
  width: min(420px, 90%);
  margin-bottom: 32px;
}

.auth-brand h1 {
  max-width: 650px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.06;
  text-transform: uppercase;
}

.auth-brand p {
  max-width: 600px;
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
}

.auth-card {
  display: grid;
  gap: 14px;
  padding: 24px;
  background: white;
  border-radius: 8px;
  border: 1px solid #dfe5ea;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.20);
}

.auth-card h2 {
  font-size: 26px;
}

.check-row {
  display: flex;
  gap: 9px;
  align-items: center;
  color: #314151;
  font-size: 14px;
}

.check-row input {
  width: 16px;
  min-height: 16px;
}

.link-button {
  background: transparent;
  color: var(--primary);
  font-weight: 800;
  padding: 8px;
}

.auth-message {
  padding: 10px 12px;
  background: #fff7df;
  border: 1px solid #ead27c;
  border-radius: 8px;
  color: #5d4a09;
  line-height: 1.4;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  transition: grid-template-columns 180ms ease;
}

.app-shell.sidebar-collapsed {
  grid-template-columns: 82px minmax(0, 1fr);
}

.sidebar {
  background: #ffffff;
  color: var(--text);
  padding: 22px 18px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  z-index: 30;
  transition: width 180ms ease, transform 180ms ease, padding 180ms ease;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.brand > div:nth-child(2) {
  min-width: 0;
}

.sidebar-toggle,
.mobile-sidebar-trigger,
.sidebar-backdrop {
  display: none;
}

.sidebar-toggle {
  display: grid;
  width: 36px;
  height: 36px;
  margin-left: auto;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--primary);
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: #f2c14e;
  color: #17212b;
  font-weight: 900;
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(242, 193, 78, 0.22);
}

.brand strong {
  display: block;
  font-size: 18px;
}

.brand span,
.nav-label,
.meta {
  color: var(--muted);
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-label {
  margin: 20px 10px 8px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.nav button {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  color: #314151;
  background: transparent;
  border-radius: 8px;
  text-align: left;
  border-left: 4px solid transparent;
  font-weight: 750;
}

.nav button .icon {
  color: var(--primary);
}

.app-shell.sidebar-collapsed .sidebar {
  padding-inline: 14px;
}

.app-shell.sidebar-collapsed .brand {
  justify-content: center;
}

.app-shell.sidebar-collapsed .brand > div:nth-child(2),
.app-shell.sidebar-collapsed .nav button span,
.app-shell.sidebar-collapsed .nav-label,
.app-shell.sidebar-collapsed .offline-badge span {
  display: none;
}

.app-shell.sidebar-collapsed .brand-mark {
  width: 40px;
  height: 40px;
}

.app-shell.sidebar-collapsed .sidebar-toggle {
  display: grid;
  position: absolute;
  left: 42px;
  top: 18px;
  box-shadow: var(--shadow);
}

.app-shell.sidebar-collapsed .nav button {
  justify-content: center;
  padding-inline: 0;
  border-left-width: 0;
}

.app-shell.sidebar-collapsed .offline-badge {
  justify-content: center;
  padding-inline: 0;
}

.nav button.active,
.nav button:hover {
  background: #f8f5e8;
  color: #17212b;
  border-left-color: var(--accent);
}

.main {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.08;
}

h2 {
  font-size: 22px;
}

h3 {
  font-size: 15px;
}

.subtitle {
  color: var(--muted);
  max-width: 760px;
  margin-top: 8px;
}

.toolbar,
.row,
.actions,
.chips,
.file-row,
.inspection-line {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar {
  justify-content: flex-end;
}

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 700;
  border: 1px solid transparent;
  touch-action: manipulation;
  user-select: none;
}

.btn.primary {
  background: var(--primary);
  color: white;
}

.btn.accent {
  background: var(--accent);
  color: #17212b;
}

.btn.ghost-light {
  background: rgba(255, 255, 255, 0.14);
  color: white;
  border-color: rgba(255, 255, 255, 0.24);
}

.btn.danger {
  background: #f9e5e2;
  color: var(--danger);
}

.btn:hover {
  filter: brightness(0.96);
}

.offline-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid #f4c46a;
  border-radius: 8px;
  background: #fff4d8;
  color: #795000;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.public-shell > .offline-badge {
  margin: 0;
  border-radius: 0;
  justify-content: center;
}

.grid {
  display: grid;
  gap: 16px;
}

.stats {
  grid-template-columns: repeat(4, minmax(160px, 1fr));
}

.stat,
.panel,
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 8px 20px rgba(26, 38, 52, 0.06);
}

.stat {
  padding: 16px;
  border-radius: 8px;
}

.stat span {
  color: var(--muted);
  font-size: 13px;
}

.stat strong {
  display: block;
  margin-top: 7px;
  font-size: 28px;
}

.content-grid {
  grid-template-columns: 1.25fr 0.75fr;
  align-items: start;
  margin-top: 18px;
}

.catalog-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 620px), 1fr));
}

.panel {
  border-radius: 8px;
  overflow: hidden;
}

.panel-head {
  padding: 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fbfcfd;
}

.panel-body {
  padding: 16px;
}

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

.card {
  border-radius: 8px;
  padding: 14px;
}

.card.clickable {
  cursor: pointer;
}

.card.clickable:hover {
  border-color: var(--primary);
}

.card-title {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
  margin-bottom: 8px;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.ok {
  color: var(--ok);
  background: #e8f5ed;
}

.badge.warn {
  color: var(--warn);
  background: #fff1d8;
}

.badge.danger {
  color: var(--danger);
  background: #fbe8e6;
}

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

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--text);
  padding: 10px 11px;
  min-height: 40px;
}

textarea {
  resize: vertical;
  min-height: 92px;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(13, 107, 104, 0.18);
  border-color: var(--primary);
}

.table-wrap {
  overflow-x: auto;
}

.list-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.list-controls label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.list-controls select {
  width: auto;
  min-width: 76px;
  min-height: 34px;
  padding: 7px 9px;
}

.pager {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.pager span {
  min-width: 110px;
  text-align: center;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
  filter: grayscale(0.2);
}

.item-summary {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.item-summary strong,
.item-summary span {
  display: block;
}

.item-media {
  width: 66px;
  aspect-ratio: 1.25;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface-2);
}

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

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

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

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.tabs {
  display: flex;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.tabs button {
  min-height: 46px;
  padding: 12px 16px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.tabs button.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.dropzone {
  border: 1px dashed var(--line-strong);
  background: #fbfcfd;
  border-radius: 8px;
  padding: 18px;
  text-align: center;
}

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

.capture-actions .btn {
  min-height: 48px;
}

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

.photo {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}

.photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.photo div {
  padding: 9px;
}

.photo-analysis-card {
  display: grid;
  grid-template-rows: auto 1fr;
}

.photo-analysis-card div {
  display: grid;
  gap: 8px;
}

.photo-analysis-card textarea {
  min-height: 126px;
}

.photo-analysis-card .badge {
  justify-self: start;
}

.report-photos .photo p {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 12px;
  line-height: 1.45;
}

.empty {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fbfcfd;
}

.voice-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.ai-transcript {
  min-height: 260px;
  line-height: 1.5;
}

.ai-hint {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #eadfb9;
  background: #fffaf0;
  border-radius: 8px;
}

.ai-hint p {
  margin-top: 6px;
  color: #536170;
  line-height: 1.45;
}

.ai-result {
  min-height: 110px;
  margin: 0;
  padding: 12px;
  white-space: pre-wrap;
  color: #314151;
  background: #f8fafb;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-family: inherit;
  line-height: 1.45;
}

.ai-flow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.ai-flow div {
  min-height: 112px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.ai-flow strong,
.ai-flow span {
  display: block;
}

.ai-flow span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.logo-config {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.logo-preview {
  width: 92px;
  height: 92px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  overflow: hidden;
}

.logo-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.logo-preview span {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f1c84b;
  font-weight: 900;
}

.brand-proof {
  min-height: 180px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.signature-proof {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.signature-proof strong,
.signature-proof span {
  display: block;
}

.signature-proof span {
  color: var(--muted);
  margin-top: 3px;
}

.report-paper {
  background: white;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
}

.pdf-preview {
  display: grid;
  justify-content: center;
  gap: 18px;
  overflow-x: auto;
  padding: 18px;
  background: #dfe5eb;
  border-radius: 8px;
}

.final-report {
  display: grid;
  gap: 18px;
}

.pdf-page {
  width: 216mm;
  min-height: 279mm;
  position: relative;
  background: #fff;
  color: #111;
  padding: 28mm 24mm 22mm;
  box-shadow: 0 18px 42px rgba(20, 31, 43, 0.20);
  overflow: hidden;
}

.pdf-cover-page {
  display: flex;
  flex-direction: column;
}

.report-logo {
  display: grid;
  justify-items: center;
  gap: 2px;
  min-height: 58px;
  color: #17304c;
  text-align: center;
  text-transform: uppercase;
}

.report-logo .logo-sun {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f1c84b;
  color: #17304c;
  font-weight: 900;
  box-shadow: 0 0 0 7px rgba(241, 200, 75, 0.25);
}

.report-logo img {
  max-width: 130px;
  max-height: 62px;
  object-fit: contain;
}

.report-logo strong {
  font-size: 18px;
  line-height: 1.1;
}

.report-logo span {
  font-size: 8px;
  letter-spacing: 1.2px;
}

.cover-title {
  display: grid;
  place-items: center;
  min-height: 230px;
  text-align: center;
}

.cover-title h1 {
  max-width: 150mm;
  font-size: 30px;
  line-height: 1.24;
  text-transform: uppercase;
}

.cover-object {
  margin-top: 8px;
  font-size: 16px;
  line-height: 1.25;
  text-align: justify;
}

.client-data {
  margin-top: 36px;
  display: grid;
  gap: 18px;
  font-size: 16px;
}

.client-data h2 {
  width: max-content;
  font-size: 16px;
  text-decoration: underline;
}

.client-data p {
  line-height: 1.5;
}

.pdf-doc-header {
  position: absolute;
  top: 10mm;
  left: 24mm;
  right: 24mm;
  display: grid;
  justify-items: center;
}

.pdf-doc-header .report-logo {
  transform: scale(0.78);
  transform-origin: top center;
}

.pdf-doc-header > span {
  position: absolute;
  top: 26px;
  right: 0;
  font-family: Georgia, serif;
  font-size: 12px;
}

.pdf-doc-footer {
  position: absolute;
  left: 24mm;
  right: 24mm;
  bottom: 9mm;
  border-top: 1px solid #111;
  padding-top: 5px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 10px;
  text-align: center;
}

.pdf-doc-footer span {
  position: absolute;
  right: 0;
  top: -18px;
  font-size: 12px;
}

.doc-text {
  margin-top: 12px;
}

.doc-text p {
  margin-top: 16px;
  font-size: 17px;
  line-height: 1.25;
  text-align: justify;
  text-indent: 24px;
}

.numbered-title {
  font-size: 18px;
  margin: 18px 0 12px;
  text-transform: uppercase;
}

.pdf-page table {
  margin-top: 12px;
  font-size: 11px;
}

.pdf-page th,
.pdf-page td {
  padding: 6px 7px;
  border: 1px solid #999;
}

.pdf-page th {
  color: #111;
  font-size: 10px;
  text-transform: none;
  background: #f7f7f7;
}

.report-date {
  margin-top: 78px;
  text-align: right;
  font-size: 17px;
}

.signature-block {
  width: 84mm;
  margin: 28px auto 0;
  text-align: center;
  font-size: 17px;
}

.signature-line {
  border-top: 1px solid #111;
  margin-bottom: 6px;
}

.signature-block strong,
.signature-block span {
  display: block;
}

.digital-signature {
  width: 96mm;
  margin: 120px auto 0;
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  gap: 12px;
  font-size: 8px;
  color: #111;
}

.digital-signature .gov-mark {
  color: #1976d2;
  font-size: 22px;
  font-weight: 900;
}

.digital-signature strong,
.digital-signature span {
  display: block;
}

.report-photos {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.pdf-actions {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: center;
  gap: 10px;
  padding: 12px;
  background: rgba(244, 246, 248, 0.92);
  border-bottom: 1px solid var(--line);
}

.pdf-window {
  display: grid;
  justify-content: center;
  padding: 18px;
}

.page-break-avoid {
  break-inside: avoid;
}

.report-cover {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  border-bottom: 3px solid var(--primary);
  padding-bottom: 18px;
  margin-bottom: 18px;
}

.report-section {
  margin-top: 22px;
}

.inspection-line {
  justify-content: space-between;
  border: 1px solid var(--line);
  padding: 10px;
  border-radius: 8px;
  background: #fbfcfd;
}

.mobile-actions {
  display: none;
}

@media (max-width: 980px) {
  .landing-hero,
  .landing-section,
  .landing-contact,
  .auth-page {
    grid-template-columns: 1fr;
  }

  .service-grid,
  .landing-values,
  .landing-gallery {
    grid-template-columns: 1fr;
  }

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

  .sidebar {
    position: static;
    height: auto;
  }

  .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .nav-label {
    grid-column: 1 / -1;
  }

  .stats,
  .content-grid,
  .form-grid,
  .ai-flow {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
  }
}

@media (max-width: 620px) {
  .public-nav {
    height: 72px;
    align-items: center;
    padding: 10px 16px;
    flex-direction: row;
  }

  .public-logo img {
    width: 122px;
  }

  .public-nav nav {
    gap: 2px;
  }

  .public-nav nav button {
    min-height: 34px;
    padding: 7px 8px;
    font-size: 13px;
  }

  .landing-hero,
  .landing-section,
  .landing-services,
  .landing-contact,
  .auth-page {
    padding: 26px 18px;
  }

  .landing-hero {
    min-height: auto;
    gap: 24px;
  }

  .landing-copy h1 {
    font-size: 38px;
    line-height: 1.05;
  }

  .landing-copy p {
    font-size: 16px;
    line-height: 1.48;
  }

  .landing-actions .btn {
    width: 100%;
  }

  .landing-contact-actions {
    display: grid;
    width: 100%;
  }

  .landing-panel {
    padding: 16px;
  }

  .landing-section,
  .landing-contact {
    gap: 16px;
  }

  .landing-values div,
  .service-grid article {
    min-height: auto;
  }

  .landing-gallery {
    padding: 10px 18px 0;
  }

  .landing-gallery img {
    height: 190px;
  }

  .auth-page {
    min-height: calc(100vh - 72px);
    gap: 20px;
  }

  .auth-brand img {
    width: 230px;
    margin-bottom: 18px;
  }

  .auth-brand h1 {
    font-size: 30px;
  }

  .auth-card {
    padding: 18px;
  }

  .main {
    padding: 16px;
  }

  .sidebar {
    padding: 14px 14px 12px;
    position: sticky;
    top: 0;
    z-index: 20;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .brand {
    margin-bottom: 10px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    box-shadow: 0 0 0 5px rgba(242, 193, 78, 0.18);
  }

  .brand strong {
    font-size: 16px;
  }

  .brand span {
    font-size: 12px;
  }

  .nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .nav::-webkit-scrollbar {
    display: none;
  }

  .nav-label {
    display: none;
  }

  .nav button {
    flex: 0 0 auto;
    width: auto;
    min-height: 36px;
    padding: 8px 11px;
    border-left: 0;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    background: var(--surface-2);
  }

  .nav button.active,
  .nav button:hover {
    border-left-color: transparent;
    border-bottom-color: var(--accent);
  }

  .toolbar .btn {
    flex: 1 1 140px;
  }

  .topbar {
    gap: 14px;
    padding-bottom: 14px;
    margin-bottom: 16px;
  }

  h1 {
    font-size: 28px;
  }

  h2 {
    font-size: 20px;
  }

  .subtitle {
    font-size: 15px;
  }

  .stats {
    gap: 10px;
  }

  .stat {
    padding: 13px;
  }

  .stat strong {
    font-size: 24px;
  }

  .panel-head {
    display: grid;
    align-items: start;
  }

  .panel-body {
    padding: 12px;
  }

  .list-controls {
    display: grid;
    padding: 12px;
  }

  .list-controls label {
    justify-content: space-between;
    width: 100%;
  }

  .pager {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    width: 100%;
  }

  .pager .btn {
    min-width: 0;
  }

  .tabs button {
    min-height: 40px;
    padding: 9px 11px;
    font-size: 14px;
  }

  .row select,
  .panel-head select {
    min-width: 0;
    max-width: 100%;
  }

  .panel-head .row {
    display: grid;
    width: 100%;
  }

  .panel-head .actions {
    width: 100%;
  }

  .panel-head .actions .btn {
    width: 100%;
  }

  input,
  select,
  textarea {
    font-size: 16px;
  }

  .form-grid {
    gap: 10px;
  }

  .inspection-line {
    display: grid;
    grid-template-columns: 1fr;
  }

  .capture-actions {
    grid-template-columns: 1fr;
  }

  .table-wrap {
    margin-left: -12px;
    margin-right: -12px;
    padding: 0 12px;
  }

  .table-wrap table:has(.mobile-card-row),
  .table-wrap table:has(.mobile-card-row) thead,
  .table-wrap table:has(.mobile-card-row) tbody,
  .table-wrap table:has(.mobile-card-row) tr,
  .table-wrap table:has(.mobile-card-row) td {
    display: block;
    width: 100%;
  }

  .table-wrap table:has(.mobile-card-row) thead {
    display: none;
  }

  .mobile-card-row {
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 8px 18px rgba(26, 38, 52, 0.06);
  }

  .mobile-card-row td {
    border-bottom: 0;
    padding: 7px 0;
  }

  .mobile-card-row td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 4px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .mobile-card-row td:first-child::before {
    display: none;
  }

  .mobile-card-row td:last-child {
    padding-bottom: 0;
  }

  .mobile-card-row .btn {
    width: 100%;
  }

  .item-summary {
    grid-template-columns: 94px minmax(0, 1fr);
    align-items: start;
  }

  .item-media {
    width: 94px;
    aspect-ratio: 1.08;
  }

  th,
  td {
    padding: 8px 7px;
  }

  td input,
  td select {
    min-width: 130px;
  }

  .report-cover {
    grid-template-columns: 1fr;
  }

  .pdf-page {
    width: min(100%, 216mm);
    min-height: auto;
    padding: 18px 16px;
  }

  .pdf-preview {
    padding: 10px;
    margin-left: -12px;
    margin-right: -12px;
  }

  .cover-title {
    min-height: 150px;
  }

  .cover-title h1 {
    font-size: 22px;
  }

  .cover-object,
  .client-data,
  .doc-text p {
    font-size: 14px;
  }

  .report-photos {
    grid-template-columns: 1fr;
  }

  .pdf-doc-header,
  .pdf-doc-footer {
    position: static;
    margin-bottom: 18px;
  }

  .digital-signature {
    width: 100%;
    margin-top: 48px;
  }

  .signature-block {
    width: 100%;
    font-size: 15px;
  }
}

@media (max-width: 980px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    display: block;
  }

  .mobile-sidebar-trigger {
    display: inline-flex;
    position: sticky;
    top: 10px;
    left: 12px;
    z-index: 25;
    min-height: 42px;
    align-items: center;
    gap: 8px;
    margin: 10px 0 0 12px;
    padding: 9px 12px;
    border-radius: 999px;
    background: var(--primary);
    color: white;
    box-shadow: var(--shadow);
    font-weight: 850;
  }

  .app-shell.sidebar-open .mobile-sidebar-trigger {
    display: none;
  }

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(86vw, 320px);
    height: 100dvh;
    padding: 18px;
    transform: translateX(-104%);
    border-right: 1px solid var(--line);
    border-bottom: 0;
    box-shadow: 20px 0 42px rgba(17, 29, 43, 0.20);
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 29;
    background: rgba(9, 18, 28, 0.42);
  }

  .app-shell.sidebar-open .sidebar-backdrop {
    display: block;
  }

  .sidebar-toggle {
    display: grid;
  }

  .app-shell.sidebar-collapsed .brand > div:nth-child(2),
  .app-shell.sidebar-collapsed .nav button span,
  .app-shell.sidebar-collapsed .nav-label,
  .app-shell.sidebar-collapsed .offline-badge span {
    display: block;
  }

  .app-shell.sidebar-collapsed .sidebar-toggle {
    position: static;
    box-shadow: none;
  }

  .nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    overflow: visible;
    padding-bottom: 0;
  }

  .nav-label {
    display: block;
    grid-column: auto;
  }

  .nav button {
    width: 100%;
    min-height: 46px;
    justify-content: flex-start;
    padding: 10px 12px;
    border-left: 4px solid transparent;
    border-bottom: 0;
    white-space: normal;
    background: transparent;
  }

  .nav button.active,
  .nav button:hover {
    border-left-color: var(--accent);
    border-bottom-color: transparent;
  }

  .main {
    padding-top: 14px;
  }
}

@media print {
  @page {
    size: letter;
    margin: 0;
  }

  body {
    background: white;
  }

  .sidebar,
  .mobile-sidebar-trigger,
  .sidebar-backdrop,
  .topbar,
  .tabs,
  .no-print,
  .panel-head .actions,
  .btn {
    display: none !important;
  }

  .app-shell,
  .main,
  .pdf-window {
    display: block;
    padding: 0;
  }

  .panel,
  .report-paper {
    box-shadow: none;
    border: 0;
    border-radius: 0;
  }

  .pdf-preview {
    display: block;
    background: white;
    padding: 0;
  }

  .report-section,
  .photo,
  tr {
    break-inside: avoid;
  }

  .final-report {
    display: block;
  }

  .pdf-page {
    width: 216mm;
    height: 279mm;
    min-height: 279mm;
    box-shadow: none;
    page-break-after: always;
    break-after: page;
  }

  .pdf-page:last-child {
    page-break-after: auto;
    break-after: auto;
  }
}
