/* ==========================================================================
   MODERN AUTHENTICATION SYSTEM (Customer & Vendor Login & Register)
   ========================================================================== */

:root {
  --auth-primary: #2563eb;
  --auth-primary-hover: #1d4ed8;
  --auth-primary-rgb: 37, 99, 235;
  --auth-vendor: #0f172a;
  --auth-vendor-hover: #1e293b;
  --auth-vendor-rgb: 15, 23, 42;
  --auth-bg: #f8fafc;
  --auth-card-bg: #ffffff;
  --auth-border: #e2e8f0;
  --auth-border-focus: #93c5fd;
  --auth-text-dark: #0f172a;
  --auth-text-muted: #64748b;
  --auth-radius-lg: 24px;
  --auth-radius-md: 14px;
  --auth-radius-sm: 10px;
  --auth-shadow: 0 20px 45px -15px rgba(15, 23, 42, 0.08), 0 0 0 1px rgba(226, 232, 240, 0.7);
}

/* Page Background Wrapper */
.auth-modern-page {
  background-color: var(--auth-bg);
  background-image: 
    radial-gradient(at 0% 0%, rgba(37, 99, 235, 0.04) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.03) 0px, transparent 50%),
    radial-gradient(at 50% 50%, rgba(248, 250, 252, 1) 0px, transparent 100%);
  padding: 60px 16px 80px;
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card-wrap {
  width: 100%;
  max-width: 490px;
  margin: 0 auto;
}

.auth-card-wrap.auth-card-wide {
  max-width: 580px;
}

/* Main Card */
.auth-card {
  background: var(--auth-card-bg);
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-lg);
  box-shadow: var(--auth-shadow);
  padding: 40px 36px;
  position: relative;
  overflow: hidden;
}

/* Subtle Top Accent Bar */
.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #3b82f6, #10b981);
}

.auth-card.vendor-card::before {
  background: linear-gradient(90deg, #0f172a, #334155, #2563eb);
}

/* --------------------------------------------------------------------------
   Role Switcher (Customer Account vs. Vendor Portal)
   -------------------------------------------------------------------------- */
.auth-role-switcher {
  display: flex;
  background: #f1f5f9;
  border-radius: var(--auth-radius-sm);
  padding: 4px;
  margin-bottom: 28px;
  gap: 4px;
}

.auth-role-pill {
  flex: 1;
  text-align: center;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  border-radius: 8px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.auth-role-pill:hover {
  color: var(--auth-text-dark);
}

.auth-role-pill.active {
  background: #ffffff;
  color: var(--auth-text-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  font-weight: 700;
}

.auth-role-pill.active.vendor-active {
  color: #0f172a;
}

/* --------------------------------------------------------------------------
   Auth Header (Badge, Title, Subtitle)
   -------------------------------------------------------------------------- */
.auth-header {
  text-align: center;
  margin-bottom: 28px;
}

.auth-brand-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}

.auth-brand-logo img {
  max-height: 44px;
  width: auto;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.auth-brand-logo a:hover img {
  transform: scale(1.03);
}

.auth-badge-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 16px;
  background: #eff6ff;
  color: var(--auth-primary);
  box-shadow: 0 4px 12px rgba(var(--auth-primary-rgb), 0.12);
}

.auth-badge-icon.vendor-icon {
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.2);
}

.auth-portal-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 3px 10px;
  border-radius: 20px;
  background: #f1f5f9;
  color: #475569;
  margin-bottom: 8px;
}

.auth-portal-tag.vendor-tag {
  background: #f0fdf4;
  color: #15803d;
}

.auth-title {
  font-size: 24px;
  font-weight: 800;
  color: var(--auth-text-dark);
  margin-bottom: 6px;
  letter-spacing: -0.5px;
}

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

/* --------------------------------------------------------------------------
   Modern Form Groups & Inputs
   -------------------------------------------------------------------------- */
.auth-form-group {
  margin-bottom: 20px;
}

.auth-label {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 7px;
}

.auth-label .required-star {
  color: #ef4444;
  margin-left: 2px;
}

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

.auth-input-icon {
  position: absolute;
  left: 15px;
  color: #94a3b8;
  font-size: 16px;
  pointer-events: none;
  transition: color 0.2s;
  z-index: 2;
}

.auth-input {
  width: 100%;
  height: 48px;
  padding: 10px 16px 10px 44px;
  font-size: 14.5px;
  color: var(--auth-text-dark);
  background: #ffffff;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-md);
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.auth-input:hover {
  border-color: #cbd5e1;
}

.auth-input:focus {
  outline: none;
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(var(--auth-primary-rgb), 0.12);
  background: #ffffff;
}

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

/* Password Eye Button */
.auth-eye-btn {
  position: absolute;
  right: 14px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  cursor: pointer;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
  z-index: 2;
}

.auth-eye-btn:hover {
  color: var(--auth-text-dark);
}

/* Error message */
.auth-error-msg {
  font-size: 12.5px;
  color: #ef4444;
  margin-top: 5px;
  margin-bottom: 0;
  display: flex;
  align-items: center;
  gap: 4px;
}

/* --------------------------------------------------------------------------
   Vendor File Upload Dropzone
   -------------------------------------------------------------------------- */
.auth-file-dropzone {
  position: relative;
  border: 1.5px dashed var(--auth-border);
  border-radius: var(--auth-radius-md);
  padding: 16px;
  text-align: center;
  background: #fafbfc;
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-file-dropzone:hover {
  border-color: var(--auth-primary);
  background: #f0f7ff;
}

.auth-file-dropzone input[type="file"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.auth-file-dropzone-icon {
  font-size: 22px;
  color: var(--auth-primary);
  margin-bottom: 6px;
}

.auth-file-dropzone-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--auth-text-dark);
  margin-bottom: 2px;
}

.auth-file-dropzone-hint {
  font-size: 11.5px;
  color: var(--auth-text-muted);
}

.auth-file-chosen-name {
  font-size: 12px;
  font-weight: 600;
  color: #15803d;
  margin-top: 6px;
  display: none;
}

/* --------------------------------------------------------------------------
   Submit Button
   -------------------------------------------------------------------------- */
.auth-submit-btn {
  width: 100%;
  height: 48px;
  background: var(--auth-primary);
  color: #ffffff !important;
  font-size: 15px;
  font-weight: 700;
  border: none;
  border-radius: var(--auth-radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px rgba(var(--auth-primary-rgb), 0.35);
  margin-top: 8px;
}

.auth-submit-btn:hover {
  background: var(--auth-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--auth-primary-rgb), 0.45);
}

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

.auth-submit-btn.vendor-submit-btn {
  background: #0f172a;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
}

.auth-submit-btn.vendor-submit-btn:hover {
  background: #1e293b;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.35);
}

/* --------------------------------------------------------------------------
   Divider ("Or Login With")
   -------------------------------------------------------------------------- */
.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 22px 0;
  color: #94a3b8;
  font-size: 12.5px;
  font-weight: 500;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--auth-border);
}

.auth-divider span {
  padding: 0 14px;
}

/* --------------------------------------------------------------------------
   Social Login Buttons
   -------------------------------------------------------------------------- */
.auth-social-row {
  display: flex;
  gap: 12px;
  margin-bottom: 10px;
}

.auth-social-btn {
  flex: 1;
  height: 44px;
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius-md);
  background: #ffffff;
  color: #334155;
  font-size: 13.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none !important;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.03);
}

.auth-social-btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
  color: #0f172a;
  transform: translateY(-1px);
}

.auth-social-icon {
  width: 18px;
  height: 18px;
}

/* --------------------------------------------------------------------------
   Footer Links & Security Badge
   -------------------------------------------------------------------------- */
.auth-footer-links {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #f1f5f9;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: #64748b;
  text-align: center;
}

.auth-footer-link {
  color: var(--auth-primary);
  font-weight: 600;
  text-decoration: none !important;
  transition: color 0.15s;
}

.auth-footer-link:hover {
  color: var(--auth-primary-hover);
  text-decoration: underline !important;
}

.auth-trust-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 16px;
}

.auth-trust-badge i {
  color: #10b981;
}

/* --------------------------------------------------------------------------
   Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 576px) {
  .auth-modern-page {
    padding: 30px 12px 60px;
  }

  .auth-card {
    padding: 28px 20px;
    border-radius: 20px;
  }

  .auth-title {
    font-size: 21px;
  }

  .auth-social-row {
    flex-direction: column;
    gap: 8px;
  }

  .auth-role-pill {
    font-size: 12px;
    padding: 7px 8px;
  }
}
