:root {
  --bg: #f4f6fa;
  --bg-white: #ffffff;
  --brand-navy: #0a3d6e;
  --brand-navy-dark: #072d52;
  --brand-orange: #f28c00;
  --brand-orange-light: #ffa726;
  --ink: #0a3d6e;
  --muted: #71717a;
  --line: #e4e4e7;
  --accent: #f28c00;
  --accent-bg: #fff4e6;
  --error: #dc2626;
  --radius: 24px;
  --radius-lg: 32px;
  --shadow-sm: 0 8px 30px -8px rgba(9, 9, 11, 0.08);
  --max: 1200px;
}

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

html { overflow-x: hidden; }

body {
  font-family: "Manrope", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

header {
  position: fixed; inset: 16px 16px auto 16px; z-index: 50;
  max-width: calc(var(--max) + 48px); margin: 0 auto;
}

.header-pill {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 10px 10px 20px;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 100px;
  box-shadow: var(--shadow-sm);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 40px; width: auto; display: block; object-fit: contain; }
.brand-name { font-size: 1.05rem; font-weight: 800; letter-spacing: -.03em; line-height: 1; white-space: nowrap; }
.brand-name .medturkey { color: var(--brand-navy); }
.brand-name .go { color: var(--brand-orange); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 22px; border-radius: 100px; font-weight: 700;
  font-size: .84rem; border: none; cursor: pointer; transition: .25s;
  font-family: inherit;
}
.btn:disabled { opacity: .65; cursor: not-allowed; transform: none !important; }
.btn-fill { background: var(--brand-navy); color: white; }
.btn-fill:hover:not(:disabled) { transform: scale(1.02); background: var(--brand-navy-dark); }
.btn-line { background: white; color: var(--ink); border: 1px solid var(--line); }
.btn-line:hover:not(:disabled) { border-color: var(--ink); }
.btn-accent { background: var(--accent); color: white; }
.btn-accent:hover:not(:disabled) { filter: brightness(1.05); }
.btn-block { width: 100%; padding: 15px 22px; font-size: .95rem; }

/* —— Giriş: split layout —— */
.login-page {
  min-height: 100vh;
  background: var(--bg);
}

.login-page header { display: none; }

.login-shell {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 100vh;
}

.login-visual {
  background: linear-gradient(155deg, var(--brand-navy) 0%, var(--brand-navy-dark) 55%, #051f38 100%);
  color: white;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.login-visual::after {
  content: "";
  position: absolute;
  right: -80px; bottom: -80px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(242, 140, 0, 0.35), transparent 70%);
  pointer-events: none;
}

.brand--light .brand-name .medturkey { color: #fff; }
.brand--light .brand-name .go { color: var(--brand-orange-light); }
.brand--light .brand-name .goclinics { color: var(--brand-orange-light); }
.brand-name--login { font-size: 1.35rem; letter-spacing: -.04em; }

.login-visual__highlight {
  color: var(--brand-orange-light);
  white-space: nowrap;
}

.login-visual__content {
  margin-top: auto;
  margin-bottom: auto;
  position: relative;
  z-index: 1;
  max-width: 440px;
}

.login-visual__tag {
  font-size: .72rem; font-weight: 800; letter-spacing: .14em;
  text-transform: uppercase; color: var(--brand-orange-light);
  margin-bottom: 16px;
}

.login-visual h1 {
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 800; letter-spacing: -.04em; line-height: 1.15;
  margin-bottom: 16px;
}

.login-visual__desc {
  color: rgba(255,255,255,.78);
  font-size: .98rem; line-height: 1.65; margin-bottom: 28px;
}

.login-visual__list {
  list-style: none; margin-bottom: 28px;
}

.login-visual__list li {
  position: relative; padding-left: 22px;
  font-size: .9rem; font-weight: 600;
  color: rgba(255,255,255,.9);
  margin-bottom: 10px;
}

.login-visual__list li::before {
  content: "◆";
  position: absolute; left: 0;
  color: var(--brand-orange);
  font-size: .65rem; top: 4px;
}

.login-roles {
  display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 12px;
}

.role-pill {
  font-size: .72rem; font-weight: 800; letter-spacing: .04em;
  padding: 8px 14px; border-radius: 100px;
}

.role-pill--clinic {
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.2);
}

.role-pill--admin {
  background: rgba(242, 140, 0, 0.22);
  border: 1px solid rgba(242, 140, 0, 0.45);
  color: #ffe4c2;
}

.login-visual__hint {
  font-size: .78rem; color: rgba(255,255,255,.55);
}

.login-main {
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px 56px;
  background: var(--bg);
}

.login-back {
  position: absolute;
  top: 24px; right: 32px;
  font-size: .84rem; font-weight: 700;
  color: var(--muted);
}

.login-back:hover { color: var(--brand-navy); }

.login-form-wrap {
  max-width: 400px;
  width: 100%;
  margin: 0 auto;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 40px 36px;
}

.login-main { position: relative; }

.auth-page {
  padding: 120px 0 64px;
  min-height: 100vh;
}

.auth-wrap {
  max-width: 480px;
  margin: 0 auto;
}

.auth-wrap--wide {
  max-width: 760px;
}

.auth-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 40px 36px;
}

.auth-card + .auth-card { margin-top: 20px; }

.auth-eyebrow {
  font-size: .72rem; font-weight: 800; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 10px;
}

.auth-title {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800; letter-spacing: -.04em; line-height: 1.15;
  margin-bottom: 8px;
}

.auth-sub {
  color: var(--muted); font-size: .95rem; margin-bottom: 28px;
}

.auth-footer {
  text-align: center; margin-top: 24px;
  font-size: .88rem; color: var(--muted);
}

.auth-footer a {
  color: var(--brand-navy); font-weight: 700;
}

.auth-footer a:hover { color: var(--brand-orange); }

.form-section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 1rem; font-weight: 800; letter-spacing: -.02em;
  margin-bottom: 4px;
}

.form-section-desc {
  font-size: .82rem; color: var(--muted); margin-bottom: 18px;
}

.form-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}

.field { margin-bottom: 14px; }

.field label {
  display: block; font-size: .78rem; font-weight: 700;
  color: var(--ink); margin-bottom: 6px;
}

.field input,
.field select,
.field textarea {
  width: 100%; padding: 13px 16px;
  border: 1px solid var(--line); border-radius: 14px;
  font-family: inherit; font-size: .92rem; font-weight: 500;
  color: var(--ink); background: #fafafa;
  transition: border-color .2s, box-shadow .2s, background .2s;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none; border-color: var(--brand-navy);
  background: white; box-shadow: 0 0 0 3px rgba(10, 61, 110, 0.1);
}

.field input[readonly] {
  background: #f0f2f5; color: var(--muted); cursor: default;
}

.field textarea { resize: vertical; min-height: 110px; }

.field-hint {
  font-size: .75rem; color: var(--muted); margin-top: 6px;
}

.field-error {
  font-size: .75rem; color: var(--error); font-weight: 600; margin-top: 6px;
  display: none;
}

.field.is-invalid input,
.field.is-invalid select,
.field.is-invalid textarea { border-color: var(--error); }

.field.is-invalid .field-error { display: block; }

.password-wrap { position: relative; }

.password-wrap input { padding-right: 48px; }

.password-toggle {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--muted);
  padding: 4px; font-size: .75rem; font-weight: 700;
}

.login-meta-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin: 8px 0 20px;
}

.login-meta-row .checkbox-row { margin: 0; }

.link-btn {
  background: none; border: none; padding: 0;
  font: inherit; font-size: .86rem; font-weight: 600;
  color: var(--brand-navy); cursor: pointer;
}

.link-btn:hover { color: var(--brand-orange); text-decoration: underline; }

.checkbox-row {
  display: flex; align-items: center; gap: 10px;
  margin: 8px 0 20px; font-size: .86rem; color: var(--muted);
}

.checkbox-row input { width: 18px; height: 18px; accent-color: var(--brand-navy); }

.alert {
  padding: 12px 16px; border-radius: 14px; font-size: .86rem;
  font-weight: 600; margin-bottom: 18px; display: none;
}

.alert.show { display: block; }
.alert-error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.alert-info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }

.panel-note {
  display: none; margin-bottom: 18px;
}
.panel-note.show { display: block; }

.chip-grid {
  display: flex; flex-wrap: wrap; gap: 8px;
}

.chip {
  padding: 8px 14px; border-radius: 100px;
  border: 1px solid var(--line); background: #fafafa;
  font-size: .8rem; font-weight: 600; cursor: pointer;
  transition: .2s; user-select: none;
}

.chip:hover { border-color: var(--brand-orange); }

.chip.is-selected {
  background: var(--accent-bg); border-color: var(--brand-orange);
  color: var(--brand-navy); font-weight: 700;
}

.register-note {
  text-align: center; font-size: .78rem; color: var(--muted);
  margin-top: 16px;
}

.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: white; border-radius: 50%;
  animation: spin .7s linear infinite;
}

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

@media (max-width: 960px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { padding: 40px 28px; min-height: auto; }
  .login-visual__content { margin: 24px 0; }
  .login-main { padding: 32px 20px 48px; }
  .login-back { position: static; margin-bottom: 16px; align-self: flex-start; }
  .login-form-wrap { padding: 28px 22px; }
}

@media (max-width: 720px) {
  .auth-card { padding: 28px 20px; }
  .form-grid-2 { grid-template-columns: 1fr; }
}
