/* Final runtime overrides to neutralize legacy conflicting rules */
html,
body {
  overflow-x: hidden;
}

.news-showcase,
.portfolio {
  overflow: visible !important;
}

.news-showcase .section-head,
.news-showcase .section-head h2,
.news-showcase .section-head p {
  text-align: center !important;
  justify-content: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.news-showcase .section-head > div {
  width: 100% !important;
}

.news-showcase .news-slide {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.news-showcase .news-slide-body {
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
  align-items: center !important;
  justify-items: center !important;
}

.news-slider,
.gallery-carousel,
.news-track,
.news-slider-track,
.gallery-track,
.news-slide,
.news-slide-body,
.gallery-card,
.gallery-body {
  overflow-y: hidden !important;
  max-height: none !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.news-slider::-webkit-scrollbar,
.gallery-carousel::-webkit-scrollbar,
.news-track::-webkit-scrollbar,
.news-slider-track::-webkit-scrollbar,
.gallery-track::-webkit-scrollbar,
.news-slide::-webkit-scrollbar,
.news-slide-body::-webkit-scrollbar,
.gallery-card::-webkit-scrollbar,
.gallery-body::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

.news-slider,
.gallery-carousel {
  overflow: hidden !important;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  touch-action: pan-y pinch-zoom !important;
}

.news-track,
.news-slider-track,
.gallery-track {
  display: flex !important;
  transform: translate3d(0, 0, 0);
  transition: transform 0.32s ease !important;
  will-change: transform;
}

.btn-home-news-read::after,
.btn-home-faq-more::after,
.news-showcase .link::after,
.faq-section .link::after {
  content: none !important;
}

.btn-home-news-read,
.btn-home-faq-more {
  text-decoration: none !important;
  color: #f8fafc !important;
  background: rgba(71, 85, 105, 0.5) !important;
  border: 1px solid rgba(148, 163, 184, 0.35) !important;
}

.btn-home-news-read:hover,
.btn-home-faq-more:hover {
  background: rgba(100, 116, 139, 0.62) !important;
}

@media (max-width: 900px) {
  .news-slider-controls,
  .gallery-controls {
    display: none !important;
  }

  .news-showcase .news-slider,
  .portfolio .gallery-carousel,
  .news-showcase .news-track,
  .portfolio .gallery-track,
  .news-showcase .news-slide,
  .portfolio .gallery-card {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  .news-showcase .news-slide {
    aspect-ratio: auto !important;
  }

  .news-showcase .news-slide-body,
  .portfolio .gallery-body {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }

  .news-slide img,
  .gallery-card img {
    width: 100% !important;
    height: 260px !important;
    min-height: 0 !important;
    max-height: none !important;
    aspect-ratio: auto !important;
    object-fit: cover !important;
    display: block !important;
  }
}

@media (max-width: 1024px) {
  .news-slider-controls,
  .gallery-controls,
  .news-controls-row .news-slider-controls,
  .gallery-controls-row .gallery-controls,
  .news-controls-row .carousel-btn,
  .gallery-controls-row .carousel-btn {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
  }
}

/* FINAL hard override for News/Gallery layout and scrollbars */
.news-showcase .news-slider,
.news-showcase .news-track,
.news-showcase .news-slider-track,
.news-showcase .news-slide,
.news-showcase .news-slide-body,
.portfolio .gallery-carousel,
.portfolio .gallery-track,
.portfolio .gallery-card,
.portfolio .gallery-body {
  overflow: hidden !important;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  scrollbar-width: none !important;
  -ms-overflow-style: none !important;
}

.news-showcase .news-slider::-webkit-scrollbar,
.news-showcase .news-track::-webkit-scrollbar,
.news-showcase .news-slider-track::-webkit-scrollbar,
.news-showcase .news-slide::-webkit-scrollbar,
.news-showcase .news-slide-body::-webkit-scrollbar,
.portfolio .gallery-carousel::-webkit-scrollbar,
.portfolio .gallery-track::-webkit-scrollbar,
.portfolio .gallery-card::-webkit-scrollbar,
.portfolio .gallery-body::-webkit-scrollbar {
  width: 0 !important;
  height: 0 !important;
  display: none !important;
}

.news-showcase .news-slider {
  overflow: hidden !important;
}

.news-showcase .news-track,
.news-showcase .news-slider-track {
  display: flex !important;
  gap: 0 !important;
  width: auto !important;
  min-width: 0 !important;
}

.news-showcase .news-slide {
  flex: 0 0 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  align-items: center !important;
  justify-items: center !important;
  text-align: center !important;
  box-sizing: border-box !important;
}

.news-showcase .news-slide-body,
.news-showcase .news-slide.no-image .news-slide-body {
  width: 100% !important;
  max-width: 760px !important;
  margin: 0 auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

/* Make news card span section width like other cards */
.news-showcase .news-slide {
  width: 100% !important;
}

.news-showcase .news-slide-body {
  max-width: 100% !important;
  padding-left: 20px !important;
  padding-right: 20px !important;
}

.news-showcase .news-slider .news-slide .news-slide-body,
.news-showcase .news-slider .news-slide .news-slide-body * {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.news-showcase .news-slider .news-slide {
  justify-items: center !important;
}

@media (min-width: 901px) {
  .news-block {
    display: flex !important;
    justify-content: center !important;
  }

  .news-block .news-slider,
  .news-block .news-controls-row {
    width: min(980px, 100%) !important;
  }
}

/* Align news card with left section edge, but center content inside */
.news-block .news-slider {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  display: flex !important;
  justify-content: center !important;
}

.news-block .news-slide-body,
.news-block .news-slide-body * {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.news-block .news-slide {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 170px !important;
  width: 100% !important;
  text-align: center !important;
}

.news-block .news-slide-body {
  width: 100% !important;
  max-width: 620px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.news-block .news-slide-body h3,
.news-block .news-slide-body p,
.news-block .news-slide-body .btn-home-news-read {
  width: fit-content !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

.news-block .news-slide-body h3 {
  font-size: 1.05rem !important;
  margin: 0 0 4px !important;
}

.news-block .news-slide-body p {
  font-size: 0.92rem !important;
  margin: 0 0 6px !important;
}

.news-block .btn-home-news-read {
  padding: 6px 14px !important;
  font-size: 0.9rem !important;
}

.news-block .news-slider {
  padding: 14px !important;
}

.news-showcase .news-track,
.news-showcase .news-slider-track {
  width: 100% !important;
  max-width: 100% !important;
}

.news-showcase .news-slide {
  width: 100% !important;
  max-width: 100% !important;
}

.news-showcase .news-slide.no-image {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.news-showcase .news-slide.no-image .news-slide-body {
  max-width: 72% !important;
  min-height: 150px !important;
}

.news-showcase .news-slide-body h3,
.news-showcase .news-slide-body p,
.news-showcase .news-slide-body .btn-home-news-read {
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

.news-showcase .news-slide img {
  width: min(100%, 560px) !important;
  height: auto !important;
  max-height: 300px !important;
  object-fit: cover !important;
  display: block !important;
  margin: 0 auto 12px !important;
}

.portfolio .gallery-carousel {
  overflow: hidden !important;
}

@media (max-width: 900px) {
  .news-showcase .news-slide img {
    width: 100% !important;
    max-width: 100% !important;
    max-height: none !important;
    height: auto !important;
  }
}

/* Requested UI adjustments */
.news-showcase .section-head,
.news-showcase .section-head h2,
.news-showcase .section-head p,
.news-showcase .section-head > div {
  text-align: left !important;
  justify-content: flex-start !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.btn:not(.ghost):not(.btn-home-news-read):not(.btn-home-faq-more),
.btn:not(.ghost):not(.btn-home-news-read):not(.btn-home-faq-more) *,
.hero-actions .btn:not(.ghost),
.order-form .btn[type='submit'],
.quick-order-form .btn[type='submit'],
#supportSubmit {
  color: #0b1220 !important;
  -webkit-text-fill-color: #0b1220 !important;
}

.form-disclaimer {
  text-decoration: underline !important;
  text-decoration-thickness: 1px !important;
  text-underline-offset: 3px !important;
}

/* === News section reset: align left, center content inside, keep buttons working === */
.news-showcase .news-block {
  display: block !important;
}

.news-showcase .news-slider {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 0 !important;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  scroll-snap-type: x mandatory !important;
  scroll-behavior: smooth !important;
  pointer-events: auto !important;
}

.news-showcase .news-track,
.news-showcase .news-slider-track {
  display: flex !important;
  gap: 0 !important;
  transform: none !important;
  transition: none !important;
  width: 100% !important;
}

.news-showcase .news-slide {
  flex: 0 0 100% !important;
  min-width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  box-sizing: border-box !important;
  padding: 0 16px !important;
}

.news-showcase .news-slide-body,
.news-showcase .news-slide.no-image .news-slide-body {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

.news-showcase .news-slide-body *,
.news-showcase .news-slide-body h3,
.news-showcase .news-slide-body p,
.news-showcase .news-slide-body .btn-home-news-read {
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* News slide animation */
.news-showcase .news-slide {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.24s ease, transform 0.24s ease;
}

.news-showcase .news-slide.is-active {
  opacity: 1;
  transform: translateY(0);
}

.news-showcase .news-controls-row {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  margin-top: 8px !important;
  margin-bottom: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 12px !important;
}

.news-showcase .news-slider-controls {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  flex-direction: row !important;
}

.news-showcase .news-dots {
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

@media (max-width: 900px) {
  .news-showcase .news-slider {
    width: 100% !important;
    max-width: 100% !important;
  }

  .news-showcase .news-controls-row {
    width: 100% !important;
    max-width: 100% !important;
  }

  .news-showcase .news-slider-controls {
    display: none !important;
  }
}

/* Ensure news track can scroll (don't clamp to 100% width) */
.news-showcase .news-track,
.news-showcase .news-slider-track {
  width: max-content !important;
  min-width: 100% !important;
  flex-wrap: nowrap !important;
}

/* Keep slide geometry stable; animation classes control transform/opacity */
.news-showcase .news-slide {
  opacity: 1;
  transform: none;
}

.news-showcase .news-slide.news-enter-left {
  animation: newsSlideInLeft 0.24s ease both;
}

.news-showcase .news-slide.news-enter-right {
  animation: newsSlideInRight 0.24s ease both;
}

@keyframes newsSlideInLeft {
  from { opacity: 0; transform: translateX(-24px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes newsSlideInRight {
  from { opacity: 0; transform: translateX(24px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Force center alignment on mobile for news content and controls */
@media (max-width: 900px) {
  .news-showcase .news-slide,
  .news-showcase .news-slide.no-image {
    text-align: center !important;
    align-items: center !important;
    justify-items: center !important;
    justify-content: center !important;
  }

  .news-showcase .news-slide-body,
  .news-showcase .news-slide.no-image .news-slide-body {
    text-align: center !important;
    align-items: center !important;
    justify-content: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .news-showcase .news-slide-body h3,
  .news-showcase .news-slide-body p,
  .news-showcase .news-slide-body .btn-home-news-read {
    text-align: center !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  .news-showcase .news-controls-row,
  .news-showcase .news-dots {
    justify-content: center !important;
    align-items: center !important;
  }
}

/* Isolated home news carousel (news2) to bypass legacy .news-* conflicts */
.news-showcase[data-news-hard-fix="1"] .news2-block {
  width: 100%;
}

.news-showcase[data-news-hard-fix="1"] .news2-slider {
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  border-radius: 22px;
}

.news-showcase[data-news-hard-fix="1"] .news2-track {
  display: flex;
  gap: 0;
  will-change: transform;
  transition: transform 0.32s ease;
}

.news-showcase[data-news-hard-fix="1"] .news2-slide {
  display: flex;
  align-items: stretch;
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  background: rgba(12, 29, 56, 0.82);
  border: 1px solid rgba(90, 124, 173, 0.22);
  border-radius: 22px;
  overflow: hidden;
}

.news-showcase[data-news-hard-fix="1"] .news2-slide img {
  width: 42%;
  min-width: 42%;
  max-width: 42%;
  height: auto;
  object-fit: cover;
  display: block;
  background: rgba(8, 18, 34, 0.7);
}

.news-showcase[data-news-hard-fix="1"] .news2-slide.no-image {
  justify-content: center;
}

.news-showcase[data-news-hard-fix="1"] .news2-slide.no-image .news2-slide-body {
  max-width: 920px;
}

.news-showcase[data-news-hard-fix="1"] .news2-slide-body {
  flex: 1 1 auto;
  min-width: 0;
  padding: 26px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 14px;
}

.news-showcase[data-news-hard-fix="1"] .news2-slide-body h3,
.news-showcase[data-news-hard-fix="1"] .news2-slide-body p,
.news-showcase[data-news-hard-fix="1"] .news2-slide-body .btn-home-news-read {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.news-showcase[data-news-hard-fix="1"] .news2-slide-body h3 {
  margin-top: 0;
  margin-bottom: 0;
}

.news-showcase[data-news-hard-fix="1"] .news2-slide-body p {
  margin-top: 0;
  margin-bottom: 0;
  max-width: 58ch;
}

.news-showcase[data-news-hard-fix="1"] .news2-controls-row {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 10px;
}

.news-showcase[data-news-hard-fix="1"] .news2-slider-controls {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
}

.news-showcase[data-news-hard-fix="1"] .news2-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}

.news-showcase[data-news-hard-fix="1"] .news2-dot {
  width: 12px;
  height: 7px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: transparent;
  padding: 0;
  cursor: pointer;
}

.news-showcase[data-news-hard-fix="1"] .news2-dot.is-active {
  width: 18px;
  background: #fff;
  border-color: #fff;
}

.news-showcase[data-news-hard-fix="1"] .news2-slider-controls .carousel-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex: 0 0 auto !important;
  width: 42px !important;
  min-width: 42px !important;
  max-width: 42px !important;
  height: 32px !important;
  min-height: 32px !important;
  max-height: 32px !important;
  padding: 0 !important;
  border-radius: 999px !important;
  border: 0 !important;
  background: #e28b26 !important;
  color: #ffffff !important;
  font-size: 20px !important;
  line-height: 1 !important;
  writing-mode: horizontal-tb !important;
  transform: none !important;
  box-shadow: none !important;
}

.news-showcase[data-news-hard-fix="1"] .news2-slider-controls .carousel-btn:hover {
  background: #f29b34 !important;
}

@media (max-width: 900px) {
  .news-showcase[data-news-hard-fix="1"] .news2-slide {
    flex-direction: column;
  }

  .news-showcase[data-news-hard-fix="1"] .news2-slide img {
    width: 100%;
    min-width: 100%;
    max-width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
  }

  .news-showcase[data-news-hard-fix="1"] .news2-slide-body {
    padding: 16px 14px 18px;
    gap: 10px;
  }

  .news-showcase[data-news-hard-fix="1"] .news2-slide-body p {
    max-width: none;
  }

  .news-showcase[data-news-hard-fix="1"] .news2-slider-controls {
    display: none;
  }
}

/* =========================
   Global stability + responsive layer
   ========================= */

/* Prevent common horizontal overflow from long content / old style collisions */
html, body {
  overflow-x: clip;
}

body * {
  min-width: 0;
}

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

/* Content boxes should fit content unless a component explicitly controls height */
:where(.hero-card, .order-section, .model-sites, .faq-item, .auth-card, .status-card, .modal-card, .chat, .chat-panel, .material-card, .support-item, .side-card, .order-form-card, .order-card, .support-form-card, .feature-card, .stat-card, .admin-panel, .admin-topbar, .admin-panel-body) {
  height: auto !important;
  min-height: 0 !important;
}

/* Public site: safer wrapping in text-heavy zones */
.hero-card,
.news2-slide-body,
.faq-item,
.order-card,
.support-item,
.material-card {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Keep buttons readable and avoid accidental vertical stretching from legacy rules */
.btn,
.carousel-btn {
  writing-mode: horizontal-tb;
}

/* Admin layout baseline */
.admin-shell {
  width: 100%;
  box-sizing: border-box;
}

.admin-layout {
  display: grid;
  grid-template-columns: minmax(240px, 300px) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}

.admin-content {
  min-width: 0;
  width: 100%;
}

.admin-sidebar {
  min-width: 0;
  position: sticky;
  top: 12px;
  max-height: calc(100vh - 24px);
  overflow: auto;
  scrollbar-gutter: stable;
}

.admin-panel,
.admin-topbar,
.admin-panel-body {
  width: 100%;
  box-sizing: border-box;
}

.admin-topbar,
.admin-panel {
  overflow: hidden;
}

/* Admin section headers should stay in normal flow (not sticky) */
.admin-topbar {
  position: static !important;
  top: auto !important;
}

/* Forms and actions in admin: wrap instead of overflowing */
.admin-topbar-actions,
.admin-panel-header,
.admin-actions,
.admin-actions-bottom,
.files-actions,
.admin-sort {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-panel-header > * {
  min-width: 0;
}

.admin-sort select,
.admin-content input,
.admin-content select,
.admin-content textarea {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
}

.admin-sort {
  width: 100%;
}

.admin-sort > * {
  min-width: 0;
}

.admin-content textarea {
  resize: vertical;
}

/* Agreements page: stretch search and table panels to full width */
.admin-content[data-admin-agreements] .admin-panel {
  width: 100%;
}

.admin-content[data-admin-agreements] .admin-sort {
  width: 100%;
}

.admin-content[data-admin-agreements] .admin-sort .admin-topbar-actions {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.admin-content[data-admin-agreements] .admin-sort .admin-topbar-actions input {
  width: 100%;
  min-width: 0;
}

.admin-content[data-admin-agreements] .table-scroll {
  width: 100%;
}

.admin-content[data-admin-agreements] .admin-table {
  width: 100%;
  min-width: 920px;
}

.field,
.field.full {
  min-width: 0;
}

.admin-grid,
.admin-site-grid,
.admin-order-grid {
  min-width: 0;
}

/* Tables: never break page width */
.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
}

.admin-table {
  width: 100%;
  min-width: 720px;
}

.admin-table th,
.admin-table td {
  vertical-align: top;
  word-break: break-word;
}

.actions-cell,
.files-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.actions-cell .btn,
.actions-cell .link,
.files-actions .btn {
  white-space: nowrap;
}

/* Visits page layout cleanup */
.visits-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

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

.visits-summary > div {
  min-width: 0;
}

.visits-donut {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(0, 1fr);
  align-items: center;
  gap: 14px;
}

.donut-legend > div {
  min-width: 0;
}

.visits-chart {
  overflow-x: auto;
  overflow-y: hidden;
}

.visits-bars {
  min-width: max-content;
}

.visits-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
}

/* Site admin page: two columns on desktop, safe stacking on small screens */
.admin-site-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.admin-site-form,
.admin-site-preview {
  min-width: 0;
}

.admin-site-preview .site-preview-card {
  height: auto !important;
  min-height: 0 !important;
}

.logo-preview,
.admin-image-preview {
  max-width: 100%;
  overflow: hidden;
}

/* Mobile admin optimization */
@media (max-width: 1100px) {
  .admin-layout {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static !important;
    top: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .admin-site-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .admin-shell {
    padding: 10px !important;
  }

  .admin-topbar,
  .admin-panel,
  .admin-panel-body {
    border-radius: 14px !important;
  }

  .admin-topbar,
  .admin-panel {
    padding: 12px !important;
  }

  .admin-brand {
    align-items: center;
    gap: 10px;
  }

  .admin-brand strong {
    line-height: 1.15;
  }

  .admin-nav {
    gap: 8px;
  }

  .admin-nav-group {
    gap: 6px;
  }

  .admin-link {
    min-height: 38px;
    padding: 8px 10px !important;
    font-size: 0.95rem;
    white-space: normal;
  }

  .admin-topbar-actions,
  .admin-panel-header,
  .admin-actions,
  .admin-actions-bottom,
  .files-actions,
  .admin-sort {
    display: grid !important;
    grid-template-columns: 1fr;
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }

  .admin-content .btn,
  .admin-sort .btn,
  .admin-sort select,
  .files-actions .btn {
    width: 100% !important;
    max-width: 100%;
  }

  .admin-content[data-admin-agreements] .admin-sort .admin-topbar-actions {
    grid-template-columns: 1fr;
  }

  .visits-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .visits-summary {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .visits-donut {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .donut-legend {
    width: 100%;
  }

  .visits-range {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .visits-range .muted {
    display: none;
  }

  .admin-table {
    min-width: 620px;
    font-size: 0.9rem;
  }
}

/* Public site compactness on phones: reduce oversized empty card spacing */
@media (max-width: 900px) {
  .hero-card,
  .feature-card,
  .stat-card,
  .faq-item,
  .order-form-card,
  .support-form-card {
    padding: 14px !important;
  }

  .value-cards,
  .feature-grid,
  .stats-grid {
    gap: 10px !important;
  }

  .value-card,
  .feature-card,
  .stat-card {
    min-height: 0 !important;
  }
}

/* Chat file card (telegram-like non-media attachment preview) */
.chat-file-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: min(100%, 420px);
  max-width: 100%;
  min-width: 0;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.45);
  color: #e8eefc !important;
  text-decoration: none !important;
  cursor: pointer;
  box-sizing: border-box;
}

.admin-link[href^="/admin/documents"] { border-left: 3px solid #facc15; }

.chat-file-card:hover {
  background: rgba(51, 65, 85, 0.52);
  border-color: rgba(148, 163, 184, 0.38);
}

.chat-file-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 40px;
  padding: 0 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-file-body {
  display: grid;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
  gap: 2px;
}

.chat-file-name {
  display: block;
  min-width: 0;
  max-width: 100%;
  color: #f3f6ff;
  font-weight: 600;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-file-meta {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.82rem;
  line-height: 1.2;
}

.chat-attachment-preview {
  min-width: 0;
}

.chat-attachment-preview .preview-info {
  min-width: 0;
  max-width: 100%;
}

.chat-attachment-preview .preview-name,
.chat-attachment-preview .preview-size {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-attachment-preview .file-chip {
  padding: 0 6px;
  min-width: 54px;
  max-width: 54px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.04em;
}

@media (max-width: 900px) {
  .chat-file-card {
    width: 100%;
    max-width: 100%;
    padding: 9px 10px;
    gap: 8px;
  }

  .chat-file-icon {
    min-width: 46px;
    height: 36px;
    font-size: 10px;
  }
}

/* Compact process flow (emoji + arrows) */
.process-timeline .timeline-flow {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
  margin-top: 10px;
}

.process-timeline .timeline-flow-step {
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  justify-items: center;
  align-content: start;
  gap: 8px;
  padding: 12px 10px;
  border-radius: 16px;
  border: 1px solid rgba(115, 141, 183, 0.22);
  background: rgba(12, 29, 56, 0.7);
  text-align: center;
  min-height: 0 !important;
}

.process-timeline .timeline-flow-index {
  font-weight: 800;
  letter-spacing: 0.08em;
  font-size: 0.95rem;
  line-height: 1;
  color: #f59e0b;
}

.process-timeline .timeline-flow-step:nth-of-type(3n) .timeline-flow-index {
  color: #60a5fa;
}

.process-timeline .timeline-flow-step:nth-of-type(5n) .timeline-flow-index {
  color: #5eead4;
}

.process-timeline .timeline-flow-step:nth-of-type(7n) .timeline-flow-index {
  color: #c084fc;
}

.process-timeline .timeline-flow-emoji {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 1.35rem;
  line-height: 1;
}

.process-timeline .timeline-flow-step h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.2;
}

.process-timeline .timeline-flow-step p {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
  max-width: 24ch;
}

.process-timeline .timeline-flow-arrow {
  display: grid;
  place-items: center;
  align-self: center;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  transform: translateY(-8px);
}

@media (max-width: 1100px) {
  .process-timeline .timeline-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .process-timeline .timeline-flow-arrow {
    display: none;
  }
}

@media (max-width: 700px) {
  .process-timeline .timeline-flow {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .process-timeline .timeline-flow-step {
    grid-template-columns: auto 52px 1fr;
    grid-template-rows: auto auto;
    text-align: left;
    justify-items: start;
    align-items: center;
    gap: 6px 10px;
    padding: 10px 12px;
  }

  .process-timeline .timeline-flow-index {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
  }

  .process-timeline .timeline-flow-emoji {
    grid-column: 1;
    grid-row: 2;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 1.15rem;
  }

  .process-timeline .timeline-flow-step h3 {
    grid-column: 2 / 4;
    grid-row: 1;
    align-self: end;
  }

  .process-timeline .timeline-flow-step p {
    grid-column: 2 / 4;
    grid-row: 2;
    max-width: none;
    text-align: left;
  }
}

/* Transparent-background image support (PNG/WebP/SVG) */
img.alpha-img {
  background: transparent !important;
}

.hero-art img.alpha-img,
.value-card img.alpha-img,
.logo-preview img.alpha-img,
.brand img.alpha-img,
.site-preview-brand img.alpha-img,
.gallery-card img.alpha-img,
.news-card .news-slide img.alpha-img,
.news-showcase[data-news-hard-fix="1"] .news2-slide img.alpha-img {
  object-fit: contain !important;
  object-position: center center !important;
  background: transparent !important;
}

.gallery-card img.alpha-img,
.news-card .news-slide img.alpha-img,
.news-showcase[data-news-hard-fix="1"] .news2-slide img.alpha-img {
  padding: 8px;
}

/* =========================================================
   UI refresh layer (main site + admin)
   ========================================================= */

body.theme-dark {
  --ui-radius-sm: 12px;
  --ui-radius-md: 16px;
  --ui-radius-lg: 20px;
  --ui-gap-1: 8px;
  --ui-gap-2: 12px;
  --ui-gap-3: 16px;
  --ui-gap-4: 24px;
  --ui-gap-5: 32px;
  --ui-panel-bg: linear-gradient(180deg, rgba(11, 26, 49, 0.9), rgba(9, 20, 38, 0.88));
  --ui-panel-border: rgba(123, 156, 201, 0.16);
  --ui-panel-shadow: 0 16px 40px rgba(3, 8, 18, 0.26);
  --ui-text-muted: #a8b8d6;
  --ui-accent-1: #f59e0b;
  --ui-accent-2: #fbbf24;
  --ui-accent-3: #f97316;
}

.page-shell {
  width: min(1200px, calc(100% - 28px));
  margin-inline: auto;
}

.page-shell > .section {
  margin-top: 20px;
  margin-bottom: 0;
  padding: 22px 22px 20px;
  border-radius: var(--ui-radius-lg);
  border: 1px solid var(--ui-panel-border);
  background: var(--ui-panel-bg);
  box-shadow: var(--ui-panel-shadow);
  backdrop-filter: blur(8px);
}

.page-shell > .section:last-of-type {
  margin-bottom: 8px;
}

.section-head {
  gap: 12px !important;
  margin-bottom: 14px !important;
}

.section-head h2 {
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.section-head p,
.muted {
  color: var(--ui-text-muted) !important;
}

/* Buttons: unify look and remove accidental blue text/underline on buttons */
.btn,
.btn:link,
.btn:visited,
.btn:hover,
.btn:active,
.btn:focus,
.btn:focus-visible {
  text-decoration: none !important;
}

.btn:not(.ghost):not(.danger),
.btn:not(.ghost):not(.danger) * {
  color: #0b1220 !important;
  font-weight: 700 !important;
}

.btn:not(.ghost):not(.danger) {
  border-radius: 999px !important;
  min-height: 44px;
  padding-inline: 18px !important;
  border: 1px solid rgba(255, 214, 126, 0.65) !important;
  background: linear-gradient(135deg, #ff8a1e 0%, #ffb443 55%, #ffd77a 100%) !important;
  box-shadow: 0 8px 18px rgba(255, 138, 30, 0.2) !important;
}

.btn:not(.ghost):not(.danger):hover {
  filter: saturate(1.04) brightness(1.02);
}

.btn.ghost {
  min-height: 42px;
  border-radius: 999px !important;
  padding-inline: 16px !important;
}

.btn-home-news-read,
.btn-home-faq-more {
  min-height: 42px !important;
  border-radius: 999px !important;
  padding-inline: 16px !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
}

/* Home / hero */
.hero-saas {
  gap: 20px !important;
  border-radius: 24px !important;
  border: 1px solid rgba(120, 152, 198, 0.18) !important;
  box-shadow: 0 24px 50px rgba(2, 8, 20, 0.28) !important;
}

.hero-copy h1 {
  line-height: 0.98 !important;
  letter-spacing: -0.03em;
}

.hero-copy p.muted {
  max-width: 54ch;
}

.hero-actions {
  gap: 10px !important;
}

.hero-actions .btn,
.quick-order-form .btn,
.nav-actions .btn {
  min-height: 48px !important;
}

.hero-panel {
  gap: 14px !important;
}

.hero-card {
  border-radius: var(--ui-radius-md) !important;
  border: 1px solid rgba(115, 141, 183, 0.18) !important;
  background: rgba(9, 18, 35, 0.75) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.hero-art {
  border-radius: 18px !important;
  background: radial-gradient(circle at 30% 20%, rgba(69, 198, 255, 0.08), transparent 50%), rgba(9, 18, 35, 0.65) !important;
  border: 1px solid rgba(115, 141, 183, 0.18) !important;
}

.metric-card {
  min-height: 0 !important;
  padding: 12px 14px !important;
  border-radius: 14px !important;
  border: 1px solid rgba(133, 161, 205, 0.18) !important;
  background: rgba(10, 22, 40, 0.76) !important;
}

.metric-card strong {
  font-size: 1.1rem !important;
}

.metric-sub {
  line-height: 1.3;
}

/* News (isolated news2 component) */
.news-showcase[data-news-hard-fix="1"] .news2-block {
  width: 100%;
}

.news-showcase[data-news-hard-fix="1"] .news2-slider {
  border-radius: 18px !important;
  border: 1px solid rgba(115, 141, 183, 0.18) !important;
  background: rgba(8, 21, 40, 0.82) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.news-showcase[data-news-hard-fix="1"] .news2-slide {
  padding: 0 !important;
  min-height: 240px !important;
}

.news-showcase[data-news-hard-fix="1"] .news2-slide img {
  border-radius: 16px !important;
}

.news-showcase[data-news-hard-fix="1"] .news2-slide-body {
  width: min(100%, 760px) !important;
  margin: 0 auto !important;
  padding: 18px 20px !important;
  gap: 14px !important;
}

.news-showcase[data-news-hard-fix="1"] .news2-slide-body h3 {
  margin: 0 !important;
  text-align: center !important;
  line-height: 1.15 !important;
}

.news-showcase[data-news-hard-fix="1"] .news2-slide-body p {
  margin: 0 !important;
  text-align: center !important;
  line-height: 1.45 !important;
}

.news-showcase[data-news-hard-fix="1"] .news2-controls-row {
  margin-top: 10px !important;
  gap: 10px !important;
}

.news-showcase[data-news-hard-fix="1"] .news2-slider-controls {
  display: flex !important;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.news-showcase[data-news-hard-fix="1"] .news2-slider-controls .carousel-btn {
  width: 42px !important;
  min-width: 42px !important;
  height: 32px !important;
  border-radius: 999px !important;
  line-height: 1;
  font-size: 1.05rem !important;
}

.news-showcase[data-news-hard-fix="1"] .news2-dots {
  margin-top: 12px !important;
}

/* Gallery */
.portfolio .gallery-carousel {
  border-radius: 18px !important;
  border: 1px solid rgba(115, 141, 183, 0.18) !important;
  background: rgba(8, 21, 40, 0.78) !important;
}

.portfolio .gallery-card {
  border-radius: 18px !important;
  border: 1px solid rgba(115, 141, 183, 0.14) !important;
  background: rgba(9, 20, 38, 0.72) !important;
  box-shadow: none !important;
}

.portfolio .gallery-card img {
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

.portfolio .gallery-body {
  gap: 8px;
}

.portfolio .gallery-body h3 {
  line-height: 1.15;
}

/* Value cards / FAQ */
.value-cards {
  gap: 12px !important;
}

.value-card {
  border-radius: 16px !important;
  border: 1px solid rgba(125, 155, 201, 0.16) !important;
  background: rgba(9, 20, 38, 0.72) !important;
}

.value-card h3 {
  line-height: 1.2;
}

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

.faq-item {
  border-radius: 16px !important;
  border: 1px solid rgba(125, 155, 201, 0.16) !important;
  background: rgba(9, 20, 38, 0.72) !important;
  overflow: clip;
}

.faq-item > summary {
  min-height: 54px;
  align-items: center;
}

.faq-answer {
  border-top: 1px solid rgba(125, 155, 201, 0.1);
}

/* Admin layout refresh */
.admin-shell {
  padding: 10px !important;
}

.admin-layout {
  display: grid !important;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 12px !important;
  align-items: start;
}

.admin-sidebar {
  position: sticky !important;
  top: 10px !important;
  max-height: calc(100vh - 20px);
  overflow: auto;
  border-radius: 18px !important;
  border: 1px solid rgba(122, 153, 196, 0.16) !important;
  background: linear-gradient(180deg, rgba(9, 18, 34, 0.96), rgba(8, 16, 30, 0.94)) !important;
  box-shadow: 0 14px 34px rgba(3, 8, 18, 0.22) !important;
}

.admin-content {
  min-width: 0;
}

.admin-topbar {
  display: flex !important;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px !important;
  padding: 14px 16px !important;
  border-radius: 16px !important;
  border: 1px solid rgba(122, 153, 196, 0.14) !important;
  background: rgba(10, 20, 36, 0.74) !important;
  box-shadow: none !important;
}

.admin-topbar h1 {
  line-height: 1.05;
  letter-spacing: -0.02em;
}

.admin-topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-panel,
.admin-panel-body {
  border-radius: 16px !important;
  border: 1px solid rgba(122, 153, 196, 0.14) !important;
  background: rgba(10, 20, 36, 0.74) !important;
  box-shadow: none !important;
}

.admin-panel {
  padding: 14px !important;
}

.admin-panel + .admin-panel {
  margin-top: 12px !important;
}

.admin-panel-header {
  gap: 10px !important;
  margin-bottom: 10px !important;
}

.admin-panel-header h2 {
  line-height: 1.15;
}

.admin-grid {
  gap: 12px !important;
}

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

.field label {
  font-weight: 600;
  font-size: 0.92rem;
}

.field input,
.field textarea,
.field select,
.admin-sort input,
.admin-sort textarea,
.admin-sort select {
  border-radius: 12px !important;
  border: 1px solid rgba(127, 160, 206, 0.18) !important;
  background: rgba(6, 14, 27, 0.85) !important;
}

.field textarea {
  resize: vertical;
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.admin-panel form .admin-actions:last-child {
  position: sticky;
  bottom: 0;
  z-index: 2;
  padding-top: 10px;
  margin-top: 10px;
  background: linear-gradient(180deg, rgba(10, 20, 36, 0), rgba(10, 20, 36, 0.95) 35%);
}

.admin-nav {
  display: grid;
  gap: 10px;
}

.admin-nav-group {
  display: grid;
  gap: 4px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.01);
}

.admin-nav-label {
  margin: 2px 6px 6px;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(189, 204, 231, 0.68) !important;
}

.admin-link {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px !important;
  border-radius: 10px !important;
  border: 1px solid transparent;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease;
}

.admin-link:hover {
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(123, 156, 201, 0.12);
  transform: translateX(1px);
}

.admin-link.is-active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(245, 158, 11, 0.06)) !important;
  border-color: rgba(245, 158, 11, 0.22) !important;
}

.badge {
  border-radius: 999px !important;
}

.table-scroll {
  border-radius: 12px;
  border: 1px solid rgba(122, 153, 196, 0.12);
  overflow: auto;
}

.admin-table {
  min-width: 720px;
}

.admin-table th,
.admin-table td {
  vertical-align: top;
}

.admin-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(7, 16, 29, 0.95);
}

.actions-cell,
.files-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.inline {
  display: inline-flex;
  align-items: center;
}

.notice {
  border-radius: 14px !important;
  border: 1px solid rgba(34, 197, 94, 0.22) !important;
  background: rgba(12, 46, 22, 0.55) !important;
  color: #d5f5de !important;
}

.error,
.field .error {
  min-height: 1.1em;
}

/* Admin visits page polish */
.visits-grid {
  gap: 12px !important;
}

.visits-summary {
  gap: 10px !important;
}

.visits-summary > div {
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(122, 153, 196, 0.12);
  background: rgba(255, 255, 255, 0.02);
}

.visits-chart {
  border-radius: 14px;
  padding: 10px;
  border: 1px solid rgba(122, 153, 196, 0.12);
  background: rgba(255, 255, 255, 0.015);
}

.visits-bars {
  gap: 8px !important;
}

/* Performance/UX */
.page-shell > .section,
.admin-panel {
  content-visibility: auto;
  contain-intrinsic-size: 320px;
}

@media (prefers-reduced-motion: reduce) {
  .news-showcase[data-news-hard-fix="1"] .news2-track,
  .gallery-track,
  .btn,
  .admin-link {
    transition: none !important;
    animation: none !important;
  }
}

/* Admin mobile navigation */
.admin-mobile-nav-toggle {
  display: none;
  width: 42px;
  min-width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(122, 153, 196, 0.16);
  background: rgba(8, 17, 31, 0.8);
  color: #e8eefc;
  font-size: 1.2rem;
  line-height: 1;
}

.admin-mobile-overlay {
  display: none;
}

@media (max-width: 1100px) {
  .page-shell {
    width: min(1200px, calc(100% - 18px));
  }

  .page-shell > .section {
    padding: 16px 14px 14px;
    border-radius: 18px;
    margin-top: 14px;
  }

  .hero-saas {
    gap: 14px !important;
    border-radius: 20px !important;
  }

  .news-showcase[data-news-hard-fix="1"] .news2-slide {
    min-height: 220px !important;
  }

  .admin-layout {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .admin-sidebar {
    position: fixed !important;
    top: 10px !important;
    left: 10px;
    bottom: 10px;
    width: min(84vw, 320px);
    max-height: none;
    z-index: 40;
    transform: translateX(calc(-100% - 14px));
    transition: transform .22s ease;
  }

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

  .admin-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(2, 8, 18, 0.55);
    backdrop-filter: blur(2px);
    z-index: 35;
  }

  .admin-shell.admin-nav-open .admin-mobile-overlay {
    display: block;
  }

  .admin-topbar {
    padding: 12px !important;
    gap: 10px;
  }

  .admin-mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .admin-topbar > div:first-child {
    min-width: 0;
  }

  .admin-topbar h1 {
    font-size: 1.45rem !important;
  }

  .admin-topbar-actions {
    width: 100%;
  }

  .admin-panel {
    padding: 12px !important;
  }

  .admin-panel form .admin-actions:last-child {
    position: static;
    background: transparent;
    margin-top: 8px;
    padding-top: 0;
  }

  .admin-sort,
  .admin-sort .visits-range,
  .admin-topbar-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .admin-sort input,
  .admin-sort select,
  .admin-sort .btn {
    width: 100%;
  }

  .visits-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 700px) {
  .hero-copy h1 {
    font-size: clamp(1.9rem, 9vw, 2.5rem) !important;
  }

  .hero-actions {
    grid-template-columns: 1fr !important;
  }

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

  .hero-metrics {
    gap: 8px !important;
  }

  .metric-card {
    padding: 10px 12px !important;
  }

  .value-cards {
    grid-template-columns: 1fr !important;
  }

  .news-showcase[data-news-hard-fix="1"] .news2-slide-body {
    padding: 14px 12px !important;
  }

  .news-showcase[data-news-hard-fix="1"] .news2-slide-body p {
    font-size: 0.93rem !important;
  }

  .portfolio .gallery-body,
  .news-card .news-body {
    font-size: 0.95rem;
  }

  .admin-shell {
    padding: 8px !important;
  }

  .admin-sidebar {
    top: 8px !important;
    left: 8px;
    bottom: 8px;
    width: calc(100vw - 16px);
    border-radius: 14px !important;
  }

  .admin-topbar {
    flex-direction: row !important;
    align-items: flex-start !important;
  }

  .admin-topbar .admin-topbar-actions {
    justify-content: flex-start;
  }

  .admin-table {
    min-width: 640px;
  }
}

/* Admin Cyrillic-safe typography + wide tables (prevent per-letter wrapping) */
.admin-shell,
.admin-shell .admin-topbar,
.admin-shell .admin-panel,
.admin-shell .admin-panel-body,
.admin-shell .admin-table,
.admin-shell .admin-table th,
.admin-shell .admin-table td,
.admin-shell .admin-link,
.admin-shell .admin-nav-label,
.admin-shell .stat-card,
.admin-shell .stat-card * {
  font-family: var(--font-body), "Segoe UI", Tahoma, sans-serif !important;
}

.admin-shell h1,
.admin-shell h2,
.admin-shell h3,
.admin-shell h4,
.admin-shell .stat-label,
.admin-shell .stat-sub,
.admin-shell .legend-item,
.admin-shell .admin-panel-header h2,
.admin-shell .admin-topbar h1 {
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.admin-shell .table-scroll {
  width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden !important;
}

.admin-shell .admin-table {
  width: max-content !important;
  min-width: 100% !important;
  table-layout: auto !important;
}

.admin-shell .admin-table th {
  white-space: nowrap !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
}

.admin-shell .admin-table td {
  word-break: normal !important;
  overflow-wrap: break-word !important;
  vertical-align: top;
}

.admin-shell .admin-table td .btn,
.admin-shell .admin-table td .link,
.admin-shell .admin-table td .status,
.admin-shell .admin-table td .badge {
  white-space: nowrap !important;
}

.admin-shell .admin-table .order-print-meta {
  min-width: 120px;
}

.admin-shell .admin-table .history-phone,
.admin-shell .admin-table .open-cell,
.admin-shell .admin-table .actions-cell {
  white-space: nowrap !important;
}
