/* ==========================================================================
   VidhaiX Technology — Website & Authentication Identity Overrides
   Matches design tokens from https://vidhaixtechnology.com/
   ========================================================================== */

/* Typography & Base Tokens */
:root {
  --font-inter: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-jakarta: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --vdx-navy: #050C1A;
  --vdx-navy-surface: #0B132B;
  --vdx-primary: #2563eb;
  --vdx-primary-hover: #1d4ed8;
  --vdx-accent-cyan: #38bdf8;
  --vdx-border: rgba(255, 255, 255, 0.12);
  --vdx-border-active: rgba(59, 130, 246, 0.5);
  --vdx-text-muted: #94a3b8;
  --vdx-text-subtle: #64748b;
  --vdx-text-light: #f8fafc;
}

body {
  font-family: var(--font-inter) !important;
}

/* ==========================================================================
   Learner & User Login Screen (data-path="login")
   ========================================================================== */
body[data-path="login"] {
  background-color: var(--vdx-navy) !important;
  background-image: 
    radial-gradient(ellipse 90% 60% at 50% -20%, rgba(37, 99, 235, 0.28), transparent),
    radial-gradient(circle at 90% 80%, rgba(56, 189, 248, 0.12), transparent 45%),
    linear-gradient(to right, rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.035) 1px, transparent 1px) !important;
  background-size: 100% 100%, 100% 100%, 48px 48px, 48px 48px !important;
  color: #f8fafc !important;
  min-height: 100vh !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  align-items: center !important;
  padding: 32px 16px !important;
}

/* Hide Frappe default website navigation, header, and footer on login */
body[data-path="login"] header,
body[data-path="login"] nav.navbar,
body[data-path="login"] .navbar,
body[data-path="login"] .web-header,
body[data-path="login"] .page-head-navbar,
body[data-path="login"] footer,
body[data-path="login"] .web-footer,
body[data-path="login"] .footer-powered,
body[data-path="login"] .btn-login-with-frappe-cloud {
  display: none !important;
}

/* Main Container Root */
.vdx-auth-page-root {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
}

/* Modern Split Container */
.vdx-auth-card-split {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  background: rgba(11, 17, 32, 0.88);
  border: 1px solid var(--vdx-border);
  border-radius: 24px;
  overflow: hidden;
  backdrop-filter: blur(28px);
  -webkit-backdrop-filter: blur(28px);
  box-shadow: 
    0 30px 70px -15px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(255, 255, 255, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  min-height: 640px;
}

/* ==========================================================================
   LEFT CONTAINER: Brand Showcase & Hero Artwork
   ========================================================================== */
.vdx-auth-visual-col {
  position: relative;
  background: linear-gradient(165deg, rgba(15, 23, 42, 0.95) 0%, rgba(8, 14, 30, 0.98) 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  padding: 40px 36px 32px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

.vdx-showcase-bg-glow {
  position: absolute;
  top: -100px;
  left: -100px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.25) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(40px);
}

.vdx-showcase-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  z-index: 2;
}

.vdx-brand-pill {
  background: #ffffff;
  padding: 6px 14px;
  border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
  display: inline-flex;
  align-items: center;
}

.vdx-brand-img {
  max-height: 32px;
  max-width: 140px;
  width: auto;
  height: auto;
  display: block;
}

.vdx-brand-badge {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--vdx-accent-cyan);
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 4px 10px;
  border-radius: 20px;
}

/* Visual Artwork Frame */
.vdx-showcase-visual-wrapper {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);
  margin-bottom: 24px;
  max-height: 230px;
  z-index: 2;
}

.vdx-showcase-cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
  transform: scale(1.02);
  transition: transform 0.5s ease;
}

.vdx-showcase-visual-wrapper:hover .vdx-showcase-cover-img {
  transform: scale(1.05);
}

.vdx-showcase-visual-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 14, 30, 0.85) 0%, transparent 60%);
  pointer-events: none;
}

.vdx-floating-status {
  position: absolute;
  bottom: 12px;
  left: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(5, 12, 26, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.15);
  padding: 4px 12px;
  border-radius: 20px;
  z-index: 3;
}

.vdx-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #22c55e;
  box-shadow: 0 0 8px #22c55e;
}

.vdx-status-text {
  font-size: 0.74rem;
  font-weight: 500;
  color: #e2e8f0;
}

/* Showcase Copy & Values */
.vdx-showcase-copy {
  z-index: 2;
}

.vdx-showcase-heading {
  font-family: var(--font-jakarta) !important;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: #ffffff !important;
  margin: 0 0 10px 0 !important;
  line-height: 1.3 !important;
}

.vdx-showcase-subtext {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--vdx-text-muted);
  margin: 0 0 18px 0;
}

.vdx-features-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vdx-feature-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  font-weight: 500;
  color: #cbd5e1;
}

.vdx-feature-chip svg {
  stroke: var(--vdx-accent-cyan);
  flex-shrink: 0;
}

.vdx-showcase-bottom {
  margin-top: 24px;
  font-size: 0.75rem;
  color: var(--vdx-text-subtle);
  z-index: 2;
}

/* ==========================================================================
   RIGHT CONTAINER: Form Column
   ========================================================================== */
.vdx-auth-form-col {
  padding: 40px 42px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: rgba(11, 17, 32, 0.4);
}

/* Nav Tab Switcher */
.vdx-auth-tabs-nav {
  display: flex;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 28px;
}

.vdx-tab-btn {
  flex: 1;
  text-align: center;
  padding: 9px 16px;
  border-radius: 9px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--vdx-text-muted);
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.vdx-tab-btn:hover {
  color: #ffffff;
}

.vdx-tab-btn.active {
  background: var(--vdx-primary);
  color: #ffffff !important;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.45);
}

/* Form Headers */
.vdx-form-header {
  margin-bottom: 24px;
}

.vdx-form-title {
  font-family: var(--font-jakarta) !important;
  font-size: 1.5rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em !important;
  color: #ffffff !important;
  margin: 0 0 6px 0 !important;
}

.vdx-form-subtitle {
  font-size: 0.88rem;
  color: var(--vdx-text-muted);
  margin: 0;
}

/* Frappe Reset for Custom Container */
.vdx-card-reset {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

.vdx-card-body-reset {
  padding: 0 !important;
}

/* Modern Input Controls & Labels */
.vdx-field-group {
  margin-bottom: 20px !important;
}

.vdx-field-label {
  display: block;
  font-size: 0.86rem;
  font-weight: 500;
  color: #e2e8f0;
  margin-bottom: 8px;
}

.vdx-label-split {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.vdx-subtle-link {
  font-size: 0.82rem;
  font-weight: 500;
  color: #60a5fa;
  text-decoration: none !important;
  transition: color 0.15s ease;
}

.vdx-subtle-link:hover {
  color: #93c5fd;
  text-decoration: underline !important;
}

.vdx-input-container {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.vdx-input-icon {
  position: absolute;
  left: 14px;
  top: 50% !important;
  transform: translateY(-50%) !important;
  color: var(--vdx-text-muted);
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  transition: color 0.2s ease;
  z-index: 3;
}

.vdx-input-icon svg {
  display: block;
  flex-shrink: 0;
}

.vdx-input-container:focus-within .vdx-input-icon {
  color: var(--vdx-accent-cyan);
}

.vdx-form-input {
  width: 100% !important;
  height: 48px !important;
  background: rgba(15, 23, 42, 0.75) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;
  border-radius: 12px !important;
  color: #ffffff !important;
  font-size: 0.95rem !important;
  padding: 0 16px 0 44px !important;
  transition: all 0.2s ease !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.25) !important;
}

/* Password input right padding ensures credential icons & toggle don't collide */
input[type="password"].vdx-form-input,
#login_password.vdx-form-input {
  padding-right: 76px !important;
}

.vdx-form-input::placeholder {
  color: #64748b !important;
  font-size: 0.92rem !important;
}

.vdx-form-input:focus {
  background: rgba(15, 23, 42, 0.95) !important;
  border-color: #3b82f6 !important;
  box-shadow: 
    0 0 0 3px rgba(59, 130, 246, 0.3),
    0 0 20px rgba(37, 99, 235, 0.2) !important;
  outline: none !important;
  color: #ffffff !important;
}

/* Password Toggle Button */
.vdx-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50% !important;
  transform: translateY(-50%) !important;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  height: 28px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--vdx-text-muted);
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  z-index: 4;
}

.vdx-pw-toggle:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Primary Action CTA Button */
.vdx-actions-reset {
  margin-top: 24px;
}

.vdx-btn-cta {
  width: 100% !important;
  height: 48px !important;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important;
  border: none !important;
  border-radius: 12px !important;
  color: #ffffff !important;
  font-family: var(--font-inter) !important;
  font-size: 0.96rem !important;
  font-weight: 600 !important;
  letter-spacing: 0.01em !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 8px !important;
  box-shadow: 0 4px 18px rgba(37, 99, 235, 0.45) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  cursor: pointer !important;
}

.vdx-btn-cta:hover {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.55) !important;
}

.vdx-btn-cta:active {
  transform: translateY(0) scale(0.99) !important;
}

/* Divider */
.vdx-or-divider {
  position: relative;
  text-align: center;
  margin: 22px 0 16px 0;
}

.vdx-or-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.vdx-or-divider span {
  position: relative;
  background: #091024;
  padding: 0 12px;
  font-size: 0.78rem;
  color: var(--vdx-text-subtle);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Magic Link Button */
.vdx-btn-magic-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 44px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #cbd5e1;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.2s ease;
}

.vdx-btn-magic-link:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

/* Switcher / Footer Prompt */
.vdx-switch-link-box {
  margin-top: 24px;
  text-align: center;
  font-size: 0.86rem;
  color: var(--vdx-text-muted);
}

.vdx-action-highlight {
  color: #60a5fa !important;
  font-weight: 600 !important;
  margin-left: 6px;
  text-decoration: none !important;
  transition: color 0.15s ease;
}

.vdx-action-highlight:hover {
  color: #93c5fd !important;
  text-decoration: underline !important;
}

/* ==========================================================================
   Responsive Adaptations
   ========================================================================== */
@media (max-width: 900px) {
  body[data-path="login"] {
    justify-content: flex-start !important;
    padding: 20px 14px 40px 14px !important;
  }

  .vdx-auth-page-root {
    margin: 0 auto;
  }

  .vdx-auth-card-split {
    grid-template-columns: 1fr;
    min-height: auto;
    border-radius: 20px;
  }

  .vdx-auth-visual-col {
    padding: 24px 20px 18px 20px;
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .vdx-showcase-top {
    margin-bottom: 14px;
  }

  .vdx-brand-pill {
    padding: 5px 12px;
  }

  .vdx-brand-img {
    max-height: 28px;
    max-width: 120px;
  }

  .vdx-showcase-visual-wrapper,
  .vdx-features-list,
  .vdx-showcase-bottom {
    display: none;
  }

  .vdx-showcase-heading {
    font-size: 1.15rem !important;
    margin-bottom: 6px !important;
  }

  .vdx-showcase-subtext {
    font-size: 0.82rem;
    margin-bottom: 0;
  }

  .vdx-auth-form-col {
    padding: 24px 20px;
  }
}
