/* css/app.css — Wenest AI Academy: bas-stil för login och skal.
   Alla klientspecifika färger/bilder kommer som CSS-variabler från tenant_branding.
   Lägg ALDRIG in kundspecifika regler här - då tappar vi en motor för alla. */

:root {
  --c-primary: #0f2540;
  --c-accent: #2563eb;
  --c-overlay: rgba(15, 37, 64, .45);
  --c-text: #1a1a1a;
  --c-muted: #94a3b8;
  --c-border: #e5e7eb;
  --login-image: none;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f8f9fa;
  color: var(--c-text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* === LOGIN: stor bild till vänster, inloggningspanel till höger === */
.login-screen { position: fixed; inset: 0; display: flex; background: #fff; }

.login-image {
  flex: 1;
  background: var(--login-image) center/cover no-repeat;
  background-color: var(--c-primary);
  position: relative;
  min-width: 0;
}
.login-image::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, var(--c-overlay) 0%, rgba(0, 0, 0, .35) 100%);
}
.login-image-text { position: absolute; bottom: 56px; left: 56px; right: 56px; z-index: 1; color: #fff; }
.login-image-text h2 {
  font-size: 40px; font-weight: 700; line-height: 1.2;
  margin-bottom: 12px; text-shadow: 0 2px 14px rgba(0, 0, 0, .35);
}
.login-image-text p {
  font-size: 17px; opacity: .9; max-width: 520px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, .35);
}

.login-panel {
  width: 480px; flex-shrink: 0;
  display: flex; flex-direction: column; justify-content: center;
  padding: 60px 56px; background: #fff;
}
.login-logo { margin-bottom: 44px; min-height: 40px; }
.login-logo img { width: 180px; height: auto; }
.login-logo .login-wordmark { font-size: 24px; font-weight: 700; color: var(--c-primary); letter-spacing: -.5px; }

.login-greeting { font-size: 28px; font-weight: 700; margin-bottom: 6px; }
.login-subtitle { font-size: 15px; color: var(--c-muted); margin-bottom: 36px; }

.login-form-group { margin-bottom: 20px; }
.login-form-group label {
  display: block; font-size: 13px; font-weight: 600; color: #334155; margin-bottom: 6px;
}
.login-form-group input {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--c-border); border-radius: 10px;
  font-size: 15px; font-family: inherit; background: #fafbfc; transition: all .2s;
}
.login-form-group input:focus {
  outline: none; border-color: var(--c-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); background: #fff;
}
.login-form-group input::placeholder { color: #c1c7cd; }

.login-remember {
  display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px;
}
.login-remember label {
  display: flex; align-items: center; gap: 8px; font-size: 13px; color: #64748b; cursor: pointer;
}
.login-remember input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--c-primary); cursor: pointer; }
.login-forgot { font-size: 13px; color: var(--c-accent); text-decoration: none; font-weight: 500; }
.login-forgot:hover { text-decoration: underline; }

/* GDPR-godkännande - obligatoriskt för att kunna logga in */
.login-consent { margin-bottom: 24px; }
.login-consent label {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 12.5px; line-height: 1.5; color: #64748b; cursor: pointer;
}
.login-consent input[type=checkbox] {
  width: 16px; height: 16px; flex-shrink: 0; margin-top: 2px;
  accent-color: var(--c-primary); cursor: pointer;
}
.login-consent a { color: var(--c-accent); font-weight: 500; }

.login-btn {
  width: 100%; padding: 14px;
  background: var(--c-primary); color: #fff;
  border: none; border-radius: 10px;
  font-size: 15px; font-weight: 600; font-family: inherit; cursor: pointer;
  letter-spacing: .2px; transition: all .2s;
}
.login-btn:hover { filter: brightness(1.15); box-shadow: 0 4px 14px rgba(15, 37, 64, .25); }
.login-btn:active { transform: scale(.985); }
.login-btn:disabled { opacity: .6; cursor: not-allowed; }

.login-alert {
  display: none; margin-top: 14px; padding: 10px 14px;
  border-radius: 8px; font-size: 13px; text-align: center;
  background: #fef2f2; border: 1px solid #fecaca; color: #dc2626;
}

/* Klientväljare - visas när samma konto finns hos flera klienter */
.tenant-choice { display: none; margin-top: 20px; }
.tenant-choice h3 { font-size: 15px; font-weight: 600; margin-bottom: 12px; }
.tenant-choice button {
  display: block; width: 100%; text-align: left;
  padding: 14px 16px; margin-bottom: 10px;
  border: 1.5px solid var(--c-border); border-radius: 10px;
  background: #fff; font-family: inherit; font-size: 15px; font-weight: 500; cursor: pointer;
  transition: all .15s;
}
.tenant-choice button:hover { border-color: var(--c-primary); background: #f8fafc; }

.login-footer { margin-top: 28px; font-size: 12px; color: var(--c-muted); }

@media (max-width: 900px) {
  .login-screen { flex-direction: column; }
  .login-image { flex: 0 0 200px; }
  .login-image-text { bottom: 24px; left: 24px; right: 24px; }
  .login-image-text h2 { font-size: 26px; }
  .login-image-text p { font-size: 14px; }
  .login-panel { width: 100%; padding: 36px 24px; justify-content: flex-start; }
}
