/* ===== CPMS Design System — Dark Theme ===== */
:root {
  --bg-primary: #0a0a0a;
  --bg-card: #111111;
  --bg-input: #1a1a1a;
  --border-color: #2a2a2a;
  --border-focus: #ffcc00;
  --text-primary: #f5f5f5;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;
  --accent-yellow: #ffcc00;
  --accent-yellow-hover: #e6b800;
  --accent-yellow-glow: rgba(255, 204, 0, 0.15);
  --accent-emerald: #10b981;
  --accent-rose: #f43f5e;
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

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

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  overflow-y: auto;
}

/* Animated background grid */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: 
    radial-gradient(circle at 20% 50%, rgba(255, 204, 0, 0.03) 0%, transparent 50%),
    radial-gradient(circle at 80% 20%, rgba(255, 204, 0, 0.02) 0%, transparent 40%),
    radial-gradient(circle at 50% 80%, rgba(16, 185, 129, 0.02) 0%, transparent 40%);
  z-index: 0;
  pointer-events: none;
}

/* Auth Wrapper */
.auth-wrapper {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  width: 100%;
  max-width: 440px;
  padding: 24px;
  margin: 20px 0;
}

/* Logo section */
.logo-section {
  text-align: center;
}

.logo-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: var(--accent-yellow);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 24px;
  color: #111;
  margin-bottom: 16px;
  box-shadow: 0 0 30px rgba(255, 204, 0, 0.3);
}

.logo-title {
  font-size: 28px;
  font-weight: 800;
  color: var(--accent-yellow);
  text-transform: uppercase;
  letter-spacing: 3px;
}

.logo-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 4px;
  letter-spacing: 0.5px;
}

/* Card */
.auth-card {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.4),
    0 0 0 1px rgba(255, 204, 0, 0.05);
}

.auth-header {
  margin-bottom: 24px;
}

.auth-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 13px;
}

/* Form */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.form-input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  border-color: var(--accent-yellow);
  box-shadow: 0 0 0 3px var(--accent-yellow-glow);
}

/* Unified Auth Button */
.btn-auth {
  width: 100%;
  padding: 13px;
  background: var(--accent-yellow);
  color: #111;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.btn-auth:hover:not(:disabled) {
  background: var(--accent-yellow-hover);
  box-shadow: 0 0 20px rgba(255, 204, 0, 0.3);
}

.btn-auth:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Error/Success Messages */
.error-msg {
  color: var(--accent-rose);
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
  display: none;
  padding: 10px;
  background: rgba(244, 63, 94, 0.08);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(244, 63, 94, 0.15);
  white-space: pre-line;
}

.success-msg {
  font-size: 13px;
  margin-top: 12px;
  text-align: center;
  display: none;
  padding: 16px;
  background: rgba(16, 185, 129, 0.08);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--accent-emerald);
}

/* Loader */
.loader {
  border: 2px solid rgba(17, 17, 17, 0.2);
  border-radius: 50%;
  border-top: 2px solid #111;
  width: 16px;
  height: 16px;
  animation: spin 0.8s linear infinite;
  display: none;
}

@keyframes spin { 
  0% { transform: rotate(0deg); } 
  100% { transform: rotate(360deg); } 
}

/* Footer */
.auth-footer {
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-footer a {
  color: var(--accent-yellow);
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

.auth-footer a:hover {
  opacity: 0.8;
}

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

.divider span {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Password strength meter */
.pwd-strength {
  margin-top: 8px;
}

.pwd-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--border-color);
  overflow: hidden;
}

.pwd-bar-fill {
  height: 100%;
  width: 0;
  border-radius: 2px;
  transition: width 0.3s ease, background-color 0.3s ease;
}

.pwd-reqs {
  margin-top: 8px;
  font-size: 11px;
}

.pwd-reqs div {
  padding: 2px 0;
  color: var(--text-muted);
  transition: color 0.2s;
}

.pwd-reqs div.pass {
  color: var(--accent-emerald);
}

.pwd-reqs div.fail {
  color: var(--text-muted);
}

/* Status badge */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: rgba(255, 204, 0, 0.08);
  border: 1px solid rgba(255, 204, 0, 0.15);
  border-radius: 20px;
  font-size: 11px;
  color: var(--accent-yellow);
  font-weight: 600;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--accent-yellow);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}
