 /* ==========================================================================
   CSS Değişkenleri (Root)
   ========================================================================== */
 :root {
     --bg: #f2f2f4;
     --panel: #ffffff;
     --ink: #0f0f12;
     --muted: #8e90a7;
     --accent: #111114;
     --shadow: 0 20px 80px rgba(15, 15, 18, 0.12);
     --purple: #6d4cff;
     --black: #22242a;
     --orange: #ff7a40;
     --yellow: #f3c515;
     --danger: #e5484d;
     --ok: #0aa35b;
 }

 /* ==========================================================================
   Temel Sıfırlamalar ve Yapısal Stiller
   ========================================================================== */
 *,
 *::before,
 *::after {
     box-sizing: border-box;
 }

 html,
 body {
     height: 100%;
 }

 body {
     margin: 0;
     background: var(--bg);
     color: var(--ink);
     font: 16px/1.5 ui-sans-serif, system-ui, Segoe UI, Roboto, Inter, Helvetica, Arial;
 }

 /* Sayfa Düzeni */
 .wrap {
     min-height: 100%;
     display: grid;
     gap: 32px;
     align-items: center;
     justify-content: center;
     grid-template-columns: minmax(280px, 520px) minmax(280px, 440px);
     padding: 48px 24px;
 }

 /* Tek Sütun Düzeni (Scene Yoksa/Mobil) */
 .wrap.single {
     display: flex !important;
     flex-direction: column;
     justify-content: center;
     align-items: center;
     min-height: 100vh;
     padding: 0 16px;
 }

 .wrap.single .panel {
     width: 100%;
     max-width: 440px;
     min-width: 320px;
 }

 /* Mobil Görünüm */
 @media (max-width: 980px) {
     .wrap {
         grid-template-columns: 1fr;
         padding: 24px;
     }
 }

 /* ==========================================================================
   Link Stilleri (A)
   ========================================================================== */
 a {
     color: var(--accent);
     text-decoration: none;
     transition: color 0.2s ease-in-out;
 }

 a:hover,
 a:focus {
     color: var(--purple);
     text-decoration: underline;
     text-decoration-thickness: 1px;
     text-underline-offset: 3px;
     outline: none;
 }

 /* Özel Alan Linkleri */
 .footnote a,
 .field a {
     color: var(--ink);
     font-weight: 500;
 }

 .footnote a:hover,
 .footnote a:focus,
 .field a:hover,
 .field a:focus {
     color: var(--purple);
 }

 /* ==========================================================================
   Sağ Bölüm: Giriş Paneli
   ========================================================================== */
 .panel {
     background: var(--panel);
     border-radius: 20px;
     box-shadow: var(--shadow);
     padding: 36px 32px;
     max-width: 480px;
 }

 .brand {
     display: flex;
     align-items: center;
     gap: 10px;
     margin-bottom: 12px;
 }

 .brand-badge {
     width: 28px;
     height: 28px;
     border-radius: 10px;
     background: var(--ink);
     display: inline-block;
     position: relative;
 }

 .brand-badge::after {
     content: '';
     position: absolute;
     inset: 6px;
     border-radius: 6px;
     background: #fff;
     clip-path: polygon(50% 0,
             62% 35%,
             98% 35%,
             70% 57%,
             80% 92%,
             50% 70%,
             20% 92%,
             30% 57%,
             2% 35%,
             38% 35%);
 }

 h1 {
     margin: 0 0 4px;
     font-size: 26px;
 }

 .muted {
     color: var(--muted);
     font-size: 13px;
     margin-bottom: 16px;
 }

 .error {
     display: none;
     margin: 0 0 12px;
     padding: 10px 12px;
     border-radius: 10px;
     background: #ffe9ea;
     color: #7a1f24;
     border: 1px solid #f2c6c8;
     font-size: 13px;
 }

 #passwordError {
     margin-bottom: 8px;
     font-size: 13px;
 }

 .field {
     display: grid;
     gap: 8px;
     margin: 14px 0 18px;
 }

 .label {
     font-size: 13px;
     color: var(--muted);
 }

 /* ==========================================================================
   Giriş (Input) ve Seçim (Select) Stilleri
   ========================================================================== */
 .input,
 select {
     /* Ortak görünümler */
     display: flex;
     align-items: center;
     background: #f7f7fa;
     border-radius: 12px;
     border: 1px solid transparent;
 }

 .input {
     gap: 8px;
     padding: 14px 14px;
     outline: 0;
 }

 .input:focus-within {
     border-color: #c9c9d9;
     background: #fff;
 }

 .input input {
     all: unset;
     flex: 1;
     font-size: 15px;
     color: var(--ink);
 }

 /* Select Alanı */
 select {
     all: unset;
     width: 100%;
     font-size: 14px;
     color: var(--ink);
     padding: 10px 12px;
     /* Daha kompakt hale getirildi */
     appearance: none;
     background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
         linear-gradient(135deg, var(--muted) 50%, transparent 50%);
     background-position: calc(100% - 18px) calc(50% - 3px),
         calc(100% - 13px) calc(50% - 3px);
     background-size: 6px 6px, 6px 6px;
     background-repeat: no-repeat;
     cursor: pointer;
 }

 select:focus {
     border-color: #c9c9d9;
     background-color: #fff;
     outline: none;
 }

 select option {
     background: #fff;
     color: var(--ink);
     font-size: 14px;
     padding: 8px 10px;
 }

 /* Karanlık Mod Uyumu (Select Option) */
 @media (prefers-color-scheme: dark) {
     select option {
         background: #2b2b2f;
         color: #f3f3f3;
     }
 }

 /* İkonlu Input Stili */
 .input-with-icon {
     position: relative;
     display: flex;
     align-items: center;
 }

 .input-with-icon input {
     width: 100%;
     padding-right: 40px;
     /* Toggle ikon için boşluk */
 }

 .toggle-password {
     position: absolute;
     right: 12px;
     cursor: pointer;
     user-select: none;
     font-style: normal;
     color: #888;
 }

 /* ==========================================================================
   Düğme (Button) Stilleri
   ========================================================================== */
 .icon-btn {
     all: unset;
     cursor: pointer;
     padding: 6px;
     border-radius: 8px;
 }

 .primary {
     width: 100%;
     padding: 14px 16px;
     border: 0;
     border-radius: 12px;
     background: var(--accent);
     color: #fff;
     font-weight: 600;
     cursor: pointer;
 }

 .primary[disabled] {
     opacity: 0.6;
     cursor: not-allowed;
 }

 .footnote {
     margin-top: 14px;
     color: var(--muted);
     font-size: 12px;
     text-align: center;
 }

 /* ==========================================================================
   Sol Bölüm: Karakterler (Art)
   ========================================================================== */
 .art {
     position: relative;
     aspect-ratio: 4/3;
     max-width: 560px;
     width: 100%;
     background: #e9e9ef;
     border-radius: 22px;
     box-shadow: var(--shadow);
     overflow: hidden;
     padding: 24px;
 }

 .stage {
     position: absolute;
     inset: 24px;
     display: grid;
     align-items: end;
     grid-template-columns: 1fr 1fr 1fr 1fr;
     gap: 18px;
 }

 /* Karakter (Buddy) */
 .buddy {
     position: relative;
     height: 160px;
     display: flex;
     align-items: flex-end;
     justify-content: center;
     transform-style: preserve-3d;
     transition: transform 0.35s cubic-bezier(0.22, 0.8, 0.35, 1);
 }

 .body {
     position: absolute;
     inset: auto 0 0 0;
     height: 140px;
     border-radius: 20px;
 }

 .face {
     position: absolute;
     left: 50%;
     width: 90px;
     height: 60px;
     transform: translateX(-50%);
     backface-visibility: hidden;
     -webkit-backface-visibility: hidden;
 }

 /* Vücut ve Yüz Varyantları (Ortak Stiller) */
 .purple .body {
     background: var(--purple);
 }

 .purple .face {
     bottom: 88px;
 }

 .black .body {
     background: var(--black);
 }

 .black .face {
     bottom: 74px;
 }

 .yellow .body {
     background: var(--yellow);
     border-radius: 26px 26px 22px 22px;
 }

 .yellow .face {
     bottom: 82px;
 }

 .yellow.look-away {
     transform: rotateY(28deg) rotateZ(-3deg);
 }

 .orange .body {
     height: 120px;
     background: var(--orange);
     border-radius: 140px 140px 0 0;
 }

 .orange .face {
     bottom: 60px;
 }

 /* Göz (Eye) */
 .eye {
     position: absolute;
     width: 22px;
     height: 22px;
     border-radius: 50%;
     background: #fff;
     top: 10px;
     overflow: hidden;
     box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.06);
 }

 .eye.left {
     left: 10px;
 }

 .eye.right {
     right: 10px;
 }

 .eye .pupil {
     position: absolute;
     width: 10px;
     height: 10px;
     border-radius: 50%;
     background: #111;
     left: 6px;
     top: 6px;
     transform: translate(0, 0);
     transition: transform 0.08s linear;
 }

 .eye .lid {
     position: absolute;
     left: 0;
     right: 0;
     height: 100%;
     top: 0;
     background: linear-gradient(#111 0 0) center/100% 3px no-repeat;
     opacity: 0;
     transform: translateY(-12px);
     transition: opacity 0.15s ease, transform 0.15s ease;
 }

 /* Ağız (Mouth) */
 .mouth {
     position: absolute;
     left: 50%;
     bottom: 6px;
     width: 28px;
     height: 10px;
     transform: translateX(-50%);
     border-radius: 0 0 18px 18px;
     background: #111;
     transition: transform 0.2s ease, border-radius 0.2s ease, height 0.2s ease;
 }

 /* ==========================================================================
   Sahne Durumları (Scene States)
   ========================================================================== */
 /* Dikkatli (Attentive) */
 .scene--attentive .mouth {
     height: 14px;
     border-radius: 0 0 22px 22px;
 }

 /* Utangaç (Shy) */
 .scene--shy .eye .pupil {
     transform: translate(0, 14px);
     opacity: 0;
     transition: transform 0.25s ease-in, opacity 0.25s ease-in;
 }

 .scene--shy .eye .lid {
     opacity: 1;
     transform: translateY(0);
     background: #111;
     transition: opacity 0.25s ease-out, transform 0.25s ease-out;
 }

 /* Saklanma (Hiding - Arkası Dönük) */
 .scene--hiding .buddy {
     transform: rotateY(180deg);
 }

 /* Eğilme (Tilt) */
 .buddy.tilt-left {
     transform: rotateZ(-2deg);
 }

 .buddy.tilt-right {
     transform: rotateZ(2deg);
 }

 /* Saklanırken Eğilme (Tilt + Hiding Kombinasyonu) */
 .scene--hiding .buddy.tilt-left {
     transform: rotateY(180deg) rotateZ(-2deg);
 }

 .scene--hiding .buddy.tilt-right {
     transform: rotateY(180deg) rotateZ(2deg);
 }

 /* Date input'u diğer inputlarla aynı hizaya getir */
 .input input[type="date"] {
     all: unset;
     flex: 1;
     font-size: 16px;
     color: var(--ink);
     appearance: auto;
     -webkit-appearance: auto;
 }


 @supports (-webkit-touch-callout: none) {
     input[type="date"] {
         min-height: 44px;
     }
 }