@import url('variables.css');

/* Page Wrapper */
body {
  background-color: #F3F4F6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.login-wrapper {
  display: flex;
  flex: 1;
  min-height: calc(100vh - 80px);
  position: relative;
  background-image: url('../assets/university-bg.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

/* Red Wave Bottom Graphic */
.login-wrapper::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 50%;
  height: 120px;
  background: linear-gradient(135deg, rgba(192, 0, 29, 0.9) 0%, rgba(192, 0, 29, 0.4) 100%);
  clip-path: polygon(0 40%, 100% 85%, 100% 100%, 0% 100%);
  z-index: 1;
  pointer-events: none;
}

.login-wrapper::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 55%;
  height: 150px;
  background: linear-gradient(135deg, rgba(192, 0, 29, 0.7) 0%, rgba(220, 38, 38, 0.1) 100%);
  clip-path: polygon(0 60%, 100% 90%, 100% 100%, 0% 100%);
  z-index: 1;
  pointer-events: none;
}

.left-panel {
  flex: 0 0 55%;
  padding: 35px 50px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.panel-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%);
  z-index: -1;
}

/* Brand Header Override for Login */
.brand-header {
  margin-bottom: 30px;
}

.text-primary-logo {
  color: var(--primary) !important;
}

.text-dark-tagline {
  color: var(--dark-text) !important;
}

/* Left Panel Promo Text */
.promo-content {
  max-width: 550px;
  margin: auto 0;
}

.promo-title {
  font-family: var(--font-headings);
  font-size: 38px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--dark-text);
  margin-bottom: 15px;
}

.text-primary-glow {
  color: var(--primary);
  text-shadow: 0 2px 8px rgba(192, 0, 29, 0.1);
}

.promo-desc {
  font-size: 15px;
  color: var(--text-main);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* Highlight Cards */
.highlight-cards {
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

.highlight-card {
  background-color: var(--white);
  padding: 16px 12px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border: 1px solid rgba(255, 255, 255, 0.8);
  transition: transform var(--transition-normal);
}

.highlight-card:hover {
  transform: translateY(-4px);
}

.highlight-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--primary-light);
  color: var(--primary);
  font-size: 18px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 12px;
}

.highlight-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--dark-text);
  line-height: 1.3;
}

.panel-stats {
  display: flex;
  justify-content: flex-start;
  gap: 35px;
  margin-top: 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  padding-top: 15px;
}

.panel-stat {
  display: flex;
  flex-direction: column;
}

.panel-stat-num {
  font-family: var(--font-headings);
  font-size: 20px;
  font-weight: 800;
  color: var(--primary);
}

.panel-stat-lbl {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

/* Right Panel (Login Container) */
.right-panel {
  flex: 0 0 45%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  z-index: 2;
}

.login-card {
  background-color: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 500px;
  padding: 24px 32px;
  border: 1px solid rgba(255, 255, 255, 0.8);
  position: relative;
  overflow: hidden;
}

/* Client Logo Crest styling */
.client-logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 12px;
}

.crest-logo {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.client-details {
  display: flex;
  flex-direction: column;
}

.client-title {
  font-family: var(--font-headings);
  font-size: 24px;
  font-weight: 800;
  color: #002B49; /* Dark Navy */
  line-height: 0.9;
  letter-spacing: 2px;
}

.client-subtitle {
  font-family: var(--font-headings);
  font-size: 11px;
  font-weight: 700;
  color: #002B49;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.client-tagline {
  font-size: 8px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  margin-top: 3px;
  letter-spacing: 0.3px;
}

/* Powered By Cerisee Row */
.powered-by {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 11px;
  color: var(--text-muted);
}

.powered-badge {
  display: flex;
  align-items: center;
  gap: 4px;
  background-color: var(--primary-light);
  border: 1px solid rgba(192, 0, 29, 0.1);
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

.cherry-logo-mini {
  width: 14px;
  height: 14px;
}

.powered-brand {
  font-family: var(--font-headings);
  font-weight: 800;
  color: var(--primary);
}

.powered-system {
  font-weight: 500;
}

/* Welcome Messages */
.login-intro {
  text-align: center;
  margin-bottom: 16px;
}

.login-greeting {
  font-family: var(--font-headings);
  font-size: 20px;
  font-weight: 800;
  color: var(--dark-text);
  margin-bottom: 2px;
}

.login-instructions {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
}

/* Form Styles */
.form-group {
  margin-bottom: 12px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark-text);
  margin-bottom: 8px;
}

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

.input-icon {
  position: absolute;
  left: 15px;
  color: var(--primary);
  font-size: 15px;
  pointer-events: none;
}

.form-input {
  width: 100%;
  padding: 12px 15px 12px 42px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background-color: var(--light-bg);
  font-size: 14px;
  color: var(--dark-text);
  transition: var(--transition-fast);
}

.form-input::placeholder {
  color: var(--text-light);
}

.form-input:focus {
  outline: none;
  background-color: var(--white);
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Toggle Password Button */
.toggle-password {
  position: absolute;
  right: 15px;
  color: var(--text-muted);
  font-size: 15px;
  transition: color var(--transition-fast);
}

.toggle-password:hover {
  color: var(--primary);
}

/* Form Options (Checkbox & Forgot Password) */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  font-size: 13px;
}

.checkbox-container {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-main);
  font-weight: 500;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.custom-checkbox {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkbox-checkmark {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border-color);
  border-radius: 4px;
  display: inline-block;
  position: relative;
  transition: var(--transition-fast);
  background-color: var(--white);
}

.checkbox-container:hover .checkbox-checkmark {
  border-color: var(--primary);
}

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

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

.custom-checkbox:checked ~ .checkbox-checkmark::after {
  display: block;
}

.forgot-link {
  color: var(--primary);
  font-weight: 600;
}

.forgot-link:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

/* Submit Login Button */
.btn-login-submit {
  width: 100%;
  background-color: var(--primary);
  color: var(--white);
  padding: 12px 24px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 700;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  box-shadow: 0 4px 12px var(--primary-glow);
  position: relative;
  transition: var(--transition-normal);
}

.btn-login-submit:hover {
  background-color: var(--primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px var(--primary-glow);
}

.btn-arrow-circle {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background-color: var(--white);
  color: var(--primary);
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 11px;
  position: absolute;
  right: 18px;
  transition: transform var(--transition-fast);
}

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

/* Alert notifications */
.alert {
  padding: 10px 15px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
}

.alert-danger {
  background-color: #FEE2E2;
  color: #DC2626;
  border: 1px solid #FCA5A5;
}

/* Help Box */
.help-box {
  background-color: var(--primary-light);
  border: 1px solid rgba(192, 0, 29, 0.08);
  border-radius: var(--radius-md);
  padding: 10px 15px;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  position: relative;
}

.help-icon-wrapper {
  flex-shrink: 0;
}

.help-shield {
  width: 32px;
  height: 32px;
}

.help-content {
  flex-grow: 1;
}

.help-title {
  font-family: var(--font-headings);
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 2px;
}

.help-text {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.4;
}

.help-headset {
  font-size: 20px;
  color: var(--primary);
  opacity: 0.6;
}

/* Security Badge below card */
.security-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 12px;
}

.security-badge i {
  color: var(--primary);
}

/* Login Footer Section */
.login-footer {
  background-color: var(--white);
  border-top: 1px solid var(--border-color);
  padding: 15px 20px;
  height: 80px;
  box-sizing: border-box;
  z-index: 2;
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.login-footer-container {
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 30px;
}

.info-badges {
  display: flex;
  gap: 40px;
}

.info-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

.info-badge-icon {
  font-size: 20px;
  color: var(--primary);
  background-color: var(--primary-light);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.info-badge-text {
  display: flex;
  flex-direction: column;
}

.info-badge-text strong {
  font-size: 13px;
  color: var(--dark-text);
  line-height: 1.2;
}

.info-badge-text span {
  font-size: 11px;
  color: var(--text-muted);
}

.copyright-socials {
  display: flex;
  align-items: center;
  gap: 30px;
}

.login-copyright {
  font-size: 13px;
  color: var(--text-muted);
}

.login-social-icons {
  display: flex;
  gap: 10px;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
  .left-panel {
    padding: 40px;
  }
  
  .promo-title {
    font-size: 36px;
  }
  
  .highlight-cards {
    flex-direction: column;
    gap: 12px;
  }
  
  .highlight-card {
    flex-direction: row;
    justify-content: flex-start;
    text-align: left;
    padding: 12px 15px;
    gap: 15px;
  }
  
  .highlight-icon {
    margin-bottom: 0;
    width: 36px;
    height: 36px;
    font-size: 15px;
  }
  
  .info-badges {
    gap: 20px;
  }
}

@media (max-width: 768px) {
  .login-wrapper {
    flex-direction: column;
  }
  
  .login-wrapper::after,
  .login-wrapper::before {
    display: none; /* Hide bottom wave decorators on mobile */
  }
  
  .left-panel {
    flex: none;
    width: 100%;
    padding: 40px 20px;
    text-align: center;
    align-items: center;
  }
  
  .promo-content {
    margin: 30px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
  
  .highlight-cards {
    flex-direction: row;
    width: 100%;
    gap: 10px;
  }
  
  .highlight-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 15px 10px;
    gap: 8px;
  }
  
  .highlight-icon {
    margin-bottom: 4px;
  }
  
  .panel-stats {
    width: 100%;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
  }
  
  .right-panel {
    flex: none;
    width: 100%;
    padding: 20px;
  }
  
  .login-card {
    max-width: 100%;
    padding: 30px 20px;
  }
  
  .login-footer {
    padding: 25px 20px;
  }
  
  .login-footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 25px;
  }
  
  .info-badges {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    width: 100%;
    max-width: 250px;
    margin: 0 auto;
  }
  
  .copyright-socials {
    flex-direction: column;
    gap: 15px;
  }
}

@media (max-width: 480px) {
  .promo-title {
    font-size: 28px;
  }
  
  .highlight-cards {
    flex-direction: column;
  }
  
  .highlight-card {
    flex-direction: row;
    text-align: left;
    gap: 15px;
    padding: 12px 15px;
  }
}

/* Height Lock for Desktops & Laptops to prevent scrolling and fit screen */
@media (min-width: 769px) {
  html, body {
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
  }
  
  .login-wrapper {
    height: calc(100vh - 70px);
    min-height: 0;
    overflow: hidden;
  }
  
  .left-panel {
    padding: 24px 40px;
    height: 100%;
    box-sizing: border-box;
  }
  
  .right-panel {
    padding: 16px;
    height: 100%;
    box-sizing: border-box;
    overflow-y: auto;
  }
  
  .login-card {
    padding: 20px 24px;
    margin: auto;
  }
  
  .client-logo-container {
    margin-bottom: 12px;
    padding-bottom: 8px;
    gap: 12px;
  }
  
  .crest-logo {
    width: 48px;
    height: 48px;
  }
  
  .client-title {
    font-size: 20px;
  }
  
  .powered-by {
    margin-bottom: 12px;
  }
  
  .login-intro {
    margin-bottom: 12px;
  }
  
  .login-greeting {
    font-size: 18px;
  }
  
  .form-group {
    margin-bottom: 8px;
  }
  
  .form-input {
    padding: 10px 12px 10px 38px;
    font-size: 13px;
  }
  
  .input-icon {
    left: 12px;
    font-size: 13px;
  }
  
  .form-options {
    margin-bottom: 12px;
    font-size: 12px;
  }
  
  .btn-login-submit {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .help-box {
    margin-top: 12px;
    padding: 8px 12px;
    gap: 8px;
  }
  
  .help-shield {
    width: 24px;
    height: 24px;
  }
  
  .help-title {
    font-size: 12px;
  }
  
  .help-text {
    font-size: 10px;
  }
  
  .security-badge {
    margin-top: 8px;
    font-size: 10px;
  }
  
  .login-footer {
    height: 70px;
    padding: 10px 20px;
    box-sizing: border-box;
    flex-shrink: 0;
    display: flex;
    align-items: center;
  }

  .info-badge-icon {
    width: 32px;
    height: 32px;
    font-size: 15px;
  }
  
  .info-badge-text strong {
    font-size: 12px;
  }
  
  .info-badge-text span {
    font-size: 10px;
  }
  
  .info-badges {
    gap: 30px;
  }
}
