:root {
  --bg: #f4f4f4;
  --paper: #ffffff;
  --ink: #12161f;
  --muted: #5c6470;
  --brand: #d2581e;
  --dark: #0f2235;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
a { color: inherit; text-decoration: none; }

.topbar {
  background: #091521;
  color: #fff;
  font-size: 14px;
}
.topbar-inner {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.site-head { background: #fff; border-bottom: 1px solid #e7e7e7; position: sticky; top: 0; z-index: 20; }
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 74px;
}
.nav a { margin-left: 18px; font-weight: 600; color: #24303b; }
.nav a:hover { color: var(--brand); }

.hero {
  background-image: url("https://images.unsplash.com/photo-1621905252507-b35492cc74b4?auto=format&fit=crop&w=1800&q=80");
  background-size: cover;
  background-position: center;
}
.hero-mask {
  background: linear-gradient(90deg, rgba(11, 28, 45, 0.86), rgba(11, 28, 45, 0.55));
  color: #fff;
}
.hero-content { padding: 110px 0; max-width: 700px; }
.hero-kicker { text-transform: uppercase; letter-spacing: 1.8px; font-size: 12px; margin-bottom: 10px; color: #f2c4a9; }
.hero h1 { font-size: 46px; margin: 0 0 12px; line-height: 1.1; }
.hero p { color: #dde4eb; font-size: 18px; margin: 0; }
.hero-actions { margin-top: 26px; display: flex; gap: 12px; }

.btn {
  background: var(--brand);
  color: #fff;
  border: 0;
  padding: 12px 18px;
  font-weight: 700;
  display: inline-block;
  cursor: pointer;
}
.btn-outline {
  background: transparent;
  border: 1px solid #f2f2f2;
}

section { padding: 56px 0; }
h2 { font-size: 34px; margin: 0 0 22px; }

.trust { background: #fff; border-bottom: 1px solid #e8e8e8; }
.trust-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.trust-item { background: #f8f9fb; border: 1px solid #eceff3; padding: 18px; }
.trust-item b { display: block; font-size: 24px; color: #16283a; margin-bottom: 6px; }
.trust-item span { color: var(--muted); font-size: 14px; }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card {
  background: #fff;
  border: 1px solid #e8ecf0;
  padding: 22px;
  box-shadow: 0 2px 10px rgba(8, 27, 46, 0.05);
}
.card h3 { margin-top: 0; }
.card p { color: var(--muted); }

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.project-card {
  background: #fff;
  border: 1px solid #e8ecf0;
  box-shadow: 0 3px 14px rgba(8, 27, 46, 0.08);
  overflow: hidden;
}
.project-link { display: block; }
.project-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}
.project-text { padding: 16px; }
.project-city {
  color: var(--brand);
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 700;
  margin: 0 0 8px;
  font-size: 12px;
}
.project-text h3 { margin: 0 0 8px; }
.project-text p { color: var(--muted); margin: 0; }

.cta-band { background: var(--dark); color: #fff; }
.cta-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
}
.cta-inner p { color: #d7dfe8; }

.contact-wrap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 20px;
}
.contact-card {
  background: #fff;
  border: 1px solid #e8ecf0;
  padding: 20px;
}
input:not([type="checkbox"]):not([type="radio"]), textarea {
  width: 100%;
  padding: 11px 12px;
  margin: 7px 0 12px;
  border: 1px solid #d6dce2;
  font-size: 15px;
}
input[type="checkbox"], input[type="radio"] {
  width: auto;
  margin: 0 6px 0 0;
  accent-color: var(--brand);
}
select {
  width: 100%;
  padding: 11px 12px;
  margin: 7px 0 12px;
  border: 1px solid #d6dce2;
  font-size: 15px;
  background: #fff;
}

footer {
  background: #0f141b;
  color: #ced6de;
  margin-top: 0;
  padding-top: 34px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 20px;
}
.footer-copy {
  border-top: 1px solid #2b343f;
  margin-top: 20px;
  padding: 16px 0 24px;
  font-size: 14px;
}

.track-form {
  display: flex;
  gap: 10px;
  align-items: center;
}
.track-form input { margin: 0; }
.track-card {
  margin-top: 18px;
  background: #fff;
  border: 1px solid #e8ecf0;
  padding: 20px;
}
.steps {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}
.step {
  border: 1px solid #d9e0e7;
  background: #f4f7fa;
  padding: 8px;
  text-align: center;
}
.step span {
  display: inline-block;
  width: 26px;
  height: 26px;
  line-height: 26px;
  border-radius: 50%;
  background: #7b8794;
  color: #fff;
  font-weight: 700;
}
.step small {
  display: block;
  margin-top: 6px;
  font-size: 12px;
}
.step.done {
  border-color: #bfe0ca;
  background: #e9f8ef;
}
.step.done span { background: #238a4d; }
.msg-ok {
  background: #e9f8ef;
  border: 1px solid #bfe0ca;
  padding: 10px 12px;
}

.admin-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.admin-card, .order-card {
  background: #fff;
  border: 1px solid #dfe5eb;
  padding: 14px;
}
.admin-row {
  display: flex;
  gap: 8px;
}
.orders-wrap {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.btn-danger { background: #b73333; }
.btn-outline-dark {
  background: transparent;
  color: #12202d;
  border: 1px solid #12202d;
}
.project-hero {
  background: #eef3f8;
  border-top: 1px solid #dbe4ed;
  border-bottom: 1px solid #dbe4ed;
}
.project-hero h1 {
  margin: 6px 0 10px;
  font-size: 46px;
}
.project-lead {
  font-size: 22px;
  color: #384452;
  max-width: 980px;
}
.project-detail {
  background: #f7f9fc;
}
.detail-main {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 18px;
  background: #fff;
  border: 1px solid #dfe5eb;
  padding: 18px;
}
.detail-text p {
  line-height: 1.8;
  color: #344150;
}
.detail-media img {
  width: 100%;
  height: 100%;
  min-height: 350px;
  object-fit: cover;
  border: 1px solid #e5e9ef;
}
.detail-points-card {
  margin-top: 18px;
  background: #fff;
  border: 1px solid #dfe5eb;
  padding: 16px;
}
.detail-points-card ul {
  margin: 0;
  padding-left: 20px;
  columns: 2;
  column-gap: 36px;
}
.detail-points-card li {
  margin: 8px 0;
}
.admin-shell {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  align-items: start;
}
.admin-sidebar {
  background: #fff;
  border: 1px solid #dfe5eb;
  padding: 14px;
  position: sticky;
  top: 16px;
}
.admin-sidebar h3 {
  margin: 4px 0 12px;
  font-size: 18px;
}
.admin-nav-item {
  display: block;
  padding: 10px 12px;
  border: 1px solid #e4e9ef;
  margin-bottom: 8px;
  font-weight: 700;
  background: #f7f9fb;
}
.admin-nav-item.active {
  border-color: #d2581e;
  background: #fff4ec;
  color: #9e3f14;
}
.admin-side-actions {
  margin-top: 14px;
  display: grid;
  gap: 8px;
}
.admin-main h2 {
  margin-bottom: 12px;
}
.admin-panel {
  background: #fff;
  border: 1px solid #dfe5eb;
  padding: 16px;
}
.admin-panel h3 {
  margin-top: 0;
}
.admin-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.admin-stat-card {
  background: #f8fafc;
  border: 1px solid #e4e9ef;
  padding: 14px;
}
.admin-stat-card b {
  display: block;
  font-size: 28px;
  color: #13263a;
}
.admin-stat-card span {
  color: #5d6876;
  font-size: 14px;
}
.chat-widget {
  position: fixed;
  right: 24px;
  top: 88px;
  z-index: 60;
}
.chat-widget.is-open {
  top: 128px;
}
.chat-fab {
  background: transparent;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  width: 86px;
  height: 86px;
  padding: 0;
  display: grid;
  place-items: center;
  box-shadow: 0 12px 28px rgba(12, 32, 50, 0.35);
  position: relative;
  overflow: hidden;
}
.chat-fab img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
}
.chat-fab-text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(7, 20, 34, 0.6);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.8;
  text-align: center;
}
.chat-fab.is-open {
  outline: 3px solid rgba(255, 255, 255, 0.85);
  outline-offset: 2px;
}
.chat-panel {
  width: 340px;
  margin-top: 12px;
  background: #fff;
  border: 1px solid #d7dee7;
  box-shadow: 0 16px 36px rgba(9, 24, 40, 0.28);
  border-radius: 12px;
  overflow: hidden;
  height: min(74vh, 560px);
  display: flex;
  flex-direction: column;
  font-size: 14px;
}
.chat-panel[hidden] {
  display: none !important;
}
.chat-head {
  background: #0f2235;
  color: #fff;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.chat-head small {
  display: block;
  color: #d2d9e1;
  font-size: 11px;
}
.chat-wa-call {
  font-size: 11px;
  color: #fff;
  border: 1px solid #2f4660;
  padding: 6px 8px;
  border-radius: 8px;
}
.chat-body {
  padding: 12px;
  flex: 1;
  overflow-y: auto;
  background: #f4f7fb;
}
.chat-msg {
  max-width: 92%;
  padding: 9px 10px;
  border-radius: 10px;
  margin-bottom: 8px;
  line-height: 1.45;
  font-size: 13px;
}
.chat-msg.bot {
  background: #fff;
  border: 1px solid #dde5ee;
}
.chat-msg.user {
  background: #d2581e;
  color: #fff;
  margin-left: auto;
}
.chat-solve, .chat-escalate {
  background: #fff;
  border: 1px solid #dde5ee;
  border-radius: 10px;
  padding: 10px;
  margin: 8px 0;
}
.chat-solve p, .chat-escalate p {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 13px;
}
.chat-solve-actions {
  display: flex;
  gap: 8px;
}
.chat-solve-actions button {
  border: 1px solid #cfd8e1;
  background: #f6f8fb;
  padding: 8px 10px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 12px;
}
.chat-wa-btn {
  display: inline-block;
  background: #25d366;
  color: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 13px;
}
.chat-wa-alt {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  color: #466380;
}
.chat-menu {
  border-top: 1px solid #e3e9f1;
  background: #fff;
  padding: 10px 12px 12px;
  flex-shrink: 0;
}
.chat-menu p {
  margin: 0 0 8px;
  font-weight: 700;
  font-size: 13px;
}
.chat-faq-list {
  display: grid;
  gap: 8px;
  max-height: 108px;
  overflow-y: auto;
  padding-right: 4px;
}
.chat-faq-item {
  text-align: left;
  border: 1px solid #d8e0e9;
  background: #f8fafc;
  border-radius: 999px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 13px;
  line-height: 1.3;
}
.chat-faq-item:hover {
  border-color: #d2581e;
  color: #9e3f14;
}
.chat-input-wrap {
  border-top: 1px solid #e3e9f1;
  background: #fff;
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}
.chat-input-wrap input {
  margin: 0;
  padding: 9px 10px;
  font-size: 13px;
}
.chat-input-wrap button {
  border: 0;
  background: #d2581e;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  padding: 0 12px;
  cursor: pointer;
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
  }
  .wrap {
    padding: 0 12px;
  }
  .topbar-inner {
    min-height: 34px;
    font-size: 12px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 6px 0;
  }
  .site-head {
    position: sticky;
    top: 0;
    z-index: 30;
  }
  .nav {
    align-items: flex-start;
    min-height: auto;
    padding: 10px 0 8px;
    gap: 8px;
  }
  .nav h2 {
    margin: 0;
    font-size: 22px;
  }
  .nav > div {
    width: 100%;
    white-space: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .nav > div::-webkit-scrollbar {
    height: 0;
  }
  .nav a {
    display: inline-block;
    margin-left: 0;
    margin-right: 14px;
    font-size: 16px;
  }
  .hero-content {
    padding: 62px 0;
  }
  .hero h1 {
    font-size: 38px;
  }
  .hero p {
    font-size: 17px;
  }
  .hero-actions .btn {
    min-height: 42px;
    line-height: 18px;
  }
  .grid,
  .project-grid,
  .trust-grid,
  .contact-wrap,
  .footer-grid,
  .admin-grid,
  .orders-wrap,
  .steps,
  .admin-stat-grid {
    grid-template-columns: 1fr;
  }
  .cta-inner {
    flex-direction: column;
    align-items: flex-start;
  }
  .track-form {
    flex-direction: column;
    align-items: stretch;
  }
  .detail-main {
    grid-template-columns: 1fr;
  }
  .detail-points-card ul {
    columns: 1;
  }
  .project-card img {
    height: 190px;
  }

  .chat-widget {
    top: auto;
    right: 10px;
    bottom: calc(14px + env(safe-area-inset-bottom));
    z-index: 80;
  }
  .chat-widget.is-open {
    top: auto;
    right: 0;
    left: 0;
    bottom: calc(8px + env(safe-area-inset-bottom));
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 0 10px;
  }
  .chat-fab {
    width: 72px;
    height: 72px;
  }
  .chat-fab-text {
    font-size: 10px;
    line-height: 1.7;
  }
  .chat-panel {
    width: min(96vw, 430px);
    height: min(70vh, 620px);
    margin-top: 8px;
    border-radius: 12px;
  }
  .chat-head {
    padding: 10px;
  }
  .chat-head b {
    font-size: 16px;
  }
  .chat-head small {
    font-size: 11px;
  }
  .chat-wa-call {
    font-size: 11px;
    padding: 6px 8px;
    max-width: 165px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .chat-body {
    padding: 10px;
  }
  .chat-msg {
    font-size: 13px;
    max-width: 95%;
  }
  .chat-menu {
    padding: 8px 10px 10px;
  }
  .chat-faq-list {
    max-height: 112px;
  }
  .chat-input-wrap {
    padding: 8px;
    grid-template-columns: 1fr 70px;
  }
  .chat-input-wrap input {
    height: 38px;
  }
  .chat-input-wrap button {
    height: 38px;
  }
}

@media (min-width: 769px) and (max-width: 900px) {
  .hero h1 { font-size: 34px; }
  .grid, .project-grid, .trust-grid, .contact-wrap, .footer-grid, .admin-grid, .orders-wrap, .steps, .admin-stat-grid { grid-template-columns: 1fr; }
  .cta-inner { flex-direction: column; align-items: flex-start; }
  .topbar-inner { flex-direction: column; justify-content: center; gap: 4px; padding: 6px 0; }
  .nav { flex-direction: column; justify-content: center; padding: 10px 0; }
  .nav a { margin: 0 12px 0 0; }
  .track-form { flex-direction: column; align-items: stretch; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; }
  .detail-main { grid-template-columns: 1fr; }
  .project-hero h1 { font-size: 34px; }
  .project-lead { font-size: 18px; }
  .detail-points-card ul { columns: 1; }
  .chat-widget {
    right: 12px;
    top: 72px;
  }
  .chat-widget.is-open {
    top: 64px;
  }
  .chat-panel {
    width: min(92vw, 360px);
    height: 68vh;
  }
}
