@import url('design-system.css');

:root {
  --navy: #0A2540;
  --navy-mid: #123860;
  --navy-light: #163A5F;
  --blue: #0A2540;
  --blue-light: #163A5F;
  --green: #22C55E;
  --green-light: #4ade80;
  --gold: #D4AF37;
  --gold-light: #F5D061;
  --white: #ffffff;
  --gray-50: #f8fafc;
  --gray-100: #e2e8f0;
  --gray-200: #cbd5e1;
  --gray-300: #94a3b8;
  --gray-600: #475569;
  --gray-900: #0f172a;
  
  --font-main: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --font-head: 'Plus Jakarta Sans', 'Inter', sans-serif;
  --radius-lg: 16px;
  --radius-md: 10px;
  --radius-sm: 6px;
  --radius-full: 9999px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-lg: 0 10px 30px -5px rgba(13,33,55,0.08), 0 20px 40px -15px rgba(13,33,55,0.05);
  --shadow-md: 0 4px 20px -2px rgba(13,33,55,0.06), 0 10px 15px -3px rgba(13,33,55,0.04);
}

/* ─── BASE STYLES ─── */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}
body.auth-body {
  font-family: var(--font-main);
  background-color: #f1f5f9;
  color: var(--gray-900);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}
/* Hide scrollbar for Chrome, Safari and Opera */
html::-webkit-scrollbar,
body::-webkit-scrollbar,
*::-webkit-scrollbar {
  display: none !important;
  width: 0 !important;
  height: 0 !important;
}
a {
  text-decoration: none;
  transition: var(--transition);
}

/* ─── SPLIT LAYOUT (Login & Register) ─── */
.auth-split-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 100vh;
  width: 100%;
}

/* Left Visual Column */
.auth-visual-col {
  position: relative;
  background-image: url('../images/about_hero_warehouse.png');
  background-size: cover;
  background-position: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3.5rem;
  color: var(--white);
  overflow: hidden;
}
.auth-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(13,33,55,0.95) 0%, rgba(26,82,118,0.85) 100%);
  z-index: 1;
}
.auth-visual-inner {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-visual-brand .logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}
.auth-visual-brand .logo-text {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--white);
}
.auth-visual-brand .logo-dot {
  color: var(--green-light);
}
.auth-visual-message {
  margin: auto 0;
  max-width: 480px;
}
.auth-visual-message h1 {
  font-family: var(--font-head);
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}
.auth-visual-message p {
  font-size: 1.05rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.8);
}
.auth-visual-features {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2rem;
}
.auth-feat-item {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.auth-feat-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
  flex-shrink: 0;
}
.auth-feat-text strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
}
.auth-feat-text span {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.65);
}

/* Right Form Column */
.auth-form-col {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background-color: #f8fafc;
}
.auth-card-wrap {
  width: 100%;
  max-width: 520px;
}

/* ─── FULL CENTER LAYOUT (Verification, Forgot, Reset) ─── */
.auth-center-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2.5rem 1.5rem;
  background: linear-gradient(135deg, #eef2f7 0%, #e2e8f0 100%);
}
.auth-center-logo {
  margin-bottom: 2rem;
  display: flex;
  justify-content: center;
}
.auth-center-logo .logo-text {
  font-family: var(--font-head);
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--navy);
}
.auth-center-logo .logo-dot {
  color: var(--green);
}
.auth-center-card {
  width: 100%;
  max-width: 480px;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  box-shadow: 0 10px 40px rgba(13,33,55,0.06);
}

/* ─── AUTHENTICATION CARD ELEMENTS ─── */
.auth-card-header {
  margin-bottom: 2rem;
}
.auth-card-header h2 {
  font-family: var(--font-head);
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 0.5rem;
}
.auth-card-header p {
  color: var(--gray-600);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ─── FORMS & INPUTS ─── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.form-group label {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy);
}
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}
.input-wrapper svg.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94A3B8;
  pointer-events: none;
  z-index: 2;
  transition: var(--transition);
}
.input-control {
  width: 100%;
  padding: 0.85rem 2.85rem 0.85rem 2.85rem !important;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--gray-200);
  background-color: var(--white);
  font-family: var(--font-main);
  font-size: 0.95rem;
  color: var(--gray-900);
  transition: all 0.2s ease;
  box-sizing: border-box;
}
.input-control:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(10, 37, 64, 0.1);
  background-color: var(--white);
}
.input-control:focus ~ svg.input-icon,
.input-wrapper:focus-within svg.input-icon {
  color: var(--navy);
}

/* Password Toggle Eye Button */
.btn-toggle-password {
  position: absolute;
  right: 1rem;
  background: none;
  border: none;
  color: var(--gray-300);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem;
  transition: var(--transition);
}
.btn-toggle-password:hover {
  color: var(--navy);
}

/* Remember Me & Forgot Password Flex Row */
.form-actions-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.25rem;
  font-size: 0.875rem;
}
.remember-me-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-600);
  cursor: pointer;
  user-select: none;
}
.remember-me-label input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--blue);
  cursor: pointer;
}
.link-forgot {
  color: var(--blue-light);
  font-weight: 600;
}
.link-forgot:hover {
  color: var(--blue);
  text-decoration: underline;
}

/* ─── BUTTONS (Corporate Navy CTA) ─── */
.btn-auth-submit {
  width: 100%;
  padding: 0.9rem 1.5rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  outline: none;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: all var(--transition);
  font-family: var(--font-head);
  margin-top: 0.5rem;
  background: var(--navy, #0A2540) !important;
  background-color: var(--navy, #0A2540) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(10, 37, 64, 0.25) !important;
  text-decoration: none;
}
.btn-auth-submit span {
  color: #ffffff !important;
  font-weight: 700;
}
.btn-auth-submit svg {
  stroke: #ffffff !important;
  color: #ffffff !important;
}
.btn-auth-submit.primary,
.btn-auth-submit.green,
.btn-auth-submit {
  background: var(--navy, #0A2540) !important;
  background-color: var(--navy, #0A2540) !important;
  color: #ffffff !important;
  box-shadow: 0 4px 15px rgba(10, 37, 64, 0.25) !important;
}
.btn-auth-submit:hover,
.btn-auth-submit.primary:hover,
.btn-auth-submit.green:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(10, 37, 64, 0.35) !important;
  background: var(--navy-mid, #123860) !important;
  background-color: var(--navy-mid, #123860) !important;
  color: #ffffff !important;
}
.btn-auth-submit:active,
.btn-auth-submit.primary:active,
.btn-auth-submit.green:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(10, 37, 64, 0.2) !important;
}
.btn-auth-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

/* ─── CARD FOOTERS ─── */
.auth-card-footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--gray-600);
}
.auth-card-footer a {
  color: var(--blue-light);
  font-weight: 700;
}
.auth-card-footer a:hover {
  color: var(--blue);
  text-decoration: underline;
}

/* ─── REGISTER STEP WIZARD ─── */
.register-progress-container {
  margin-bottom: 2rem;
}
.register-progress-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.75rem;
}
.progress-step-text {
  font-size: 0.85rem;
  color: var(--gray-600);
  font-weight: 700;
}
.progress-step-label {
  font-size: 0.85rem;
  color: var(--green);
  font-weight: 800;
  text-transform: uppercase;
}
.register-progress-bar-wrap {
  width: 100%;
  height: 6px;
  background-color: var(--gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
  display: flex;
  gap: 4px;
}
.progress-bar-seg {
  flex: 1;
  height: 100%;
  background-color: var(--gray-200);
  transition: background-color var(--transition);
}
.progress-bar-seg.active {
  background-color: var(--green-light);
}

/* Step wrapper animation */
.register-step {
  display: none;
  animation: slideIn 0.4s ease-out forwards;
}
.register-step.active {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.step-buttons-row {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 1rem;
  margin-top: 0.75rem;
}
.btn-step-prev {
  background: var(--white);
  border: 1px solid var(--gray-200);
  color: var(--gray-600);
  padding: 0.9rem;
  font-size: 1rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  font-family: var(--font-head);
}
.btn-step-prev:hover {
  background: var(--gray-50);
  color: var(--navy);
}

/* File Upload input custom styling */
.file-upload-drag {
  border: 2px dashed var(--gray-200);
  border-radius: var(--radius-md);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  background-color: var(--gray-50);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}
.file-upload-drag:hover {
  border-color: var(--blue-light);
  background-color: rgba(41,128,185,0.02);
}
.file-upload-drag svg {
  color: var(--gray-300);
}
.file-upload-drag span {
  font-size: 0.88rem;
  color: var(--gray-600);
}
.file-upload-drag strong {
  color: var(--blue-light);
}
.file-upload-name-preview {
  font-size: 0.85rem;
  color: var(--green);
  font-weight: 700;
  display: none;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

/* ─── VERIFICATION (OTP INPUT) ─── */
.otp-input-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
  margin: 1.5rem 0;
}
.otp-digit {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-md);
  border: 1px solid var(--gray-200);
  background: var(--white);
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--navy);
  text-align: center;
  transition: var(--transition);
}
.otp-digit:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(26,82,118,0.12);
}
.otp-timer-text {
  text-align: center;
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: 1.5rem;
}
.otp-timer-count {
  font-weight: 800;
  color: var(--navy);
}
.btn-resend-otp {
  background: none;
  border: none;
  color: var(--blue-light);
  font-weight: 800;
  cursor: pointer;
  text-decoration: underline;
  transition: var(--transition);
}
.btn-resend-otp:disabled {
  color: var(--gray-300);
  text-decoration: none;
  cursor: not-allowed;
}

/* ─── PASSWORD STRENGTH METER ─── */
.strength-meter-wrap {
  margin-top: 0.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}
.strength-bar-bg {
  width: 100%;
  height: 4px;
  background-color: var(--gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}
.strength-bar-fill {
  height: 100%;
  width: 0%;
  border-radius: var(--radius-full);
  transition: width var(--transition), background-color var(--transition);
}
.strength-bar-fill.weak { width: 33%; background-color: #e74c3c; }
.strength-bar-fill.medium { width: 66%; background-color: #f39c12; }
.strength-bar-fill.strong { width: 100%; background-color: #2ecc71; }

.strength-label-text {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--gray-600);
}
.strength-label-text span {
  font-weight: 800;
}
.strength-label-text.weak span { color: #e74c3c; }
.strength-label-text.medium span { color: #f39c12; }
.strength-label-text.strong span { color: #2ecc71; }

/* ─── AUTH FOOTER (Copyright note) ─── */
.auth-site-footer {
  margin-top: auto;
  width: 100%;
  padding: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--gray-100);
  font-size: 0.8rem;
  color: var(--gray-300);
  background-color: var(--white);
}
.auth-site-footer-links {
  display: flex;
  gap: 1.25rem;
}
.auth-site-footer-links a {
  color: var(--gray-300);
}
.auth-site-footer-links a:hover {
  color: var(--navy);
}

/* Back to Home Button */
.btn-back-home {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--gray-600);
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  padding: 0.55rem 1.15rem;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition);
}
.btn-back-home:hover {
  color: var(--navy);
  background: var(--gray-50);
  border-color: var(--gray-300);
  transform: translateX(-4px);
  box-shadow: var(--shadow-md);
}
.btn-back-home svg {
  transition: transform var(--transition);
}
.btn-back-home:hover svg {
  transform: translateX(-2px);
}

.btn-mobile-back-public {
  display: flex;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--white);
  border: 1px solid var(--gray-200);
  color: var(--navy);
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--transition);
  -webkit-tap-highlight-color: transparent;
}
.btn-mobile-back-public:active {
  transform: scale(0.92);
  background: var(--gray-100);
}

/* ═══════════════════════════════════════════
   RESPONSIVE DESIGN (Mobile Friendly)
   ═══════════════════════════════════════════ */
@media (max-width: 992px) {
  .auth-split-container {
    grid-template-columns: 1fr;
  }
  .auth-visual-col {
    display: none; /* Hide visual split on tablet/mobile as per specs */
  }
  .auth-form-col {
    padding: 3rem 1.5rem;
    min-height: 100vh;
  }
}

@media (max-width: 576px) {
  .auth-center-card {
    padding: 2.25rem 1.5rem;
    border-radius: var(--radius-md);
  }
  .otp-input-row {
    gap: 0.5rem;
  }
  .otp-digit {
    font-size: 1.25rem;
  }
  .auth-site-footer {
    flex-direction: column;
    gap: 0.75rem;
    text-align: center;
  }
  .auth-site-footer-links {
    justify-content: center;
  }
}

/* ═══════════════════════════════════════════
   FLOATING BOTTOM NAVIGATION (MOBILE)
═══════════════════════════════════════════ */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 64px;
  background: #FFFFFF !important;
  border-top: 1px solid #E2E8F0 !important;
  z-index: 9990;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.06) !important;
  align-items: center;
  justify-content: space-around;
  padding: 0 4px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  flex: 1;
  padding: 6px 0;
  color: #8da2b5 !important;
  font-size: 0.65rem !important;
  font-weight: 600 !important;
  font-family: 'Poppins', 'Inter', -apple-system, sans-serif !important;
  text-decoration: none !important;
  transition: all 0.2s ease;
  position: relative;
  -webkit-tap-highlight-color: transparent;
}
.bottom-nav-item svg {
  width: 22px !important;
  height: 22px !important;
  stroke: #8da2b5 !important;
  stroke-width: 2.2 !important;
  transition: all 0.2s ease;
}
.bottom-nav-item span {
  color: #8da2b5 !important;
  font-size: 0.65rem !important;
  font-weight: 600 !important;
  font-family: 'Poppins', 'Inter', -apple-system, sans-serif !important;
  transition: all 0.2s ease;
}
.bottom-nav-item:not(.cta-item):hover,
.bottom-nav-item.active {
  color: #00a2c7 !important;
}
.bottom-nav-item:not(.cta-item):hover svg,
.bottom-nav-item.active svg {
  stroke: #00a2c7 !important;
  transform: translateY(-1px);
}
.bottom-nav-item:not(.cta-item):hover span,
.bottom-nav-item.active span {
  color: #00a2c7 !important;
}
.bottom-nav-item:not(.cta-item):hover::before,
.bottom-nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 3.5px;
  background: #00a2c7 !important;
  border-radius: 0 0 4px 4px;
  box-shadow: 0 1px 4px rgba(0, 162, 199, 0.3);
}
.bottom-nav-item.cta-item {
  color: #8da2b5 !important;
}
.bottom-nav-item.cta-item .bottom-nav-icon {
  width: 48px !important;
  height: 48px !important;
  background: linear-gradient(135deg, #00b4d8 0%, #0096c7 35%, #0d9488 75%, #059669 100%) !important;
  border-radius: 50% !important;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -18px;
  box-shadow: 0 6px 18px rgba(13, 148, 136, 0.4) !important;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.bottom-nav-item.cta-item .bottom-nav-icon svg {
  stroke: #FFFFFF !important;
  width: 22px !important;
  height: 22px !important;
  stroke-width: 2.4 !important;
}
.bottom-nav-item.cta-item:active .bottom-nav-icon {
  transform: scale(0.92);
}
.bottom-nav-item.cta-item span {
  color: #0096c7 !important;
  font-size: 0.65rem !important;
  font-weight: 600 !important;
  font-family: 'Poppins', 'Inter', -apple-system, sans-serif !important;
  margin-top: 1px;
}

@media (max-width: 768px) {
  .bottom-nav { display: flex !important; }
  body.auth-body { padding-bottom: 96px !important; }
  .auth-form-col { padding-bottom: 5.5rem !important; }
}
