/* ============================================
   CosmoPro MMC — Login Page CSS
   ============================================ */

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

:root {
  --gold: #c9a84c;
  --gold-light: #e8c96a;
  --gold-dark: #a07830;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0a0a0f;
  overflow: hidden;
  position: relative;
}

.login-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(201,168,76,0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(139,92,246,0.05) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(59,130,246,0.04) 0%, transparent 50%),
    #0a0a0f;
  z-index: 0;
}

.login-particles {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px; height: 2px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0;
  animation: float linear infinite;
}

@keyframes float {
  0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
  10% { opacity: 0.6; }
  90% { opacity: 0.4; }
  100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

.login-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 420px;
  padding: 20px;
}

.login-card {
  background: rgba(17,17,24,0.9);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 20px;
  padding: 40px;
  backdrop-filter: blur(20px);
  box-shadow:
    0 0 0 1px rgba(201,168,76,0.05),
    0 32px 64px rgba(0,0,0,0.6),
    0 0 80px rgba(201,168,76,0.05);
  animation: cardAppear 0.8s cubic-bezier(0.34,1.56,0.64,1);
}

@keyframes cardAppear {
  from { opacity: 0; transform: translateY(30px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Logo */
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}

.logo-ring {
  width: 72px; height: 72px;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  position: relative;
  box-shadow: 0 0 30px rgba(201,168,76,0.3);
  animation: pulse 3s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 30px rgba(201,168,76,0.3); }
  50% { box-shadow: 0 0 50px rgba(201,168,76,0.5); }
}

.logo-ring::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid rgba(201,168,76,0.3);
  animation: rotateBorder 4s linear infinite;
}

.logo-ring::after {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 1px dashed rgba(201,168,76,0.15);
  animation: rotateBorder 8s linear infinite reverse;
}

@keyframes rotateBorder {
  to { transform: rotate(360deg); }
}

.login-logo h1 {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: 1px;
  margin-bottom: 4px;
}

.login-logo h1 span { color: var(--gold); }

.login-logo p {
  font-size: 12px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 2px;
}

/* Divider */
.login-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 24px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(255,255,255,0.08);
}

.login-divider span {
  font-size: 11px;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}

.input-wrapper {
  position: relative;
}

.input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #555;
  transition: all 0.3s;
}

.form-control {
  width: 100%;
  padding: 12px 14px 12px 44px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: all 0.3s;
  font-family: inherit;
}

.form-control:focus {
  border-color: var(--gold);
  background: rgba(201,168,76,0.05);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.1);
}

.form-control:focus ~ .input-icon,
.input-wrapper:focus-within .input-icon {
  color: var(--gold);
}

.form-control::placeholder { color: #444; }

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #555;
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  transition: all 0.3s;
}

.password-toggle:hover { color: var(--gold); }

/* Remember me */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}

.checkbox-wrap input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--gold);
  cursor: pointer;
}

.checkbox-wrap span {
  font-size: 13px;
  color: #888;
  user-select: none;
}

.forgot-link {
  font-size: 12px;
  color: var(--gold);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.forgot-link:hover { opacity: 1; }

/* Login button */
.btn-login {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  border: none;
  border-radius: 10px;
  color: #000;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.btn-login::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(201,168,76,0.4);
}

.btn-login:hover::before { opacity: 1; }

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

.btn-login .btn-spinner {
  display: none;
  width: 18px; height: 18px;
  border: 2px solid rgba(0,0,0,0.3);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.btn-login.loading .btn-text { display: none; }
.btn-login.loading .btn-spinner { display: block; }

/* Error message */
.login-error {
  display: none;
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  color: #ef4444;
  margin-bottom: 16px;
  align-items: center;
  gap: 8px;
}

.login-error.show { display: flex; }

/* Footer */
.login-footer {
  text-align: center;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.login-footer p {
  font-size: 12px;
  color: #444;
}

.login-footer strong { color: var(--gold); }

/* Corner decorations */
.corner-deco {
  position: fixed;
  z-index: 2;
}

.corner-deco.tl {
  top: 0; left: 0;
  width: 200px; height: 200px;
  background: radial-gradient(ellipse at 0% 0%, rgba(201,168,76,0.06) 0%, transparent 70%);
}

.corner-deco.br {
  bottom: 0; right: 0;
  width: 300px; height: 300px;
  background: radial-gradient(ellipse at 100% 100%, rgba(201,168,76,0.04) 0%, transparent 70%);
}

.grid-lines {
  position: fixed;
  inset: 0;
  z-index: 1;
  background-image:
    linear-gradient(rgba(201,168,76,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}
