/* JavaMAIL - app.java (Sakai + PrimeVue 4 Aura) ile BIREBIR ayni tema
 *
 * KAYNAK (tahmin degil, olculdu):
 *   frontend/src/main.ts                 -> preset: Aura, darkModeSelector: '.app-dark'
 *   frontend/src/theme/themeDefaults.ts  -> primary: emerald, storage key: 'darkTheme'
 *   frontend/src/theme/semanticCssVars.scss -> --primary-color = --p-primary-color ...
 *   frontend/src/layout/AuthLayout.vue   -> giris ekrani yerlesimi (kart 56/53px, gradient)
 *   frontend/src/views/pages/auth/Login.vue -> form yapisi (gap-6, label/InputText/Button)
 *   @primeuix/themes/aura/base           -> renk ve olcek token'lari (asagi kopyalandi)
 *
 * KURAL: renk/olcek UYDURULMAZ. Asagidaki degerler Aura preset'inin birebir
 * karsiligidir (emerald + slate/zinc surface). app.java'da bir token degisirse
 * burada da degismelidir.
 *
 * BAGIMLILIK: hicbir dis kaynak yok. PrimeIcons yerel woff2, font sistem yigini.
 */

/* ---------------------------------------------------------------- Aura token: primitive */
:root {
  /* emerald (primary) */
  --p-emerald-50:  #ecfdf5;
  --p-emerald-100: #d1fae5;
  --p-emerald-200: #a7f3d0;
  --p-emerald-300: #6ee7b7;
  --p-emerald-400: #34d399;
  --p-emerald-500: #10b981;
  --p-emerald-600: #059669;
  --p-emerald-700: #047857;
  --p-emerald-800: #065f46;
  --p-emerald-900: #064e3b;
  --p-emerald-950: #022c22;

  /* olcek */
  --p-border-radius-sm: 4px;
  --p-border-radius-md: 6px;
  --p-border-radius-lg: 8px;
  --p-border-radius-xl: 12px;
  --p-transition-duration: 0.2s;
  --p-disabled-opacity: 0.6;
  --p-icon-size: 1rem;
  --p-form-field-padding-x: 0.75rem;
  --p-form-field-padding-y: 0.5rem;
}

/* ---------------------------------------------------------------- Aura token: light (slate) */
:root {
  --p-surface-0:   #ffffff;
  --p-surface-50:  #f8fafc;
  --p-surface-100: #f1f5f9;
  --p-surface-200: #e2e8f0;
  --p-surface-300: #cbd5e1;
  --p-surface-400: #94a3b8;
  --p-surface-500: #64748b;
  --p-surface-600: #475569;
  --p-surface-700: #334155;
  --p-surface-800: #1e293b;
  --p-surface-900: #0f172a;
  --p-surface-950: #020617;

  --p-primary-color: #10b981;
  --p-primary-contrast-color: #ffffff;
  --p-primary-hover-color: #059669;
  --p-primary-active-color: #047857;
  /* ERISILEBILIRLIK: vurgu rengi DOLGU ile LINK icin AYNI olamaz. #10b981
     beyaz zeminde 2,5:1 kaliyor (WCAG AA metin 4,5:1 ister). Bu yuzden
     link/dugme tonlari vurgu renginden TURETILIR (tek kaynak: aksan paleti).
     `color-mix` desteklenmezse sabit yedek deger gecerli olur. */
  --jm-link-color: #047857;
  --jm-link-color: color-mix(in oklab, var(--p-primary-color), #000 38%);
  --jm-btn-bg: #047857;
  --jm-btn-bg: color-mix(in oklab, var(--p-primary-color), #000 38%);
  /* Hata METNI: red-500 beyaz zeminde 3,76:1 (AA altinda) -> red-700 6,3:1 */
  --jm-danger-text: #b91c1c;

  --p-text-color: #334155;
  --p-text-hover-color: #1e293b;
  /* #64748b app zemininde 4,08:1 (AA altinda) -> slate-600 = 6,1:1 */
  --p-text-muted-color: #475569;

  --p-content-background: #ffffff;
  --p-content-hover-background: #f1f5f9;
  /* Aura datatable row.striped.background — zebra deseni (aile standardi) */
  --p-datatable-row-striped-background: #f8fafc;
  --p-content-border-color: #dbe3ee;

  /* --- Katmanli yuzeyler (light) -------------------------------------------
     Kullanici geri bildirimi: "light temada arkaplan hep beyaz oldugu icin
     ekranlar ve gecisler net gorunmuyor". Dark modda ton farklari zaten var;
     ayni hiyerarsi acik modda da TANIMLI: sayfa (koyu) < panel < kart. */
  --p-mask-background: rgb(15 23 42 / 45%);
  --p-overlay-popover-shadow: 0 12px 32px rgb(15 23 42 / 16%), 0 2px 8px rgb(15 23 42 / 8%);
  /* Aura overlay.popover.background — yuzen kartlar (sidebar gibi) */
  --p-overlay-popover-background: #ffffff;
  --jm-app-bg: #e8eef6;
  --jm-panel-bg: #ffffff;
  --jm-panel-alt: #f4f7fb;
  --jm-panel-border: #d5dfea;
  --jm-elev-1: 0 1px 2px rgb(15 23 42 / 7%);
  --jm-elev-2: 0 12px 32px rgb(15 23 42 / 16%), 0 2px 8px rgb(15 23 42 / 8%);
  --p-content-border-radius: 6px;

  /* --- Kabuk olculeri (app.java tokens.scss ile BIREBIR) ---------------------
     DESIGN_SYSTEM_UI_CONSISTENCY 5.2: goz karari yasak, deger burada tanimlanir.
     Urunler bu token'lari TUKETIR, kendi olcusunu uydurmaz. */
  --layout-topbar-height: 4rem;
  --sidebar-width-expanded: 15rem;
  --sidebar-width-icon-only: 3.5rem;
  --layout-page-inset: 24px;
  /* Yuzden kart: topbar'in ALTINDAN baslar, altta ayni inset kadar bosluk kalir. */
  --layout-sidebar-top: calc(var(--layout-topbar-height) + 24px);
  --layout-sidebar-height: calc(100vh - var(--layout-topbar-height) - 48px);

  /* --- HIZALAMA HATLARI (tek dogruluk) --------------------------------------
     Kullanici kurali: "topbar ve sidebar %100 ayni desen; body alaninin sidebar
     ve topbar'a mesafeleri app.java ile hizali". Tek inset -> tek hat:
       topbar sol dolgu ...... = --layout-page-inset            (24px)
       sidebar karti sol ..... = --layout-page-inset            (24px)
       topbar marka blogu .... = sidebar + inset - inset - gap  (aramayi 234'e oturtur)
       icerik ilk ogesi ...... = sidebar + inset + inset         (258px)
       topbar sag dolgu ...... = ray + inset                    (avatar icerik hattinda biter)
     Sabit sayi YAZILMAZ; bu token'lar tuketilir. */
  --layout-topbar-gap: 0.75rem;
  --layout-rail-width: 4rem;
  --layout-brand-width: calc(var(--sidebar-width-expanded) + var(--layout-page-inset));
  --layout-content-left: calc(var(--sidebar-width-expanded) + var(--layout-page-inset) + var(--layout-page-inset));

  --p-form-field-background: #ffffff;
  --p-form-field-border-color: #cbd5e1;
  --p-form-field-hover-border-color: #94a3b8;
  --p-form-field-focus-border-color: var(--p-primary-color);
  --p-form-field-color: #334155;
  --p-form-field-placeholder-color: #64748b;
  --p-form-field-icon-color: #94a3b8;
  --p-form-field-shadow: 0 0 #0000, 0 0 #0000, 0 1px 2px 0 rgba(18, 18, 23, 0.05);
  --p-form-field-border-radius: var(--p-border-radius-md);

  --p-highlight-background: #ecfdf5;
  --p-highlight-color: #047857;

  /* Etiket (tag) paleti — Aura semantic 500 serisi. Iki temada da TANIMLI olmali:
     daha once `--p-red-*` yalniz dark blokta vardi -> acik temada hata metni
     renksiz kaliyordu (olculdu 2026-11-23). */
  --p-red-200: #fecaca;
  --p-red-300: #fca5a5;
  --p-red-400: #f87171;
  --p-red-500: #ef4444;
  --p-red-600: #dc2626;
  --p-red-800: #991b1b;
  --p-amber-500: #f59e0b;
  --p-green-500: #22c55e;
  --p-blue-200: #bfdbfe;
  --p-blue-300: #93c5fd;
  --p-blue-400: #60a5fa;
  --p-blue-500: #3b82f6;
  --p-blue-600: #2563eb;
  --p-blue-800: #1e40af;
  --p-green-600: #059669;
  --p-purple-500: #a855f7;
}

/* ---------------------------------------------------------------- Aura token: dark (zinc) */
html.app-dark {
  --p-surface-0:   #ffffff;
  --p-surface-50:  #fafafa;
  --p-surface-100: #f4f4f5;
  --p-surface-200: #e4e4e7;
  --p-surface-300: #d4d4d8;
  --p-surface-400: #a1a1aa;
  --p-surface-500: #71717a;
  --p-surface-600: #52525b;
  --p-surface-700: #3f3f46;
  --p-surface-800: #27272a;
  --p-surface-900: #18181b;
  --p-surface-950: #09090b;

  --p-primary-color: #34d399;
  --p-primary-contrast-color: #18181b;
  --p-primary-hover-color: #6ee7b7;
  --p-primary-active-color: #a7f3d0;
  /* Koyu zeminde link ACIK tondan turetilir; dolgu zaten kontrast renk tasir. */
  --jm-link-color: #6ee7b7;
  --jm-link-color: color-mix(in oklab, var(--p-primary-color), #fff 16%);
  --jm-btn-bg: var(--p-primary-color);
  --jm-danger-text: #fca5a5;

  --p-text-color: #ffffff;
  --p-text-hover-color: #ffffff;
  --p-text-muted-color: #a1a1aa;

  --p-content-background: #18181b;
  --p-content-hover-background: #27272a;
  /* Aura datatable row.striped.background — zebra deseni (aile standardi) */
  --p-datatable-row-striped-background: #09090b;
  /* dark: Aura red/blue paleti ayni kalir; golgeler daha koyu */
  --p-red-200: #fecaca;
  --p-red-300: #fca5a5;
  --p-red-400: #f87171;
  --p-red-500: #ef4444;
  --p-red-600: #dc2626;
  --p-red-800: #7f1d1d;
  --p-blue-200: #bfdbfe;
  --p-blue-300: #93c5fd;
  --p-blue-600: #2563eb;
  --p-blue-800: #1e3a8a;
  --p-green-600: #059669;
  /* Etiket paleti — koyu zeminde 400 serisi daha okunur (Aura yaklasimi) */
  --p-amber-400: #fbbf24;
  --p-green-400: #4ade80;
  --p-blue-400: #60a5fa;
  --p-purple-400: #c084fc;
  --p-mask-background: rgb(0 0 0 / 60%);
  --p-overlay-popover-shadow: 0 10px 28px rgb(0 0 0 / 45%);
  --p-overlay-popover-background: #18181b;
  --p-content-border-color: #3f3f46;
  /* Katmanli yuzeyler (dark = "siyah" mod): light ile AYNI degisken adlari */
  --jm-app-bg: #09090b;
  --jm-panel-bg: #18181b;
  --jm-panel-alt: #131316;
  --jm-panel-border: #3f3f46;
  --jm-elev-1: 0 1px 2px rgb(0 0 0 / 55%);
  --jm-elev-2: 0 12px 32px rgb(0 0 0 / 55%);

  --p-form-field-background: #09090b;
  --p-form-field-border-color: #52525b;
  --p-form-field-hover-border-color: #71717a;
  --p-form-field-color: #ffffff;
  --p-form-field-placeholder-color: #a1a1aa;
  --p-form-field-icon-color: #a1a1aa;

  --p-highlight-background: rgba(52, 211, 153, 0.16);
  --p-highlight-color: rgba(255, 255, 255, 0.87);

  color-scheme: dark;
}

/* ---------------------------------------------------------------- semantic alias (app.java) */
:root {
  --primary-color: var(--p-primary-color);
  --primary-contrast-color: var(--p-primary-contrast-color);
  --text-color: var(--p-text-color);
  --text-color-secondary: var(--p-text-muted-color);
  --surface-border: var(--p-content-border-color);
  --surface-card: var(--p-content-background);
  --surface-hover: var(--p-content-hover-background);
  --content-border-radius: var(--p-content-border-radius);

  /* --- Kabuk ikon dugmesi (TEK KAYNAK) ------------------------------------
     Auth/legal/apex kabugu ile login sonrasi topbar AYNI ikonu cizer:
     olcu/radius/renk buradan gelir, iki tarafta kopya deger yoktur.
     (Kullanici: "auth'taki locales ve mod ikonu /mail topbar'daki ile AYNI
     olacak; merkezi, dinamik, optimize yapilarimiza aykiri davranma".) */
  --jm-icon-btn-size: 2rem;
  --jm-icon-btn-radius: 6px;
  /* Ikon boyutu login sonrasi topbar'in YOGUNLUK standardidir (olculdu:
     13.33px); auth kabugu ayni degeri kullanir ki iki topbar birebir ayni
     gorunsun. */
  --jm-icon-btn-font: 0.8333rem;
  --jm-icon-btn-color: var(--p-text-muted-color);
  --jm-icon-btn-color-hover: var(--p-text-color);
  --jm-icon-btn-bg-hover: var(--p-surface-100);
}

html.app-dark {
  --jm-icon-btn-bg-hover: var(--p-surface-800);
}

/* --- 0.12.7: tema paletleri (yesil / siyah / kirmizi / lacivert) ---
   `app-dark` koyu yuzeyleri verir; `data-accent` YALNIZ vurgu rengini degistirir.
   Boylece dort palet ayni token setiyle calisir (no-duplicate). */
/* 1) ACIK yapi: her temanin light karsiligi (mod = light) */
html[data-accent='neutral'] {
  --p-primary-color: var(--p-surface-700);
  --p-primary-hover-color: var(--p-surface-600);
  --p-primary-active-color: var(--p-surface-800);
  --p-primary-contrast-color: var(--p-surface-0);
  --primary-color: var(--p-primary-color);
  --p-highlight-background: var(--p-surface-200);
  --p-highlight-color: var(--p-surface-900);
}
html[data-accent='red'] {
  --p-primary-color: var(--p-red-600);
  --p-primary-hover-color: var(--p-red-500);
  --p-primary-active-color: var(--p-red-800);
  --p-primary-contrast-color: var(--p-surface-0);
  --primary-color: var(--p-primary-color);
  --p-highlight-background: var(--p-red-200);
  --p-highlight-color: var(--p-red-800);
}
html[data-accent='navy'] {
  --p-primary-color: var(--p-blue-600);
  --p-primary-hover-color: var(--p-blue-500);
  --p-primary-active-color: var(--p-blue-800);
  --p-primary-contrast-color: var(--p-surface-0);
  --primary-color: var(--p-primary-color);
  --p-highlight-background: var(--p-blue-200);
  --p-highlight-color: var(--p-blue-800);
}

/* 2) KARANLIK mod: ayni temalarin koyu karsiligi */
html.app-dark[data-accent='neutral'] {
  --p-primary-color: var(--p-surface-300);
  --p-primary-hover-color: var(--p-surface-200);
  --p-primary-active-color: var(--p-surface-100);
  --p-primary-contrast-color: var(--p-surface-950);
  --primary-color: var(--p-primary-color);
}
html.app-dark[data-accent='red'] {
  --p-primary-color: var(--p-red-400);
  --p-primary-hover-color: var(--p-red-300);
  --p-primary-active-color: var(--p-red-200);
  --p-primary-contrast-color: var(--p-surface-900);
  --primary-color: var(--p-primary-color);
  --p-highlight-background: var(--p-red-800);
  --p-highlight-color: var(--p-red-200);
}
html.app-dark[data-accent='navy'] {
  --p-primary-color: var(--p-blue-400);
  --p-primary-hover-color: var(--p-blue-300);
  --p-primary-active-color: var(--p-blue-200);
  --p-primary-contrast-color: var(--p-surface-950);
  --primary-color: var(--p-primary-color);
  --p-highlight-background: var(--p-blue-800);
  --p-highlight-color: var(--p-blue-200);
}

/* ---------------------------------------------------------------- taban */
* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--jm-app-bg);
  color: var(--text-color);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

html.app-dark, html.app-dark body { background: var(--jm-app-bg); }

a { color: var(--jm-link-color); text-decoration: none; }
a:hover { text-decoration: none; }

/* ---------------------------------------------------------------- AuthLayout birebir */

/* .bg-surface-50 dark:bg-surface-950 flex items-center justify-center min-h-screen relative */
.auth-shell {
  min-height: 100vh;
  min-width: 100vw;
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* B3: kiracinin giris arka plani (yalniz auth aile sayfalari). Okunurluk icin
   gorselin UZERINE mod-duyarli bir perde konur; `--jm-auth-backdrop` JS'ten
   `url("...")` olarak gelir (tirnak `encodeURI` ile kacirilir). */
body.jm-has-backdrop {
  background-image: linear-gradient(rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.76)),
                    var(--jm-auth-backdrop);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}
html.app-dark body.jm-has-backdrop {
  background-image: linear-gradient(rgba(9, 9, 11, 0.74), rgba(9, 9, 11, 0.74)),
                    var(--jm-auth-backdrop);
}

/* Theme toggle button (AuthLayout: absolute p-3 right-4 top-4 rounded-full) */
.auth-theme-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.75rem;
  border-radius: 9999px;
  background: var(--p-surface-0);
  border: 1px solid var(--p-surface-200);
  color: var(--text-color);
  cursor: pointer;
  line-height: 0;
  transition: background-color var(--p-transition-duration),
              border-color var(--p-transition-duration);
  z-index: 10;
}
.auth-theme-toggle:hover { background: var(--p-surface-100); }
html.app-dark .auth-theme-toggle {
  background: var(--p-surface-800);
  border-color: var(--p-surface-700);
}
html.app-dark .auth-theme-toggle:hover { background: var(--p-surface-700); }
.auth-theme-toggle:focus-visible {
  outline: 1px solid var(--primary-color);
  outline-offset: 2px;
}
.auth-theme-toggle .pi { font-size: 1.25rem; }

/* gradient dis cerceve (56px / 0.3rem)
 * GENISLIK SABIT: `width: 100%` flex icinde "shrink-to-fit" olur -> kart
 * icerige gore daralir (olculdu: 361/396/414/448 gibi sayfa basina farkli).
 * Bu yuzden acik genislik verilir: tum auth sayfalari AYNI genislikte,
 * yalniz yukseklik field sayisina gore degisir. */
.auth-card-outer {
  width: calc(28rem + 0.6rem);
  max-width: calc(100vw - 2rem);
  border-radius: 56px;
  padding: 0.3rem;
  background: linear-gradient(180deg, var(--primary-color) 10%, rgba(33, 150, 243, 0) 30%);
}

/* ic kart (53px, max-w 28rem)
 * NOT: min-height YOK — kullanici istegi: "form sadece field sayisina gore
 * buyuyup kuculebilmeli, ortada sabit olmali". Yatay/dikey ortalama
 * .auth-shell'de; kart yuksekligi icerige gore. */
.auth-card {
  background: var(--jm-panel-bg);
  border: 1px solid var(--jm-panel-border);
  box-shadow: var(--jm-elev-2);
  border-radius: 53px;
  max-width: 28rem;
  width: 100%;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
html.app-dark .auth-card { background: var(--jm-panel-bg); border-color: var(--jm-panel-border); }

.auth-logo { display: flex; justify-content: center; margin: 0 auto 1.25rem; }
.auth-logo img { max-height: 40px; width: auto; object-fit: contain; }
.auth-logo img:hover { opacity: 0.9; }

.auth-title {
  text-align: center;
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.5;
  color: var(--p-surface-900);
  margin: 0 0 0.75rem;
}
html.app-dark .auth-title { color: var(--p-surface-0); }

.auth-subtitle {
  display: block;
  text-align: center;
  font-size: 0.875rem;
  color: var(--text-color-secondary);
}

/* form: flex flex-col gap-6 */
.auth-form { display: flex; flex-direction: column; gap: 1.5rem; margin-top: 1.5rem; }
/* `hidden` özniteliği KAZANMALI: `.auth-form`/`.auth-help` gibi `display` kuralı
   olan bileşenlerde UA'nın `[hidden]{display:none}` kuralı ezilir → başarı
   durumunda form EKRANDA KALIYORDU (canlıda ölçüldü 2026-11-29, TRAPS #385). */
.auth-form[hidden],
.auth-help[hidden],
.auth-state[hidden],
.auth-note[hidden] { display: none; }
.auth-head { margin-bottom: 1rem; }

/* label: block font-medium mb-2 text-base */
.auth-label {
  display: block;
  font-weight: 500;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  color: var(--p-surface-900);
}
html.app-dark .auth-label { color: var(--p-surface-0); }

/* ---------------------------------------------------------------- PrimeVue InputText (Aura) */
.p-inputtext {
  width: 100%;
  max-width: 24rem;
  font-family: inherit;
  font-feature-settings: inherit;
  font-size: 1rem;
  color: var(--p-form-field-color);
  background: var(--p-form-field-background);
  border: 1px solid var(--p-form-field-border-color);
  border-radius: var(--p-form-field-border-radius);
  padding: var(--p-form-field-padding-y) var(--p-form-field-padding-x);
  box-shadow: var(--p-form-field-shadow);
  appearance: none;
  transition: background-color var(--p-transition-duration),
              color var(--p-transition-duration),
              border-color var(--p-transition-duration),
              box-shadow var(--p-transition-duration),
              outline-color var(--p-transition-duration);
}
.p-inputtext::placeholder { color: var(--p-form-field-placeholder-color); }
.p-inputtext:hover { border-color: var(--p-form-field-hover-border-color); }
.p-inputtext:focus,
.p-inputtext:focus-visible {
  outline: 0 none;
  outline-offset: 0;
  border-color: var(--p-form-field-focus-border-color);
}

/* PrimeVue Password: sarmalayici + goz ikonu */
.p-password { position: relative; display: inline-flex; width: 100%; max-width: 24rem; }
.p-password .p-inputtext { padding-right: 2.75rem; }
.p-password-toggle {
  position: absolute;
  top: 50%;
  right: 0.5rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: var(--p-border-radius-md);
  background: transparent;
  color: var(--p-form-field-icon-color);
  cursor: pointer;
  line-height: 0;
}
.p-password-toggle:hover { color: var(--p-text-hover-color); }
.p-password-toggle:focus-visible {
  outline: 1px solid var(--primary-color);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------- PrimeVue Button (Aura primary) */
.p-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1;
  padding: var(--p-form-field-padding-y) var(--p-form-field-padding-x);
  border-radius: var(--p-form-field-border-radius);
  border: 1px solid var(--jm-btn-bg);
  background: var(--jm-btn-bg);
  color: var(--p-primary-contrast-color);
  cursor: pointer;
  transition: background-color var(--p-transition-duration),
              border-color var(--p-transition-duration),
              color var(--p-transition-duration),
              outline-color var(--p-transition-duration);
}
.p-button:hover {
  background: var(--p-primary-hover-color);
  border-color: var(--p-primary-hover-color);
  color: var(--p-primary-contrast-color);
}
.p-button:active {
  background: var(--p-primary-active-color);
  border-color: var(--p-primary-active-color);
}
.p-button:focus-visible { outline: 1px solid var(--primary-color); outline-offset: 2px; }
.p-button:disabled,
.p-button[aria-disabled="true"] {
  opacity: var(--p-disabled-opacity);
  cursor: not-allowed;
  pointer-events: none;
}
.p-button-block { width: 100%; max-width: 24rem; }

/* ikincil varyant (outlined) - "Java hesap ile giris" */
.p-button-outlined {
  background: transparent;
  border-color: var(--p-form-field-border-color);
  color: var(--text-color);
}
.p-button-outlined:hover {
  background: var(--p-content-hover-background);
  border-color: var(--p-form-field-hover-border-color);
  color: var(--p-text-hover-color);
}
html.app-dark .p-button-outlined {
  background: transparent;
  border-color: var(--p-surface-600);
  color: var(--p-surface-0);
}
html.app-dark .p-button-outlined:hover {
  background: var(--p-surface-800);
  border-color: var(--p-surface-500);
}

/* ---------------------------------------------------------------- PrimeVue Checkbox (Aura) */
.p-checkbox {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
  flex: 0 0 auto;
  border: 1px solid var(--p-form-field-border-color);
  border-radius: var(--p-border-radius-sm);
  background: var(--p-form-field-background);
  cursor: pointer;
  transition: background-color var(--p-transition-duration),
              border-color var(--p-transition-duration);
}
.p-checkbox:hover { border-color: var(--p-form-field-hover-border-color); }
.p-checkbox input {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}
.p-checkbox input:checked ~ .p-checkbox-box,
.p-checkbox input:checked + .p-checkbox-box {
  background: var(--primary-color);
  border-color: var(--primary-color);
}
.p-checkbox-box {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  display: grid;
  place-items: center;
  /* TIKLAMA GECIRGEN: bu span, alttaki <input>'un uzerine cizilir. Aksi halde
   * pointer event'leri yutulur ve checkbox isaretlenmez (olculdu). */
  pointer-events: none;
}
.p-checkbox-box::after {
  content: "";
  width: 0.45rem;
  height: 0.25rem;
  border-left: 2px solid var(--p-primary-contrast-color);
  border-bottom: 2px solid var(--p-primary-contrast-color);
  transform: rotate(-45deg) translateY(-0.05rem);
  opacity: 0;
  transition: opacity var(--p-transition-duration);
}
.p-checkbox input:checked ~ .p-checkbox-box::after,
.p-checkbox input:checked + .p-checkbox-box::after { opacity: 1; }
.p-checkbox input:focus-visible ~ .p-checkbox-box,
.p-checkbox input:focus-visible + .p-checkbox-box {
  outline: 1px solid var(--primary-color);
  outline-offset: 2px;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}
.checkbox-row label {
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--p-surface-700);
  cursor: pointer;
}
html.app-dark .checkbox-row label { color: var(--p-surface-200); }

/* ---------------------------------------------------------------- durum ekranlari */
.auth-state { text-align: center; }
.auth-state-icon {
  display: block;
  margin: 0 auto 1.5rem;
  line-height: 0;
}
.auth-state-icon .pi { font-size: 4rem; }
.auth-state-icon.is-success .pi { color: #22c55e; }  /* green-500 */
.auth-state-icon.is-error .pi { color: var(--p-red-500); }    /* red-500 */
.auth-state h2 {
  margin: 0 0 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--p-surface-900);
}
html.app-dark .auth-state h2 { color: var(--p-surface-0); }
.auth-state p {
  margin: 0 0 1.5rem;
  color: var(--text-color-secondary);
  font-size: 0.9375rem;
}
.auth-state .p-button { margin-top: 0.25rem; }

/* alan alti yardim metni */
.auth-help {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.8125rem;
  color: var(--text-color-secondary);
}


/* ---------------------------------------------------------------- yardimci siniflar */
.text-muted { color: var(--text-color-secondary); }
.text-sm { font-size: 0.875rem; }
.text-center { text-align: center; }
.font-medium { font-weight: 500; }
.auth-row-end { display: flex; justify-content: flex-end; }
.auth-row-between { display: flex; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap; }
.auth-link { font-weight: 500; color: var(--jm-link-color); cursor: pointer; }

/* bilgi kutusu (uyari/not) - highlight token'lari */
.auth-note {
  margin-top: 1.5rem;
  padding: 0.75rem 0.875rem;
  border-radius: var(--p-border-radius-lg);
  background: var(--p-highlight-background);
  color: var(--p-highlight-color);
  font-size: 0.8125rem;
  line-height: 1.55;
}
html.app-dark .auth-note { color: var(--p-surface-200); }

/* hata durumu: giris basarisiz (ayni sinif, tek sahip - tuzak #77) */
.auth-note.is-error {
  margin-top: 0.875rem;
  background: color-mix(in srgb, var(--p-red-500) 12%, transparent);
  color: var(--p-red-600);
}
html.app-dark .auth-note.is-error { color: var(--p-red-300); }

/* ---------------------------------------------------------------- mobil */
@media (max-width: 640px) {
  .auth-card { padding: 1.5rem; border-radius: 43px; }
  .auth-card-outer { border-radius: 46px; }
  .auth-title { font-size: 1.25rem; }
  .auth-logo img { max-height: 32px; }
  .p-inputtext, .p-password, .p-button-block { max-width: 100%; }
  .marketing { padding: 1rem 0.75rem 2rem; }
  .marketing-head h1 { font-size: 1.375rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ---------------------------------------------------------------- Aile kok olcegi
   app.java `_core.scss` ile BIREBIR: 14px, >=1920 viewport ile buyur.
   Boylece ayni rem degeri AYNI px verir (kabuk olculeri eslesir).
   :root DISINDA tanimlanir — HTML elemani secicisi. */
html { font-size: 14px; }
@media (min-width: 1920px) { html { font-size: clamp(14px, 0.73vw, 18px); } }
