/* ==========================================================================
   WEBLAUNCH CYBERNETIC LOGIN DASHBOARD - MASTER PRODUCTION STYLESHEET
   Palette:
     --bg-obsidian:  #101010 (Dark Obsidian Void)
     --bg-surface:   #141414 (Surface Dark)
     --bg-card:      rgba(18, 18, 18, 0.94)
     --border-bronze:#45321d (Deep Bronze Earth)
     --border-light: #61462a (Light Bronze)
     --cyber-gold:   #c28c28 (Warm Cyber Gold)
     --gold-glow:    rgba(194, 140, 40, 0.45)
     --crimson:      #721b29 (Cyber Crimson / Burgundy)
     --crimson-glow: rgba(114, 27, 41, 0.55)
     --mint-milk:    #f4fff8 (Mint Milk Text)
     --text-muted:   #7d8b84
   Architecture: 100% Dead-Center Viewport, Zero Triangle Glitches, Exact Canvas
   ========================================================================== */

@font-face {
  font-family: 'Vazirmatn';
  src: url('/static/fonts/Vazir-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/static/fonts/Vazir-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/static/fonts/Vazir-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('/static/fonts/Vazir-Black.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg-obsidian: #101010;
  --bg-surface: #141414;
  --bg-card: rgba(18, 18, 18, 0.94);
  --border-bronze: #45321d;
  --border-light: #61462a;
  --cyber-gold: #c28c28;
  --gold-glow: rgba(194, 140, 40, 0.45);
  --crimson: #721b29;
  --crimson-glow: rgba(114, 27, 41, 0.55);
  --mint-milk: #f4fff8;
  --text-muted: #7d8b84;
}

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

html, body {
  width: 100% !important;
  height: 100% !important;
  min-height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  background-color: var(--bg-obsidian) !important;
  font-family: 'Vazirmatn', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  color: var(--mint-milk) !important;
  direction: rtl !important;
  text-align: right !important;
  overflow-x: hidden !important;
}

/* Hide all Django admin default header, sidebar, breadcrumb elements */
#header,
.breadcrumbs,
#nav-sidebar,
.toggle-nav-sidebar,
.skip-to-content-link,
nav {
  display: none !important;
}

/* Reset Django admin wrapper elements completely */
#container,
#main,
#main.shifted,
#content,
#content.colM {
  margin: 0 !important;
  padding: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  min-height: 100vh !important;
  height: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: transparent !important;
  border: none !important;
}

/* ==========================================================================
   CANVAS & AMBIENT GLOW (EXACT MATCH WITH LANDING)
   ========================================================================== */
#cyberGridCanvas {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  pointer-events: none !important;
  z-index: 1 !important;
}

.ambient-gold-light {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  width: 750px !important;
  height: 750px !important;
  background: radial-gradient(circle, rgba(194, 140, 40, 0.18) 0%, rgba(114, 27, 41, 0.08) 45%, transparent 70%) !important;
  filter: blur(90px) !important;
  pointer-events: none !important;
  z-index: 2 !important;
}

/* ==========================================================================
   DEAD-CENTER STAGE & WIDE CYBER CARD
   ========================================================================== */
.login-stage-container {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 24px 20px !important;
  overflow-y: auto !important;
  z-index: 10 !important;
  margin: auto !important;
}

/* Wider, substantial card (580px max-width) */
.devcrm-login-glass-card {
  width: 100%;
  max-width: 580px;
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-bronze);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.9), 0 0 35px rgba(69, 50, 29, 0.35);
  position: relative;
  padding: 38px 44px 34px;
  margin: auto !important;
}

/* ==========================================================================
   CLEAN CORNER BRACKETS (NO ARROWS, NO TRIANGLES)
   ========================================================================== */
.corner-bracket {
  position: absolute;
  width: 14px;
  height: 14px;
  pointer-events: none;
  z-index: 5;
}

.corner-bracket.top-right {
  top: -1px;
  right: -1px;
  border-top: 2px solid var(--cyber-gold);
  border-right: 2px solid var(--cyber-gold);
}

.corner-bracket.top-left {
  top: -1px;
  left: -1px;
  border-top: 2px solid var(--cyber-gold);
  border-left: 2px solid var(--cyber-gold);
}

.corner-bracket.bottom-right {
  bottom: -1px;
  right: -1px;
  border-bottom: 2px solid var(--cyber-gold);
  border-right: 2px solid var(--cyber-gold);
}

.corner-bracket.bottom-left {
  bottom: -1px;
  left: -1px;
  border-bottom: 2px solid var(--cyber-gold);
  border-left: 2px solid var(--cyber-gold);
}

/* ==========================================================================
   TELEMETRY HEADER
   ========================================================================== */
.login-telemetry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(69, 50, 29, 0.45);
  padding-bottom: 12px;
  margin-bottom: 24px;
  font-family: 'Orbitron', monospace;
  font-size: 11px;
  color: var(--cyber-gold);
  letter-spacing: 0.5px;
}

.telemetry-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

.telemetry-pulse {
  width: 8px;
  height: 8px;
  background-color: var(--cyber-gold);
  box-shadow: 0 0 10px var(--cyber-gold);
  animation: telemetryPulse 2s infinite ease-in-out;
}

@keyframes telemetryPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.3; transform: scale(0.8); }
}

.telemetry-right {
  color: var(--text-muted);
  font-size: 10px;
}

/* ==========================================================================
   BRAND HEADER
   ========================================================================== */
.login-brand-header {
  text-align: center;
  margin-bottom: 26px;
}

.login-logo-glow {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-bronze);
  box-shadow: 0 0 20px rgba(194, 140, 40, 0.25), inset 0 0 15px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.login-logo-glow .login-brand-img {
  width: 52px;
  height: 52px;
  object-fit: contain;
  display: block;
}

.login-brand-header .login-title {
  margin: 0 0 8px;
  font-size: 21px;
  font-weight: 800;
  color: var(--mint-milk);
  letter-spacing: -0.3px;
}

.login-slogan-wrap {
  margin: 6px 0 8px;
}

.login-slogan-badge {
  display: inline-block;
  background: rgba(69, 50, 29, 0.35);
  border: 1px solid var(--border-bronze);
  color: var(--cyber-gold);
  padding: 4px 14px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.login-subtitle {
  margin: 6px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ==========================================================================
   ALERTS (CYBER CRIMSON)
   ========================================================================== */
.login-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}

.login-alert.danger {
  background: rgba(114, 27, 41, 0.25);
  border: 1px solid var(--crimson);
  color: var(--mint-milk);
  box-shadow: 0 0 20px rgba(114, 27, 41, 0.35);
}

.alert-icon {
  color: #ff6b81;
  font-size: 14px;
}

/* ==========================================================================
   INPUTS & FORM
   ========================================================================== */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.login-form .form-group .form-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--mint-milk);
}

.label-icon {
  color: var(--cyber-gold);
  font-size: 12px;
  font-family: monospace;
}

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

.login-form .form-group .input-wrapper .login-input {
  width: 100% !important;
  background: var(--bg-obsidian) !important;
  border: 1px solid var(--border-bronze) !important;
  border-radius: 0 !important;
  color: var(--mint-milk) !important;
  padding: 13px 16px !important;
  font-size: 14px !important;
  font-family: 'Vazirmatn', inherit !important;
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.5) !important;
  transition: border-color 0.18s ease, box-shadow 0.18s ease !important;
  box-sizing: border-box !important;
}

.login-form .form-group .input-wrapper .login-input:focus {
  border-color: var(--cyber-gold) !important;
  box-shadow: 0 0 0 1px var(--cyber-gold), 0 0 18px rgba(194, 140, 40, 0.3) !important;
  outline: none !important;
}

.login-form .form-group .input-wrapper .login-input::placeholder {
  color: var(--text-muted) !important;
  font-size: 12.5px !important;
}

.login-form .form-group .input-wrapper .toggle-password-btn {
  position: absolute;
  left: 12px;
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 15px;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.login-form .form-group .input-wrapper .toggle-password-btn:hover {
  color: var(--cyber-gold);
  border-color: var(--border-bronze);
  background: var(--bg-surface);
}

.login-form .form-group .field-error {
  color: #ff6b81;
  font-size: 11.5px;
  margin-top: 4px;
}

.password-reset-link {
  text-align: left;
  font-size: 12px;
  margin-top: -6px;
}

.password-reset-link a {
  color: var(--cyber-gold) !important;
  text-decoration: none !important;
  transition: color 0.15s ease;
}

.password-reset-link a:hover {
  color: #e0a334 !important;
  text-decoration: underline !important;
}

/* ==========================================================================
   SUBMIT BUTTON (CYBER METALLIC GOLD CTA)
   ========================================================================== */
.submit-wrapper {
  margin-top: 8px;
}

.login-submit-btn {
  width: 100%;
  background: linear-gradient(135deg, #c28c28 0%, #9a6d1c 100%) !important;
  border: 1px solid var(--cyber-gold) !important;
  border-radius: 0 !important;
  color: #101010 !important;
  font-weight: 800 !important;
  font-size: 14.5px !important;
  padding: 13px 20px !important;
  cursor: pointer !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 10px !important;
  box-shadow: 0 6px 20px rgba(194, 140, 40, 0.35) !important;
  transition: all 0.2s ease !important;
  font-family: 'Vazirmatn', inherit !important;
  letter-spacing: 0.3px;
}

.login-submit-btn:hover {
  background: linear-gradient(135deg, #d49c33 0%, #ab7c24 100%) !important;
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(194, 140, 40, 0.5) !important;
}

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

.login-submit-btn .btn-arrow {
  font-size: 16px;
  transition: transform 0.2s ease;
  font-weight: bold;
}

.login-submit-btn:hover .btn-arrow {
  transform: translateX(-4px);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.login-footer {
  text-align: center;
  margin-top: 26px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid rgba(69, 50, 29, 0.4);
  padding-top: 16px;
  font-family: 'Orbitron', 'Vazirmatn', monospace;
  letter-spacing: 0.2px;
}

@media (max-width: 640px) {
  .devcrm-login-glass-card {
    padding: 28px 22px;
    max-width: 100%;
  }
  .login-brand-header .login-title {
    font-size: 18px;
  }
}
