/* ============================================================
   Silver Palms MIS — login.css
   Login page dedicated styles
   Colors: #006400 (Dark Green) | #90EE90 (Light Green) | #C0C0C0 (Silver)
   Font  : Arial, Helvetica, sans-serif
   ============================================================ */

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
}

body.sp-login-body {
  font-family: Arial, Helvetica, sans-serif;
  display: flex;
  min-height: 100vh;
  background: #001500;
}

/* ════════════════════════════════════════════════════════
   LEFT PANEL — hero / brand / background
════════════════════════════════════════════════════════ */
.sp-left {
  flex: 1 1 58%;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;

  /* Background image — assets/img/bg.jpg */
  background-image: url('../img/bg.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
}

/* Layered dark-green overlay */
.sp-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      170deg,
      rgba(0, 40, 0, 0.60)  0%,
      rgba(0, 100, 0, 0.72) 40%,
      rgba(0, 20, 0, 0.90)  100%
    );
  z-index: 1;
}

/* Subtle radial glow */
.sp-left::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 80%, rgba(144,238,144,0.14) 0%, transparent 55%),
    radial-gradient(ellipse at 80% 10%, rgba(144,238,144,0.07) 0%, transparent 45%);
  z-index: 2;
  pointer-events: none;
}

/* ── Logo bar (top-left) ────────────────────────────── */
.sp-logo-bar {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 32px 48px;
}

.sp-logo-img-wrap {
  flex-shrink: 0;
}

.sp-logo-img {
  height: 64px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 3px 10px rgba(0,0,0,0.45));
  display: block;
}

.sp-logo-fallback {
  display: none;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: #90EE90;
  color: #006400;
  font-size: 1.8rem;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(0,0,0,0.35);
  flex-shrink: 0;
}

.sp-logo-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.sp-logo-name {
  font-size: 1.35rem;
  font-weight: 400;
  color: #ffffff;
  letter-spacing: 0.2px;
  line-height: 1;
}
.sp-logo-name strong {
  font-weight: 700;
  color: #90EE90;
}

.sp-logo-sub {
  font-size: 0.7rem;
  color: rgba(144,238,144,0.8);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ── Hero section (centred) ─────────────────────────── */
.sp-hero {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 48px 48px;
}

.sp-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(144,238,144,0.15);
  border: 1px solid rgba(144,238,144,0.35);
  color: #90EE90;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 22px;
  width: fit-content;
}

.sp-hero-title {
  font-size: 2.6rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.18;
  margin-bottom: 18px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3);
}
.sp-hero-title span {
  color: #90EE90;
}

.sp-hero-desc {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.72);
  line-height: 1.65;
  max-width: 420px;
  margin-bottom: 32px;
}

/* Module chips */
.sp-modules {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.sp-module-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.85);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 6px;
  backdrop-filter: blur(4px);
  transition: background 0.2s, border-color 0.2s;
}
.sp-module-chip:hover {
  background: rgba(144,238,144,0.15);
  border-color: rgba(144,238,144,0.4);
  color: #90EE90;
}
.sp-module-chip i {
  font-size: 0.75rem;
  color: #90EE90;
}

/* Bottom copyright */
.sp-left-foot {
  position: relative;
  z-index: 3;
  padding: 16px 48px;
  font-size: 0.72rem;
  color: rgba(255,255,255,0.35);
  border-top: 1px solid rgba(255,255,255,0.06);
}

/* ════════════════════════════════════════════════════════
   RIGHT PANEL — login form
════════════════════════════════════════════════════════ */
.sp-right {
  flex: 0 0 420px;
  width: 420px;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: -10px 0 50px rgba(0,0,0,0.22);
}

/* Green gradient top bar */
.sp-accent-bar {
  height: 5px;
  background: linear-gradient(90deg, #006400 0%, #90EE90 50%, #006400 100%);
  flex-shrink: 0;
}

.sp-form-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 44px 44px 24px;
  overflow-y: auto;
}

/* ── Form header ────────────────────────────────────── */
.sp-welcome-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #006400;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 8px;
}

.sp-form-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #111;
  margin-bottom: 6px;
  line-height: 1.2;
}

.sp-form-sub {
  font-size: 0.84rem;
  color: #999;
  margin-bottom: 28px;
}

/* ── Alerts ─────────────────────────────────────────── */
.sp-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 0.83rem;
  line-height: 1.45;
  margin-bottom: 18px;
  border-left: 3px solid;
}
.sp-alert i { flex-shrink: 0; margin-top: 1px; }

.sp-alert--warning { background: #fffbeb; border-color: #f59e0b; color: #78350f; }
.sp-alert--success { background: #f0fdf4; border-color: #22c55e; color: #14532d; }
.sp-alert--error   { background: #fef2f2; border-color: #ef4444; color: #7f1d1d; }

/* ── Fields ─────────────────────────────────────────── */
.sp-field {
  margin-bottom: 20px;
  position: relative;
}

.sp-field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  color: #444;
  margin-bottom: 7px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.sp-field-label i {
  color: #006400;
  font-size: 0.75rem;
}

.sp-field-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1.5px solid #e0e0e0;
  border-radius: 8px;
  font-size: 0.9rem;
  font-family: Arial, Helvetica, sans-serif;
  color: #111;
  background: #f9f9f9;
  outline: none;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.sp-field-input:focus {
  border-color: #006400;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(0,100,0,0.10);
}
.sp-field-input::placeholder { color: #c0c0c0; }
.sp-field-input--error {
  border-color: #ef4444 !important;
  background: #fff5f5 !important;
}

/* Animated underline bar */
.sp-field-bar {
  height: 2px;
  background: #006400;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
  margin-top: 2px;
}
.sp-field-input:focus ~ .sp-field-bar {
  transform: scaleX(1);
}

/* Password wrapper */
.sp-pw-wrap {
  position: relative;
}
.sp-pw-input { padding-right: 48px !important; }
.sp-pw-eye {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #bbb;
  font-size: 0.88rem;
  padding: 4px 6px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
  z-index: 2;
}
.sp-pw-eye:hover {
  color: #006400;
  background: rgba(0,100,0,0.06);
}

/* ── Meta row (remember + forgot) ───────────────────── */
.sp-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

/* Custom checkbox */
.sp-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: #555;
  cursor: pointer;
  user-select: none;
}
.sp-checkbox-label input[type="checkbox"] {
  display: none;
}
.sp-checkbox-box {
  width: 17px;
  height: 17px;
  border: 2px solid #C0C0C0;
  border-radius: 4px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.2s, border-color 0.2s;
  position: relative;
}
.sp-checkbox-label input:checked + .sp-checkbox-box {
  background: #006400;
  border-color: #006400;
}
.sp-checkbox-label input:checked + .sp-checkbox-box::after {
  content: '';
  display: block;
  width: 9px;
  height: 5px;
  border-left: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translateY(-1px);
}

.sp-link-forgot {
  font-size: 0.82rem;
  font-weight: 700;
  color: #006400;
  text-decoration: none;
}
.sp-link-forgot:hover {
  text-decoration: underline;
  color: #004d00;
}

/* ── Submit button ──────────────────────────────────── */
.sp-btn-submit {
  width: 100%;
  height: 50px;
  background: #006400;
  border: none;
  border-radius: 8px;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 700;
  font-family: Arial, Helvetica, sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.4px;
  transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
}
/* Shimmer on hover */
.sp-btn-submit::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255,255,255,0.12),
    transparent
  );
  transition: left 0.4s ease;
}
.sp-btn-submit:hover::after { left: 140%; }
.sp-btn-submit:hover {
  background: #007a00;
  box-shadow: 0 6px 24px rgba(0,100,0,0.32);
  transform: translateY(-1px);
}
.sp-btn-submit:active { transform: translateY(0); box-shadow: none; }
.sp-btn-submit:disabled {
  background: #5a9a5a;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}
.sp-btn-submit--loading::after { display: none; }

/* ── Security note ──────────────────────────────────── */
.sp-security-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.75rem;
  color: #bbb;
  text-align: center;
  justify-content: center;
  padding-top: 4px;
  line-height: 1.5;
}
.sp-security-note i { color: #006400; font-size: 0.75rem; flex-shrink: 0; }

/* ── Domain watermark ───────────────────────────────── */
.sp-domain-tag {
  padding: 14px 44px;
  font-size: 0.72rem;
  color: #C0C0C0;
  border-top: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.sp-domain-tag i {
  color: #006400;
  font-size: 0.65rem;
}

/* ════════════════════════════════════════════════════════
   RESPONSIVE — tablet / mobile
════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .sp-left { display: none; }
  .sp-right {
    flex: 1;
    width: 100%;
    box-shadow: none;
  }
  .sp-form-wrap { padding: 40px 28px 20px; }
}

@media (max-width: 480px) {
  .sp-form-wrap { padding: 32px 20px 16px; }
  .sp-form-title { font-size: 1.45rem; }
  .sp-domain-tag { padding: 12px 20px; }
}
