/* ==========================================================================
   MX-ERP EPC & Construction Management System - Clean Light Theme
   Theme: Industrial Modern, Architectural Grid, Crisp & Spacious
   ========================================================================== */

:root {
  --epc-bg: #f1f5f9;
  --epc-surface-card: #ffffff;
  --epc-surface-subtle: #f8fafc;
  --epc-border: #e2e8f0;
  --epc-border-strong: #cbd5e1;
  --epc-teal-primary: #087d7b;
  --epc-teal-hover: #0ca6a4;
  --epc-amber-accent: #d97706;
  --epc-text-primary: #0f172a;
  --epc-text-secondary: #334155;
  --epc-text-muted: #64748b;
  --epc-radius-card: 16px;
  --epc-radius-input: 8px;
  --epc-radius-btn: 8px;
  --epc-shadow-card: 0 20px 48px -12px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(0, 0, 0, 0.04);
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
  color: var(--epc-text-primary);
  background-color: var(--epc-bg);
  -webkit-font-smoothing: antialiased;
}

/* Background canvas: Crisp, bright, modern enterprise canvas with architectural CAD grid */
.login-main {
  min-height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow-x: hidden;
  padding: 30px 18px;
  background-color: #f1f5f9;
  background-image: 
    radial-gradient(circle at 10% 18%, rgba(8, 125, 123, 0.07) 0%, transparent 40%),
    radial-gradient(circle at 90% 82%, rgba(217, 119, 6, 0.06) 0%, transparent 35%),
    linear-gradient(to right, rgba(15, 23, 42, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 28px 28px, 28px 28px;
}

/* Ambient soft light orbs */
.ambient-glow {
  position: absolute;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
}
.glow-teal {
  width: 440px;
  height: 440px;
  background: rgba(8, 125, 123, 0.09);
  top: -80px;
  left: -60px;
}
.glow-amber {
  width: 380px;
  height: 380px;
  background: rgba(245, 158, 11, 0.06);
  bottom: -60px;
  right: -50px;
}

/* Central split container - Clean, spacious & "little big" */
.login-shell {
  width: 100%;
  max-width: 960px; /* Spacious & comfortable */
  display: flex;
  background: var(--epc-surface-card);
  border: 1px solid var(--epc-border);
  border-radius: var(--epc-radius-card);
  box-shadow: var(--epc-shadow-card);
  overflow: hidden;
  position: relative;
  z-index: 1;
}

/* ==========================================================================
   LEFT SIDE: EPC Project Showcase & Command Hub (Clean Light Design)
   ========================================================================== */
.epc-showcase-panel {
  flex: 1.15;
  padding: 34px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: var(--epc-text-primary);
  background: linear-gradient(155deg, #f8fafc 0%, #f1f5f9 100%);
  border-right: 1px solid var(--epc-border);
  position: relative;
}

/* Blueprint watermark subtle lines */
.epc-showcase-panel::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(8, 125, 123, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(8, 125, 123, 0.025) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
  opacity: 0.8;
}

.showcase-header {
  position: relative;
  z-index: 2;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.erp-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  padding: 5px 12px 5px 10px;
  border-radius: 20px;
  border: 1px solid var(--epc-border);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.erp-brand-badge img {
  height: 20px;
  width: auto;
  object-fit: contain;
}

.erp-version-text {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.5px;
  color: var(--epc-teal-primary);
  text-transform: uppercase;
}

.live-pulse-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: #059669;
  background: #ecfdf5;
  padding: 4px 11px;
  border-radius: 16px;
  border: 1px solid #a7f3d0;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #059669;
  box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7);
  animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(5, 150, 105, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

.epc-hero-title {
  position: relative;
  z-index: 2;
  margin-bottom: 18px;
  text-align: center;
}

.epc-sector-tag {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.3px;
  color: var(--epc-amber-accent);
  margin-bottom: 5px;
  text-align: center;
}

.epc-main-heading {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 8px 0;
  color: #0f172a;
  letter-spacing: -0.3px;
  text-align: center;
}

.epc-sub-heading {
  font-size: 12px;
  line-height: 1.6;
  color: var(--epc-text-muted);
  margin: 0 auto;
  max-width: 480px;
  text-align: center;
}

/* Feature Showcase Grid - Crisp white cards */
.epc-features-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.feature-box {
  background: #ffffff;
  border: 1px solid var(--epc-border);
  border-radius: 10px;
  padding: 12px 14px;
  transition: all 0.22s ease;
  display: flex;
  gap: 11px;
  align-items: flex-start;
  box-shadow: 0 2px 5px rgba(15, 23, 42, 0.02);
}

.feature-box:hover {
  background: #ffffff;
  border-color: var(--epc-teal-primary);
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(8, 125, 123, 0.09);
}

.feature-icon-wrap {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #ffffff;
}

.feature-box:nth-child(1) .feature-icon-wrap {
  background: linear-gradient(135deg, #087d7b 0%, #0ca6a4 100%);
}
.feature-box:nth-child(2) .feature-icon-wrap {
  background: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
}
.feature-box:nth-child(3) .feature-icon-wrap {
  background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
}
.feature-box:nth-child(4) .feature-icon-wrap {
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
}

.feature-content h4 {
  margin: 0 0 3px 0;
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
}

.feature-content p {
  margin: 0;
  font-size: 10.5px;
  line-height: 1.45;
  color: var(--epc-text-muted);
}

/* Bottom Operational Highlights Bar */
.epc-highlights-bar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px solid var(--epc-border);
  gap: 10px;
}

.highlight-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--epc-text-secondary);
  font-weight: 500;
}

.highlight-pill i {
  color: #059669;
  font-size: 12px;
}

/* ==========================================================================
   RIGHT SIDE: Secure Login Card (CLEAN WHITE / LIGHT THEME)
   ========================================================================== */
.auth-card-panel {
  flex: 0.95;
  background: #ffffff;
  padding: 34px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
}

.auth-header {
  text-align: center;
  margin-bottom: 18px;
}

/* Client Logo Frame */
.company-logo-frame {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 18px;
  background: #f8fafc;
  border: 1px solid var(--epc-border);
  border-radius: 10px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
  margin-bottom: 12px;
  max-width: 190px;
  min-height: 48px;
}

.company-logo-frame img {
  max-height: 38px;
  max-width: 165px;
  object-fit: contain;
  display: block;
}

.auth-title {
  font-size: 19px;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 4px 0;
  letter-spacing: -0.2px;
}

.auth-subtitle {
  font-size: 11.5px;
  color: var(--epc-text-muted);
  margin: 0;
  line-height: 1.4;
}

/* Form Styles - Clean Light Mode */
.login-form-container {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.form-group-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.form-label {
  font-size: 11.5px;
  font-weight: 600;
  color: #334155;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

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

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

.form-input-control {
  width: 100% !important;
  height: 40px !important;
  line-height: 40px;
  padding: 0 13px 0 38px !important;
  font-family: inherit;
  font-size: 12.5px !important;
  color: #0f172a !important;
  background: #f8fafc !important;
  border: 1.5px solid var(--epc-border-strong) !important;
  border-radius: var(--epc-radius-input) !important;
  outline: none !important;
  transition: all 0.2s ease !important;
  box-shadow: none !important;
}

.form-input-control::placeholder {
  color: #94a3b8 !important;
}

.form-input-control:focus {
  background: #ffffff !important;
  border-color: var(--epc-teal-primary) !important;
  box-shadow: 0 0 0 3px rgba(8, 125, 123, 0.15) !important;
}

.input-wrapper:focus-within .field-icon {
  color: var(--epc-teal-primary);
}

/* Password with toggle button */
.input-wrapper .form-input-control[type="password"],
.input-wrapper .form-input-control.is-pwd {
  padding-right: 40px !important;
}

.pwd-toggle-btn {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 5px 7px;
  cursor: pointer;
  font-size: 13.5px;
  border-radius: 4px;
  transition: color 0.2s ease;
  z-index: 3;
}

.pwd-toggle-btn:hover {
  color: var(--epc-teal-primary);
}

/* Custom Select styling in light mode */
.form-select-control {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%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/polyline%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 15px !important;
  padding-right: 36px !important;
  cursor: pointer;
}

/* Submit Action Button */
.btn-submit-action {
  width: 100%;
  height: 42px;
  margin-top: 5px;
  background: linear-gradient(135deg, var(--epc-teal-primary) 0%, #066563 100%) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: var(--epc-radius-btn) !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0.3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(8, 125, 123, 0.3);
  transition: all 0.22s ease;
}

.btn-submit-action:hover {
  background: linear-gradient(135deg, var(--epc-teal-hover) 0%, var(--epc-teal-primary) 100%) !important;
  box-shadow: 0 6px 18px rgba(8, 125, 123, 0.42);
  transform: translateY(-1px);
}

.btn-submit-action:active {
  transform: translateY(1px);
}

/* Security notice banner */
.security-status-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-size: 11px;
  color: #475569;
  background: #f8fafc;
  border: 1px solid var(--epc-border);
  padding: 7px 12px;
  border-radius: 6px;
  margin-top: 5px;
  text-align: center;
}

.security-status-note i {
  color: var(--epc-teal-primary);
  font-size: 13px;
}

/* Demo Credentials Box if enabled */
.demo-mode-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 11.5px;
  color: #92400e;
  margin-bottom: 10px;
  text-align: center;
}

/* Card Bottom Partner Footer */
.auth-footer {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--epc-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.partner-credit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--epc-text-muted);
  font-size: 11px;
  transition: color 0.2s ease;
}

.partner-credit:hover {
  color: var(--epc-teal-primary);
  text-decoration: none;
}

.partner-logo-img {
  height: 18px;
  width: auto;
  object-fit: contain;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 960px) {
  .login-shell {
    flex-direction: column;
    max-width: 480px;
  }
  
  .epc-showcase-panel {
    border-right: none;
    border-bottom: 1px solid var(--epc-border);
    padding: 24px 22px;
  }
  
  .epc-main-heading {
    font-size: 18px;
  }
  
  .epc-features-grid {
    grid-template-columns: 1fr;
    gap: 9px;
  }
  
  .auth-card-panel {
    padding: 24px 22px;
  }
}

@media (max-width: 480px) {
  .login-main {
    padding: 12px 10px;
  }
  
  .epc-showcase-panel {
    padding: 18px 16px;
  }
  
  .auth-card-panel {
    padding: 18px 16px;
  }
  
  .brand-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}
