:root {
  --brand-dark: #142637;
  --brand-slate: #2C3C4B;
  --brand-yellow: #FFD028;
  --brand-orange: #EE6400;
  --brand-orange-dark: #C94F00;
  --bg: #F3F5F7;
  --surface: #FFFFFF;
  --surface-2: #E7E9EB;
  --text: #01060E;
  --muted: #5A5454;
  --line: #D9DEE3;
  --shadow: 0 18px 45px rgba(1, 6, 14, 0.16);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--brand-dark);
}

body {
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
  background: var(--brand-dark);
  color: var(--text);
  font-family: Arial, "Helvetica Neue", sans-serif;
  letter-spacing: 0;
}

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

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

.app-shell {
  position: relative;
  width: 100%;
  min-height: 100svh;
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: calc(128px + env(safe-area-inset-bottom));
  overflow: hidden;
  background: var(--bg);
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 70px;
  padding: calc(9px + env(safe-area-inset-top)) 18px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #fff;
  background: var(--brand-dark);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.brand img {
  width: 36px;
  height: 36px;
  object-fit: contain;
  background: transparent;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 19px;
  line-height: 1;
}

.brand small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
}

.header-action {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 208, 40, 0.35);
  border-radius: 50%;
  color: var(--brand-yellow);
}

.header-action svg,
.nav-item svg,
.upload-box svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.app-main {
  padding: 12px 12px 0;
}

.screen {
  display: none;
}

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

.screen-head,
.order-hero,
.contacts-hero {
  padding: 18px;
  border-radius: 8px;
  overflow-wrap: break-word;
}

.screen-head,
.contacts-hero {
  color: #fff;
  background: var(--brand-slate);
}

.order-hero {
  color: #fff;
  background: linear-gradient(180deg, #142637 0%, #1A2F42 100%);
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--brand-yellow);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 8px;
  font-size: 25px;
  line-height: 1.1;
}

h2 {
  margin-bottom: 8px;
  font-size: 18px;
  line-height: 1.2;
}

p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.38;
}

.screen-head p,
.order-hero p,
.contacts-hero p {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.78);
}

.news-featured,
.news-list-card,
.b24-order-form,
.order-form,
.tool-card,
.contact-card {
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(1, 6, 14, 0.08);
}

.news-feed {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.news-featured {
  display: block;
  overflow: hidden;
  overflow-wrap: break-word;
}

.news-featured-media {
  position: relative;
  display: block;
  height: 156px;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.86);
  background: linear-gradient(135deg, #142637 0%, #2C3C4B 100%);
  font-size: 34px;
  font-weight: 900;
}

.news-featured-media.is-empty {
  display: grid;
  place-items: center;
}

.news-featured-media img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-featured-content {
  position: relative;
  z-index: 1;
  display: block;
  min-width: 0;
  padding: 14px;
  background: var(--surface);
}

.news-meta {
  display: block;
  margin-bottom: 7px;
  color: var(--brand-orange);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.news-featured strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--brand-dark);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.16;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
}

.news-excerpt {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.42;
}

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

.news-list-card {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 106px;
  padding: 12px;
  overflow-wrap: break-word;
}

.news-list-thumb {
  display: grid;
  place-items: center;
  width: 92px;
  height: 86px;
  border-radius: 8px;
  object-fit: cover;
  color: #fff;
  background: linear-gradient(135deg, #142637 0%, #2C3C4B 100%);
  font-size: 13px;
  font-weight: 900;
}

.news-list-body {
  display: block;
  min-width: 0;
}

.news-list-card strong {
  display: -webkit-box;
  overflow: hidden;
  color: var(--brand-dark);
  font-size: 15px;
  font-weight: 800;
  line-height: 1.22;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.news-list-card .news-excerpt {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.news-list-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
}

.news-list-date {
  min-width: 0;
  margin: 0;
}

.news-read-more {
  flex: 0 0 auto;
  color: var(--brand-orange);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.news-load-state {
  padding: 4px 0 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.news-scroll-sentinel {
  width: 100%;
  height: 1px;
}

.news-featured .news-excerpt {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.news-empty {
  margin-top: 12px;
}

.order-form {
  margin-top: 10px;
  padding: 14px;
}

.upload-box {
  display: grid;
  place-items: center;
  min-height: 106px;
  padding: 16px;
  border: 2px dashed #B9BEC3;
  border-radius: 8px;
  color: var(--brand-dark);
  text-align: center;
  background: #FAFBFC;
  cursor: pointer;
}

.upload-box input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

.upload-box span {
  margin-top: 8px;
  font-weight: 700;
}

.field-group,
.field-row,
.comment-field {
  display: block;
  margin-top: 13px;
}

.field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 700;
}

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

.chip {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--brand-dark);
  background: #fff;
  font-weight: 700;
}

.chip.is-selected {
  border-color: var(--brand-yellow);
  background: var(--brand-yellow);
}

.field-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: #fff;
}

input,
select {
  height: 44px;
  padding: 0 12px;
}

textarea {
  min-height: 86px;
  resize: vertical;
  padding: 12px;
}

.primary-button {
  width: 100%;
  min-height: 50px;
  margin-top: 14px;
  border: 0;
  border-radius: 8px;
  color: #fff;
  background: var(--brand-orange);
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(238, 100, 0, 0.28);
}

.b24-order-form {
  margin-top: 10px;
  padding: 14px;
  overflow: hidden;
}

.b24-order-form #pwa-b24form-wrap {
  min-height: 360px;
}

.b24-order-form .b24-form {
  min-width: 0 !important;
  background: transparent !important;
}

.b24-order-form .b24-form-wrapper {
  max-width: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

.b24-order-form .b24-form-header,
.b24-order-form .b24-form-padding-side {
  padding-right: 0 !important;
  padding-left: 0 !important;
}

.b24-order-form .b24-form-header {
  padding-top: 0 !important;
}

.b24-order-form .b24-form-header-title {
  color: var(--brand-dark) !important;
  font-family: Arial, "Helvetica Neue", sans-serif !important;
  font-size: 22px !important;
  font-weight: 800 !important;
  line-height: 1.15 !important;
}

.b24-order-form .b24-form-header-description {
  color: var(--muted) !important;
  font-family: Arial, "Helvetica Neue", sans-serif !important;
  font-size: 14px !important;
  line-height: 1.38 !important;
}

.b24-order-form .b24-form-control-container {
  margin-bottom: 12px !important;
}

.b24-order-form .b24-form-control,
.b24-order-form .b24-form-control-file {
  border-color: var(--line) !important;
  border-radius: 8px !important;
  color: var(--text) !important;
  font-family: Arial, "Helvetica Neue", sans-serif !important;
  box-shadow: none !important;
}

.b24-order-form .b24-form-control:focus {
  border-color: var(--brand-orange) !important;
}

.b24-order-form .b24-form-btn {
  width: 100% !important;
  min-height: 50px !important;
  border-radius: 8px !important;
  background: var(--brand-orange) !important;
  color: #fff !important;
  font-family: Arial, "Helvetica Neue", sans-serif !important;
  font-weight: 800 !important;
  box-shadow: 0 12px 24px rgba(238, 100, 0, 0.28) !important;
}

.b24-order-form .b24-form-sign {
  display: none !important;
}

.tool-list,
.contact-list,
.material-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.tool-card,
.contact-card,
.material-card {
  display: block;
  padding: 18px;
}

.contact-card span,
.material-card span {
  display: block;
  margin-bottom: 8px;
  color: var(--brand-orange);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.tool-card strong,
.contact-card strong,
.tool-card small,
.material-card strong,
.material-card small {
  display: block;
}

.tool-card {
  position: relative;
  min-height: 96px;
  overflow: hidden;
  padding-right: 92px;
}

.tool-card strong {
  display: inline-flex;
  align-items: center;
  position: relative;
  z-index: 1;
}

.tool-card strong::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
  flex: 0 0 auto;
}

.map-link-card strong {
  display: inline-flex;
  align-items: center;
}

.map-link-card strong::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 7px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: translateY(-1px) rotate(45deg);
  flex: 0 0 auto;
}

.tool-card small {
  position: relative;
  z-index: 1;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.34;
}

.tool-card-icon {
  position: absolute;
  right: -6px;
  bottom: -10px;
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  color: var(--brand-orange);
  opacity: 0.13;
  pointer-events: none;
}

.tool-card-icon svg {
  width: 66px;
  height: 66px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.route-card small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.34;
}

.route-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 14px;
}

.route-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  min-height: 46px;
  padding: 0 13px;
  border-radius: 8px;
  color: var(--brand-dark);
  background: var(--brand-yellow);
  font-size: 14px;
  font-weight: 800;
}

.route-button::after {
  content: "";
  width: 7px;
  height: 7px;
  margin-left: 10px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
  flex: 0 0 auto;
}

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

.material-card {
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(1, 6, 14, 0.08);
}

.material-card strong {
  color: var(--brand-dark);
  font-size: 18px;
  line-height: 1.15;
}

.material-card small {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.34;
}

.material-picker-panel {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.material-search-field {
  position: relative;
  display: block;
}

.material-search-field svg {
  position: absolute;
  top: 50%;
  left: 13px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  fill: none;
  stroke: var(--muted);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  pointer-events: none;
}

.material-search-field input {
  height: 48px;
  padding-left: 42px;
  font-size: 15px;
  box-shadow: 0 8px 24px rgba(1, 6, 14, 0.08);
}

.material-picker-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.material-picker-grid {
  display: grid;
  gap: 10px;
}

.material-picker-card,
.material-empty {
  padding: 14px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(1, 6, 14, 0.08);
}

.material-picker-meta {
  display: block;
  margin-bottom: 7px;
  color: var(--brand-orange);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.material-picker-card strong {
  display: block;
  color: var(--brand-dark);
  font-size: 17px;
  line-height: 1.2;
}

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

.material-spec-grid span {
  display: block;
  min-width: 0;
  padding: 9px;
  border-radius: 8px;
  background: var(--bg);
}

.material-spec-grid small,
.material-spec-grid b {
  display: block;
}

.material-spec-grid small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.material-spec-grid b {
  margin-top: 3px;
  color: var(--brand-dark);
  font-size: 12px;
  line-height: 1.2;
}

.material-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.material-tag-list span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 0 8px;
  border-radius: 999px;
  color: var(--brand-dark);
  background: rgba(255, 208, 40, 0.22);
  font-size: 11px;
  font-weight: 800;
}

.material-empty {
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  text-align: center;
}

.detail-shell {
  background: var(--bg);
}

.detail-main {
  padding-bottom: 0;
}

.back-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  margin-bottom: 10px;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
}

.back-link::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-bottom: 2px solid currentColor;
  border-left: 2px solid currentColor;
  transform: rotate(45deg);
}

.news-detail-modern,
.news-empty {
  padding: 16px;
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(1, 6, 14, 0.08);
}

.news-detail-modern h1 {
  margin-bottom: 10px;
  color: var(--brand-dark);
  font-size: 26px;
  line-height: 1.12;
}

.news-detail-image {
  display: block;
  width: 100%;
  max-height: 300px;
  margin: 0 0 15px;
  border-radius: 8px;
  object-fit: cover;
}

.news-detail-lead {
  margin-bottom: 14px;
  color: var(--brand-slate);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.42;
}

.news-detail-body {
  color: var(--text);
  font-size: 15px;
  line-height: 1.52;
}

.news-detail-body p,
.news-detail-body div {
  color: var(--text);
  font-size: 15px;
  line-height: 1.52;
}

.news-detail-body img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}

.news-detail-body a {
  color: var(--brand-orange);
  font-weight: 800;
}

.news-detail-body ul,
.news-detail-body ol {
  padding-left: 20px;
}

.pwa-news-detail .news-detail img.detail_picture,
.pwa-news-detail .news-detail img.preview_picture {
  display: block;
  float: none !important;
  width: 100%;
  max-height: 260px;
  margin: 0 0 14px !important;
  border-radius: 8px;
  object-fit: cover;
}

.pwa-news-detail .news-detail .news-date-time {
  display: block;
  margin-bottom: 10px;
  color: var(--brand-orange);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.pwa-news-detail .news-detail h1,
.pwa-news-detail .news-detail h2,
.pwa-news-detail .news-detail h3,
.news-empty h1 {
  color: var(--brand-dark);
}

.pwa-news-detail .news-detail p,
.pwa-news-detail .news-detail div,
.news-empty p {
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
}

.pwa-news-detail .news-detail a {
  color: var(--brand-orange);
  font-weight: 800;
}

.pwa-news-detail .news-detail ul,
.pwa-news-detail .news-detail ol {
  padding-left: 20px;
}

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  align-items: end;
  width: 100%;
  max-width: 480px;
  min-height: calc(86px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--brand-dark);
  box-shadow: var(--shadow);
}

.nav-gap {
  min-height: 64px;
}

.nav-item {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 56px;
  padding: 5px 2px;
  border: 0;
  color: rgba(255, 255, 255, 0.72);
  background: transparent;
  cursor: pointer;
}

.nav-item span {
  max-width: 100%;
  margin-top: 4px;
  overflow: hidden;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-item.is-active {
  color: var(--brand-yellow);
}

.nav-order {
  position: absolute;
  top: -54px;
  left: 50%;
  width: 112px;
  min-height: 104px;
  padding: 0;
  transform: translateX(-50%);
}

.order-bubble {
  display: grid;
  place-items: center;
  width: 98px;
  height: 98px;
  margin-top: 0 !important;
  border: 7px solid var(--bg);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(180deg, #FF7A1A 0%, var(--brand-orange) 100%);
  box-shadow: 0 8px 18px rgba(1, 6, 14, 0.24), 0 0 0 1px rgba(255, 255, 255, 0.16) inset;
}

.nav-order.is-active .order-bubble {
  background: linear-gradient(180deg, #FF7A1A 0%, var(--brand-orange) 100%);
}

.nav-order .order-bubble svg {
  width: 42px;
  height: 42px;
  stroke-width: 2;
}

.more-menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 24;
  background: rgba(1, 6, 14, 0.22);
}

.more-menu {
  position: fixed;
  bottom: calc(132px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 25;
  width: min(calc(100% - 24px), 456px);
  max-width: 456px;
  padding: 10px;
  transform: translateX(-50%);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.more-menu-item {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 64px;
  padding: 12px;
  border: 0;
  border-radius: 8px;
  color: var(--text);
  background: var(--bg);
  text-align: left;
}

.more-menu-item svg {
  width: 24px;
  height: 24px;
  color: var(--brand-orange);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.more-menu-item strong,
.more-menu-item small {
  display: block;
}

.more-menu-item strong {
  color: var(--brand-dark);
  font-size: 15px;
  line-height: 1.2;
}

.more-menu-item small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

@media (max-width: 374px) {
  h1 {
    font-size: 23px;
  }

  .app-main {
    padding-right: 10px;
    padding-left: 10px;
  }

  .nav-item span {
    font-size: 9px;
  }

  .news-featured-media {
    height: 132px;
  }

  .news-featured strong {
    font-size: 17px;
  }

  .news-list-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
  }

  .news-list-thumb {
    width: 76px;
    height: 78px;
  }

  .material-list {
    grid-template-columns: 1fr;
  }

}

@media (min-width: 760px) {
  body {
    padding: 24px 0;
    background: #0D1A26;
  }

  .app-shell {
    min-height: calc(100svh - 48px);
    border-radius: 8px;
  }

  .bottom-nav {
    border-radius: 0 0 8px 8px;
  }
}
