/**
 * login.css — High-End Modern Enterprise Responsive Light-Theme Login Interface
 * Always Light Mode: Crisp typography, clean borders, zero button gradients, sharp campus background.
 */

:root {
  --bg-main: #f8fafc;
  --panel-bg: #ffffff;
  --panel-border: #e2e8f0;
  --panel-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(226, 232, 240, 0.9);
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-faint: #64748b;
  --brand-primary: #4f46e5;
  --brand-secondary: #4338ca;
  --brand-light: #eef2ff;
  --input-bg: #ffffff;
  --input-border: #cbd5e1;
  --input-focus: #4f46e5;
  --input-focus-ring: rgba(79, 70, 229, 0.16);
  --danger-color: #dc2626;
  --danger-bg: #fef2f2;
  --danger-border: #fecaca;
  --success-color: #16a34a;
}

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

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0f172a url('../../assets/login-bg.jpg') no-repeat center center fixed;
  background-size: cover;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* ── Modern Campus Architectural Vignette Overlay (NO BLUR - Sharp & Vibrant) ── */
.login-bg-overlay {
  position: fixed;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.45) 0%, rgba(30, 41, 59, 0.25) 50%, rgba(15, 23, 42, 0.5) 100%);
  z-index: 1;
  pointer-events: none;
}

/* ── Main Wrapper ── */
.login-main-wrapper {
  position: relative;
  z-index: 10;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 20px;
}

/* ── Enterprise Responsive Dual-Panel Card Container ── */
.login-card-container {
  width: 100%;
  max-width: 960px;
  background: #ffffff;
  border-radius: 22px;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.2);
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  overflow: hidden;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.2s ease;
}

/* ═══════════════════════════════════════════════════════════════
   LEFT PANEL: Academic Intelligence Showcase
   ═══════════════════════════════════════════════════════════════ */
.login-showcase-panel {
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.showcase-content-top {
  display: flex;
  flex-direction: column;
}

/* Showcase Header: Brand Badge & Online Status */
.showcase-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.brand-badge-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  padding: 5px 12px 5px 6px;
  border-radius: 40px;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.brand-icon-halo {
  width: 32px;
  height: 32px;
  background: var(--brand-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.brand-logo {
  width: 18px;
  height: 18px;
}

.brand-names {
  text-align: left;
}

.brand-title {
  display: flex;
  align-items: center;
  gap: 4px;
  line-height: 1.1;
}

.brand-main {
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.05em;
  color: #0f172a;
}

.brand-ai {
  font-size: 10px;
  font-weight: 800;
  background: var(--brand-primary);
  color: #ffffff;
  padding: 1px 5px;
  border-radius: 4px;
}

.brand-sub {
  font-size: 10px;
  color: var(--text-faint);
  font-weight: 500;
}

.status-indicator-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 20px;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  font-size: 11px;
  font-weight: 600;
  color: #166534;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  animation: pulseGreen 2s infinite;
}

@keyframes pulseGreen {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

/* Showcase Pitch */
.showcase-heading {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
  line-height: 1.25;
}

.showcase-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-bottom: 24px;
}

/* Showcase Feature Highlights */
.showcase-features-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.feature-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  transition: all 0.2s ease;
}

.feature-item:hover {
  border-color: #cbd5e1;
  transform: translateX(2px);
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.feature-icon-box {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: #eef2ff;
  border: 1px solid #e0e7ff;
  color: var(--brand-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-icon-box svg,
.feature-icon-box i {
  width: 18px;
  height: 18px;
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feature-text strong {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.feature-text span {
  font-size: 11.5px;
  color: #64748b;
  line-height: 1.4;
}

/* Showcase Metrics Footer */
.showcase-metrics-footer {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}

.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  font-size: 11px;
  font-weight: 600;
  color: #475569;
}

.metric-pill svg,
.metric-pill i {
  width: 13px;
  height: 13px;
  color: var(--brand-primary);
}

/* ═══════════════════════════════════════════════════════════════
   RIGHT PANEL: Clean, Focused Sign In Form
   ═══════════════════════════════════════════════════════════════ */
.login-form-panel {
  background: #ffffff;
  padding: 40px 36px 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.form-panel-header {
  margin-bottom: 22px;
}

.login-headline {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.login-subtext {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

/* ── Alert Banner ── */
.alert-banner {
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  color: var(--danger-color);
  padding: 11px 14px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 18px;
  animation: slideDown 0.25s ease-out;
}

.alert-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--danger-color);
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Form Controls ── */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

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

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.form-label {
  font-size: 12px;
  font-weight: 700;
  color: #334155;
  letter-spacing: 0.01em;
}

.auth-helper {
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 500;
}

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

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  pointer-events: none;
  transition: color 0.2s ease;
}

.input-icon svg,
.input-icon i {
  width: 16px;
  height: 16px;
}

.form-input {
  width: 100%;
  height: 44px;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 10px;
  padding: 0 40px 0 40px;
  font-size: 13.5px;
  color: var(--text-main);
  font-family: inherit;
  transition: all 0.2s ease;
  outline: none;
}

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

.form-input:focus {
  border-color: var(--input-focus);
  background: #ffffff;
  box-shadow: 0 0 0 3px var(--input-focus-ring);
}

.input-wrap:focus-within .input-icon {
  color: var(--brand-primary);
}

.btn-pwd-toggle {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  border-radius: 6px;
  transition: color 0.2s ease;
}

.btn-pwd-toggle:hover {
  color: var(--text-main);
}

.btn-pwd-toggle svg,
.btn-pwd-toggle i {
  width: 16px;
  height: 16px;
}

/* ── Form Options (Remember Me) ── */
.form-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 2px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}

.custom-checkbox {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  cursor: pointer;
  position: relative;
  transition: all 0.2s ease;
}

.custom-checkbox:checked {
  background: var(--brand-primary);
  border-color: var(--brand-primary);
}

.custom-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.checkbox-text {
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ── Submit Button (Solid Primary — ZERO Gradient) ── */
.btn-login-submit {
  height: 46px;
  background-color: var(--brand-primary) !important;
  background-image: none !important;
  border: 1px solid var(--brand-primary);
  border-radius: 10px;
  color: #ffffff !important;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(79, 70, 229, 0.25);
  transition: all 0.2s ease;
  margin-top: 4px;
}

.btn-login-submit:hover:not(:disabled) {
  background-color: var(--brand-secondary) !important;
  background-image: none !important;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
  transform: translateY(-1px);
}

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

.btn-login-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-arrow {
  width: 16px;
  height: 16px;
  transition: transform 0.2s ease;
}

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

/* ── Spinner ── */
.btn-spinner {
  width: 18px;
  height: 18px;
}

.spinner-svg {
  animation: rotate 2s linear infinite;
  width: 18px;
  height: 18px;
}

.spinner-svg .path {
  stroke: #ffffff;
  stroke-linecap: round;
  animation: dash 1.5s ease-in-out infinite;
}

@keyframes rotate {
  100% { transform: rotate(360deg); }
}

@keyframes dash {
  0% { stroke-dasharray: 1, 150; stroke-dashoffset: 0; }
  50% { stroke-dasharray: 90, 150; stroke-dashoffset: -35; }
  100% { stroke-dasharray: 90, 150; stroke-dashoffset: -124; }
}

/* ── Quick Demo Credentials Selector ── */
.demo-pills-section {
  margin-top: 20px;
}

.demo-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin-bottom: 10px;
}

.demo-divider::before,
.demo-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid #e2e8f0;
}

.demo-divider span {
  padding: 0 10px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.demo-pills-grid {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.demo-pill {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  background-image: none !important;
  border: 1px solid #e2e8f0;
  padding: 7px 12px;
  border-radius: 9px;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.demo-pill:hover,
.demo-pill.active-pill {
  background: var(--brand-light) !important;
  background-image: none !important;
  border-color: #c7d2fe !important;
  transform: translateY(-1px);
}

.pill-badge {
  font-size: 9.5px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(79, 70, 229, 0.1);
  color: #4f46e5;
}

.pill-badge.vtu-badge {
  background: rgba(234, 88, 12, 0.1);
  color: #c2410c;
}

.pill-badge.uom-badge {
  background: rgba(14, 165, 233, 0.1);
  color: #0284c7;
}

.pill-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  margin: 0 10px;
}

.pill-info strong {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
}

.pill-info span {
  font-size: 10px;
  color: var(--text-faint);
}

.pill-arrow {
  width: 14px;
  height: 14px;
  color: var(--text-faint);
  transition: transform 0.2s ease, color 0.2s ease;
}

.demo-pill:hover .pill-arrow {
  transform: translateX(2px);
  color: var(--brand-primary);
}

/* ── Card Footer ── */
.card-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.security-badges {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

.badge-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 10.5px;
  color: var(--text-faint);
  font-weight: 500;
}

.badge-item svg,
.badge-item i {
  width: 13px;
  height: 13px;
  color: var(--success-color);
}

/* ── Error Shake Animation ── */
.shake-card {
  animation: shake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-3px, 0, 0); }
  40%, 60% { transform: translate3d(3px, 0, 0); }
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN: Tablet & Mobile Breakpoints
   ═══════════════════════════════════════════════════════════════ */

/* Tablet (max-width: 900px) */
@media (max-width: 900px) {
  .login-card-container {
    grid-template-columns: 1fr;
    max-width: 480px;
    border-radius: 18px;
  }

  .login-showcase-panel {
    padding: 24px 24px 18px;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    gap: 14px;
  }

  .showcase-header {
    margin-bottom: 12px;
  }

  .showcase-heading {
    font-size: 19px;
    margin-bottom: 2px;
  }

  .showcase-desc {
    font-size: 12.5px;
    margin-bottom: 10px;
    display: none; /* keep compact on tablet/mobile */
  }

  .showcase-features-list {
    display: none; /* Hide dense list on mobile for quick access */
  }

  .showcase-metrics-footer {
    padding-top: 0;
    border-top: none;
    gap: 6px;
  }

  .metric-pill {
    padding: 4px 10px;
    font-size: 10.5px;
  }

  .login-form-panel {
    padding: 28px 24px 22px;
  }

  .login-headline {
    font-size: 21px;
  }
}

/* Mobile (max-width: 480px) */
@media (max-width: 480px) {
  .login-main-wrapper {
    padding: 12px;
  }

  .login-card-container {
    border-radius: 16px;
  }

  .login-showcase-panel {
    padding: 18px 16px 14px;
  }

  .login-form-panel {
    padding: 20px 16px 18px;
  }

  .showcase-header {
    flex-direction: row;
    gap: 8px;
  }

  .brand-sub {
    display: none;
  }

  .form-input {
    height: 42px;
    font-size: 13px;
  }

  .btn-login-submit {
    height: 44px;
    font-size: 13.5px;
  }

  .demo-pills-section {
    margin-top: 16px;
  }

  .demo-pill {
    padding: 6px 10px;
  }

  .pill-info span {
    display: none;
  }

  .security-badges {
    gap: 8px;
    font-size: 10px;
  }
}

/* Global button reset: zero gradients anywhere */
button,
.btn,
.btn-login-submit,
.btn-pwd-toggle,
.demo-pill {
  background-image: none !important;
}
