/* EXIP Pro_V1_Referans — login & splash design system
   Ported verbatim (tokens + the classes actually used here) from the
   old reference build's giris.html, which is the authoritative source
   for the single admin/team login screen and the X-mark loading splash. */

:root {
  color-scheme: light;
  --bg: #FFFFFF;
  --bg-alt: #F5F5F7;
  --stage-bg: #EEF1F6;
  --text: #1D1D1F;
  --muted: #6E6E73;
  --faint: #A1A1A6;
  --border: #E5E5EA;
  --accent: #0071E3;
  --accent-soft: rgba(0, 113, 227, 0.09);
  --cyan: #22D3EE;
  --violet: #7C5CFF;
  --sky: #5AC8FA;
  --done: #248A3D;
  --done-soft: rgba(36, 138, 61, 0.10);
  --warn: #B25000;
  --warn-soft: rgba(178, 80, 0, 0.10);
  --bad: #C9302C;
  --bad-soft: rgba(201, 48, 44, 0.09);
  --ai: linear-gradient(120deg, #0071E3 0%, #22D3EE 35%, #7C5CFF 70%, #5AC8FA 100%);
  --ai-conic: conic-gradient(from 0deg, #0071E3, #22D3EE, #7C5CFF, #5AC8FA, #0071E3);
  --radius: 20px;
  --radius-sm: 12px;
  --space-xs: 6px;
  --space-sm: 10px;
  --space-md: 16px;
  --space-lg: 24px;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--stage-bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
  overflow: hidden;
}
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; touch-action: manipulation; }
input, select, textarea { font: inherit; font-size: 16px; color: var(--text); touch-action: manipulation; }
a, [role="button"], .btn, .seg-btn { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.seg-btn:active { transform: scale(0.97); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.hidden { display: none !important; }

.stage { position: relative; height: 100%; display: flex; align-items: center; justify-content: center; }
.stage-aurora { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.stage-aurora i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(80px); opacity: 0.26; }
.stage-aurora i:nth-child(1) { background: #8EC5FF; left: -15vmax; top: -20vmax; }
.stage-aurora i:nth-child(2) { background: #C9B8FF; right: -20vmax; bottom: -25vmax; }

.device {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: 100%;
  background: var(--bg-alt);
  overflow: hidden;
  isolation: isolate;
}
@media (min-width: 560px) and (hover: hover) and (pointer: fine) {
  .device {
    width: 390px;
    height: min(852px, calc(100% - 40px));
    border-radius: 44px;
    box-shadow: 0 30px 80px rgba(20, 30, 60, 0.16), 0 0 0 10px #FFFFFF, 0 0 0 11px #DADDE3;
  }
}

.screen { position: absolute; inset: 0; display: flex; flex-direction: column; background: var(--bg-alt); }

.eyebrow { font-size: 11.5px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
h1, h2, h3 { margin: 0; text-wrap: balance; letter-spacing: -0.02em; }
h1 { font-size: 30px; line-height: 1.1; font-weight: 700; }
h2 { font-size: 21px; line-height: 1.2; font-weight: 700; }
h3 { font-size: 16px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 13px; }
.xs { font-size: 11.5px; }

.stack { display: flex; flex-direction: column; gap: 12px; }
.stack-s { display: flex; flex-direction: column; gap: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 18px; border-radius: 14px; font-weight: 600; font-size: 15px;
  background: var(--accent); color: #FFFFFF; text-decoration: none;
}
.btn:active { transform: scale(0.98); }
.btn.secondary { background: var(--bg-alt); color: var(--text); }
.btn.ghost { background: transparent; color: var(--accent); padding: 0 6px; height: 36px; }
.btn.small { height: 36px; font-size: 14px; padding: 0 12px; border-radius: 11px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: 0.45; pointer-events: none; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }
.input {
  height: 48px; padding: 0 14px; border-radius: 14px; border: 1px solid var(--border);
  background: var(--bg); font-size: 16px; width: 100%;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.err { font-size: 13px; color: var(--bad); min-height: 18px; }

.pin-row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; width: 100%; }
.pin-box {
  height: 48px; width: 100%; padding: 0; text-align: center; font-family: var(--mono);
  font-size: 20px; font-weight: 700; border-radius: 12px; border: 1.5px solid var(--border);
  background: var(--bg); color: var(--text);
}
.pin-box:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }

.seg {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px;
  background: var(--bg-alt); padding: 4px; border-radius: 13px;
}
.seg-btn {
  height: 34px; padding: 0 12px; border-radius: 10px; font-size: 13px; font-weight: 600;
  color: var(--muted); display: inline-flex; align-items: center; justify-content: center;
  transition: background 0.16s, color 0.16s;
}
.seg-btn.on { background: var(--bg); color: var(--text); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06); }

#s-login {
  background: var(--bg);
  padding: calc(28px + env(safe-area-inset-top, 0px)) 22px calc(28px + env(safe-area-inset-bottom, 0px));
  justify-content: flex-start;
  gap: 18px;
  overflow-y: auto;
}
.login-head { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; margin-top: 8px; }
.login-mark {
  width: 68px; height: 68px; border-radius: 20px; display: grid; place-items: center;
  background: var(--bg); box-shadow: 0 10px 30px rgba(0, 80, 180, 0.14);
}
.login-mark svg { width: 40px; height: auto; }
.legal { font-size: 11.5px; color: var(--faint); text-align: center; }

/* Loading splash */
#s-loading-splash {
  position: absolute; inset: 0; z-index: 200; background: var(--bg);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px;
}
#s-loading-splash.leaving { animation: splashOut .5s ease-in forwards; }
#s-loading-splash .pct { font-size: 22px; font-weight: 700; letter-spacing: .08em; color: var(--muted); }
@keyframes splashOut { to { opacity: 0; visibility: hidden; pointer-events: none; } }

.loader { position: relative; width: 184px; height: 184px; display: grid; place-items: center; }
.loader .ring {
  position: absolute; inset: 0; border-radius: 50%; background: var(--ai-conic);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 5px), #000 calc(100% - 4px));
  animation: ringspin 1.6s linear infinite;
}
.loader .ring.blur {
  filter: blur(14px); opacity: 0.55;
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 14px), #000 calc(100% - 13px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 14px), #000 calc(100% - 13px));
}
.loader .halo {
  position: absolute; inset: 24px; border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.18), rgba(124, 92, 255, 0.06) 60%, transparent 70%);
  animation: breathe 2.4s ease-in-out infinite;
}
@keyframes ringspin { to { transform: rotate(360deg); } }
@keyframes breathe { 50% { transform: scale(1.08); opacity: 0.7; } }
.loader svg { width: 88px; height: auto; position: relative; }
.loader svg .trace {
  fill: none; stroke: url(#traceGrad); stroke-width: 7; stroke-linejoin: round;
  stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: trace 2.4s ease-in-out infinite;
}
.loader svg .solid { opacity: 0; animation: solidIn 2.4s ease-in-out infinite; }
@keyframes trace { 0% { stroke-dashoffset: 1400; } 55% { stroke-dashoffset: 0; } 100% { stroke-dashoffset: 0; } }
@keyframes solidIn { 0%, 45% { opacity: 0; } 70%, 100% { opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  .loader .ring, .loader .halo, .loader svg .trace, .loader svg .solid { animation: none; opacity: 1; }
}
