/* ==========================================================================
   Soil Health Map & ICAR-IISS | Unique Spatial Portal Login Stylesheet
   File: soil-login.css
   Theme: Deep Spatial Midnight Canvas with Floating Precision Capsule
   ========================================================================== */

:root {
  --portal-bg: #080d1a;
  --portal-bg-grad: linear-gradient(135deg, #060a14 0%, #0b152d 35%, #132450 70%, #070d1e 100%);
  --portal-blue: #2563eb;
  --portal-blue-dark: #1d4ed8;
  --portal-blue-light: #60a5fa;
  --portal-card-bg: #ffffff;
  --portal-text-dark: #0f172a;
  --portal-text-muted: #64748b;
  --portal-border: #e2e8f0;
}

/* --------------------------------------------------------------------------
   1. Spatial Canvas & Ambient Atmospheric Background
   -------------------------------------------------------------------------- */
.spatial-login-canvas {
  min-height: 100vh;
  width: 100%;
  background: var(--portal-bg-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 16px;
  position: relative;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Subtle Animated Coordinate Grid Overlay */
.spatial-login-canvas::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(37, 99, 235, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.07) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
  z-index: 0;
}

/* Glowing Ambient Halo Behind Card */
.spatial-login-canvas::after {
  content: "";
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.22) 0%, rgba(30, 58, 138, 0.08) 50%, transparent 70%);
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

/* Top Subtle Watermark Header */
.canvas-watermark-strip {
  position: absolute;
  top: 20px;
  left: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.55);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  z-index: 1;
}

.canvas-watermark-strip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* --------------------------------------------------------------------------
   2. Floating Precision Login Capsule (Unique Centered Floating Hub)
   -------------------------------------------------------------------------- */
.spatial-card-wrapper {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 410px;
  margin: 0 auto;
}

.spatial-login-card {
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow: 
    0 24px 60px rgba(0, 0, 0, 0.35),
    0 4px 16px rgba(37, 99, 235, 0.15),
    0 0 0 1px rgba(255, 255, 255, 0.1);
  padding: 34px 28px 28px;
  position: relative;
  overflow: hidden;
}

/* Top Card Accent Border */
.spatial-login-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #1e3a8a 0%, #2563eb 50%, #60a5fa 100%);
}

/* --------------------------------------------------------------------------
   3. Card Header & Brand Presentation
   -------------------------------------------------------------------------- */
.card-brand-header {
  text-align: center;
  margin-bottom: 22px;
}

.brand-emblem-ring {
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px solid #bfdbfe;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.2);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.brand-emblem-ring:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.35);
}

.brand-emblem-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.gateway-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 20px;
  background-color: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.3px;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.gateway-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: #10b981;
  display: inline-block;
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
  animation: pulseLiveDot 2s infinite;
}

@keyframes pulseLiveDot {
  0% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.7; }
  100% { transform: scale(1); opacity: 1; }
}

.card-title-main {
  font-size: 19px;
  font-weight: 800;
  color: var(--portal-text-dark);
  line-height: 1.25;
  margin-bottom: 2px;
  letter-spacing: -0.3px;
}

.card-title-sep {
  color: #94a3b8;
  font-weight: 400;
  margin: 0 3px;
}

.card-subtitle-text {
  font-size: 12px;
  color: var(--portal-text-muted);
  font-weight: 600;
  margin-bottom: 0;
}

/* --------------------------------------------------------------------------
   4. Reduced-Width Form Container & Precision Input Fields
   -------------------------------------------------------------------------- */
.reduced-form-box {
  width: 100%;
  max-width: 330px;
  margin: 0 auto;
}

.field-group-item {
  margin-bottom: 14px;
}

.field-label-text {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--portal-text-dark);
  margin-bottom: 5px;
}

/* Icon-Embedded Input Wrapper */
.precision-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon-prefix {
  position: absolute;
  left: 11px;
  color: #64748b;
  font-size: 13.5px;
  pointer-events: none;
  transition: color 0.2s ease;
}

.precision-input {
  width: 100%;
  height: 40px;
  padding: 8px 34px 8px 34px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--portal-text-dark);
  background-color: #f8fafc;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.precision-input::placeholder {
  color: #94a3b8;
  font-weight: 400;
  font-size: 13px;
}

.precision-input:focus {
  outline: none;
  background-color: #ffffff;
  border-color: var(--portal-blue);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.16);
}

.precision-input:focus + .input-icon-prefix,
.precision-input-wrap:focus-within .input-icon-prefix {
  color: var(--portal-blue);
}

/* Password Visibility Toggle */
.pwd-eye-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  font-size: 13px;
  transition: color 0.15s ease;
}

.pwd-eye-toggle:hover {
  color: var(--portal-blue);
}

/* Remember & Forgot Options */
.form-options-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  font-size: 12px;
}

.remember-label {
  color: #334155;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  margin: 0;
}

.link-forgot-pwd {
  color: var(--portal-blue);
  font-weight: 700;
  text-decoration: none;
  transition: color 0.15s ease;
}

.link-forgot-pwd:hover {
  color: var(--portal-blue-dark);
  text-decoration: underline;
}

/* Submit Action Button */
.btn-portal-submit {
  width: 100%;
  height: 42px;
  background: linear-gradient(135deg, var(--portal-blue-dark) 0%, var(--portal-blue) 100%);
  border: none;
  border-radius: 8px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 3px 12px rgba(37, 99, 235, 0.35);
  transition: all 0.2s ease;
}

.btn-portal-submit:hover {
  background: linear-gradient(135deg, #172554 0%, var(--portal-blue-dark) 100%);
  box-shadow: 0 5px 18px rgba(37, 99, 235, 0.45);
  transform: translateY(-1px);
}

.btn-portal-submit:active {
  transform: translateY(0);
}

/* Security Note */
.card-security-footer {
  text-align: center;
  font-size: 11px;
  color: var(--portal-text-muted);
  font-weight: 600;
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.card-security-footer i {
  color: #10b981;
}

/* --------------------------------------------------------------------------
   5. Bottom Quick Badges
   -------------------------------------------------------------------------- */
.portal-bottom-badges {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.portal-badge-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.7);
  background-color: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 4px 10px;
  border-radius: 14px;
  backdrop-filter: blur(6px);
}

.portal-badge-pill i {
  color: var(--portal-blue-light);
  font-size: 11px;
}

/* Responsive Rules */
@media (max-width: 576px) {
  .canvas-watermark-strip {
    display: none;
  }
  .spatial-login-card {
    padding: 26px 18px 20px;
  }
  .reduced-form-box {
    max-width: 100%;
  }
}
