/* ═══════════════════════════════════════════════════════
   AgroTeams — main.css  (Login + Global Variables)
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Variables ── */
:root {
  --green:   #22c55e;
  --green-d: #16a34a;
  --green-l: #4ade80;
  --bg:      #0a0f1a;
  --bg2:     #0f172a;
  --bg3:     #1e293b;
  --border:  rgba(255,255,255,.08);
  --text:    #f1f5f9;
  --muted:   #94a3b8;
  --radius:  14px;
  --shadow:  0 25px 60px rgba(0,0,0,.6);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ─── Login Body ────────────────────────────────────────── */
.login-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: radial-gradient(ellipse at 20% 50%, #0d2818 0%, transparent 60%),
              radial-gradient(ellipse at 80% 20%, #0a1628 0%, transparent 50%),
              var(--bg);
  overflow: hidden;
  position: relative;
}

/* ─── Animated Background Particles ──────────────────── */
.bg-anim {
  position: fixed; inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.bg-anim span {
  position: absolute;
  bottom: -10px;
  border-radius: 50%;
  background: rgba(34,197,94,.15);
  animation: floatUp linear infinite;
}
@keyframes floatUp {
  0%   { transform: translateY(0) scale(1);    opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: .4; }
  100% { transform: translateY(-110vh) scale(0); opacity: 0; }
}

/* ─── Login Container ─────────────────────────────────── */
.login-container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

/* ─── Brand ────────────────────────────────────────────── */
.login-brand {
  text-align: center;
}
.brand-logo {
  width: 240px;
  margin: 0 auto 15px;
  filter: drop-shadow(0 0 15px rgba(34, 197, 94, 0.4));
  animation: pulse 3s ease-in-out infinite;
}
.brand-logo img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
@keyframes pulse {
  0%,100% { transform: scale(1); filter: drop-shadow(0 0 20px rgba(34,197,94,.6)); }
  50%      { transform: scale(1.05); filter: drop-shadow(0 0 35px rgba(34,197,94,.9)); }
}
.brand-sub {
  font-size: .85rem;
  color: var(--muted);
  margin-top: 10px;
  letter-spacing: .5px;
  font-weight: 500;
}

/* ─── Login Card ───────────────────────────────────────── */
.login-card {
  width: 100%;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 32px 28px;
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.07);
}

.ms-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: .7rem;
  color: var(--muted);
  margin-bottom: 20px;
}
.ms-badge svg { width: 18px; height: 18px; border-radius: 3px; }

.login-card h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 4px;
}
.login-card > p {
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 24px;
}

/* ─── Form ──────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
  display: block;
  font-size: .8rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 7px;
}
.input-wrap {
  position: relative;
}
.input-wrap input {
  width: 100%;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 10px;
  padding: 11px 14px 11px 40px;
  color: var(--text);
  font-size: .9rem;
  font-family: inherit;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.input-wrap input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(34,197,94,.15);
}
.input-wrap input::placeholder { color: rgba(148,163,184,.5); }

.left-icon {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: .85rem;
  pointer-events: none;
}
.eye-btn {
  position: absolute;
  right: 10px; top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
  font-size: .85rem;
  transition: color .2s;
}
.eye-btn:hover { color: var(--text); }

.form-opts {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .78rem;
  color: var(--muted);
  cursor: pointer;
}
.check-label input { display: none; }
.check-box {
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1.5px solid rgba(255,255,255,.25);
  display: flex; align-items: center; justify-content: center;
  transition: all .2s;
  flex-shrink: 0;
}
.check-label input:checked + .check-box {
  background: var(--green);
  border-color: var(--green);
}
.check-label input:checked + .check-box::after {
  content: '✓';
  color: #000;
  font-size: .65rem;
  font-weight: 700;
}
.forgot {
  font-size: .78rem;
  color: var(--green);
  text-decoration: none;
  transition: opacity .2s;
}
.forgot:hover { opacity: .7; }

/* ─── Login Button ─────────────────────────────────────── */
.btn-login {
  width: 100%;
  background: linear-gradient(135deg, var(--green), var(--green-d));
  border: none;
  border-radius: 11px;
  color: #fff;
  font-size: .95rem;
  font-weight: 600;
  font-family: inherit;
  padding: 13px;
  cursor: pointer;
  transition: transform .15s, box-shadow .15s;
  box-shadow: 0 4px 20px rgba(34,197,94,.4);
  display: flex; align-items: center; justify-content: center; gap: 8px;
  position: relative;
  overflow: hidden;
}
.btn-login::before {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.15), transparent);
  opacity: 0;
  transition: opacity .2s;
}
.btn-login:hover::before { opacity: 1; }
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 6px 25px rgba(34,197,94,.5); }
.btn-login:active { transform: translateY(0); }
.btn-login:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-txt { display: flex; align-items: center; gap: 8px; }

.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Error Box ─────────────────────────────────────────── */
.error-box {
  display: flex; align-items: center; gap: 8px;
  background: rgba(239,68,68,.12);
  border: 1px solid rgba(239,68,68,.3);
  border-radius: 9px;
  padding: 10px 14px;
  font-size: .82rem;
  color: #fca5a5;
  margin-top: 14px;
  animation: slideIn .25s ease;
}
.error-box.hidden { display: none; }
@keyframes slideIn {
  from { opacity:0; transform:translateY(-8px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ─── Footer ────────────────────────────────────────────── */
.login-footer {
  font-size: .72rem;
  color: rgba(148,163,184,.4);
  text-align: center;
}

/* ─── Scrollbar Global ──────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.25); }
