/* Magnic Antispam - Enterprise Login Stylesheet */
:root {
  --as-brand-orange: #f06026;
  --as-brand-orange-hover: #db4f18;
  --as-brand-orange-light: rgba(240, 96, 38, 0.14);
  --as-bg-canvas: #090b10;
  --as-card-bg: #ffffff;
  --as-text-main: #0f172a;
  --as-text-muted: #64748b;
  --as-border-color: #cbd5e1;
  --as-border-focus: #f06026;
  --as-radius-card: 18px;
  --as-radius-input: 10px;
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0 !important;
  padding: 0 !important;
  min-height: 100vh !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  color: var(--as-text-main) !important;
  background-color: var(--as-bg-canvas) !important;
  background-image: 
    radial-gradient(circle at 50% 0%, rgba(240, 96, 38, 0.15) 0%, transparent 60%),
    radial-gradient(circle at 80% 85%, rgba(30, 41, 59, 0.5) 0%, transparent 55%),
    radial-gradient(circle at 15% 90%, rgba(15, 23, 42, 0.7) 0%, transparent 55%) !important;
  background-attachment: fixed !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
}

.login-wrapper {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
}

/* Card */
#loginpanel {
  width: 100% !important;
  max-width: 440px !important;
  margin: 0 auto !important;
  padding: 38px 36px 30px 36px !important;
  box-sizing: border-box !important;
  background: var(--as-card-bg) !important;
  border-radius: var(--as-radius-card) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(0, 0, 0, 0.05) !important;
  white-space: normal !important;
  text-align: left !important;
  animation: fadeInCard 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeInCard {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Header & Logo */
.brand-header {
  text-align: center;
  margin-bottom: 24px;
}

.logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}

#mclogo {
  display: block !important;
  max-width: 310px !important;
  width: 100% !important;
  height: auto !important;
  margin: 0 auto !important;
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--as-text-muted);
  background: #f1f5f9;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background-color: var(--as-brand-orange);
  box-shadow: 0 0 6px rgba(240, 96, 38, 0.8);
}

/* Error banner */
#badlogin {
  display: none;
}

#badlogin:not(:empty) {
  display: flex !important;
  align-items: center;
  gap: 10px;
  background: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  color: #991b1b !important;
  padding: 12px 14px !important;
  border-radius: 10px !important;
  font-size: 13px !important;
  line-height: 1.4 !important;
  font-weight: 500 !important;
  margin: 0 0 20px 0 !important;
  width: 100% !important;
  box-sizing: border-box !important;
  text-align: left !important;
}

#badlogin:not(:empty)::before {
  content: '';
  display: inline-block;
  width: 18px;
  height: 18px;
  min-width: 18px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23dc2626' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cline x1='12' y1='8' x2='12' y2='12'/%3E%3Cline x1='12' y1='16' x2='12.01' y2='16'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Form Layout */
.form-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.field-group {
  display: flex;
  flex-direction: column;
}

.field-label {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 6px;
  display: block;
  text-align: left;
}

.input-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.field-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: #94a3b8;
  pointer-events: none;
  transition: color 0.2s ease;
  z-index: 2;
}

/* Inputs */
.fieldinput {
  width: 100% !important;
  box-sizing: border-box !important;
  height: 46px !important;
  padding: 0 14px 0 42px !important;
  border-radius: var(--as-radius-input) !important;
  border: 1px solid var(--as-border-color) !important;
  background-color: #f8fafc !important;
  font-size: 14px !important;
  font-family: inherit !important;
  color: var(--as-text-main) !important;
  outline: none !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.fieldinput:focus {
  border-color: var(--as-border-focus) !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3px var(--as-brand-orange-light) !important;
}

.input-container:focus-within .field-icon {
  color: var(--as-brand-orange);
}

/* Language Dropdown */
.select-container {
  position: relative;
}

#language {
  width: 100% !important;
  box-sizing: border-box !important;
  height: 46px !important;
  padding: 0 38px 0 42px !important;
  border-radius: var(--as-radius-input) !important;
  border: 1px solid var(--as-border-color) !important;
  background-color: #f8fafc !important;
  font-size: 14px !important;
  font-family: inherit !important;
  color: var(--as-text-main) !important;
  outline: none !important;
  appearance: none !important;
  -webkit-appearance: none !important;
  cursor: pointer !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  background-size: 16px !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#language:focus {
  border-color: var(--as-border-focus) !important;
  background-color: #ffffff !important;
  box-shadow: 0 0 0 3px var(--as-brand-orange-light) !important;
}

.select-container:focus-within .field-icon {
  color: var(--as-brand-orange);
}

/* Submit Button */
.fieldsubmit {
  margin-top: 8px;
  width: 100%;
}

#submitbutton {
  float: none !important;
  display: block !important;
  width: 100% !important;
  height: 48px !important;
  margin: 0 !important;
  padding: 0 20px !important;
  border: none !important;
  border-radius: var(--as-radius-input) !important;
  background: linear-gradient(135deg, var(--as-brand-orange) 0%, var(--as-brand-orange-hover) 100%) !important;
  color: #ffffff !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  font-family: inherit !important;
  letter-spacing: 0.02em !important;
  cursor: pointer !important;
  box-shadow: 0 4px 14px rgba(240, 96, 38, 0.35) !important;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

#submitbutton:hover {
  transform: translateY(-1px) !important;
  box-shadow: 0 6px 20px rgba(240, 96, 38, 0.45) !important;
  background: linear-gradient(135deg, #f56d35 0%, #e0531c 100%) !important;
}

#submitbutton:active {
  transform: translateY(0) !important;
  box-shadow: 0 2px 8px rgba(240, 96, 38, 0.3) !important;
}

/* Reminder / Help */
#reminder {
  display: none;
}

#reminder:not(:empty) {
  display: block !important;
  font-size: 12px !important;
  line-height: 1.5 !important;
  color: var(--as-text-muted) !important;
  margin: 18px 0 0 0 !important;
  padding: 0 !important;
  width: 100% !important;
  height: auto !important;
  max-width: 100% !important;
  text-align: center !important;
}

#reminder a, .minilink {
  color: var(--as-brand-orange) !important;
  text-decoration: none !important;
  font-weight: 500 !important;
  font-size: 12px !important;
  transition: color 0.15s ease !important;
}

#reminder a:hover, .minilink:hover {
  text-decoration: underline !important;
  color: var(--as-brand-orange-hover) !important;
}

/* Footer */
#loginfooter {
  margin: 24px 0 0 0 !important;
  padding: 18px 0 0 0 !important;
  border-top: 1px solid #f1f5f9 !important;
  background: transparent !important;
  height: auto !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  font-size: 12px !important;
}

.copyright {
  float: none !important;
  margin: 0 !important;
  color: var(--as-text-muted) !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

.copyright a {
  color: var(--as-text-muted) !important;
  text-decoration: none !important;
  font-weight: 500 !important;
}

.copyright a:hover {
  color: var(--as-brand-orange) !important;
}

.security-indicator {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 500;
  color: #059669;
  background: #ecfdf5;
  padding: 4px 9px;
  border-radius: 6px;
  border: 1px solid #d1fae5;
  line-height: 1;
}

.sec-icon {
  width: 12px;
  height: 12px;
  stroke: #059669;
}

/* Mobile responsive */
@media (max-width: 480px) {
  #loginpanel {
    padding: 28px 20px 24px 20px !important;
    border-radius: 14px !important;
  }
  
  #mclogo {
    max-width: 250px !important;
  }

  #loginfooter {
    flex-direction: column;
    gap: 10px;
    align-items: center;
    text-align: center;
  }
}
