/* ===== RESET ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --green: #2fa845;
  --green-dark: #1f9a3b;
  --green-light: #57c96a;
  --green-text: #1f9a3b;
  --ink: #1f2a37;
  --muted: #98a2a6;
  --line: #e8efe9;
  --radius: 16px;
  --app-max-width: 430px;
  --app-padding-top: 16px;
  --app-padding-x: 18px;
  --app-padding-bottom: 36px;
}

html {
  min-height: 100%;
  background: #fff;
  overflow-x: clip;
  overscroll-behavior-y: none;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  width: 100%;
  max-width: 100%;
  font-family: Roboto, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  background: #fff;
  color: var(--green-text);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

img {
  display: block;
  max-width: 100%;
}

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

.app {
  width: 100%;
  max-width: var(--app-max-width);
  min-height: 100vh;
  margin: 0 auto;
  padding: 6px var(--app-padding-x) var(--app-padding-bottom);
  background: #f4faf5 url('image/bg.jpg') center top / cover no-repeat;
}

/* ===== HEADER ===== */
.header {
  position: relative;
  width: 100%;
  max-width: var(--app-max-width);
  margin: 0 auto;
  background: #eef7f0;
}

.header-inner {
  position: relative;
  max-width: 430px;
  margin: 0 auto;
  padding: 16px 18px 6px;
  border-bottom: 2px solid #bfe8c4;
}

.back-btn {
  position: absolute;
  left: 18px;
  top: 14px;
  width: 58px;
  height: 30px;
  border-radius: 999px;
  background: #398B17;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 3px 8px rgba(47, 168, 69, .35);
}

.back-btn img {
  width: 18px;
  height: auto;
}

.head-title {
  text-align: center;
}

.ht-thin {
  display: block;
  font-family: Roboto;
  font-weight: 900;
  font-size: 23.91px;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  vertical-align: middle;
  text-transform: uppercase;
  color: #9aa0a6;

}

.ht-bold {
  display: block;
  color: var(--green-text);
  font-family: Roboto;
  font-size: 31px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1.15;
}

/* ===== TABS ===== */
.tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 0px 0 6px;
}

.tab {
  border-radius: 16px;
  overflow: hidden;
  background: #398B17;
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(31, 154, 59, .10);
  display: flex;
  flex-direction: column;
}

.tab-icon {
  padding: 16px 6px 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  background: #fff;
}

.tab-icon img {
  height: 54px;
  width: auto;
}

.tab-label {
  background: #398B17;
  color: #fff;
  font-family: Inter;
  font-weight: 800;
  font-size: 15.66px;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-transform: uppercase;
  padding: 10px 4px;
}

.tab.active {
  border: 2px solid #5cce72;
  box-shadow: 0 0 0 2px rgba(92, 206, 114, .30), 0 3px 14px rgba(92, 206, 114, .45);
}

/* ===== MENU CARDS ===== */
.menu {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin-bottom:10px;
}

.menu-panel:not(.active) {
  display: none;
}

.card {
  border: 1.04px solid transparent;
  border-left-width: 1.04px;
  border-radius: 10.33px;
  background:
    linear-gradient(#fff, #fff) padding-box,
    linear-gradient(140deg, #74cf83 0%, #d9ecdb 28%, #ececec 55%) border-box;
  padding: 14px 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0px 1.03px 5.16px 0px #99999959;
  min-height: 78px;
}

.card-icon {
  height: 40px;
  width: 40px;
  object-fit: contain;
  flex: 0 0 auto;
}

.card-text {
  flex: 1 1 auto;
  min-width: 0;
  font-weight: 800;
  font-family: Roboto;
  font-size: 14px;
  line-height: 1.22;
  color: #5E5E5E;
  word-break: keep-all;
}

.hotline {
  background: linear-gradient(180deg, #ecfaef 0%, #ddf5e3 100%);
  border: 1px solid #d0efd6;
  border-radius: 18px;
  padding: 14px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0 10px;
}

.hotline-phone {
  width: 62px;
  height: 62px;
  flex: 0 0 auto;
  transform-origin: center;
  animation: phone-ring 1s ease-in-out infinite;
}

@keyframes phone-ring {
  0%, 60%, 100% { transform: rotate(0); }
  5%  { transform: rotate(-14deg); }
  10% { transform: rotate(14deg); }
  15% { transform: rotate(-12deg); }
  20% { transform: rotate(12deg); }
  25% { transform: rotate(-8deg); }
  30% { transform: rotate(8deg); }
  35% { transform: rotate(-4deg); }
  40% { transform: rotate(4deg); }
  45% { transform: rotate(0); }
}

@media (prefers-reduced-motion: reduce) {
  .hotline-phone { animation: none; }
}

.hotline-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hl-small {
  color: var(--green-text);
  font-weight: 700;
  font-family: Inter;
  font-weight: 700;
  font-style: Bold;
  font-size: 10.42px;
  letter-spacing: .4px;
}

.hl-number {
  color: var(--green-text);
  font-size: 22px;
  font-weight: 900;
  font-family: Inter;
  letter-spacing: .5px;
  white-space: nowrap;
}

.hl-sub {
  color: #8ba18f;
  font-size: 13px;
  font-family: Inter;
  font-weight: 500;
  font-style: Medium;
  font-size: 10.42px;
  leading-trim: NONE;
  letter-spacing: 0%;
  vertical-align: middle;
}

.hotline-star {
  width: 92px;
  height: auto;
  flex: 0 0 auto;
}

/* ===== CONTACT CARD ===== */
.contact-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0px 1.04px 5.21px 0px #99999959;
  padding: 16px 16px 14px;
  margin-bottom: 12px;
}

.cc-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: #2fa845;
  font-family: Roboto;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .5px;
  margin-bottom: 8px;
}

.cc-heading::before,
.cc-heading::after {
  content: "";
  flex: 0 0 44px;
  height: 2px;
  border-radius: 2px;
}

.cc-heading::before {
  background: linear-gradient(90deg, transparent, #7cc98a);
}

.cc-heading::after {
  background: linear-gradient(90deg, #7cc98a, transparent);
}

.cc-cols {
  display: flex;
  align-items: center;
}

.contact-col {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 6px;
  min-width: 0;
}

.cc-icon {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-col:first-child {
  justify-content: flex-start;
}

.contact-col:last-child {
  justify-content: flex-end;
}

.contact-col:first-child .cc-text,
.contact-col:last-child .cc-text {
  flex: 1 1 auto;
}

.contact-col img {
  max-width: none;
  object-fit: contain;
  flex: 0 0 auto;
}

.contact-col:first-child img {
  width: 40px;
  height: 40px;
}

.contact-col:last-child img {
  width: 50px;
  height: 50px;
}

.cc-text {
  flex: 0 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4px;
  min-width: 0;
}

.contact-div {
  flex: 0 0 2px;
  width: 2px;
  height: 52px;
  margin: 0 6px;
  position: relative;
  left: -8px;
  align-self: center;
  background: linear-gradient(180deg, transparent, #9ed6a8 20%, #9ed6a8 80%, transparent);
}

.cc-title {
  color: #5E5E5E;
  font-weight: 800;
  font-size: 17px;
  font-family: Inter;
}

.cc-sub {
  color: #2fa845;
  font-weight: 700;
  font-family: Inter;
  font-weight: 700;
  font-style: Bold;
  font-size: 11px;
  leading-trim: NONE;
  letter-spacing: 0%;
  vertical-align: middle;
}

/* ===== SPEED LINKS ===== */
.speed-head {
  display: flex;
  align-items: center;
  font-family: Roboto;
  gap: 9px;
  font-weight: 800;
  color: var(--green-text);
  font-size: 18px;
  letter-spacing: .3px;
  margin: 4px 0 10px;
}

.sh-bar {
  width: 5px;
  height: 22px;
  border-radius: 3px;
  background: var(--green);
  flex: 0 0 auto;
}

.speed-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.speed-card {
  background: #fff;
  border: 1px solid #ecefec;
  border-radius: 14px;
  padding: 12px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0px 1.03px 5.17px 0px #99999959;
}

.sc-body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.sc-name {
  display: flex;
  align-items: center;
  font-family: Roboto;
  gap: 7px;
  font-weight: 800;
  color: var(--ink);
  font-size: 15px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #2f6bed;
  flex: 0 0 auto;
}

.status {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.ping {
  align-self: flex-start;
  font-size: 12px;
  font-weight: 800;
  padding: 3px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.sc-green .ping {
  background: #e3f7e8;
  color: #2fa84a;
}

.sc-amber .ping {
  background: #fdefda;
  color: #ef9d34;
}

.sc-purple .ping {
  background: #efe8fb;
  color: #8b5cf6;
}

/* ===== IFRAME BOX (master) ===== */
body.iframe-open {
  overflow: hidden;
  background: #E3E3E3;
}

#box-iframe {
  display: none;
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: var(--app-max-width);
  height: 100dvh;
  z-index: 1000;
  background: #fff;
  /* padding: var(--app-padding-top) var(--app-padding-x) var(--app-padding-bottom); */
  box-sizing: border-box;
}

#draggable {
  position: relative;
  width: 100%;
  height: 100%;
}

#show-iframe-open {
  width: 100%;
  height: 100%;
}

.code-iframe {
  display: none;
  width: 100%;
  height: 100%;
}

.code-iframe.active {
  display: block;
}

.chat-dialog {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.iframe-toolbar {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1002;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  background: transparent;
  margin-top: 9px;
  margin-right: 12px;
}

.iframe-toolbar.is-visible {
  display: flex;
}

.iframe-toolbar__btn {
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .95);
  color: #33413a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-sizing: border-box;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .18), 0 1px 3px rgba(0, 0, 0, .12);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  -webkit-tap-highlight-color: transparent;
}

.iframe-toolbar__btn:hover {
  background: #fff;
  transform: scale(1.08);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .24), 0 2px 4px rgba(0, 0, 0, .12);
}

.iframe-toolbar__btn:active {
  transform: scale(.94);
}

.iframe-toolbar__btn img {
  width: 20px;
  height: 20px;
  display: block;
}

.iframe-toolbar__icon {
  width: 16px;
  height: 16px;
  display: block;
  flex: 0 0 auto;
}

/* ===== NARROW PHONES ===== */
@media (max-width: 400px) {
  :root {
    --app-padding-top: 14px;
    --app-padding-x: 12px;
    --app-padding-bottom: 32px;
  }

  .app {
    padding: 6px var(--app-padding-x) var(--app-padding-bottom);
  }

  .header-inner {
    padding: 14px 12px;
  }

  .card {
    padding: 13px 9px;
    gap: 9px;
  }

  .card-icon {
    height: 38px;
    width: 40px;
  }

  .ht-thin {
    font-size: 19px;
  }

  .ht-bold {
    font-size: 26px;
  }

  .tab-label {
    font-size: 13px;
  }

  .tab-icon img {
    height: 46px;
  }

  .hl-number {
    font-size: 21px;
  }

  .hotline-star {
    width: 78px;
  }

  .hotline-phone {
    width: 54px;
    height: 54px;
  }

  .cc-title {
    font-size: 14px;
  }

  .cc-sub {
    font-size: 11px;
  }

  .contact-col:first-child img {
    width: 34px;
    height: 34px;
  }

  .contact-col:last-child img {
    width: 42px;
    height: 42px;
  }

  .speed-head {
    font-size: 16px;
  }

  .speed-card {
    padding: 10px 8px;
  }

  .sc-name {
    font-size: 13px;
  }

  .status {
    font-size: 11px;
    padding: 3px 9px;
  }
}

@media (max-width: 360px) {
  .card {
    padding: 12px 8px;
    gap: 8px;
  }

  .card-icon {
    height: 38px;
    width: 40px;
  }

  .card-text {
    font-size: 12.5px;
  }

  .sc-name {
    font-size: 12px;
  }

  .status {
    padding: 3px 7px;
  }
}