/* ==========================================================================
   Giriş / kurulum ekranları ve hata sayfaları
   ========================================================================== */

.page-auth { min-height: 100vh; }
.auth { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); min-height: 100vh; }

/* ---------- Sol: hareketli tanıtım alanı ---------- */

.auth-visual {
  position: relative; overflow: hidden; isolation: isolate;
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 2.5rem 3rem; color: #fff; background: #0a0a1a;
}
.area-admin .auth-visual { background: #0f0716; }

.blob { position: absolute; z-index: -1; border-radius: 50%; filter: blur(70px); opacity: .75; animation: float 18s ease-in-out infinite alternate; }
.blob-1 { width: 480px; height: 480px; top: -120px; left: -100px; background: var(--c1); }
.blob-2 { width: 420px; height: 420px; bottom: -140px; right: -80px; background: var(--c2); animation-duration: 22s; animation-delay: -5s; }
.blob-3 { width: 320px; height: 320px; top: 40%; left: 35%; background: var(--c3); opacity: .55; animation-duration: 26s; animation-delay: -10s; }

.grid-overlay {
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .06) 1px, transparent 1px);
  background-size: 46px 46px;
  -webkit-mask-image: radial-gradient(ellipse at center, #000 25%, transparent 75%);
  mask-image: radial-gradient(ellipse at center, #000 25%, transparent 75%);
  animation: grid-move 18s linear infinite;
}
@keyframes grid-move { to { background-position: 46px 46px; } }

.auth-brand { display: flex; align-items: center; gap: .75rem; font-size: 1.1rem; font-weight: 750; letter-spacing: -.01em; }
.auth-brand em { margin-left: .2rem; font-style: normal; font-weight: 500; opacity: .65; }
.auth-visual .logo-mark::after { background: #0a0a1a; }

.display { margin-bottom: 2rem; font-size: clamp(2.5rem, 4.4vw, 4.2rem); font-weight: 800; line-height: 1.02; letter-spacing: -.045em; }
.auth-visual .display { animation: fade-up .9s var(--ease) .1s both; }
.auth-visual .gradient-text {
  background-image: linear-gradient(90deg, #fff, color-mix(in srgb, var(--c2) 55%, #fff), color-mix(in srgb, var(--c3) 45%, #fff), #fff);
  background-size: 250% auto;
}

.auth-qr { flex: 1; display: grid; place-items: center; padding: 1.5rem 0; }
.qr-widget-auth {
  width: min(100%, 360px); color: var(--text); background: var(--bg-elev);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .55); animation: pop-in .7s var(--ease) both;
}

.feature-list { list-style: none; display: grid; gap: .95rem; margin: 0; padding: 0; }
.feature-list li { display: flex; align-items: center; gap: .85rem; color: rgba(255, 255, 255, .86); animation: fade-up .8s var(--ease) both; }
.feature-list li:nth-child(1) { animation-delay: .3s; }
.feature-list li:nth-child(2) { animation-delay: .42s; }
.feature-list li:nth-child(3) { animation-delay: .54s; }
.feature-list span {
  display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}

.float-card {
  position: absolute; display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1rem; border-radius: 16px; font-size: .85rem;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .6);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  animation: bob 6s ease-in-out infinite;
}
.float-card strong { display: block; font-size: .88rem; }
.float-card small { color: rgba(255, 255, 255, .65); font-size: .75rem; }
.float-card-1 { top: 20%; right: 8%; }
.float-card-2 { bottom: 15%; right: 13%; flex-direction: column; align-items: flex-start; animation-delay: -3s; }
.pulse-dot { width: 10px; height: 10px; border-radius: 50%; color: #22c55e; background: #22c55e; animation: pulse 2s infinite; }
.mini-bars { display: flex; align-items: flex-end; gap: 4px; height: 38px; }
.mini-bars i {
  width: 7px; border-radius: 3px; transform-origin: bottom;
  background: linear-gradient(to top, var(--c1), var(--c2));
  animation: eq 1.6s ease-in-out infinite;
}
.mini-bars i:nth-child(1) { height: 40%; animation-delay: -.2s; }
.mini-bars i:nth-child(2) { height: 75%; animation-delay: -.5s; }
.mini-bars i:nth-child(3) { height: 55%; animation-delay: -.9s; }
.mini-bars i:nth-child(4) { height: 95%; animation-delay: -.3s; }
.mini-bars i:nth-child(5) { height: 65%; animation-delay: -1.1s; }
.mini-bars i:nth-child(6) { height: 85%; animation-delay: -.7s; }
.mini-bars i:nth-child(7) { height: 50%; animation-delay: -1.3s; }
@keyframes eq { 50% { transform: scaleY(.45); } }

.auth-visual-foot { font-size: .8rem; color: rgba(255, 255, 255, .5); }

/* ---------- Sağ: form alanı ---------- */

.auth-panel {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.25rem;
  padding: 5rem 1.5rem 2rem;
}
.auth-topbar { position: absolute; top: 1.25rem; left: 1.5rem; right: 1.5rem; display: flex; align-items: center; justify-content: flex-end; }
.auth-brand-mobile { display: none; color: var(--text); }

.auth-card {
  width: 100%; max-width: 440px; padding: 2.25rem; border-radius: 28px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  animation: pop-in .8s var(--ease) both;
}
/* Kart kenarında dönen ışık şeridi */
.auth-card::after {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1.5px; pointer-events: none;
  background: conic-gradient(from var(--angle), transparent 0 62%, var(--c1), var(--c3), var(--c2), transparent 96%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: spin-angle 5s linear infinite;
}

.auth-head { margin-bottom: 1.6rem; }
.auth-head h1 { margin: .9rem 0 .45rem; font-size: 1.7rem; font-weight: 750; letter-spacing: -.03em; }
.auth-head p { font-size: .94rem; }
.auth-foot { display: flex; align-items: center; justify-content: center; gap: .4rem; margin-top: 1.4rem; font-size: .9rem; text-align: center; }
.auth-switch { display: inline-flex; align-items: center; gap: .3rem; font-size: .88rem; color: var(--muted); }
.auth-switch:hover { color: var(--accent); text-decoration: none; }

.steps { list-style: none; display: flex; gap: .5rem; margin: 0 0 1.5rem; padding: 0; }
.steps li {
  flex: 1; display: flex; align-items: center; gap: .5rem;
  padding: .5rem .6rem; border-radius: 12px; font-size: .8rem; font-weight: 600;
  color: var(--muted); background: color-mix(in srgb, var(--muted) 8%, transparent);
}
.steps span { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; font-size: .74rem; background: var(--border-strong); color: var(--text); }
.steps .is-done span { background: var(--success); color: #fff; }
.steps .is-current { color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); background: var(--accent-soft); }
.steps .is-current span { background: var(--gradient); color: #fff; }

.auth-forgot { margin: -.35rem 0 0; text-align: right; font-size: .86rem; }
.auth-options { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-top: -.35rem; font-size: .86rem; }
.check { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.remembered-box { margin-bottom: 1rem; }
.remembered-head { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-bottom: .55rem; }
.remembered-head h2 { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: .82rem; font-weight: 650; color: var(--muted); }
.remembered-head h2 .icon { color: var(--accent); }
.remembered-head form { margin: 0; font-size: .82rem; }
.remembered-list { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.remembered { display: flex; align-items: center; gap: .75rem; padding: .7rem .6rem .7rem .9rem; border: 1px solid var(--border); border-radius: 16px; background: var(--accent-soft); }
.remembered-info { flex: 1; min-width: 0; display: grid; }
.remembered-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.remembered-info small { color: var(--muted); line-height: 1.35; }
.remembered form { margin: 0; }
.remembered-remove {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 10px;
  background: transparent; color: var(--muted); cursor: pointer; transition: color .2s, background .2s;
}
.remembered-remove:hover, .remembered-remove:focus-visible { outline: none; color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, transparent); }
.remembered-note { margin: .55rem 0 0; font-size: .76rem; line-height: 1.45; }
.remembered-note .icon { width: 12px; height: 12px; vertical-align: -.1em; }
.remembered-divider { display: flex; align-items: center; gap: .75rem; margin: 0 0 1rem; font-size: .8rem; color: var(--muted); }
.remembered-divider::before, .remembered-divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.link-button { padding: 0; border: 0; background: none; font: inherit; color: var(--accent); cursor: pointer; }
.link-button:hover { text-decoration: underline; }

/* Çalışan kaydı ve şifremi unuttum */
.register-note { display: flex; gap: .6rem; margin: 0 0 1.1rem; padding: .8rem 1rem; border-radius: 14px; font-size: .9rem; background: var(--accent-soft); }
.register-note .icon { flex-shrink: 0; margin-top: .15em; color: var(--accent); }
.register-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .4rem; margin-top: .9rem; }
.register-employee { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem 1rem; margin: 0 0 1.2rem; padding: 1rem 1.1rem; border: 1px solid var(--border); border-radius: 16px; }
.register-employee dt { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.register-employee dd { margin: .15rem 0 0; font-weight: 600; overflow-wrap: anywhere; }
.code-input { letter-spacing: .5em; font-variant-numeric: tabular-nums; font-weight: 700; }
.password-rules { display: flex; flex-wrap: wrap; gap: .35rem; margin: -.4rem 0 0; padding: 0; list-style: none; }
.password-rules li { padding: .2rem .6rem; border-radius: 99px; font-size: .75rem; font-weight: 600; color: var(--muted); background: color-mix(in srgb, var(--muted) 10%, transparent); transition: color .2s, background .2s; }
.password-rules li.is-ok { color: var(--success); background: color-mix(in srgb, var(--success) 12%, transparent); }
.field-hint.is-ok { color: var(--success); }
.field-hint.is-bad { color: var(--danger); }

@media (max-width: 960px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-visual { display: none; }
  .auth-panel { min-height: 100vh; }
  .auth-brand-mobile { display: flex; margin-right: auto; font-size: 1rem; }
  .page-auth {
    background:
      radial-gradient(600px circle at 0% 0%, color-mix(in srgb, var(--c1) 22%, transparent), transparent 60%),
      radial-gradient(520px circle at 100% 100%, color-mix(in srgb, var(--c2) 18%, transparent), transparent 60%),
      var(--bg);
    background-attachment: fixed;
  }
}
@media (max-width: 480px) {
  .auth-panel { padding: 4.25rem .75rem 1.25rem; }
  .auth-topbar { top: 1rem; left: 1rem; right: 1rem; }
  .auth-card { padding: 1.35rem 1.1rem; border-radius: 22px; }
  .auth-head { margin-bottom: 1.2rem; }
  .auth-head h1 { font-size: 1.4rem; }
  .remembered-head { flex-wrap: wrap; }
  .remembered { gap: .55rem; padding: .6rem .4rem .6rem .6rem; }
  .remembered .avatar { flex: none; }
  .auth-options { flex-wrap: wrap; }
}
@media (max-width: 380px) {
  /* Dar ekranda "Devam et" yalnız ok simgesi; düğmenin aria-label'ı hesabın adını söyler. */
  .remembered .btn span { display: none; }
  .remembered .btn { padding-inline: .7rem; }
}

/* ---------- Hata sayfaları ---------- */

.plain { display: grid; place-items: center; min-height: 100vh; padding: 2rem; }
.error-card { display: grid; justify-items: center; gap: .9rem; max-width: 460px; text-align: center; animation: pop-in .7s var(--ease) both; }
.error-code { font-size: clamp(5rem, 14vw, 8rem); font-weight: 800; line-height: 1; letter-spacing: -.06em; }
.error-card h1 { font-size: 1.6rem; }
.error-card .btn { margin-top: .75rem; }

/* ---------- BTM teması ---------- */
/* Kullanıcı girişi btmmoda.com'un turuncu alt bilgi alanı gibi; yönetim girişi koyu gri zemin üstünde turuncu. */
[data-theme="btm"] .auth-visual { background: linear-gradient(150deg, #f15a24 0%, #e34f1c 55%, #c8410f 100%); }
[data-theme="btm"] .auth-visual .blob-1 { background: #ff9466; opacity: .55; }
[data-theme="btm"] .auth-visual .blob-2 { background: #fff1eb; opacity: .22; }
[data-theme="btm"] .auth-visual .blob-3 { background: #ffb08a; opacity: .3; }
[data-theme="btm"] .auth-visual .logo-mark { background: #fff; box-shadow: 0 8px 22px -8px rgba(0, 0, 0, .35); }
[data-theme="btm"] .auth-visual .logo-mark::after { background: #f15a24; }
[data-theme="btm"] .auth-visual .gradient-text { background-image: linear-gradient(90deg, #fff, #ffd2bd, #fff7f3, #fff); }
[data-theme="btm"] .auth-visual .mini-bars i { background: linear-gradient(to top, #ffd2bd, #fff); }
[data-theme="btm"] .auth-visual .float-card { background: rgba(255, 255, 255, .14); border-color: rgba(255, 255, 255, .28); }

[data-theme="btm"] .area-admin .auth-visual { background: #2b2b2b; }
[data-theme="btm"] .area-admin .auth-visual .blob-1 { background: #f15a24; opacity: .6; }
[data-theme="btm"] .area-admin .auth-visual .blob-2 { background: #c8410f; opacity: .5; }
[data-theme="btm"] .area-admin .auth-visual .blob-3 { background: #e34f1c; opacity: .35; }
[data-theme="btm"] .area-admin .auth-visual .logo-mark { background: #f15a24; }
[data-theme="btm"] .area-admin .auth-visual .logo-mark::after { background: #2b2b2b; }
[data-theme="btm"] .area-admin .auth-visual .gradient-text { background-image: linear-gradient(90deg, #ff9466, #f15a24, #ffd2bd, #ff9466); }
[data-theme="btm"] .area-admin .auth-visual .mini-bars i { background: linear-gradient(to top, #c8410f, #ff9466); }
[data-theme="btm"] .area-admin .auth-visual .float-card { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .14); }
