/* ═══════════════════════════════════════════════════════════
   GLOBALSKY — login.css
   Spécifique à index.html uniquement
   ═══════════════════════════════════════════════════════════ */

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

:root {
  color-scheme: light;
  --font: 'Inter', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}
html[data-theme="dark"] { color-scheme: dark; }

:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --text: #111827;
  --text-2: #4b5563;
  --muted: #7b8794;
  --border: #dde3ea;
  --blue: #075eab;
  --blue-bright: #1788e5;
  --shadow: 0 14px 38px rgba(15,23,42,.08);
}
html[data-theme="dark"] {
  --bg: #070b12;
  --surface: #101722;
  --surface-2: #151f2c;
  --text: #f6f9fc;
  --text-2: #aab7c6;
  --muted: #6f7e8e;
  --border: rgba(255,255,255,.10);
  --blue: #6db7ff;
  --blue-bright: #45a6ff;
}

html, body {
  min-height: 100%;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
}

/* ── Login page ── */
#login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 28px;
  background:
    radial-gradient(circle at 15% 10%, rgba(23,136,229,.22), transparent 28rem),
    linear-gradient(145deg, #050a12 0%, #0b1727 55%, #101e30 100%);
}
#login-page::before {
  content: "";
  position: fixed; inset: 0; pointer-events: none; opacity: .16;
  background-image:
    linear-gradient(rgba(255,255,255,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
}

.login-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 460px;
  padding: 42px;
  background: rgba(255,255,255,.97);
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 24px;
  box-shadow: 0 30px 90px rgba(0,0,0,.38);
}
html[data-theme="dark"] .login-card {
  background: rgba(16,23,34,.98);
  border-color: var(--border);
  color: var(--text);
}

.login-logo { margin-bottom: 32px; }
.brand-logo { display: block; object-fit: contain; object-position: center; border: 1px solid rgba(255,255,255,.10); background: #07080d; }
.login-brand-logo { width: 58px; height: 58px; margin-bottom: 24px; border-radius: 15px; box-shadow: 0 12px 30px rgba(0,0,0,.30); }
.login-logo h1 { font-size: 30px; font-weight: 700; letter-spacing: -.8px; color: var(--text); }
.login-logo p { margin-top: 8px; text-transform: uppercase; letter-spacing: 1.4px; font-size: 11px; font-weight: 700; color: var(--muted); }

.form-group { margin-bottom: 16px; }
label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--text-2); margin-bottom: 7px; }

input {
  width: 100%; min-height: 48px; padding: 0 14px;
  font-size: 15px; font-family: inherit;
  color: #1c1c1e; background: #f4f6f8;
  border: 1px solid #d8e0e8; border-radius: 8px;
  transition: border .2s;
}
html[data-theme="dark"] input { color: var(--text); background: var(--surface-2); border-color: var(--border); }
input:focus { outline: none; border-color: var(--blue-bright); }

.login-error { color: #ff3b30; font-size: 13px; margin-bottom: 12px; display: none; }

.btn-login {
  width: 100%; min-height: 50px; padding: 13px;
  background: linear-gradient(135deg, #147fda, #075eab);
  box-shadow: 0 10px 24px rgba(7,94,171,.22);
  color: white; border: none; border-radius: 12px;
  font-size: 15px; font-weight: 600; cursor: pointer;
  transition: opacity .2s; position: relative;
}
.btn-login:hover:not(:disabled) { opacity: .88; }
.btn-login:disabled { opacity: .65; cursor: not-allowed; }
.btn-login .spinner { display:none; width:18px; height:18px; border:2px solid rgba(255,255,255,.35); border-top-color:white; border-radius:50%; animation:spin .7s linear infinite; position:absolute; right:18px; top:50%; transform:translateY(-50%); }
.btn-login.loading .spinner { display: block; }
.btn-login.loading .btn-label { opacity: .7; }
@keyframes spin { to { transform: translateY(-50%) rotate(360deg); } }

.login-hint { font-size: 12px; color: var(--muted); text-align: center; margin-top: 22px; letter-spacing: .4px; }
.login-footer-link { font-size: 11px; text-align: center; margin-top: 10px; }
.login-footer-link a { color: #c7c7cc; text-decoration: none; }
.login-footer-link a:hover { text-decoration: underline; }

/* ── Denied page ── */
#denied-page {
  display: none; align-items: center; justify-content: center;
  min-height: 100vh; padding: 28px;
  background:
    radial-gradient(circle at 15% 10%, rgba(23,136,229,.22), transparent 28rem),
    linear-gradient(145deg, #050a12 0%, #0b1727 55%, #101e30 100%);
}
.denied-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 380px; padding: 42px;
  background: rgba(255,255,255,.97); border: 1px solid rgba(255,255,255,.14);
  border-radius: 24px; text-align: center; box-shadow: 0 30px 90px rgba(0,0,0,.38);
}
html[data-theme="dark"] .denied-card { background: rgba(16,23,34,.98); border-color: var(--border); }
.denied-card .company-context-mark { display:grid; place-items:center; width:44px; height:44px; border-radius:12px; background:#075eab; color:white; font:800 12px var(--mono); letter-spacing:.7px; margin:0 auto 20px; }
.denied-card h2 { font-size: 22px; font-weight: 700; color: #ff3b30; margin-bottom: 12px; }
.denied-card p  { font-size: 14px; color: var(--muted); margin-bottom: 24px; line-height: 1.5; }

.btn { min-height: 44px; padding: 9px 20px; border-radius: 9px; border: none; font-size: 13px; font-weight: 700; cursor: pointer; transition: opacity .2s; }
.btn:hover { opacity: .85; }
.btn-primary { background: #075eab; color: white; }
