/* ============================================================
   WebDialer — auth pages (login, signup, forgot-password)
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --brand-blue: #1a56ff;
  --brand-blue-hover: #0f47e5;
  --brand-dark-1: #0a1e4a;
  --brand-dark-2: #0d2559;
  --text-dark: #0f1b3d;
  --text-muted: #6b7488;
  --border: #e5e7eb;
  --bg-light: #f5f7fb;
}

html, body {
  min-height: 100%;
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  color: var(--text-dark);
  background: var(--bg-light);
  -webkit-font-smoothing: antialiased;
}

.auth-page {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  min-height: 100vh;
}

/* ---------------- LEFT ---------------- */
.auth-left {
  position: relative;
  background: linear-gradient(160deg, var(--brand-dark-1) 0%, var(--brand-dark-2) 100%);
  color: #fff;
  padding: 48px 56px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.auth-logo { display: flex; align-items: center; gap: 14px; margin-bottom: 70px; }
.auth-logo-icon {
  width: 46px; height: 46px; border-radius: 10px;
  background: var(--brand-blue);
  display: grid; place-items: center;
  color: #fff; font-size: 18px;
}
.auth-logo-text { font-size: 26px; font-weight: 700; letter-spacing: -0.5px; }

.auth-headline {
  font-size: 42px; font-weight: 800; line-height: 1.15;
  letter-spacing: -1px; margin-bottom: 22px;
}
.auth-headline .accent { color: #2f7dff; display: block; }
.auth-subtitle {
  font-size: 16px; line-height: 1.65;
  color: #c9d3e8; max-width: 420px; margin-bottom: 42px;
}
.auth-features { display: flex; flex-direction: column; gap: 22px; }
.auth-feature { display: flex; align-items: flex-start; gap: 18px; }
.auth-feature-icon {
  width: 46px; height: 46px; border-radius: 10px;
  background: rgba(47,125,255,.15);
  color: #4a90ff;
  display: grid; place-items: center;
  font-size: 18px; flex-shrink: 0;
}
.auth-feature-title { font-size: 16px; font-weight: 600; margin-bottom: 3px; }
.auth-feature-desc  { font-size: 14px; color: #9fb0d0; max-width: 260px; line-height: 1.45; }

/* Decorative world-dots */
.auth-world {
  position: absolute; left: 0; right: 0; bottom: -20px; height: 240px;
  background-image: radial-gradient(rgba(74,144,255,.55) 1.1px, transparent 1.5px);
  background-size: 10px 10px;
  -webkit-mask-image: radial-gradient(ellipse 72% 55% at 50% 100%, #000 40%, transparent 75%);
          mask-image: radial-gradient(ellipse 72% 55% at 50% 100%, #000 40%, transparent 75%);
  opacity: .6; pointer-events: none;
}
.auth-world::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 55%, #4a90ff 3px, transparent 4px),
    radial-gradient(circle at 35% 40%, #4a90ff 3px, transparent 4px),
    radial-gradient(circle at 52% 65%, #4a90ff 3px, transparent 4px),
    radial-gradient(circle at 70% 45%, #4a90ff 3px, transparent 4px),
    radial-gradient(circle at 85% 62%, #4a90ff 3px, transparent 4px);
  filter: drop-shadow(0 0 6px #4a90ff);
}

/* ---------------- RIGHT ---------------- */
.auth-right {
  background: var(--bg-light);
  display: flex; align-items: center; justify-content: center;
  padding: 40px; position: relative;
}
.auth-card {
  background: #fff; width: 100%;
  max-width: 480px; border-radius: 16px;
  padding: 48px 48px 44px;
  box-shadow: 0 4px 30px rgba(15,27,61,.06);
}
.auth-card-wide { max-width: 720px; padding: 40px 56px 44px; }

.auth-top-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: #eaf1ff; color: var(--brand-blue);
  display: grid; place-items: center;
  font-size: 22px; margin: 0 auto 14px;
}

.auth-welcome {
  text-align: center; font-size: 28px; font-weight: 700;
  margin-bottom: 6px; letter-spacing: -.5px;
}
.wave {
  display: inline-block; transform-origin: 70% 70%;
  animation: wave 2.2s ease-in-out infinite;
}
@keyframes wave {
  0%,60%,100% { transform: rotate(0deg); }
  10% { transform: rotate(14deg); }
  20% { transform: rotate(-8deg); }
  30% { transform: rotate(14deg); }
  40% { transform: rotate(-4deg); }
  50% { transform: rotate(10deg); }
}

.auth-card-sub {
  text-align: center; color: var(--text-muted);
  font-size: 15px; margin-bottom: 30px;
}

.auth-field { margin-bottom: 18px; }
.auth-label {
  display: block; font-size: 14px; font-weight: 600;
  margin-bottom: 8px; color: var(--text-dark);
}
.auth-input-wrap { position: relative; }
.auth-input-wrap i.left-icon {
  position: absolute; left: 16px; top: 50%;
  transform: translateY(-50%);
  color: #9aa1b2; font-size: 15px;
}
.auth-input-wrap .toggle-eye {
  position: absolute; right: 16px; top: 50%;
  transform: translateY(-50%);
  color: #9aa1b2; cursor: pointer;
  background: none; border: none; font-size: 15px; padding: 4px;
}
.auth-input, .auth-select {
  width: 100%; height: 50px;
  border: 1px solid var(--border); border-radius: 10px;
  padding: 0 16px 0 44px;
  font-size: 14.5px; font-family: inherit;
  color: var(--text-dark); background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.auth-input::placeholder { color: #a6adbf; }
.auth-input:focus, .auth-select:focus {
  outline: none; border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(26,86,255,.12);
}
.auth-hint { margin-top: 8px; font-size: 12.5px; color: var(--text-muted); }

.auth-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px 22px;
}

/* Phone input */
.phone-wrap {
  display: flex; align-items: center;
  border: 1px solid var(--border); border-radius: 10px;
  height: 50px; overflow: hidden; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.phone-wrap:focus-within {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(26,86,255,.12);
}
.phone-icon { padding: 0 12px 0 16px; color: #9aa1b2; font-size: 15px; }
.country {
  display: flex; align-items: center; gap: 6px;
  padding: 0 10px 0 4px; border-right: 1px solid var(--border);
  height: 100%; cursor: pointer;
  font-size: 14px; color: var(--text-dark); user-select: none;
}
.flag {
  width: 22px; height: 15px; border-radius: 2px;
  background:
    linear-gradient(to bottom,#b22234 0,#b22234 8%,#fff 8%,#fff 15%,
      #b22234 15%,#b22234 23%,#fff 23%,#fff 31%,
      #b22234 31%,#b22234 38%,#fff 38%,#fff 46%,
      #b22234 46%,#b22234 54%,#fff 54%,#fff 62%,
      #b22234 62%,#b22234 69%,#fff 69%,#fff 77%,
      #b22234 77%,#b22234 85%,#fff 85%,#fff 92%,
      #b22234 92%,#b22234 100%);
  position: relative; overflow: hidden; flex-shrink: 0;
}
.flag::before { content: ""; position: absolute; top: 0; left: 0; width: 40%; height: 54%; background: #3c3b6e; }
.country .caret { font-size: 10px; color: #9aa1b2; }
.phone-code { padding: 0 8px; color: var(--text-dark); font-size: 14.5px; }
.phone-input {
  flex: 1; height: 100%;
  border: none; outline: none; background: transparent;
  font-family: inherit; font-size: 14.5px;
  color: var(--text-dark); padding-right: 14px;
}
.phone-input::placeholder { color: #a6adbf; }

/* Select */
.select-wrap { position: relative; }
.select-wrap i.left-icon {
  position: absolute; left: 16px; top: 50%;
  transform: translateY(-50%);
  color: #9aa1b2; font-size: 15px; pointer-events: none;
}
.select-wrap i.caret-icon {
  position: absolute; right: 18px; top: 50%;
  transform: translateY(-50%);
  color: #9aa1b2; font-size: 12px; pointer-events: none;
}
select.auth-select {
  appearance: none; -webkit-appearance: none; -moz-appearance: none;
  padding-right: 40px; cursor: pointer;
}

/* Row */
.auth-row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 8px 0 24px;
}
.auth-remember {
  display: flex; align-items: center; gap: 10px;
  cursor: pointer; user-select: none;
  font-size: 14px; color: var(--text-dark);
}
.auth-remember input, .auth-terms input {
  appearance: none; -webkit-appearance: none;
  width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid var(--border); background: #fff;
  display: grid; place-items: center;
  cursor: pointer; flex-shrink: 0;
  transition: background .15s, border-color .15s;
}
.auth-remember input:checked, .auth-terms input:checked {
  background: var(--brand-blue); border-color: var(--brand-blue);
}
.auth-remember input:checked::after, .auth-terms input:checked::after {
  content: "\f00c"; font-family: "Font Awesome 6 Free"; font-weight: 900;
  color: #fff; font-size: 10px;
}
.auth-forgot {
  color: var(--brand-blue); font-size: 14px;
  font-weight: 500; text-decoration: none;
}
.auth-forgot:hover { text-decoration: underline; }

/* Terms */
.auth-terms {
  display: flex; align-items: center; gap: 10px;
  margin: 20px 0 22px;
  font-size: 14px; color: var(--text-dark); user-select: none;
}
.auth-terms a {
  color: var(--brand-blue); text-decoration: none; font-weight: 500;
}
.auth-terms a:hover { text-decoration: underline; }

/* Buttons */
.auth-btn {
  width: 100%; height: 52px; border-radius: 10px;
  border: none; font-size: 15px; font-weight: 600;
  font-family: inherit; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  transition: background .15s, transform .05s, box-shadow .15s;
}
.auth-btn-primary {
  background: var(--brand-blue); color: #fff;
  box-shadow: 0 6px 18px rgba(26,86,255,.25);
}
.auth-btn-primary:hover { background: var(--brand-blue-hover); }
.auth-btn-primary:active { transform: translateY(1px); }

.auth-divider {
  display: flex; align-items: center; gap: 14px;
  margin: 20px 0; color: var(--text-muted); font-size: 13px;
}
.auth-divider::before, .auth-divider::after {
  content: ""; flex: 1; height: 1px; background: var(--border);
}

.auth-btn-google {
  background: #fff; color: var(--text-dark); border: 1px solid var(--border);
}
.auth-btn-google:hover { background: #fafbfe; border-color: #d5d9e2; }
.g-icon { width: 20px; height: 20px; }

.auth-signup {
  text-align: center; margin-top: 22px;
  font-size: 14px; color: var(--text-muted);
}
.auth-signup a {
  color: var(--brand-blue); font-weight: 600;
  text-decoration: none; margin-left: 4px;
}
.auth-signup a:hover { text-decoration: underline; }

.auth-footer {
  position: absolute; bottom: 20px; left: 0; right: 0;
  text-align: center; color: var(--text-muted); font-size: 13px;
  pointer-events: none;
}

/* Responsive */
@media (max-width: 1000px) {
  .auth-page { grid-template-columns: 1fr; }
  .auth-left { padding: 40px 32px; }
  .auth-logo { margin-bottom: 40px; }
  .auth-headline { font-size: 32px; }
  .auth-world { display: none; }
  .auth-card, .auth-card-wide { padding: 32px 24px; }
  .auth-grid-2 { grid-template-columns: 1fr; }
  .auth-footer { position: static; margin-top: 24px; }
}
