/* ==========================================================================
   ABS Software - Matte Enterprise Software Login Interface
   ========================================================================== */

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

:root {
  --matte-bg: #090d16;
  --matte-card: #0f1624;
  --matte-card-border: #1e293b;
  --matte-input-bg: #090d16;
  --matte-input-border: #243044;
  --matte-input-focus: #0284c7;
  --accent-blue: #0284c7;
  --accent-blue-hover: #0369a1;
  --accent-cyan-matte: #38bdf8;
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --font-brand: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'Space Grotesk', monospace;
  --font-ui: 'Inter', sans-serif;
}

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

body {
  background-color: var(--matte-bg);
  background-image: 
    radial-gradient(at 50% 0%, #111a2e 0px, transparent 60%),
    radial-gradient(at 80% 100%, #0c121e 0px, transparent 60%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-brand);
  min-height: 100vh;
  overflow-x: hidden;
  user-select: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  position: relative;
  padding: 2rem 1.5rem;
}

/* --------------------------------------------------------------------------
   Subtle Background Constellation Canvas
   -------------------------------------------------------------------------- */
#mesh-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
  opacity: 0.45;
}

/* --------------------------------------------------------------------------
   Top Brand & Dynamic Kinetic Phrase Section
   -------------------------------------------------------------------------- */
.top-branding-section {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 0.5rem;
  margin-bottom: 1.5rem;
  width: 100%;
  max-width: 900px;
}

.brand-abs-title {
  font-family: var(--font-brand);
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-abs-title .logo-glyph-s {
  position: relative;
  display: inline-block;
  clip-path: polygon(0 0, 100% 0, 100% 86%, 86% 100%, 0 100%);
}

.brand-abs-subtitle {
  font-family: var(--font-brand);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.38em;
  color: #64748b;
  margin-top: 0.35rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
}

/* Dynamic Kinetic Phrase: Matte, Clean & Natural */
.phrase-single-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  font-family: var(--font-brand);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  position: relative;
  padding: 0.25rem 0.5rem;
  width: 100%;
  text-align: center;
  margin: 0 auto;
}

.dynamic-word-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 40px;
}

.dynamic-word-text {
  display: inline-flex;
  align-items: center;
  color: #f8fafc;
  font-family: var(--font-brand);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: opacity 0.5s cubic-bezier(0.16, 1, 0.3, 1), transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  transform: translateY(0);
  opacity: 1;
}

.dynamic-word-text.transition-out {
  opacity: 0;
  transform: translateY(-8px);
}

.dynamic-word-text.transition-in-prep {
  opacity: 0;
  transform: translateY(8px);
  transition: none !important;
}

/* Matte accent letter 'A' - Sharp & elegant without neon glow */
.dynamic-word-text .char-a {
  color: var(--accent-cyan-matte);
  font-weight: 800;
  margin-right: 1px;
  display: inline-block;
}

/* Fixed Anchor Inline */
.anchor-phrase-inline {
  color: #f8fafc;
  font-family: var(--font-brand);
  font-size: 1.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
}

/* --------------------------------------------------------------------------
   Centered Matte Enterprise Login Card
   -------------------------------------------------------------------------- */
.login-card-container {
  position: relative;
  z-index: 20;
  width: 100%;
  max-width: 420px;
  margin: 0.5rem auto;
}

.login-card {
  background: var(--matte-card);
  border: 1px solid var(--matte-card-border);
  border-radius: 12px;
  padding: 2.25rem 2.25rem 1.85rem;
  box-shadow: 
    0 16px 32px -8px rgba(0, 0, 0, 0.5),
    0 4px 12px rgba(0, 0, 0, 0.3);
  transition: border-color 0.2s ease;
}

.login-card:hover {
  border-color: #2e3d55;
}

/* Card Logo Emblem */
.card-logo-container {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
}

.card-logo-img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

.card-header {
  margin-bottom: 1.5rem;
  text-align: center;
}

.card-title {
  font-family: var(--font-brand);
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ffffff;
  text-transform: uppercase;
  margin-bottom: 0.2rem;
}

.card-subtitle {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 1.15rem;
  position: relative;
}

.form-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 500;
  color: #94a3b8;
  margin-bottom: 0.4rem;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.form-input {
  width: 100%;
  background: var(--matte-input-bg);
  border: 1px solid var(--matte-input-border);
  border-radius: 6px;
  padding: 0.72rem 0.95rem;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  color: #ffffff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input::placeholder {
  color: #475569;
}

.form-input:focus {
  border-color: var(--matte-input-focus);
  box-shadow: 0 0 0 2px rgba(2, 132, 199, 0.2);
}

.password-toggle-btn {
  position: absolute;
  right: 0.75rem;
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 0.35rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: color 0.2s ease;
}

.password-toggle-btn:hover {
  color: #cbd5e1;
}

.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.35rem;
  margin-bottom: 1.5rem;
  font-size: 0.8rem;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: #94a3b8;
  cursor: pointer;
  user-select: none;
  transition: color 0.2s ease;
}

.checkbox-label:hover {
  color: #e2e8f0;
}

.custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  background: #090d16;
  border: 1px solid #334155;
  border-radius: 3px;
  cursor: pointer;
  position: relative;
  outline: none;
  transition: all 0.2s ease;
}

.custom-checkbox:checked {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
}

.custom-checkbox:checked::after {
  content: '✓';
  position: absolute;
  color: #ffffff;
  font-size: 10px;
  font-weight: 800;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.forgot-password-link {
  color: var(--accent-cyan-matte);
  text-decoration: none;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  transition: color 0.2s ease;
}

.forgot-password-link:hover {
  color: #7dd3fc;
  text-decoration: underline;
}

/* Matte Enterprise Action Button */
.btn-submit-login {
  width: 100%;
  background: #0284c7;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 0.8rem 1.5rem;
  font-family: var(--font-brand);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.1s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-submit-login:hover {
  background: #0369a1;
}

.btn-submit-login:active {
  transform: translateY(1px);
}

.card-footer {
  margin-top: 1.15rem;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
}

.login-status-feedback {
  margin-top: 0.8rem;
  padding: 0.55rem 0.85rem;
  border-radius: 6px;
  font-size: 0.8rem;
  text-align: center;
  display: none;
  animation: fadeIn 0.2s ease;
}

.login-status-feedback.success {
  display: block;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.login-status-feedback.error {
  display: block;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #f87171;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --------------------------------------------------------------------------
   Bottom Section: Tagline
   -------------------------------------------------------------------------- */
.bottom-branding-section {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  width: 100%;
}

.brand-tagline-bottom {
  font-family: var(--font-brand);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  color: #475569;
  text-transform: uppercase;
}

/* --------------------------------------------------------------------------
   Responsive Adaptations
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  body {
    padding: 1.5rem 1rem;
  }
  .brand-abs-title {
    font-size: 2.5rem;
  }
  .phrase-single-row {
    font-size: 1.25rem;
  }
  .dynamic-word-text {
    font-size: 1.25rem;
  }
  .anchor-phrase-inline {
    font-size: 1.25rem;
  }
  .login-card {
    padding: 1.6rem 1.4rem;
  }
}
