:root {
  color-scheme: light;
  --bg: #0b2f55;
  --bg-deep: #082642;
  --panel: #ffffff;
  --panel-soft: #f6f9fc;
  --text: #111111;
  --muted: #333333;
  --line: #d8e0ea;
  --line-strong: #b8c7d8;
  --accent: #1768a6;
  --accent-strong: #123f6d;
  --accent-soft: #eaf4fc;
  --secondary: #f3f6fa;
  --danger: #b42318;
  --danger-soft: #fff4f2;
  --focus: rgba(142, 197, 238, 0.48);
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.16);
  --radius: 8px;
  --field-height: 48px;
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 14px;
  --space-4: 18px;
  --space-5: 24px;
  --container: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 0;
  background: var(--bg);
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 0;
  margin: 0;
  overflow-x: hidden;
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.45;
}

img,
svg,
video,
canvas {
  max-width: 100%;
  height: auto;
}

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

button,
input,
select,
textarea,
label,
.request-card,
.panel,
.topbar {
  min-width: 0;
}

.shell {
  width: min(var(--container), 100%);
  margin: 0 auto;
  padding: 12px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-3);
  padding: 4px 0 8px;
}

.brand-logo {
  display: block;
  width: min(260px, 76vw);
  height: auto;
}

.support-note {
  margin-bottom: var(--space-3);
  padding: 12px 14px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font-size: 15px;
  line-height: 1.45;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.10);
  overflow-wrap: anywhere;
}

.support-note a {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.support-note-bottom {
  margin-top: var(--space-4);
  margin-bottom: 0;
}

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

h1 {
  margin-bottom: var(--space-2);
  font-size: 24px;
  line-height: 1.15;
}

h2 {
  margin-bottom: 4px;
  font-size: 20px;
  line-height: 1.2;
}

h3 {
  line-height: 1.25;
}

p {
  color: var(--text);
}

.form-head p {
  margin-bottom: 0;
  overflow-wrap: anywhere;
}

.request-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.request-card {
  display: flex;
  min-height: 116px;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--space-2);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.request-card:hover,
.request-card:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  outline: 3px solid rgba(23, 104, 166, 0.16);
  box-shadow: 0 8px 22px rgba(18, 63, 109, 0.12);
  transform: translateY(-1px);
}

.request-card:active,
.request-card.is-active {
  border-color: var(--accent-strong);
  background: #dff0fb;
  color: var(--text);
}

.request-card strong {
  display: block;
  color: var(--text);
  font-size: 17px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.request-card span {
  color: var(--text);
  overflow-wrap: anywhere;
}

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  color: var(--text);
  padding: 14px;
  box-shadow: var(--shadow);
}

.form-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-2);
  align-items: start;
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--line);
}

.icon-btn {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  cursor: pointer;
}

.fields {
  display: grid;
  gap: var(--space-4);
}

.group {
  display: grid;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--line);
}

.group h3 {
  margin-bottom: 0;
  color: var(--text);
  font-size: 18px;
}

.row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-3);
}

.address-block,
.address-selects,
.address-manual,
.meter-block,
.doc-set {
  display: grid;
  gap: var(--space-3);
}

label {
  display: grid;
  gap: var(--space-1);
  color: var(--text);
  font-weight: 700;
  overflow-wrap: anywhere;
}

input,
select,
textarea {
  width: 100%;
  min-height: var(--field-height);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  background: #ffffff;
  color: var(--text);
  font-size: 16px;
  line-height: 1.3;
}

select {
  min-width: 0;
  text-overflow: ellipsis;
}

input[type="date"] {
  min-height: var(--field-height);
  appearance: auto;
}

input[type="file"] {
  min-height: 56px;
  padding: 12px;
  border-style: dashed;
  background: var(--panel-soft);
  cursor: pointer;
}

input[type="file"]::file-selector-button {
  min-height: 38px;
  margin-right: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font-weight: 700;
  cursor: pointer;
}

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

input:focus,
select:focus,
textarea:focus,
button:focus-visible {
  border-color: var(--accent);
  outline: 3px solid var(--focus);
}

button:focus:not(:focus-visible) {
  outline: none;
}

input:disabled,
select:disabled,
textarea:disabled {
  background: #edf2f7;
  color: #555555;
  cursor: not-allowed;
  opacity: 1;
}

.help {
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
  overflow-wrap: anywhere;
}

.checkline {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--space-2);
  align-items: start;
  font-weight: 400;
}

.checkline input {
  width: 20px;
  min-height: 20px;
  margin-top: 2px;
}

.confirm {
  margin-top: var(--space-4);
}

.actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-2);
  margin-top: var(--space-4);
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 7px;
  background: var(--accent);
  color: #ffffff;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  touch-action: manipulation;
}

button:hover {
  background: var(--accent-strong);
}

button.secondary {
  border: 1px solid var(--line);
  background: var(--secondary);
  color: var(--text);
}

button.secondary:hover {
  background: #e8eef6;
}

.file-list {
  display: grid;
  gap: 4px;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 400;
}

.file-list span {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.errors {
  margin-top: var(--space-4);
  padding: 12px;
  border: 1px solid #f3b4ad;
  border-radius: var(--radius);
  background: var(--danger-soft);
  color: var(--text);
  overflow-wrap: anywhere;
}

.success {
  display: grid;
  gap: var(--space-3);
  justify-items: center;
  padding-top: 28px;
  padding-bottom: 28px;
  text-align: center;
}

.success h2 {
  margin-bottom: 0;
  color: var(--accent-strong);
  font-size: 24px;
}

.success p {
  margin-bottom: 0;
  color: var(--text);
  font-size: 17px;
}

.hidden {
  display: none !important;
}

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

@media (min-width: 480px) {
  .shell {
    padding: 16px;
  }

  .panel {
    padding: 18px;
  }

  .actions {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  }
}

@media (min-width: 700px) {
  .request-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .row,
  .meter-two {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .actions {
    display: flex;
    justify-content: flex-end;
  }

  .actions button {
    min-width: 160px;
  }
}

@media (min-width: 1024px) {
  .shell {
    padding: var(--space-5);
  }

  .topbar {
    margin-bottom: var(--space-4);
    padding: 6px 0 10px;
  }

  .support-note {
    padding: 14px 16px;
    font-size: 16px;
  }

  .brand-logo {
    width: 320px;
  }

  .request-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-3);
  }

  .request-card {
    min-height: 132px;
    padding: 20px;
  }

  .panel {
    padding: 20px;
  }
}

@media (min-width: 1440px) {
  :root {
    --container: 1240px;
  }

  .request-card {
    min-height: 126px;
  }
}

@media (max-width: 360px) {
  .shell {
    padding: 10px;
  }

  .panel {
    padding: 12px;
  }

  .brand-logo {
    width: min(230px, 78vw);
  }

  .request-card {
    padding: 15px;
  }
}
