/* Klinik365 Pro — giriş sayfası
   Renkler paneldeki giriş ekranıyla aynı (lacivert → mavi → turkuaz). */

:root {
  --brand-navy: #0b2d6b;
  --brand-blue: #1b84ff;
  --brand-teal: #17c6c6;
  --brand-gradient: linear-gradient(160deg, var(--brand-navy) 0%, var(--brand-blue) 55%, var(--brand-teal) 100%);

  --bg: #f4f7fb;
  --surface: #ffffff;
  --field: #f6f8fb;
  --tab-active: #ffffff;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --text: #0f172a;
  --text-muted: #64748b;
  --primary: #1670e8;
  --primary-hover: #0f5fcc;
  --link: #1670e8;
  --focus-ring: rgba(27, 132, 255, 0.22);
  --danger: #e11d48;

  --info-bg: #eaf3ff;
  --info-text: #0b4fa8;
  --info-border: #cfe2ff;
  --success-bg: #e8f8f1;
  --success-text: #0f7a4f;
  --success-border: #c4eedb;
  --badge-bg: #fff4d6;
  --badge-text: #8a5a00;
  --badge-border: #ffe2a1;

  --google-bg: #ffffff;
  --google-border: #dadce0;
  --google-text: #1f1f1f;
  --google-hover: #f7f8f8;

  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 16px 40px rgba(15, 23, 42, 0.10);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c111b;
    --surface: #141b29;
    --field: #1a2233;
    --tab-active: #273149;
    --border: #263045;
    --border-strong: #34405a;
    --text: #e6ebf3;
    --text-muted: #93a0b5;
    --link: #6aaeff;
    --focus-ring: rgba(59, 149, 255, 0.32);
    --danger: #fb7185;

    --info-bg: #11243f;
    --info-text: #9cc7ff;
    --info-border: #1d3a63;
    --success-bg: #0f2a20;
    --success-text: #7ee2b5;
    --success-border: #1a4a37;
    --badge-bg: #33270a;
    --badge-text: #ffd27a;
    --badge-border: #5a4413;

    --google-bg: #131314;
    --google-border: #8e918f;
    --google-text: #e3e3e3;
    --google-hover: #1f1f20;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 16px 40px rgba(0, 0, 0, 0.4);
    color-scheme: dark;
  }
}

/* ---- Temel ---- */

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

[hidden] { display: none !important; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* Satır içi ikonlar (çizgi stili) */
.i {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---- Logo ---- */

.logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.logo img { border-radius: 12px; box-shadow: 0 6px 20px rgba(3, 18, 48, 0.35); }

.logo-word {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.logo-word b { font-weight: 800; color: #8ff0f0; }

.logo-pro {
  padding: 3px 8px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.16);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ---- Marka bloğu (geniş ekran) ---- */

.brand {
  display: none;
  position: relative;
  overflow: hidden;
  color: #fff;
  background: var(--brand-gradient);
}

/* Nokta deseni */
.brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.16) 1px, transparent 1px);
  background-size: 22px 22px;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 65%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, #000 35%, #000 65%, transparent 100%);
}

/* Logodaki halkanın büyük, soluk kopyası */
.brand-ring {
  position: absolute;
  right: -170px;
  bottom: -170px;
  width: 560px;
  height: 560px;
  opacity: 0.09;
  fill: #fff;
}

.brand-ring path {
  fill: none;
  stroke: #fff;
  stroke-width: 4;
  stroke-linecap: round;
}

.brand-inner {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 48px;
  width: 100%;
  padding: 48px 56px;
}

.brand-copy { max-width: 540px; }

.brand-title {
  margin: 0 0 16px;
  font-size: clamp(30px, 2.7vw, 40px);
  font-weight: 750;
  line-height: 1.15;
  letter-spacing: -0.025em;
}

.brand-lead {
  margin: 0 0 36px;
  font-size: 16px;
  opacity: 0.85;
}

.features {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.features li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
}

.feature-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.12);
}

.feature-icon svg { width: 16px; height: 16px; }

.brand-foot {
  margin: 0;
  font-size: 13px;
  opacity: 0.7;
}

/* ---- Giriş tarafı ---- */

.auth {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 32px 16px;
}

/* Dar ekranda marka rengi üstte bant olarak görünür, kart üzerine biner */
.auth::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 230px;
  background: var(--brand-gradient);
}

.auth > * { position: relative; }

.auth-foot {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}

@media (min-width: 992px) {
  .page { flex-direction: row; }

  .brand {
    display: flex;
    flex: 0 0 46%;
    max-width: 680px;
  }

  .auth { padding: 48px 32px; }
  .auth::before,
  .logo--mobile,
  .auth-foot { display: none; }
}

/* ---- Kart ---- */

.card {
  width: 100%;
  max-width: 440px;
  padding: 36px 32px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

@media (max-width: 480px) {
  .card { padding: 28px 20px; border-radius: 16px; }
}

.card h1 {
  margin: 0 0 4px;
  font-size: 26px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

.card-sub {
  margin: 0 0 24px;
  color: var(--text-muted);
}

.card-help {
  margin: 24px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
}

.preview-badge {
  display: inline-block;
  margin-bottom: 14px;
  padding: 3px 9px;
  border: 1px solid var(--badge-border);
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ---- Bilgi notu ---- */

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 20px;
  padding: 12px 14px;
  border: 1px solid var(--info-border);
  border-radius: 10px;
  background: var(--info-bg);
  color: var(--info-text);
  font-size: 14px;
}

.notice svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.notice .notice-success { display: none; }

.notice[data-kind="success"] {
  border-color: var(--success-border);
  background: var(--success-bg);
  color: var(--success-text);
}

.notice[data-kind="success"] .notice-info { display: none; }
.notice[data-kind="success"] .notice-success { display: block; }

/* ---- Düğmeler ---- */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.btn:disabled { cursor: progress; opacity: 0.85; }

.btn-primary {
  margin-top: 8px;
  background: var(--primary);
  color: #fff;
}

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

.btn-google {
  border-color: var(--google-border);
  background: var(--google-bg);
  color: var(--google-text);
}

.btn-google:hover:not(:disabled) { background: var(--google-hover); }
.btn-google svg { width: 18px; height: 18px; }

/* Bekleme göstergesi */
.btn.is-busy::before {
  content: "";
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-google.is-busy svg { display: none; }

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

.link {
  padding: 0;
  border: 0;
  background: none;
  color: var(--link);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
}

.link:hover:not(:disabled) { text-decoration: underline; }
.link:disabled { color: var(--text-muted); font-weight: 500; cursor: default; }
.link:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 4px; }

/* ---- Ayırıcı ---- */

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0;
  color: var(--text-muted);
  font-size: 13px;
}

.divider::before,
.divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ---- Sekmeler ---- */

.tabs {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 20px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--field);
}

.tabs-indicator {
  position: absolute;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc(50% - 4px);
  border-radius: 9px;
  background: var(--tab-active);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.12);
  transition: transform 0.2s ease;
}

.tabs[data-active="phone"] .tabs-indicator { transform: translateX(100%); }

.tab {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.tab[aria-selected="true"] { color: var(--text); }
.tab svg { width: 16px; height: 16px; }
.tab:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }

/* ---- Form alanları ---- */

.field { margin-bottom: 16px; }

label {
  display: block;
  margin-bottom: 6px;
  font-size: 13.5px;
  font-weight: 600;
}

.input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--field);
  color: var(--text);
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.input::placeholder { color: var(--text-muted); opacity: 0.75; }
.input:hover { border-color: var(--border-strong); }

.input:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.input.is-invalid,
.otp.is-invalid .input { border-color: var(--danger); }

.field-hint,
.field-error {
  margin: 6px 0 0;
  font-size: 13px;
}

.field-hint { color: var(--text-muted); }
.field-error { color: var(--danger); }

/* Parola göster/gizle */
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 48px; }

.pw-toggle {
  position: absolute;
  top: 50%;
  right: 5px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transform: translateY(-50%);
}

.pw-toggle:hover { background: var(--border); color: var(--text); }
.pw-toggle:focus-visible { outline: 2px solid var(--primary); }
.pw-toggle svg { width: 20px; height: 20px; }
.pw-toggle .ic-hide,
.pw-toggle[aria-pressed="true"] .ic-show { display: none; }
.pw-toggle[aria-pressed="true"] .ic-hide { display: block; }

/* Telefon: ülke kodu + numara tek kutu gibi görünür */
.phone {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--field);
  transition: border-color 0.15s, box-shadow 0.15s, background-color 0.15s;
}

.phone:hover { border-color: var(--border-strong); }

.phone:focus-within {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.phone:has(.is-invalid) { border-color: var(--danger); }

.phone-cc {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 14px;
  border-right: 1px solid var(--border);
  font-weight: 600;
}

.phone-cc svg { width: 21px; height: 14px; border-radius: 2px; }

.phone .input,
.phone .input:focus {
  border: 0;
  background: transparent;
  box-shadow: none;
  letter-spacing: 0.02em;
}

/* SMS kodu kutuları */
.code-info {
  margin: 0 0 16px;
  color: var(--text-muted);
}

.code-info b { color: var(--text); white-space: nowrap; }

.otp {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.otp .input {
  height: 54px;
  padding: 0;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
}

.code-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.6s !important;
  }
}
