/* ERP PSS — Futuristic Industrial Dark Auth Theme */

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

:root {
  --auth-bg:       #0A0A0A;
  --auth-surface:  #121212;
  --auth-card:     #161616;
  --auth-border:   #1E1E1E;
  --auth-accent:   #E11D48;
  --auth-accent-dim: rgba(225, 29, 72, 0.15);
  --auth-text:     #FAFAFA;
  --auth-muted:    #71717A;
  --auth-dim:      #3F3F46;
  --auth-input-bg: #0A0A0A;
  --auth-font:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

.auth-body {
  font-family: var(--auth-font);
  background: var(--auth-bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--auth-text);
  overflow: hidden;
  position: relative;
}

/* Animated background grid */
.auth-body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(225, 29, 72, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(225, 29, 72, 0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* Glow orb top-right */
.auth-body::after {
  content: '';
  position: fixed;
  top: -200px;
  right: -200px;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(225, 29, 72, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
  animation: pulse-glow 6s ease-in-out infinite alternate;
}

@keyframes pulse-glow {
  from { opacity: 0.6; transform: scale(1); }
  to   { opacity: 1;   transform: scale(1.15); }
}

.auth-wrapper {
  width: 100%;
  max-width: 400px;
  padding: 20px;
  position: relative;
  z-index: 1;
}

.auth-card {
  background: var(--auth-card);
  border: 1px solid var(--auth-border);
  border-radius: 16px;
  padding: 40px 32px;
  box-shadow:
    0 0 0 1px rgba(225, 29, 72, 0.05),
    0 25px 60px rgba(0, 0, 0, 0.5),
    0 0 80px rgba(225, 29, 72, 0.04);
  backdrop-filter: blur(10px);
  transition: box-shadow 0.3s ease;
}

.auth-card:hover {
  box-shadow:
    0 0 0 1px rgba(225, 29, 72, 0.1),
    0 25px 60px rgba(0, 0, 0, 0.5),
    0 0 120px rgba(225, 29, 72, 0.06);
}

/* Logo */
.auth-logo {
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, #1A1A2E 0%, #E11D48 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 0 30px rgba(225, 29, 72, 0.25);
  position: relative;
}

.auth-logo::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1px solid rgba(225, 29, 72, 0.2);
  animation: spin-slow 12s linear infinite;
}

@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.auth-logo i {
  color: #FAFAFA;
  font-size: 1.75rem;
}

/* Header */
.auth-header h4 {
  font-weight: 700;
  color: var(--auth-text);
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.auth-header p {
  font-size: 0.85rem;
  color: var(--auth-muted);
  margin-top: 4px;
}

/* Form */
.auth-card label,
.auth-card .form-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--auth-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-card .form-control {
  border-radius: 10px;
  padding: 12px 15px;
  font-size: 0.875rem;
  background: var(--auth-input-bg);
  border: 1px solid var(--auth-border);
  color: var(--auth-text);
  transition: all 0.2s ease;
}

.auth-card .form-control:focus {
  border-color: var(--auth-accent);
  box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.15);
  background: var(--auth-input-bg);
  color: var(--auth-text);
}

.auth-card .form-control::placeholder {
  color: var(--auth-dim);
}

.auth-card .input-group-text {
  border-radius: 10px 0 0 10px;
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  border-right: none;
  color: var(--auth-muted);
}

.auth-card .input-group .form-control {
  border-radius: 0 10px 10px 0;
}

.auth-card .input-group .form-control:focus + .input-group-text,
.auth-card .input-group:focus-within .input-group-text {
  border-color: var(--auth-accent);
}

.auth-card .input-group .btn-outline-secondary {
  border: 1px solid var(--auth-border);
  border-left: none;
  border-radius: 0 10px 10px 0;
  color: var(--auth-muted);
  background: var(--auth-surface);
}

.auth-card .input-group .btn-outline-secondary:hover {
  color: var(--auth-accent);
  background: var(--auth-accent-dim);
  border-color: var(--auth-accent);
}

.auth-card .form-check-input {
  background-color: var(--auth-input-bg);
  border-color: var(--auth-dim);
}

.auth-card .form-check-input:checked {
  background-color: var(--auth-accent);
  border-color: var(--auth-accent);
}

.auth-card .form-check-label {
  font-size: 0.85rem;
  color: var(--auth-muted);
}

/* Primary button */
.auth-card .btn-primary {
  border-radius: 10px;
  padding: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  background: linear-gradient(135deg, #E11D48 0%, #BE123C 100%);
  border: none;
  color: #fff;
  letter-spacing: 0.02em;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.auth-card .btn-primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 100%);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.auth-card .btn-primary:hover {
  background: linear-gradient(135deg, #BE123C 0%, #9F1239 100%);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(225, 29, 72, 0.35);
}

.auth-card .btn-primary:hover::before {
  opacity: 1;
}

.auth-card .btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 15px rgba(225, 29, 72, 0.2);
}

/* Footer */
.auth-footer {
  border-top: 1px solid var(--auth-border);
  padding-top: 15px;
  margin-top: 8px;
}

.auth-card .form-text {
  font-size: 0.8rem;
}

.auth-card a {
  color: var(--auth-accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-card a:hover {
  color: #FB7185;
}

/* Alert override for dark theme */
.auth-card .alert-danger {
  background: rgba(220, 38, 38, 0.1);
  border: 1px solid rgba(220, 38, 38, 0.2);
  color: #FCA5A5;
  border-radius: 10px;
}

.auth-card .alert-success {
  background: rgba(22, 163, 74, 0.1);
  border: 1px solid rgba(22, 163, 74, 0.2);
  color: #86EFAC;
  border-radius: 10px;
}

/* Responsive */
@media (max-width: 480px) {
  .auth-wrapper {
    padding: 12px;
  }
  .auth-card {
    padding: 28px 20px;
  }
  .auth-logo {
    width: 60px;
    height: 60px;
  }
  .auth-logo i {
    font-size: 1.4rem;
  }
}
