/* ==========================================================================
   SOLAR EXTRACTOR — login.css
   ========================================================================== */

/* Windmill blade spin — eased so it feels like real wind drag */
@keyframes windmill-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* Full-screen background video */
.login-bg {
  position: fixed; inset: 0; z-index: 0;
  overflow: hidden;
  background: #0d1117;
}
.login-bg-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  background: #0a0a0a;
}
.login-bg-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(
    100deg,
    rgba(4,6,12,.60) 0%,
    rgba(4,6,12,.45) 38%,
    rgba(4,6,12,.62) 62%,
    rgba(4,6,12,.68) 100%
  );
}

/* Full layout: hero left + right panel */
.login-split {
  position: relative; z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 460px;
}

/* ── LEFT: hero content ── */
.login-hero {
  display: flex;
  flex-direction: column;
  padding: 60px 60px 48px 64px;
}

/* Top navbar row */
.login-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.login-hero-brand {
  display: flex; align-items: center; gap: 10px;
}
.login-brand-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand) 0%, #d48a10 100%);
  display: grid; place-items: center;
  box-shadow: 0 0 14px rgba(245,166,35,.45);
}
.login-brand-name {
  font-size: 15px; font-weight: 800; color: #fff; letter-spacing: -.02em;
}

/* Small "Sign In" button top-right of left hero */
.login-nav-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  backdrop-filter: blur(10px);
  color: #fff; font-size: 13px; font-weight: 600;
  padding: 8px 18px; border-radius: 999px; text-decoration: none;
  transition: background .15s, border-color .15s;
  cursor: pointer;
}
.login-nav-btn:hover {
  background: rgba(255,255,255,.20);
  border-color: rgba(255,255,255,.30);
  color: #fff;
}
.login-nav-btn svg { opacity: .8; }

/* Windmill SVG wrapper — bottom-right of the hero area */
.login-windmill-wrap {
  flex: 1;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding-bottom: 0px;
  padding-right: 40px;
  pointer-events: none;
}
.login-windmill {
  width: 240px;
  opacity: .75;
  filter: drop-shadow(0 0 24px rgba(245,166,35,.20));
}
.windmill-blades {
  transform-origin: 100px 88px;
  animation: windmill-spin 6s linear infinite;
}

/* Center hero text */
.login-hero-center {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 80px 0 20px;
  flex: 1;
}
.login-hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.09);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: 999px; padding: 6px 16px;
  font-size: 12px; font-weight: 500; color: rgba(255,255,255,.75);
  margin-bottom: 24px; width: fit-content;
}
.login-hero-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand); box-shadow: 0 0 10px var(--brand);
  flex: none; animation: glow-pulse 2s ease-in-out infinite;
}
.login-hero-title {
  font-size: clamp(2.4rem, 4.2vw, 4rem);
  font-weight: 900; line-height: 1.06; letter-spacing: -.04em;
  background: linear-gradient(150deg, #ffe999 0%, #f5a623 45%, #b87310 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  margin-bottom: 18px;
}
.login-hero-sub {
  font-size: 1rem; line-height: 1.75;
  color: rgba(255,255,255,.45);
  max-width: 360px;
}

/* ── RIGHT: panel — blends into the darkened right edge of the photo ── */
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 44px;
  /* transparent so the darkened overlay shows, not a solid black box */
  background: transparent;
}

/* The actual form card */
.login-card {
  width: 100%;
  max-width: 380px;
  background: rgba(12,10,6,.55);
  border: 1px solid rgba(245,166,35,.18);
  border-radius: 28px;
  padding: 48px 40px 44px;
  backdrop-filter: blur(32px) saturate(1.4);
  -webkit-backdrop-filter: blur(32px) saturate(1.4);
  box-shadow:
    0 32px 80px rgba(0,0,0,.50),
    inset 0 1px 0 rgba(245,166,35,.10),
    inset 0 -1px 0 rgba(0,0,0,.10);
}

/* Sun / lock icon */
.login-logo {
  width: 58px; height: 58px;
  background: linear-gradient(135deg, var(--brand) 0%, #d48a10 100%);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 0 28px rgba(245,166,35,.40);
  transition: transform .2s, box-shadow .2s;
}
.login-logo:hover { transform: scale(1.06); box-shadow: 0 0 44px rgba(245,166,35,.60); }
.login-logo.blue-logo {
  background: linear-gradient(135deg, #f5a623 0%, #d48a10 100%);
  box-shadow: 0 0 28px rgba(245,166,35,.45);
}
.login-logo.blue-logo:hover { box-shadow: 0 0 44px rgba(245,166,35,.65); }

/* Admin portal — red/amber identity */
.login-logo.admin-logo {
  background: linear-gradient(135deg, #ff6b35 0%, #c0392b 100%);
  box-shadow: 0 0 28px rgba(192,57,43,.45);
}
.login-logo.admin-logo:hover { box-shadow: 0 0 44px rgba(192,57,43,.65); }

.login-card h1 {
  font-size: 1.55rem; font-weight: 800; text-align: center;
  letter-spacing: -.03em; color: #fff; margin-bottom: 6px;
}
.login-card > p {
  text-align: center; color: rgba(255,255,255,.32);
  font-size: 0.84rem; margin-bottom: 8px;
}
.login-card > p::after {
  content: '';
  display: block; width: 36px; height: 2px;
  background: linear-gradient(90deg, var(--brand), transparent);
  border-radius: 2px; margin: 12px auto 24px;
}

.login-back { display: block; text-align: center; margin-bottom: 20px; font-size: 0.82rem; color: var(--muted); }
.login-back:hover { color: var(--brand); }

/* Admin card — red accent underline instead of brand-orange */
.admin-card > p::after {
  background: linear-gradient(90deg, #ff6b35, transparent);
}
/* Admin input focus ring — red tint */
.admin-card .login-field input:focus {
  border-color: #ff6b35;
  background: rgba(255,107,53,.07) !important;
  box-shadow: 0 0 0 3px rgba(255,107,53,.14);
}

/* Input fields */
.login-field { margin-bottom: 18px; }
.login-field label {
  display: block; font-size: 10.5px; font-weight: 700;
  color: rgba(255,255,255,.38);
  margin-bottom: 7px; text-transform: uppercase; letter-spacing: .1em;
}
.login-field input {
  width: 100%; padding: 13px 16px;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 12px;
  background: rgba(255,255,255,.07) !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  font-size: 0.95rem; font-family: inherit;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
.login-field input:focus {
  outline: none;
  border-color: var(--brand);
  background: rgba(245,166,35,.08) !important;
  box-shadow: 0 0 0 3px rgba(245,166,35,.14);
}
.login-field input::placeholder { color: rgba(255,255,255,.22); }
.login-field input:-webkit-autofill,
.login-field input:-webkit-autofill:hover,
.login-field input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px rgba(18,22,40,.98) inset !important;
  -webkit-text-fill-color: #fff !important;
  border-color: rgba(255,255,255,.12) !important;
}

.login-btn {
  width: 100%; padding: 14px;
  background: linear-gradient(135deg, var(--brand) 0%, #c97d0d 100%);
  color: #000; border: none; border-radius: 12px;
  font-size: 1rem; font-weight: 800; cursor: pointer; margin-top: 4px;
  letter-spacing: -.01em;
  box-shadow: 0 4px 24px rgba(245,166,35,.40);
  transition: opacity .15s, transform .1s, box-shadow .2s;
}
.login-btn:hover  { opacity: .9; transform: translateY(-2px); box-shadow: 0 8px 32px rgba(245,166,35,.55); }
.login-btn:active { transform: translateY(1px); box-shadow: 0 2px 10px rgba(245,166,35,.25); }
.login-btn.blue-btn {
  background: linear-gradient(135deg, #f5a623 0%, #c97d0d 100%);
  color: #000;
  box-shadow: 0 4px 24px rgba(245,166,35,.45);
}
.login-btn.blue-btn:hover { box-shadow: 0 8px 32px rgba(245,166,35,.65); }

.login-btn.admin-btn {
  background: linear-gradient(135deg, #ff6b35 0%, #c0392b 100%);
  color: #fff;
  box-shadow: 0 4px 24px rgba(192,57,43,.40);
}
.login-btn.admin-btn:hover { opacity: .9; box-shadow: 0 8px 32px rgba(192,57,43,.55); }

.login-error {
  background: rgba(248,113,113,.10);
  border: 1px solid rgba(248,113,113,.25);
  color: #fca5a5; border-radius: 10px;
  padding: 11px 14px; font-size: 0.87rem; margin-bottom: 20px;
}

/* ── Responsive ── */
@media (max-width: 900px) {
  .login-split { grid-template-columns: 1fr; }
  .login-hero  { display: none; }
  .login-panel { padding: 40px 24px; }
  .login-card  { max-width: 400px; }
  .login-bg-overlay {
    background: rgba(4,6,12,.82);
  }
}

/* --------------------------------------------------------------------------
   Portal chooser
   -------------------------------------------------------------------------- */
.portal-wrap {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; background: var(--bg); padding: 24px;
}
.portal-logo { width: 60px; height: 60px; background: linear-gradient(135deg, var(--brand) 0%, #e88c10 100%); border-radius: 18px; display: flex; align-items: center; justify-content: center; font-size: 30px; color: #000; margin-bottom: 20px; box-shadow: var(--glow-brand); }
.portal-title { font-size: 1.55rem; font-weight: 800; color: #fff; margin: 0 0 6px; letter-spacing: -.03em; }
.portal-sub   { color: var(--muted); font-size: 0.9rem; margin: 0 0 40px; }
.portal-cards { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.portal-card {
  background: var(--surface); border: 1px solid var(--line2); border-radius: 20px;
  box-shadow: var(--shadow-card); padding: 36px 32px 28px;
  width: 220px; text-align: center; text-decoration: none; color: var(--ink);
  transition: box-shadow .2s, transform .2s, border-color .2s;
  cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.portal-card:hover { transform: translateY(-4px); border-color: var(--brand); box-shadow: var(--glow-brand); }
.portal-card-icon { width: 56px; height: 56px; border-radius: 14px; display: flex; align-items: center; justify-content: center; }
.portal-card-icon.orange { background: var(--brand-glow); color: var(--brand); }
.portal-card-icon.slate  { background: rgba(59,130,246,.12); color: #60a5fa; }
.portal-card-label { font-size: 1.05rem; font-weight: 700; color: #fff; }
.portal-card-hint  { font-size: 0.8rem; color: var(--muted); margin-top: -8px; }
.portal-card-arrow { font-size: 1.1rem; color: var(--brand); opacity: 0; transition: opacity .15s; }
.portal-card:hover .portal-card-arrow { opacity: 1; }
