:root {
  --bg-dark: #070b14;
  --bg-panel: #0a0f1d;
  --accent-blue: #1d4ed8;
  --accent-glow: rgba(29, 78, 216, 0.3);
  --text-primary: #f1f5f9;
  --text-secondary: #64748b;
  --border-color: rgba(255, 255, 255, 0.08);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-primary);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  height: 100vh;
  overflow: hidden;
}

.login-container {
  display: flex;
  height: 100vh;
  width: 100%;
}

/* LEFT SIDE */
.system-identity {
  width: 40%;
  background-color: var(--bg-panel);
  border-right: 1px solid var(--border-color);
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.system-identity::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: 
    radial-gradient(circle at 0% 0%, rgba(29, 78, 216, 0.1) 0%, transparent 50%),
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 100% 100%, 30px 30px, 30px 30px;
  pointer-events: none;
}

.tag-container {
  margin-bottom: 2rem;
}

.system-tag {
  display: inline-block;
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent-blue);
  border: 1px solid rgba(59, 130, 246, 0.3);
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  background: rgba(59, 130, 246, 0.05);
  margin-bottom: 1rem;
}

.tag-line {
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: block;
  margin-top: 5px;
}

.identity-header h1 {
  font-size: 2.2rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
}

.identity-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 400px;
}

.system-info {
  margin-top: 3rem;
  border-left: 2px solid var(--border-color);
  padding-left: 1.5rem;
}

.info-item {
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.info-label {
  color: var(--text-secondary);
  margin-right: 0.5rem;
}

.info-value {
  color: var(--accent-blue);
  font-variant-numeric: tabular-nums;
  text-transform: uppercase;
  font-weight: 600;
}

.bottom-note {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  opacity: 0.6;
}

/* RIGHT SIDE */
.login-form-area {
  width: 60%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 70% 30%, rgba(59, 130, 246, 0.03) 0%, transparent 70%);
  position: relative;
}

.login-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 3rem;
  width: 100%;
  max-width: 460px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  position: relative;
}

.top-system-context {
  position: absolute;
  top: 3rem;
  left: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  opacity: 0.8;
}

.top-system-context .separator {
  opacity: 0.3;
}

.auth-header {
  margin-bottom: 2.5rem;
  text-align: center;
}

.auth-tag {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 0.5rem;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 600;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 0.8rem 1rem;
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-blue);
  box-shadow: 0 0 0 3px var(--accent-glow);
  background: rgba(59, 130, 246, 0.05);
}

.btn-authenticate {
  width: 100%;
  background: var(--accent-blue);
  color: white;
  border: none;
  border-radius: 4px;
  padding: 0.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  margin-top: 2rem;
  letter-spacing: 0.02em;
}

.btn-authenticate:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 20px -10px var(--accent-blue);
  filter: brightness(1.1);
}

.btn-authenticate:active {
  transform: translateY(0);
}

.form-footer {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  align-items: center;
}

.footer-link {
  font-size: 0.85rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-link:hover {
  color: var(--accent-blue);
}

.security-note {
  margin-top: 3rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
  opacity: 0.5;
  border-top: 1px solid var(--border-color);
  padding-top: 1.5rem;
  line-height: 1.4;
}

/* Loader Styles */
.loader {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: white;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.authenticating .loader {
  display: block;
}

.authenticating .btn-text {
  display: none;
}

.authenticating .lock-icon {
  display: none;
}

@media (max-width: 1024px) {
  .system-identity {
    display: none;
  }
  .login-form-area {
    width: 100%;
    min-height: 100dvh;
    padding: 1.5rem;
  }
  .login-card {
    padding: 2rem 1.5rem;
    margin-top: 0;
  }
  .top-system-context {
    top: 1.5rem;
  }
}

/* =========================================================
   PORTAL LOGIN — MOBILE RESPONSIVE
========================================================= */

@media (max-width: 600px) {

  html,
  body {
    width: 100%;
    min-height: 100%;
    height: auto;
  }

  body {
    overflow-x: hidden;
    overflow-y: auto;
  }

  .login-container {
    width: 100%;
    min-height: 100svh;
    height: auto;
    display: block;
  }

  /* Hide desktop identity panel */
  .system-identity {
    display: none;
  }

  /* Full mobile login area */
  .login-form-area {
    width: 100%;
    min-height: 100svh;
    height: auto;
    padding: 80px 18px 40px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
  }

  /* Top system label */
  .top-system-context {
    top: 24px;
    left: 0;
    font-size: 0.52rem;
    letter-spacing: 0.14em;
    line-height: 1.6;
    text-align: center;
    width: 100%;
  }

  /* Login card */
  .login-card {
    width: 100%;
    max-width: 430px;
    padding: 28px 20px 24px;
    margin: 0;
    border-radius: 10px;
  }

  /* Authentication heading */
  .auth-header {
    margin-bottom: 28px;
  }

  .auth-tag {
    font-size: 0.58rem;
    letter-spacing: 0.14em;
    line-height: 1.5;
  }

  .auth-title {
    font-size: 1.25rem;
    line-height: 1.35;
    margin-top: 8px;
  }

  /* Form */
  .form-group {
    margin-bottom: 18px;
  }

  .form-label {
    font-size: 0.68rem;
    margin-bottom: 7px;
  }

  .form-input {
    width: 100%;
    min-height: 46px;
    padding: 0.75rem 0.85rem;
    font-size: 0.9rem;
  }

  /* Authenticate button */
  .btn-authenticate {
    min-height: 48px;
    margin-top: 24px;
    padding: 0.8rem;
    font-size: 0.82rem;
  }

  /* Footer links */
  .form-footer {
    margin-top: 22px;
    gap: 10px;
  }

  .footer-link {
    font-size: 0.78rem;
  }

  /* Security message */
  .security-note {
    margin-top: 26px;
    padding-top: 18px;
    font-size: 0.65rem;
    line-height: 1.5;
  }

}
