/* ─────────────────────────────────────────
   LEXTER · Login variante F
   Diagonal split dark/light + floating card
   Paleta: teal/verde profundo
───────────────────────────────────────── */
:root {
  --teal-900: #062020;
  --teal-800: #0D2B2E;
  --teal-700: #0F3B3A;
  --teal-500: #0D8A7E;
  --teal-400: #2ABFB0;
  --teal-300: #5DCFC2;
  --teal-200: #9DD4CC;
  --teal-100: #C8EDEA;
  --teal-50:  #EBF8F6;

  --white:    #FFFFFF;
  --gray-50:  #F6FAFA;
  --gray-100: #E8F4F2;
  --gray-300: #B2CCC9;
  --gray-500: #6A9E9A;
  --gray-700: #2E4E4C;

  --text-dark:  #062020;
  --text-muted: #4D7A76;
  --text-hint:  #8DB5B1;

  --danger:    #A32D2D;
  --danger-bg: #FCEBEB;

  --card-w:    400px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  /* Diagonal clip angle */
  --clip-dark: polygon(0 0, 58% 0, 38% 100%, 0 100%);
  --clip-light: polygon(58% 0, 100% 0, 100% 100%, 38% 100%);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

body {
  min-height: 100vh;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* ── Background layers ── */
.bg-dark {
  position: fixed;
  inset: 0;
  background: var(--teal-800);
  z-index: 0;
}

/* Subtle grid texture on dark */
.grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(42,191,176,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(42,191,176,.04) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Light diagonal */
.bg-light {
  position: fixed;
  inset: 0;
  background: var(--gray-50);
  clip-path: var(--clip-light);
  z-index: 1;
}

/* ── Brand corner ── */
.brand-corner {
  position: fixed;
  top: 36px;
  left: 48px;
  z-index: 10;
}

.logo {
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 3px;
  color: var(--teal-200);
  display: block;
}

/* ── Tagline block (dark zone) ── */
.tagline-block {
  position: fixed;
  bottom: 48px;
  left: 48px;
  z-index: 10;
}

.accent-dot {
  width: 28px;
  height: 3px;
  background: var(--teal-400);
  border-radius: 2px;
  margin-bottom: 14px;
}

.tagline-text {
  font-size: 15px;
  font-weight: 400;
  color: var(--teal-100);
  line-height: 1.55;
  margin-bottom: 20px;
  letter-spacing: .2px;
}

.tagline-url {
  font-size: 11px;
  color: var(--teal-500);
  letter-spacing: .5px;
}

/* ── Card wrapper ── */
.card-wrap {
  position: relative;
  z-index: 20;
  width: var(--card-w);
  padding: 40px 48px 40px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* ── Card ── */
.card {
  width: 100%;
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 0.5px solid var(--teal-100);
  padding: 40px 36px 32px;
  box-shadow:
    0 0 0 1px rgba(42,191,176,.06),
    0 24px 48px rgba(6,32,32,.14),
    0 8px 16px rgba(6,32,32,.08);
}

/* ── Card head ── */
.card-head {
  border-left: 3px solid var(--teal-400);
  padding-left: 12px;
  margin-bottom: 28px;
}

.card-head h1 {
  font-size: 20px;
  font-weight: 500;
  color: var(--text-dark);
  letter-spacing: .4px;
  margin-bottom: 2px;
}

.card-head p {
  font-size: 13px;
  color: var(--text-muted);
}

/* ── Fields ── */
.field {
  margin-bottom: 14px;
}

label:not(.remember) {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 5px;
  letter-spacing: .1px;
}

input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 0.5px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 14px;
  color: var(--text-dark);
  background: var(--gray-50);
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}

input[type="email"]:focus,
input[type="password"]:focus,
input[type="text"]:focus {
  border-color: var(--teal-400);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(42,191,176,.14);
}

input::placeholder {
  color: var(--text-hint);
}

/* Password wrapper */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap input {
  padding-right: 40px;
}

.toggle-pwd {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--gray-500);
  padding: 4px;
  display: flex;
  align-items: center;
  width: auto;
  height: auto;
  border-radius: 4px;
  transition: color .15s;
}

.toggle-pwd:hover {
  color: var(--teal-500);
}

/* ── Remember + Forgot row ── */
.form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 4px 0 22px;
  gap: 8px;
}

.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}

.remember input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--teal-400);
  cursor: pointer;
}

.forgot {
  font-size: 12px;
  color: var(--teal-500);
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s;
}

.forgot:hover {
  color: var(--teal-400);
  text-decoration: underline;
}

/* ── Submit button ── */
.btn-submit {
  width: 100%;
  height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--teal-800);
  color: var(--white);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .3px;
  cursor: pointer;
  transition: background .15s, transform .1s;
}

.btn-submit:hover  { background: var(--teal-700); }
.btn-submit:active { transform: scale(.985); }

/* ── Alert ── */
.alert {
  background: var(--danger-bg);
  color: var(--danger);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--danger);
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 18px;
  line-height: 1.45;
}

/* ── Footer ── */
.foot {
  text-align: center;
  font-size: 11px;
  color: var(--text-hint);
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.foot-link {
  color: var(--text-hint);
  text-decoration: none;
  transition: color .15s;
}

.foot-link:hover {
  color: var(--teal-500);
  text-decoration: underline;
}

.foot-sep {
  color: var(--gray-300);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  :root { --clip-dark: none; --clip-light: none; }

  .bg-dark  { clip-path: none; }
  .bg-light { display: none; }

  body { background: var(--gray-50); justify-content: center; overflow: auto; }

  .brand-corner {
    position: fixed;
    top: 20px; left: 20px;
  }

  .tagline-block { display: none; }

  .card-wrap {
    width: 100%;
    padding: 80px 24px 40px;
    min-height: 100vh;
    align-items: center;
  }

  .card {
    max-width: 360px;
    margin: 0 auto;
    padding: 32px 24px 28px;
  }
}