/**
 * Academic Prestige Login Stylesheet
 * Scoped under .academic-auth-body
 * Dignified, authoritative, institutional interface
 */

:root {
  --acad-navy-deep: #08182b;
  --acad-navy-card: #0b1c3d;
  --acad-gold: #c59b27;
  --acad-gold-light: #f6e05e;
  --acad-gold-dark: #996515;
  --acad-gold-muted: rgba(197, 155, 39, 0.2);
  --acad-bg: #f8fafc;
  --acad-card-bg: #ffffff;
  --acad-text-heading: #08182b;
  --acad-text-body: #334155;
  --acad-text-muted: #64748b;
  --acad-border: #e2e8f0;
  --acad-error: #dc2626;
}

*, *::before, *::after {
  box-sizing: border-box;
}

body.academic-auth-body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background-color: var(--acad-bg);
  background-image: 
    linear-gradient(to right, rgba(226, 232, 240, 0.4) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(226, 232, 240, 0.4) 1px, transparent 1px);
  background-size: 32px 32px;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--acad-text-body);
  line-height: 1.5;
  display: flex;
  flex-direction: column;
}

/* Serif font utility for headings */
.academic-serif {
  font-family: 'Cinzel', 'Playfair Display', Georgia, 'Times New Roman', serif;
}

/* Super Admin Preview Banner */
.academic-preview-banner {
  background: #0f172a;
  border-bottom: 2px solid var(--acad-gold);
  color: #f1f5f9;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  position: relative;
  z-index: 100;
}

.academic-preview-banner a {
  color: #fef08a;
  background: rgba(197, 155, 39, 0.2);
  border: 1px solid var(--acad-gold);
  padding: 4px 12px;
  border-radius: 4px;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.academic-preview-banner a:hover {
  background: var(--acad-gold);
  color: #08182b;
}

/* Main Auth Layout */
.academic-auth-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* Left Column: Oxford Navy Institutional Hero */
.academic-auth-hero {
  flex: 1.15;
  background-color: var(--acad-navy-deep);
  background-image: 
    radial-gradient(circle at 100% 0%, rgba(197, 155, 39, 0.12) 0%, transparent 45%),
    radial-gradient(circle at 0% 100%, rgba(11, 28, 61, 0.8) 0%, transparent 60%);
  border-right: 1px solid rgba(197, 155, 39, 0.25);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 50px 60px;
  position: relative;
  color: #ffffff;
}

.academic-hero-top {
  display: flex;
  align-items: center;
  gap: 16px;
}

.academic-crest-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(197, 155, 39, 0.35);
  padding: 8px 18px;
  border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.academic-crest-wrapper img {
  height: 42px;
  max-width: 140px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.4));
}

.academic-crest-name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #f8fafc;
  text-transform: uppercase;
}

.academic-hero-main {
  max-width: 580px;
  margin: 40px 0;
}

.academic-established-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(197, 155, 39, 0.12);
  border: 1px solid var(--acad-gold);
  color: var(--acad-gold-light);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 6px 14px;
  border-radius: 3px;
  margin-bottom: 22px;
}

.academic-hero-title {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  color: #ffffff;
  margin: 0 0 16px 0;
}

.academic-hero-title span {
  color: var(--acad-gold-light);
  display: block;
}

.academic-gold-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--acad-gold), var(--acad-gold-light));
  margin: 20px 0;
  border-radius: 2px;
}

.academic-hero-desc {
  font-size: 15px;
  color: #cbd5e1;
  line-height: 1.65;
  margin: 0 0 32px 0;
}

/* Institutional Value Pillars */
.academic-pillars {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.academic-pillar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(197, 155, 39, 0.2);
  padding: 14px 18px;
  border-radius: 6px;
  transition: all 0.25s ease;
}

.academic-pillar:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--acad-gold);
  transform: translateX(4px);
}

.academic-pillar-icon {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  background: rgba(197, 155, 39, 0.15);
  border: 1px solid var(--acad-gold);
  color: var(--acad-gold-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}

.academic-pillar-text h4 {
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 2px 0;
  color: #f8fafc;
}

.academic-pillar-text p {
  font-size: 12px;
  color: #94a3b8;
  margin: 0;
}

/* Left Hero Footer */
.academic-hero-footer {
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.academic-address {
  font-size: 12px;
  color: #94a3b8;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 320px;
}

.academic-social-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.academic-social-btn {
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(197, 155, 39, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.2s ease;
}

.academic-social-btn:hover {
  background: var(--acad-gold);
  border-color: var(--acad-gold);
  color: var(--acad-navy-deep);
  transform: translateY(-2px);
}

/* Right Login Card Panel */
.academic-auth-panel {
  flex: 0.95;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 50px;
}

.academic-card {
  width: 100%;
  max-width: 440px;
  background: var(--acad-card-bg);
  border: 1px solid var(--acad-border);
  border-radius: 8px;
  padding: 40px 38px;
  box-shadow: 
    0 12px 30px -5px rgba(8, 24, 43, 0.08),
    0 1px 3px rgba(8, 24, 43, 0.05);
  position: relative;
  overflow: hidden;
}

/* Triple-accent Gold Top Border */
.academic-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #996515 0%, #c59b27 30%, #f6e05e 50%, #c59b27 70%, #996515 100%);
}

.academic-card-header {
  text-align: center;
  margin-bottom: 28px;
}

.academic-mobile-logo {
  display: none;
  margin-bottom: 16px;
}

.academic-mobile-logo img {
  height: 48px;
  max-width: 160px;
  object-fit: contain;
}

.academic-card-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--acad-text-heading);
  margin: 0 0 6px 0;
  letter-spacing: 0.02em;
}

.academic-card-subtitle {
  font-size: 13px;
  color: var(--acad-text-muted);
  margin: 0;
}

/* Form Groups */
.academic-form-group {
  margin-bottom: 20px;
  position: relative;
}

.academic-label {
  display: block;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #475569;
  margin-bottom: 8px;
}

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

.academic-input-icon {
  position: absolute;
  left: 15px;
  color: #94a3b8;
  font-size: 14px;
  pointer-events: none;
  transition: color 0.2s;
}

.academic-input {
  width: 100%;
  height: 46px;
  padding: 0 16px 0 42px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 5px;
  color: #0f172a;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.academic-input.with-toggle {
  padding-right: 46px;
}

.academic-input:focus {
  border-color: var(--acad-gold);
  box-shadow: 0 0 0 3px rgba(197, 155, 39, 0.18);
}

.academic-input:focus + .academic-input-icon,
.academic-input-wrapper:focus-within .academic-input-icon {
  color: var(--acad-gold);
}

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

.academic-form-group.has-error .academic-input {
  border-color: var(--acad-error);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.academic-error-text {
  display: block;
  color: var(--acad-error);
  font-size: 12px;
  margin-top: 6px;
  font-weight: 500;
}

.academic-pw-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 14px;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.academic-pw-toggle:hover {
  color: var(--acad-text-heading);
}

.academic-pw-toggle:focus {
  outline: none;
  color: var(--acad-gold);
}

/* Remember & Forgot Row */
.academic-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  font-size: 13px;
}

.academic-checkbox-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #475569;
  user-select: none;
  margin: 0;
}

.academic-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: #0b1c3d;
  cursor: pointer;
}

.academic-forgot-link {
  color: #0b1c3d;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px dotted var(--acad-gold);
  transition: all 0.2s;
}

.academic-forgot-link:hover {
  color: var(--acad-gold-dark);
  border-bottom-style: solid;
}

/* Submit Button */
.academic-submit-btn {
  width: 100%;
  height: 48px;
  background-color: var(--acad-navy-deep);
  border: 1px solid var(--acad-gold);
  border-radius: 5px;
  color: var(--acad-gold-light);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(8, 24, 43, 0.2);
  transition: all 0.2s ease;
}

.academic-submit-btn:hover {
  background-color: #0d223f;
  color: #ffffff;
  border-color: var(--acad-gold-light);
  box-shadow: 0 6px 18px rgba(8, 24, 43, 0.3);
  transform: translateY(-1px);
}

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

.academic-submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none !important;
}

.academic-card-footer {
  margin-top: 24px;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
}

.academic-card-footer p {
  margin: 0;
}

/* Responsive Media Queries */
@media (max-width: 1024px) {
  .academic-auth-hero {
    padding: 40px;
  }
  .academic-hero-title {
    font-size: 34px;
  }
  .academic-auth-panel {
    padding: 30px;
  }
}

@media (max-width: 860px) {
  .academic-auth-wrapper {
    flex-direction: column;
  }
  .academic-auth-hero {
    padding: 30px 24px 20px 24px;
    flex: none;
    border-right: none;
    border-bottom: 2px solid var(--acad-gold);
  }
  .academic-hero-main {
    margin: 20px 0;
  }
  .academic-hero-title {
    font-size: 28px;
  }
  .academic-pillars {
    display: none;
  }
  .academic-hero-footer {
    display: none;
  }
  .academic-mobile-logo {
    display: block;
  }
  .academic-auth-panel {
    padding: 24px 20px 40px 20px;
    flex: none;
    width: 100%;
  }
  .academic-card {
    padding: 30px 22px;
    max-width: 100%;
  }
}

@media (max-width: 480px) {
  .academic-auth-hero {
    padding: 20px 16px 10px 16px;
  }
  .academic-auth-panel {
    padding: 10px 16px 30px 16px;
  }
  .academic-hero-title {
    font-size: 22px;
  }
  .academic-card-title {
    font-size: 22px;
  }
  .academic-form-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .academic-pillar,
  .academic-submit-btn,
  .academic-social-btn {
    transition: none !important;
    transform: none !important;
  }
}

/* Extra Small Mobile Viewport Target (320px - 360px) */
@media (max-width: 360px) {
  .academic-auth-hero {
    padding: 16px 12px 8px 12px;
  }
  .academic-auth-panel {
    padding: 8px 10px 24px 10px;
  }
  .academic-card {
    padding: 22px 14px;
    border-radius: 6px;
  }
  .academic-card-title {
    font-size: 20px;
  }
  .academic-input {
    height: 44px;
    font-size: 13px;
  }
  .academic-submit-btn {
    height: 46px;
    font-size: 13px;
  }
}
