/* =================================================
   FONTS – CLEAN SaaS
================================================= */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&display=swap');


/* =====================================
   THEME TOGGLE (DAY / NIGHT)
   vendose NË FILLIM të auth.css
===================================== */

.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: none;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;
  font-size: 18px;
  line-height: 1;

  background: rgba(0, 0, 0, 0.06);
  color: #111;

  transition:
    background 0.25s ease,
    color 0.25s ease,
    transform 0.15s ease;
}

/* Hover – feedback i lehtë */
.theme-toggle:hover {
  transform: scale(1.05);
  background: rgba(0, 0, 0, 0.1);
}

/* ACTIVE / CLICK */
.theme-toggle:active {
  transform: scale(0.95);
}

/* =========================
   NIGHT MODE
========================= */
body.night .theme-toggle {
  background: rgba(255, 255, 255, 0.12);
  color: #f5f5f5;
}

body.night .theme-toggle:hover {
  background: rgba(255, 255, 255, 0.2);
}


/* =================================================
   VARIABLES – MODERN / NEUTRAL
================================================= */
:root {

  --font-title: "Playfair Display", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;

  --bg: #f4f5f7;
  --bg-dark: #0f1115;

  --card: #ffffff;
  --card-dark: #171a21;

  --text: #1f2937;
  --text-dark: #e5e7eb;

  --muted: #6b7280;

  --primary: #2f4a7d;
  --primary-soft: rgba(47,74,125,.15);

  --accent: #c6a15b;
  --danger: #dc2626;

  --radius: 16px;
}

/* =================================================
   RESET
================================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
}

/* =================================================
   MAIN SPLIT LAYOUT
================================================= */
.auth-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100%;
}


/* FOTO – MAJTAS */
.auth-right {
  background:
    linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.55)),
    url("images/loginfoto.png") center / cover no-repeat;
}
.auth-right {
  min-height: 100vh; /* PA KËTË FOTO HUMBET */
  position: relative;
}

/* LOGIN – DJATHTAS */
.auth-left {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 48px;
}

/* =================================================
   MOBILE – FOTO SI BACKGROUND
================================================= */
@media (max-width: 1024px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .auth-right {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.35;
  }

  .auth-left {
    padding: 24px;
  }
}

/* =================================================
   WRAPPER
================================================= */
.auth-wrapper {
  width: 100%;
  max-width: 460px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* =================================================
   HEADER
================================================= */
.auth-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand-logo {
  font-family: var(--font-title);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.6px;
}


.brand-sub {
  font-size: 13px;
  color: var(--muted);
}

.title-gradient,
.photo-overlay h1 {
  font-family: var(--font-title);
}


/* =================================================
   SWITCH + THEME
================================================= */
.header-actions {
  display: flex;
  gap: 10px;
}

.view-switch {
  display: flex;
  background: rgba(0,0,0,.06);
  border-radius: var(--radius);
  overflow: hidden;
}

.view-switch button {
  padding: 8px 14px;
  border: none;
  background: transparent;
  font-weight: 600;
  cursor: pointer;
}

.view-switch button[aria-selected="true"] {
  background: var(--primary);
  color: #fff;
}


/* =================================================
   AUTH PANELS (KRITIKE)
================================================= */
.auth {
  width: 100%;
  overflow: hidden;
}

.panels {
  display: flex;
  width: 200%;
  transition: transform .4s ease;
}

.auth.is-login .panels { transform: translateX(0); }
.auth.is-signup .panels { transform: translateX(-50%); }

/* =================================================
   CARD
================================================= */
.card {
  flex: 0 0 50%;
  background: var(--card);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: 0 20px 40px rgba(0,0,0,.15);
}

/* =================================================
   TITLES
================================================= */
.title-gradient {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 6px;
}

.title-gradient {
  font-family: var(--font-title);
}

.muted {
  font-size: 13px;
  color: var(--muted);
}

/* =================================================
   FIELDS
================================================= */
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.field label {
  font-size: 13px;
  font-weight: 600;
}

.field input {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid rgba(0,0,0,.15);
}

.field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

/* Password toggle */
.with-toggle {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: none;
  cursor: pointer;

  font-size: 16px;
  color: var(--primary);   /* ngjyra kryesore */
  opacity: 0.7;

  transition: opacity .2s ease, transform .2s ease;
}

.toggle-password:hover {
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}


/* Errors */
.error {
  font-size: 12px;
  color: var(--danger);
}

.toggle-password svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}


/* =================================================
   BUTTONS
================================================= */
.btn-accent {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius);
  border: none;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.as-link {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  cursor: pointer;
}

/* =================================================
   FOOTER
================================================= */
.auth-footer {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
}

/* =================================================
   MODAL – FORGOT
================================================= */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal.hidden { display: none; }

.modal .modal-content {
  background: #fff;
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 420px;
}
/* =====================================
   NIGHT MODE – GLOBAL OVERRIDES
===================================== */

body.night {
  background: var(--bg-dark);
  color: var(--text-dark);
}

/* Cards */
body.night .card {
  background: var(--card-dark);
  box-shadow: 0 20px 40px rgba(0,0,0,.6);
}

/* Text muted */
body.night .muted,
body.night .brand-sub,
body.night .auth-footer {
  color: #9ca3af;
}

/* =========================
   INPUTS – DAY MODE (NEUTRAL)
========================= */

.field input {
  background: #f9fafb;      /* gri shumë e lehtë, jo e bardhë e fortë */
  color: #1f2937;           /* tekst i errët neutral */
}

.field input::placeholder {
  color: #9ca3af;
}


/* =========================
   INPUTS – NIGHT MODE (NEUTRAL)
========================= */

body.night .field input {
  background: #262b36; /* gri e errët neutrale, jo e zezë */
  border: 1px solid rgba(255,255,255,.14);
  color: #f1f5f9;      /* tekst i butë, jo i bardhë i fortë */
}

body.night .field input::placeholder {
  color: #9ca3af;
}

body.night .field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(198,161,91,.25);
}


body.night .field input::placeholder {
  color: #d5d6d8;
}

/* View switch */
body.night .view-switch {
  background: rgba(255,255,255,.08);
}

body.night .view-switch button {
  color: var(--text-dark);
}

/* Theme toggle */
body.night .theme-toggle {
  background: rgba(255,255,255,.12);
  color: #fff;
}

/* Links */
body.night .as-link {
  color: #e0c48a;
}

/* Modal */
body.night .modal .modal-content {
  background: var(--card-dark);
  color: var(--text-dark);
}
/* =========================
   INFO BUTTON
========================= */

.info-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  cursor: pointer;

  font-size: 16px;
  font-weight: 700;

  background: rgba(0,0,0,.06);
  color: var(--primary);

  display: flex;
  align-items: center;
  justify-content: center;

  transition: background .2s ease, transform .15s ease;
}

.info-btn:hover {
  background: rgba(0,0,0,.12);
  transform: scale(1.05);
}

body.night .info-btn {
  background: rgba(255,255,255,.12);
  color: var(--accent);
}
.info-btn svg {
  width: 18px;
  height: 18px;
  stroke-width: 1.8;
}

.brand {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-logo {
  font-family: var(--font-title);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.6px;
}


.brand-sub {
  margin-top: 2px;
  font-size: 13px;
  color: var(--muted);
}

/* =================================================
   PHOTO OVERLAY – DESKTOP ONLY
================================================= */



/* Titulli */
.photo-overlay h1 {
  font-family: var(--font-title);
  font-size: 34px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
}

/* Teksti shpjegues */
.photo-overlay p {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  opacity: 0.9;
  max-width: 420px;
}

/* =================================================
   TABLET & MOBILE – HIDE OVERLAY
================================================= */
@media (max-width: 1024px) {
  .photo-overlay {
    display: none;
  }
}
/* =====================================
   PHOTO TEXT – CENTERED & WHITE
===================================== */

.auth-right {
  position: relative;
}



/* Hide në tablet & mobile */
@media (max-width: 1024px) {
  .photo-overlay {
    display: none;
  }
}
/* =================================================
   PHOTO OVERLAY – FINAL, CLEAN
================================================= */

.auth-right {
  position: relative;
  min-height: 100%;
}

/* Teksti mbi foto (DESKTOP) */
.photo-overlay {
  position: absolute;
  inset: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  text-align: center;
  color: #ffffff;

  z-index: 2;
  padding: 40px;
  pointer-events: none;
}

.photo-overlay h1 {
  font-family: 'Playfair Display', serif;
  font-size: 48px;
  font-weight: 600;
  margin-bottom: 12px;
}

.photo-overlay p {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
  opacity: 0.9;
  max-width: 520px;
}

/* TABLET & MOBILE – HIDE TEXT, KEEP PHOTO */
@media (max-width: 1024px) {
  .photo-overlay {
    display: none;
  }

  .auth-right {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: 0.35;
  }
}
/* =========================
   TOAST NOTIFICATIONS
========================= */

#toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  min-width: 260px;
  max-width: 340px;
  padding: 12px 16px;
  border-radius: 12px;

  font-size: 14px;
  font-weight: 500;

  color: #fff;
  background: #333;

  box-shadow: 0 10px 30px rgba(0,0,0,.25);

  opacity: 1;
  transition: opacity .3s ease, transform .3s ease;
}

/* Types */
.toast.success {
  background: #16a34a;
}

.toast.error {
  background: #dc2626;
}

.toast.info {
  background: #2563eb;
}

/* Night mode – pak më soft */
body.night .toast {
  box-shadow: 0 10px 30px rgba(0,0,0,.6);
}
/* =================================================
   MOBILE STABILITY FIX – AUTH
================================================= */
@media (max-width: 1024px) {

  html, body {
    height: 100%;
    overflow: hidden;
  }

  /* Hiq grid-in në mobile */
  .auth-layout {
    display: flex;
    flex-direction: column;
    min-height: 100svh;
  }

  .auth-left {
    flex: 1;
    padding: 16px;
    align-items: center;
    justify-content: center;
  }

  /* Panelët – vetëm një card aktiv */
  .panels {
    width: 100%;
    transform: none !important;
  }

  .card {
    flex: 1 0 100%;
  }

  .auth.is-login .card--signup,
  .auth.is-signup .card--login {
    display: none;
  }

  /* Footer s’duhet në mobile */
  .auth-footer {
    display: none;
  }
}
