:root {
  --page-bg: #090610;
  --page-bg-soft: #100919;
  --surface: #15101f;
  --surface-soft: #1b1328;
  --text: #f8f5fc;
  --text-soft: #c0b7ca;
  --text-muted: #8e829a;
  --line: rgba(255, 255, 255, .09);
  --line-strong: rgba(168, 85, 247, .32);
  --primary: #a855f7;
  --primary-bright: #c084fc;
  --primary-dark: #7e22ce;
  --secondary: #39d98a;
  --danger: #fb7185;
  --shadow: 0 28px 90px rgba(0, 0, 0, .42);
}

html[data-theme="light"] {
  --page-bg: #f7f4fb;
  --page-bg-soft: #eee8f5;
  --surface: #ffffff;
  --surface-soft: #f4eff8;
  --text: #1c1425;
  --text-soft: #54495e;
  --text-muted: #786d82;
  --line: rgba(58, 35, 77, .13);
  --line-strong: rgba(126, 34, 206, .26);
  --shadow: 0 28px 80px rgba(67, 37, 90, .16);
}

html[data-palette="emerald"] { --primary: #16a973; --primary-bright: #34d399; --primary-dark: #087f55; --secondary: #38bdf8; --line-strong: rgba(22, 169, 115, .34); }
html[data-palette="blue"] { --primary: #3b82f6; --primary-bright: #60a5fa; --primary-dark: #1d4ed8; --secondary: #22d3ee; --line-strong: rgba(59, 130, 246, .34); }
html[data-palette="amber"] { --primary: #e7a20d; --primary-bright: #fbbf24; --primary-dark: #b87605; --secondary: #22c55e; --line-strong: rgba(231, 162, 13, .34); }
html[data-palette="rose"] { --primary: #e83e8c; --primary-bright: #f472b6; --primary-dark: #be185d; --secondary: #a78bfa; --line-strong: rgba(232, 62, 140, .34); }
html[data-palette="orange"] { --primary: #f97316; --primary-bright: #fb923c; --primary-dark: #c2410c; --secondary: #facc15; --line-strong: rgba(249, 115, 22, .34); }

*, *::before, *::after { box-sizing: border-box; }
html { min-width: 320px; background: var(--page-bg); }
body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--page-bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  transition: background-color .22s ease, color .22s ease;
}

button, input { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

button:focus-visible, a:focus-visible, input:focus-visible {
  outline: 3px solid rgba(168, 85, 247, .42);
  outline-offset: 3px;
}

.panel-atmosphere { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.panel-orb { position: absolute; border-radius: 999px; filter: blur(110px); opacity: .34; will-change: transform; }
.panel-orb-one { width: 620px; height: 620px; top: -300px; left: -190px; background: var(--primary-dark); animation: aurora-one 17s ease-in-out infinite alternate; }
.panel-orb-two { width: 540px; height: 540px; right: -260px; bottom: -220px; background: var(--secondary); opacity: .16; animation: aurora-two 21s ease-in-out infinite alternate; }
.panel-orb-three { width: 380px; height: 380px; top: 32%; left: 42%; background: var(--primary); opacity: .1; animation: aurora-three 19s ease-in-out infinite alternate; }
.panel-wave { position: absolute; right: -15%; bottom: -44%; width: 130%; height: 72%; border-radius: 50%; background: linear-gradient(115deg, transparent 20%, var(--primary-dark) 50%, var(--secondary) 80%); opacity: .08; filter: blur(70px); animation: wave-drift 24s ease-in-out infinite alternate; }

.panel-home-link, .appearance-button {
  position: fixed;
  top: 22px;
  z-index: 20;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-soft);
  box-shadow: 0 10px 30px rgba(0,0,0,.12);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.panel-home-link { left: 22px; }
.appearance-button { right: 22px; }
.appearance-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--primary); box-shadow: 0 0 0 4px rgba(168,85,247,.12); }

.appearance-panel {
  position: fixed;
  top: 76px;
  right: 22px;
  z-index: 30;
  width: calc(100% - 32px);
  max-width: 310px;
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 17px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.appearance-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.appearance-heading small, .appearance-heading strong { display: block; }
.appearance-heading small { color: var(--text-muted); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.appearance-heading strong { margin-top: 3px; font-size: 15px; }
.appearance-heading button { width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); cursor: pointer; }
.theme-mode { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.theme-mode button, .custom-colors button { min-height: 38px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-soft); font-size: 11px; font-weight: 750; cursor: pointer; }
.theme-mode button.is-active { border-color: var(--primary); color: var(--primary-bright); }
.palette-area { margin-top: 17px; }
.palette-area > span { display: block; margin-bottom: 9px; color: var(--text-muted); font-size: 9px; font-weight: 750; text-transform: uppercase; letter-spacing: .08em; }
.palette-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 7px; }
.palette-swatch { aspect-ratio: 1; border: 2px solid transparent; border-radius: 9px; cursor: pointer; }
.palette-swatch.is-active { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--primary); }
.palette-violet { background: linear-gradient(135deg, #a855f7, #39d98a); }
.palette-emerald { background: linear-gradient(135deg, #16a973, #38bdf8); }
.palette-blue { background: linear-gradient(135deg, #3b82f6, #22d3ee); }
.palette-amber { background: linear-gradient(135deg, #e7a20d, #22c55e); }
.palette-rose { background: linear-gradient(135deg, #e83e8c, #a78bfa); }
.palette-orange { background: linear-gradient(135deg, #f97316, #facc15); }
.custom-colors { margin-top: 15px; border-top: 1px solid var(--line); padding-top: 13px; }
.custom-colors summary { color: var(--text-soft); font-size: 11px; font-weight: 750; cursor: pointer; }
.custom-colors label { margin-top: 11px; display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--text-muted); font-size: 10px; }
.custom-colors input { width: 54px; height: 32px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: transparent; }
.custom-colors button { width: 100%; margin-top: 12px; background: var(--primary); color: #fff; }

.panel-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 92px 24px 44px;
}

.entry-card {
  width: 100%;
  max-width: 520px;
  padding: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 25px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: card-enter .35s ease both;
}

.entry-brand { display: grid; justify-items: center; text-align: center; }
.entry-mark { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 17px; background: linear-gradient(145deg, var(--primary-bright), var(--primary-dark)); color: #fff; box-shadow: 0 14px 36px rgba(0,0,0,.22); font-size: 25px; font-weight: 850; }
.entry-brand strong { margin-top: 13px; font-size: 20px; letter-spacing: .18em; }
.entry-brand small { margin-top: 3px; color: var(--text-muted); font-size: 9px; }

.security-heading, .login-heading { margin-top: 28px; }
.security-heading > span, .login-heading > span { color: var(--primary-bright); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.security-heading h1, .login-heading h1 { margin: 8px 0 9px; font-size: 26px; line-height: 1.12; letter-spacing: -.025em; }
.security-heading p, .login-heading p { margin: 0; color: var(--text-soft); font-size: 12px; line-height: 1.65; }

.security-checks { margin-top: 21px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.security-row { min-height: 64px; display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 11px; padding: 10px 13px; background: var(--surface-soft); }
.security-row + .security-row { border-top: 1px solid var(--line); }
.security-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: rgba(168,85,247,.13); color: var(--primary-bright); font-size: 8px; font-weight: 850; }
.security-row small, .security-row strong { display: block; }
.security-row small { color: var(--text-muted); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.security-row strong { margin-top: 3px; font-size: 11px; overflow-wrap: anywhere; }
.check-status { width: 18px; height: 18px; border: 2px solid var(--line-strong); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
.security-row.is-complete .check-status { border: 0; background: var(--secondary); animation: none; }
.security-row.is-complete .check-status::after { content: "✓"; display: grid; place-items: center; height: 18px; color: #08130d; font-size: 10px; font-weight: 900; }
.location-button { min-height: 31px; padding: 0 9px; border: 1px solid var(--line); border-radius: 9px; background: transparent; color: var(--primary-bright); font-size: 8px; font-weight: 750; cursor: pointer; }

.scan-progress { height: 5px; margin-top: 20px; overflow: hidden; border-radius: 99px; background: var(--surface-soft); }
.scan-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--primary), var(--secondary)); transition: width .35s ease; }
.scan-message { min-height: 18px; margin: 9px 0 0; color: var(--text-muted); text-align: center; font-size: 9px; }

.primary-action {
  width: 100%;
  min-height: 48px;
  margin-top: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(100deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 13px 30px rgba(0,0,0,.18);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
.primary-action:disabled { opacity: .45; cursor: wait; }
.privacy-note { margin: 13px 0 0; color: var(--text-muted); text-align: center; font-size: 8px; line-height: 1.55; }

.login-card { width: 100%; max-width: 450px; }
.login-brand { margin-bottom: 0; }
.login-heading { text-align: center; }
.login-form { margin-top: 24px; }
.login-form > label { display: block; margin: 14px 0 7px; color: var(--text-muted); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.field-wrap { min-height: 49px; display: grid; grid-template-columns: 31px 1fr; align-items: center; border: 1px solid var(--line); border-radius: 12px; background: var(--page-bg-soft); transition: border-color .2s ease, box-shadow .2s ease; }
.field-wrap:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(168,85,247,.1); }
.field-wrap > span { padding-left: 12px; color: var(--primary-bright); font-size: 8px; font-weight: 850; }
.field-wrap input { width: 100%; height: 47px; padding: 0 13px 0 5px; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 12px; }
.field-wrap input::placeholder { color: var(--text-muted); }
.pin-field { grid-template-columns: 31px 1fr auto; }
.pin-field button { height: 34px; margin-right: 7px; padding: 0 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--text-soft); font-size: 8px; font-weight: 750; cursor: pointer; }
.login-options { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; }
.remember-option { display: inline-flex; align-items: center; gap: 8px; color: var(--text-soft); font-size: 9px; cursor: pointer; }
.remember-option input { accent-color: var(--primary); }
.text-button { padding: 0; border: 0; background: transparent; color: var(--primary-bright); font-size: 9px; font-weight: 750; cursor: pointer; }
.login-submit { margin-top: 22px; }
.form-message { margin: 13px 0 0; padding: 10px 12px; border-radius: 10px; text-align: center; font-size: 9px; }
.form-message-error { border: 1px solid rgba(251,113,133,.3); background: rgba(251,113,133,.08); color: var(--danger); }
.form-message-info { border: 1px solid rgba(57,217,138,.25); background: rgba(57,217,138,.07); color: var(--secondary); }
.login-footer { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--text-muted); font-size: 8px; }
.login-footer span:first-child { display: inline-flex; align-items: center; gap: 6px; }
.login-footer i { width: 7px; height: 7px; border-radius: 50%; background: var(--secondary); }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes card-enter { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes aurora-one { 0% { transform: translate3d(-5%, -3%, 0) scale(1); } 50% { transform: translate3d(22vw, 15vh, 0) scale(1.14); } 100% { transform: translate3d(8vw, 35vh, 0) scale(.92); } }
@keyframes aurora-two { 0% { transform: translate3d(0, 0, 0) scale(.95); } 50% { transform: translate3d(-28vw, -22vh, 0) scale(1.18); } 100% { transform: translate3d(-8vw, -38vh, 0) scale(1); } }
@keyframes aurora-three { 0% { transform: translate3d(-18vw, 4vh, 0) scale(.9); } 50% { transform: translate3d(20vw, -18vh, 0) scale(1.3); } 100% { transform: translate3d(6vw, 26vh, 0) scale(1.05); } }
@keyframes wave-drift { from { transform: translate3d(-4%, 5%, 0) rotate(-5deg); } to { transform: translate3d(5%, -8%, 0) rotate(7deg); } }

@media (max-width: 600px) {
  .panel-orb { filter: blur(80px); }
  .panel-orb-one { width: 430px; height: 430px; animation-duration: 22s; }
  .panel-orb-two { width: 390px; height: 390px; animation-duration: 26s; }
  .panel-orb-three { width: 280px; height: 280px; animation-duration: 24s; }
  .panel-home-link, .appearance-button { top: 12px; min-height: 39px; padding: 0 11px; }
  .panel-home-link { left: 12px; }
  .appearance-button { right: 12px; }
  .panel-home-link > span:last-child, .appearance-button > span:last-child { display: none; }
  .appearance-panel { top: 62px; right: 12px; }
  .panel-shell { align-items: start; padding: 72px 12px 24px; }
  .entry-card { padding: 24px 18px; border-radius: 20px; }
  .entry-mark { width: 50px; height: 50px; }
  .security-heading h1, .login-heading h1 { font-size: 23px; }
  .security-row { grid-template-columns: 30px minmax(0, 1fr) auto; padding-inline: 10px; }
  .security-location-row { grid-template-columns: 30px minmax(0, 1fr); }
  .security-location-row .location-button { grid-column: 2; justify-self: start; margin-bottom: 5px; }
  .login-options, .login-footer { align-items: flex-start; flex-direction: column; }
  .login-footer { gap: 8px; }
}

@media (max-width: 370px) {
  .entry-card { padding-inline: 14px; }
  .security-row { gap: 8px; }
  .security-row strong { font-size: 10px; }
  .palette-grid { grid-template-columns: repeat(3, 1fr); }
}

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

/* Okunabilirlik ölçeği: saha personelinden gelen geri bildirimle büyütüldü. */
.panel-home-link, .appearance-button { font-size: 14px; }
.appearance-heading small { font-size: 11px; }
.appearance-heading strong { font-size: 17px; }
.theme-mode button, .custom-colors button, .custom-colors summary { font-size: 13px; }
.palette-area > span, .custom-colors label { font-size: 12px; }
.entry-brand small { font-size: 12px; }
.security-heading > span, .login-heading > span { font-size: 11px; }
.security-heading p, .login-heading p { font-size: 15px; }
.security-row small { font-size: 10px; }
.security-row strong { font-size: 14px; }
.security-icon, .location-button { font-size: 10px; }
.scan-message, .privacy-note { font-size: 11px; }
.primary-action { font-size: 15px; }
.login-form > label { font-size: 11px; }
.field-wrap > span, .pin-field button { font-size: 10px; }
.field-wrap input { font-size: 15px; }
.remember-option, .text-button, .form-message { font-size: 12px; }
.login-footer { font-size: 10px; }

@media (max-width: 600px) {
  .security-row strong { font-size: 13px; }
}
