:root {
  --sap-blue: #1e40af;
  --sap-blue-dark: #1e3a8a;
  --yellow-bg: linear-gradient(135deg, #fbbf24, #f59e0b);
  --glass: rgba(255, 255, 255, .95);
  --shadow: 0 25px 80px rgba(0, 0, 0, .15);
}

/* BASE */
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; font-family: "Segoe UI", system-ui, sans-serif; }

.loading-body { background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); overflow: hidden; }
.login-body { 
  background: url("/assets/img/login-bg.webp") center/cover no-repeat, var(--yellow-bg);
  background-blend-mode: overlay;
}

.login-bg { position: fixed; inset: 0; z-index: -1; }

/* CONTAINER */
.container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* LAYOUTS */
.loading-card, .layout {
  width: 100%;
  max-width: 480px;
  background: var(--glass);
  border-radius: 20px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,.3);
  overflow: hidden;
}

.layout {
  max-width: 1200px;
  height: 600px;
  display: grid;
  grid-template-columns: 1fr 420px;
}

.loading-card {
  padding: 3.5rem 3rem;
  text-align: center;
  animation: cardEnter 0.8s ease forwards;
  opacity: 0;
  transform: translateY(20px) scale(0.98);
}

/* BRAND */
.brand-section, .brand-head {
  text-align: center;
  margin-bottom: 2.5rem;
}

.logo { height: 56px; margin-bottom: 1rem; filter: drop-shadow(0 2px 8px rgba(0,0,0,.1)); }

.brand-title, .brand-head h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--sap-blue);
  margin: 0 0 0.5rem 0;
}

.brand-subtitle, .brand-head p {
  font-size: 0.9rem;
  color: #64748b;
  margin: 0;
}

/* LOADING */
.loading-indicator {
  margin: 2.5rem 0;
  padding: 2rem;
}

.loading-circle {
  width: 80px; height: 80px;
  border: 4px solid #e2e8f0;
  border-top: 4px solid var(--sap-blue);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
  margin: 0 auto 1.5rem;
}

@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

.progress-container {
  background: #e2e8f0;
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--sap-blue), #3b82f6);
  width: 0%;
  border-radius: 3px;
  transition: width 0.3s ease;
}

.status-section { text-align: center; }
.status-text {
  font-size: 1.1rem;
  color: var(--sap-blue);
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.status-detail {
  font-size: 0.9rem;
  color: #64748b;
}

.dots { display: inline-flex; gap: 0.2em; }
.dot {
  width: 0.4em; height: 0.4em;
  background: var(--sap-blue);
  border-radius: 50%;
  animation: dotPulse 1.4s ease-in-out infinite both;
}

.dot:nth-child(1) { animation-delay: -.32s; }
.dot:nth-child(2) { animation-delay: -.16s; }

@keyframes dotPulse {
  0%, 80%, 100% { transform: scale(0); }
  40% { transform: scale(1); }
}

@keyframes cardEnter {
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* IMAGE PANE - WITH BACKGROUND IMAGE */
.image-pane {
  position: relative;
  background: 
    /* Your main image */
    url("/assets/img/login-workspace.webp") center/cover no-repeat,
    /* Fallback gradient */
    linear-gradient(135deg, var(--sap-blue-dark), var(--sap-blue));
  background-blend-mode: overlay;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

/* IMAGE OVERLAY CONTENT */
.image-content {
  text-align: center;
  color: white;
  z-index: 2;
  position: relative;
  max-width: 300px;
}

.image-title {
  font-size: 2.2rem;
  font-weight: 700;
  margin: 0 0 1rem 0;
  text-shadow: 0 2px 10px rgba(0,0,0,.5);
  line-height: 1.2;
}

.image-subtitle {
  font-size: 1.1rem;
  opacity: 0.95;
  margin: 0;
  font-weight: 400;
}

/* IMAGE PANE DECORATION */
.image-pane::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 1;
}

.card {
  padding: 3rem;
  background: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.field { position: relative; margin-bottom: 1.6rem; }

.field input {
  width: 100%;
  height: 52px;
  padding: 18px 16px 6px 44px;
  border: 2px solid #e2e8f0;
  border-radius: 12px;
  font-size: 1rem;
  background: white;
  transition: all 0.2s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--sap-blue);
  box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.field label {
  position: absolute;
  left: 44px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1rem;
  transition: all 0.2s ease;
  pointer-events: none;
}

.field input:focus + label,
.field input:not(:placeholder-shown) + label {
  top: 8px;
  font-size: 0.75rem;
  color: var(--sap-blue);
  font-weight: 500;
}

.icon-left, .icon-right {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 1.1rem;
}

.icon-left { left: 16px; }
.icon-right { right: 16px; cursor: pointer; }

.options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
  margin-bottom: 1.8rem;
}

.options label { color: #64748b; cursor: pointer; user-select: none; }
.forgot-link { 
  color: var(--sap-blue); 
  text-decoration: none; 
  font-weight: 500; 
}

.forgot-link:hover { text-decoration: underline; }

.btn {
  width: 100%;
  height: 52px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--sap-blue), #3b82f6);
  color: white;
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn:hover { 
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(30, 64, 175, 0.3);
}

.btn:disabled { opacity: 0.7; cursor: not-allowed; transform: none; }

/* INFO SECTION */
.info-section {
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid #e8ecf4;
}

.version-info {
  font-size: 0.85rem;
  color: #94a3b8;
  margin-bottom: 1rem;
}

.system-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.8rem;
  font-size: 0.9rem;
  color: #64748b;
}

.status-indicator {
  width: 8px; height: 8px;
  background: #10b981;
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.1); }
}

/* =========================================================
   PREMIUM TOAST NOTIFICATIONS - TALLY PRIME / SAP STYLE
========================================================= */
.toast {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  min-width: 320px;
  padding: 1.25rem 1.75rem;
  border-radius: 16px;
  color: white !important;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 99999;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.2);
  
  /* Premium glassmorphism shadow */
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.25),
    0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.toast.show { 
  opacity: 1; 
  transform: translateY(0) scale(1); 
}

/* SUCCESS - Enterprise Green */
.toast.success {
  background: linear-gradient(135deg, #16a34a 0%, #15803d 50%, #166534 100%);
  border-left: 5px solid #22c55e;
  box-shadow: 
    0 25px 50px -12px rgba(34, 197, 94, 0.4),
    0 0 0 1px rgba(34, 197, 94, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.toast.success::before {
  content: '✓';
  font-size: 1.2rem;
  font-weight: bold;
  margin-right: 0.75rem;
  display: inline-block;
  animation: checkmark 0.6s ease-out forwards;
}

@keyframes checkmark {
  0% { transform: scale(0) rotate(-45deg); opacity: 0; }
  50% { transform: scale(1.2) rotate(-45deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); }
}

/* ERROR - Enterprise Red */
.toast.error {
  background: linear-gradient(135deg, #dc2626 0%, #b91c1c 50%, #991b1b 100%);
  border-left: 5px solid #f87171;
  box-shadow: 
    0 25px 50px -12px rgba(248, 113, 113, 0.4),
    0 0 0 1px rgba(248, 113, 113, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.toast.error::before {
  content: '⚠';
  font-size: 1.2rem;
  font-weight: bold;
  margin-right: 0.75rem;
  display: inline-block;
  animation: warningPulse 0.6s ease-in-out;
}

@keyframes warningPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

/* LOADING TOAST (Bonus) */
.toast.loading {
  background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
  border-left: 5px solid #60a5fa;
}

.toast.loading::before {
  content: '';
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,.3);
  border-top: 2px solid white;
  border-radius: 50%;
  display: inline-block;
  margin-right: 0.75rem;
  animation: spin 1s linear infinite;
}

/* RESPONSIVE */
@media (max-width: 480px) {
  .toast {
    bottom: 1rem;
    right: 1rem;
    left: 1rem;
    min-width: auto;
    max-width: none;
  }
}

/* ENTERPRISE HOVER EFFECT */
.toast:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 35px 70px -15px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}


.footer {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255,255,255,.9);
  text-shadow: 0 1px 3px rgba(0,0,0,.3);
}

/* RESPONSIVE */
@media (max-width: 992px) {
  .layout {
    grid-template-columns: 1fr;
    max-width: 420px;
    height: auto;
  }
  .image-pane { display: none; }
}

@media (max-width: 480px) {
  .container { padding: 1rem; }
  .loading-card, .card { padding: 2rem; }
  .brand-title, .brand-head h1 { font-size: 1.4rem; }
}
