:root {
      --primary: #1677ff;
      --primary-hover: #0567e8;
      --primary-soft: #8ebcff;
      --text: #1f2937;
      --muted: #6b7280;
      --line: #e5e7eb;
      --card: #ffffff;
      --danger: #dc2626;
      --danger-soft: #fee2e2;
      --warning-bg: #fff7ed;
      --warning-border: #fed7aa;
      --warning-text: #9a3412;
    }

    * {
      box-sizing: border-box;
    }

    html,
    body {
      margin: 0;
      min-height: 100%;
      font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;
      color: var(--text);

      background:
        linear-gradient(
          rgba(255, 255, 255, 0.72),
          rgba(255, 255, 255, 0.72)
        ),
        linear-gradient(
          135deg,
          #dbeafe,
          #eff6ff 45%,
          #d1fae5
        );
    }

    body {
      min-height: 100dvh;
      display: grid;
      place-items: center;
      padding: 12px;
    }

    button,
    input {
      font: inherit;
    }

    button:disabled {
      cursor: not-allowed;
      opacity: 0.7;
    }

    .phone {
      width: min(100%, 390px);
      min-height: min(760px, calc(100dvh - 24px));
      background: var(--card);
      border-radius: 14px;
      box-shadow: 0 18px 50px rgba(15, 23, 42, 0.18);
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    .topbar {
      height: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
      border-bottom: 1px solid #f2f4f7;
      color: #a0a7b0;
      font-size: 12px;
      position: relative;
    }

    .dots {
      position: absolute;
      left: 10px;
      display: flex;
      gap: 5px;
    }

    .dots span {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      background: #d6dbe1;
    }

    .content {
      flex: 1;
      display: flex;
      flex-direction: column;
      padding: 22px 28px 18px;
    }

    .brand {
      text-align: center;
      font-size: clamp(34px, 10vw, 46px);
      line-height: 1;
      font-weight: 800;
      letter-spacing: -2px;
      color: var(--primary);
      margin: 8px 0 18px;
    }

    .demo-warning {
      margin-bottom: 16px;
      padding: 10px 12px;
      border: 1px solid var(--warning-border);
      border-radius: 7px;
      background: var(--warning-bg);
      color: var(--warning-text);
      font-size: 12px;
      line-height: 1.5;
      text-align: center;
    }

    .tabs {
      display: grid;
      grid-template-columns: 1fr 1fr;
      border-bottom: 1px solid var(--line);
      margin-bottom: 4px;
    }

    .tab {
      appearance: none;
      border: 0;
      background: transparent;
      padding: 11px 6px;
      font-size: 13px;
      font-weight: 700;
      color: #111827;
      cursor: pointer;
      position: relative;
    }

    .tab.active {
      color: var(--primary);
    }

    .tab.active::after {
      content: "";
      position: absolute;
      left: 8px;
      right: 8px;
      bottom: -1px;
      height: 2px;
      border-radius: 999px;
      background: var(--primary);
    }

    .panel {
      display: none;
    }

    .panel.active {
      display: block;
    }

    .field {
      min-height: 54px;
      display: flex;
      align-items: center;
      gap: 10px;
      border-bottom: 1px solid var(--line);
    }

    .country-code {
      width: 112px;
      flex: 0 0 112px;
      border: 0;
      outline: 0;
      background: transparent;
      color: #374151;
      font-size: 13px;
      font-weight: 700;
      cursor: pointer;
      padding: 14px 4px 14px 0;
    }

    input {
      min-width: 0;
      flex: 1;
      border: 0;
      outline: 0;
      font-size: 15px;
      color: var(--text);
      background: transparent;
      padding: 14px 0;
    }

    input::placeholder {
      color: #c4c8ce;
    }

    .show-password {
      border: 0;
      background: transparent;
      color: #737b86;
      font-size: 12px;
      padding: 10px 0 10px 10px;
      cursor: pointer;
    }

    .message {
      min-height: 20px;
      margin-top: 10px;
      color: var(--danger);
      font-size: 12px;
      line-height: 1.4;
    }

    .spacer {
      flex: 1;
      min-height: 55px;
    }

    .primary-btn,
    .secondary-btn {
      width: 100%;
      min-height: 44px;
      border-radius: 5px;
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.1px;
      cursor: pointer;
      transition:
        transform 0.15s ease,
        background 0.15s ease;
    }

    .primary-btn {
      border: 0;
      background: var(--primary);
      color: #ffffff;
    }

    .primary-btn:hover {
      background: var(--primary-hover);
    }

    .primary-btn:active,
    .secondary-btn:active {
      transform: translateY(1px);
    }

    .or {
      text-align: center;
      font-size: 12px;
      font-weight: 700;
      margin: 10px 0;
      color: #374151;
    }

    .secondary-btn {
      border: 1px solid #cfe1fb;
      background: #ffffff;
      color: var(--primary);
    }

    .links {
      display: grid;
      gap: 10px;
      margin-top: 20px;
    }

    a {
      color: var(--primary);
      text-decoration: none;
      font-size: 13px;
    }

    .signup {
      margin-top: 34px;
      text-align: center;
      font-size: 12px;
      color: #4b5563;
    }

    .qr-box {
      margin: 28px auto 0;
      width: min(210px, 70vw);
      aspect-ratio: 1;
      border: 1px solid var(--line);
      border-radius: 10px;
      display: grid;
      place-items: center;

      background:
        linear-gradient(
          90deg,
          #111 10%,
          transparent 10% 20%,
          #111 20% 30%,
          transparent 30% 40%,
          #111 40% 50%,
          transparent 50% 60%,
          #111 60% 70%,
          transparent 70% 80%,
          #111 80% 90%,
          transparent 90%
        ),
        linear-gradient(
          #111 10%,
          transparent 10% 20%,
          #111 20% 30%,
          transparent 30% 40%,
          #111 40% 50%,
          transparent 50% 60%,
          #111 60% 70%,
          transparent 70% 80%,
          #111 80% 90%,
          transparent 90%
        );

      background-size: 24px 24px;
      opacity: 0.8;
    }

    .qr-note {
      text-align: center;
      margin-top: 18px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.5;
    }

    .loading-screen,
    .error-screen {
      flex: 1;
      text-align: center;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .loading-screen[hidden],
    .error-screen[hidden],
    .login-screen[hidden] {
      display: none;
    }

    .loading-icon {
      width: 68px;
      height: 68px;
      margin: 0 auto 22px;
      border: 7px solid #dbeafe;
      border-top-color: var(--primary);
      border-radius: 50%;
      animation: spin 1s linear infinite;
    }

    @keyframes spin {
      to {
        transform: rotate(360deg);
      }
    }

    .loading-screen h2,
    .error-screen h2 {
      margin: 0 0 12px;
      font-size: 21px;
    }

    .loading-description {
      margin: 0 0 28px;
      color: var(--muted);
      font-size: 13px;
      line-height: 1.5;
    }

    .progress-track {
      width: 100%;
      height: 12px;
      background: #e5e7eb;
      border-radius: 999px;
      overflow: hidden;
    }

    .progress-bar {
      width: 0%;
      height: 100%;
      border-radius: inherit;
      background: var(--primary);
    }

    .progress-text {
      margin: 14px 0 0;
      color: var(--primary);
      font-size: 20px;
      font-weight: 800;
    }

    .error-icon{
    width:90px;
    height:90px;

    margin:0 auto 24px;

    display:flex;
    align-items:center;
    justify-content:center;

    border-radius:50%;

    background:linear-gradient(180deg,#ffe5e5,#ffd1d1);

    box-shadow:
        0 10px 25px rgba(220,38,38,.15),
        inset 0 2px 8px rgba(255,255,255,.9);

    animation:pulseError 2s infinite;
}

.error-icon span{
    color:#dc2626;
    font-size:44px;
    font-weight:800;
    line-height:1;
}

    .error-screen h2{
    margin:18px 0 12px;
    font-size:30px;
    font-weight:700;
    color:#1f2937;
    letter-spacing:-0.5px;
}

.error-screen p{
    max-width:320px;
    margin:0 auto 28px;

    color:#4b5563;

    font-size:16px;
    font-weight:400;
    line-height:1.75;

    text-align:center;
}

    .support-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;

    padding: 18px 20px;
    margin-bottom: 22px;

    border: 1px solid #fecaca;
    border-radius: 12px;

    background: #fff8f8;

    color: #b42318;

    font-size: 16px;
    font-weight: 500;
    line-height: 1.7;
    text-align: center;

    box-shadow: 0 4px 12px rgba(220, 38, 38, .08);
}

    @media (max-width: 480px) {
      body {
        padding: 0;
        background: #ffffff;
      }

      .phone {
        width: 100%;
        min-height: 100dvh;
        border-radius: 0;
        box-shadow: none;
      }

      .topbar {
        display: none;
      }

      .content {
        padding:
          max(28px, env(safe-area-inset-top))
          24px
          max(18px, env(safe-area-inset-bottom));
      }

      .brand {
        margin-top: 14px;
      }
    }
    .messages-screen {
  position: relative;
  flex: 1;
  min-height: 620px;
  background: #f4f6f8;
  margin: -22px -28px -18px;
  overflow: hidden;
}

.messages-screen[hidden] {
  display: none;
}

.messages-header {
  height: 70px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: #1677ff;
  color: #ffffff;
}

.messages-header strong {
  display: block;
  font-size: 16px;
}

.messages-header span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  opacity: 0.8;
}

.back-button {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 30px;
  line-height: 30px;
  cursor: pointer;
}

.message-notice {
  padding: 10px 14px;
  background: #fff7ed;
  border-bottom: 1px solid #fed7aa;
  color: #9a3412;
  font-size: 12px;
  text-align: center;
}

.conversation-list {
  padding: 8px 0;
  background: #ffffff;
}

.conversation {
  min-height: 78px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #edf0f2;
}

.avatar {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #dbeafe;
  color: #1677ff;
  font-size: 18px;
  font-weight: 800;
}

.conversation-content {
  min-width: 0;
  flex: 1;
}

.conversation-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.conversation-top strong {
  font-size: 14px;
}

.conversation-top span {
  color: #9ca3af;
  font-size: 11px;
}

.conversation-content p {
  margin: 7px 0 0;
  color: #6b7280;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blurred-content {
  filter: blur(7px);
  user-select: none;
  pointer-events: none;
}

.blur-lock {
  position: fixed;
  top: 50%;
  left: 50%;

  width: min(86vw, 330px);
  padding: 24px 20px 20px;

  transform: translate(-50%, -50%);

  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 18px;

  background: rgba(255, 255, 255, 0.97);

  box-shadow:
    0 24px 60px rgba(15, 23, 42, 0.25),
    0 2px 8px rgba(15, 23, 42, 0.06);

  text-align: center;
  backdrop-filter: blur(12px);
  z-index: 9999;
}

.warning-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
}

.age-icon {
  width: 62px;
  height: 62px;

  display: grid;
  place-items: center;

  border: 6px solid #ef4444;
  border-radius: 50%;

  background: #ffffff;
  color: #111827;

  font-size: 22px;
  font-weight: 900;
  line-height: 1;

  box-shadow: 0 8px 18px rgba(239, 68, 68, 0.16);
}



.lock-title {
  display: block;
  margin-bottom: 8px;

  color: #111827;

  font-size: 18px;
  font-weight: 800;
  line-height: 1.35;
}

.lock-description {
  margin: 0;

  color: #64748b;

  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  text-align: center;
}

.policy-warning {
  display: flex;
  align-items: flex-start;
  gap: 9px;

  margin-top: 16px;
  padding: 11px 12px;

  border: 1px solid #fecaca;
  border-radius: 11px;

  background: #fff7f7;
  color: #991b1b;

  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
  text-align: left;
}

.policy-warning-icon {
  flex: 0 0 auto;

  width: 20px;
  height: 20px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: #ef4444;
  color: #ffffff;

  font-size: 13px;
  font-weight: 900;
}

.blur-lock strong {
  display: block;
  color: #111827;
  font-size: 16px;
}

.blur-lock p {
  margin: 9px 0 0;
  color: #6b7280;
  font-size: 12px;
  line-height: 1.5;
}

@media (max-width: 480px) {
  .messages-screen {
    min-height: 100dvh;
    margin:
      calc(-1 * max(28px, env(safe-area-inset-top)))
      -24px
      calc(-1 * max(18px, env(safe-area-inset-bottom)));
  }

  .messages-header {
    padding-top: max(12px, env(safe-area-inset-top));
    height: calc(70px + env(safe-area-inset-top));
  }
}

.avatar-1 { background: linear-gradient(135deg, #dbeafe, #93c5fd); color: #1d4ed8; }
.avatar-2 { background: linear-gradient(135deg, #fce7f3, #f9a8d4); color: #be185d; }
.avatar-3 { background: linear-gradient(135deg, #dcfce7, #86efac); color: #15803d; }
.avatar-4 { background: linear-gradient(135deg, #fef3c7, #fcd34d); color: #a16207; }
.avatar-5 { background: linear-gradient(135deg, #ede9fe, #c4b5fd); color: #6d28d9; }
.avatar-6 { background: linear-gradient(135deg, #cffafe, #67e8f9); color: #0e7490; }
.avatar-7 { background: linear-gradient(135deg, #fee2e2, #fca5a5); color: #b91c1c; }
.avatar-8 { background: linear-gradient(135deg, #e0e7ff, #a5b4fc); color: #4338ca; }

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

.conversation:nth-child(3n) .unread-dot,
.conversation:nth-child(4n) .unread-dot {
  visibility: hidden;
}

.conversation-list {
  min-height: calc(100% - 108px);
}

  

/* ===== GIAO DIỆN SMARTPHONE HIỆN ĐẠI ===== */
:root {
  --primary: #1976ff;
  --primary-hover: #0f62db;
  --text: #172033;
  --muted: #758096;
  --line: #e8edf5;
}

html, body {
  background:
    radial-gradient(circle at 15% 12%, rgba(94, 166, 255, .30), transparent 32%),
    radial-gradient(circle at 88% 85%, rgba(106, 232, 207, .24), transparent 30%),
    linear-gradient(145deg, #dbeafe 0%, #eef5ff 45%, #e6fff8 100%);
}

body {
  padding: 22px;
}

.phone {
  width: min(100%, 430px);
  min-height: min(860px, calc(100dvh - 44px));
  border: 8px solid rgba(255,255,255,.88);
  border-radius: 36px;
  box-shadow:
    0 30px 80px rgba(17, 45, 89, .22),
    0 8px 24px rgba(17, 45, 89, .12),
    inset 0 0 0 1px rgba(34, 69, 120, .06);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(18px);
}

.topbar {
  height: 42px;
  border-bottom: 0;
  color: #8792a6;
  font-weight: 700;
  letter-spacing: .2px;
}

.topbar::after {
  content: "";
  position: absolute;
  top: 9px;
  left: 50%;
  width: 92px;
  height: 24px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: #101827;
  opacity: .96;
}

.topbar { font-size: 0; }
.topbar .dots { display: none; }

.content {
  padding: 24px 26px 24px;
}

.login-screen {
  min-height: 740px;
  display: flex;
  flex-direction: column;
}

.brand-wrap {
  text-align: center;
  margin: 16px 0 20px;
}

.app-logo {
  width: 100px;
  height: 94px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  background: linear-gradient(145deg, #3e96ff, #1168f2);
  color: #fff;
  font-size: 34px;
  font-weight: 900;
  box-shadow:
    0 14px 30px rgba(25, 118, 255, .28),
    inset 0 1px 0 rgba(255,255,255,.35);
}

.brand {
  margin: 0;
  font-size: 32px;
  letter-spacing: -.8px;
  color: #172033;
}

.brand-subtitle {
  margin: 8px auto 0;
  max-width: 280px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.demo-warning {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-bottom: 22px;
  padding: 10px 12px;
  border: 1px solid #d9ebff;
  border-radius: 999px;
  background: #f3f9ff;
  color: #2468b7;
  font-size: 11.5px;
  font-weight: 700;
}

.demo-warning span {
  width: 19px;
  height: 19px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #dcecff;
  font-size: 11px;
}

.tabs {
  margin-bottom: 18px;
  padding: 4px;
  border: 0;
  border-radius: 14px;
  background: #f3f6fb;
  gap: 4px;
}

.tab {
  min-height: 42px;
  padding: 10px 8px;
  border-radius: 11px;
  color: #7b8496;
  font-size: 12px;
}

.tab.active {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 5px 14px rgba(29, 65, 120, .10);
}

.tab.active::after { display: none; }

.panel.active {
  display: grid;
  gap: 13px;
}

.field {
  min-height: 58px;
  padding: 0 14px;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfcfe;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.field:focus-within {
  border-color: #8ebcff;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(25,118,255,.10);
}

.field-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eaf3ff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.country-code {
  width: 118px;
  flex-basis: 118px;
  padding: 14px 2px;
  color: #2f3a4f;
  font-size: 12.5px;
}

input {
  font-size: 15px;
  color: #172033;
}

input::placeholder { color: #a9b2c1; }

.show-password {
  min-width: 44px;
  color: var(--primary);
  font-weight: 800;
}

.message {
  min-height: 18px;
  margin-top: 0;
  padding-left: 4px;
}

.spacer {
  min-height: 32px;
}

.primary-btn,
.secondary-btn {
  min-height: 54px;
  border-radius: 16px;
  font-size: 13px;
  letter-spacing: .25px;
}

.primary-btn {
  background: linear-gradient(135deg, #2b8cff, #1267f1);
  box-shadow: 0 12px 24px rgba(25,118,255,.25);
}

.primary-btn:hover {
  background: linear-gradient(135deg, #197cff, #075be1);
}

.secondary-btn {
  border-color: #dce9fb;
  background: #f7faff;
  color: #2468b7;
}

.or {
  position: relative;
  margin: 15px 0;
  color: #a1a9b7;
  font-size: 11px;
}

.or::before,
.or::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 42%;
  height: 1px;
  background: #e6ebf2;
}
.or::before { left: 0; }
.or::after { right: 0; }

.links {
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.links a {
  padding: 12px 8px;
  border-radius: 12px;
  background: #f7f9fc;
  text-align: center;
  color: #54708f;
  font-size: 11.5px;
  font-weight: 700;
}

.signup {
  margin-top: auto;
  padding-top: 24px;
  color: #9ba4b3;
}

@media (max-width: 480px) {
  body {
    padding: 0;
    background: #fff;
  }

  .phone {
    width: 100%;
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .topbar {
    display: flex;
    height: max(42px, env(safe-area-inset-top));
  }

  .topbar::after {
    top: max(9px, calc(env(safe-area-inset-top) - 24px));
  }

  .content {
    padding: 18px 22px max(22px, env(safe-area-inset-bottom));
  }

  .login-screen {
    min-height: calc(100dvh - max(42px, env(safe-area-inset-top)) - 40px);
  }

  .brand-wrap {
    margin-top: 8px;
  }

  
