/* ====================================================
   GLOBAL STYLES
   - Scroll-free login layout
   - Auto-adjusts to screen size
   - Gradient background preserved
   ==================================================== */

/* Import Poppins */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

:root {
  --bg-gradient-start: #1abc9c;
  --bg-gradient-mid: #16a085;
  --bg-gradient-end: #27ae60;
  --btn-green: #2ecc71;
  --btn-green-hover: #27ae60;
  --btn-green-gradient: linear-gradient(
    135deg,
    #2ecc71 0%,
    #27ae60 100%
  );
  --shadow-auth: 0 10px 25px rgba(0, 0, 0, 0.08);
  --radius-auth: 1rem;
  --auth-width: 960px;
}

/* ====================================================
   VIEWPORT LOCK (NO SCROLLBARS)
   ==================================================== */
html,
body {
  height: 100%;
  margin: 0;
  overflow: hidden; /* NO SCROLLBARS */
  font-family: "Poppins", sans-serif;
}

/* ====================================================
   BACKGROUND
   ==================================================== */
body {
  background: linear-gradient(
    135deg,
    var(--bg-gradient-start),
    var(--bg-gradient-mid),
    var(--bg-gradient-end)
  );
  background-size: cover;
  background-repeat: no-repeat;
  position: relative;
}

/* Decorative background shapes */
body::before,
body::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
  z-index: 0;
}

body::before {
  width: 300px;
  height: 300px;
  background: #ecf0f1;
  top: -50px;
  left: -50px;
}

body::after {
  width: 400px;
  height: 400px;
  background: #ffffff;
  bottom: -100px;
  right: -100px;
}

/* ====================================================
   AUTH CONTAINER
   ==================================================== */
.auth-wrap {
  width: 100%;
  max-width: var(--auth-width);
  max-height: 90vh; /* prevents overflow */
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 1;
}

/* ====================================================
   AUTH CARD
   ==================================================== */
.auth-card {
  width: 100%;
  max-height: 90vh; /* critical */
  background: #fff;
  border-radius: var(--radius-auth);
  overflow: hidden;
  box-shadow: var(--shadow-auth);
  display: flex;
}

/* ====================================================
   LEFT PANEL
   ==================================================== */
.left-panel {
  flex: 1;
  background: #f8f9fa;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.login-photo {
  max-width: 100%;
  max-height: 280px; /* prevents vertical overflow */
  object-fit: contain;
  border-radius: 0.5rem;
}

.left-caption h3 {
  font-weight: 600;
  color: #333;
}

.left-caption p {
  color: #666;
}

/* ====================================================
   RIGHT PANEL
   ==================================================== */
.right-panel {
  flex: 1;
  padding: 2.5rem;
}

.brand .logo i {
  font-size: 1.75rem;
  color: var(--btn-green);
}

.brand-text .h6 {
  font-size: 1.1rem;
  font-weight: 600;
}

form label {
  font-size: 0.85rem;
  color: #555;
  font-weight: 500;
}

.form-control-lg {
  font-size: 0.9rem;
  padding: 0.75rem;
}

/* ====================================================
   SIGN-IN BUTTON
   ==================================================== */
#btnSignIn {
  background: var(--btn-green-gradient);
  color: #fff;
  border: none;
  transition: background 0.3s ease;
}

#btnSignIn:hover {
  background: var(--btn-green-hover);
  color: #fff;
}

/* ====================================================
   RESPONSIVE RULES
   ==================================================== */

/* Hide image on narrow screens */
@media (max-width: 768px) {
  .auth-card {
    flex-direction: column;
  }

  .left-panel {
    display: none;
  }

  .right-panel {
    padding: 2rem 1.5rem;
  }
}

/* Hide image on short screens (important) */
@media (max-height: 650px) {
  .left-panel {
    display: none !important;
  }
}

/* Extra small devices */
@media (max-width: 425px) {
  .right-panel {
    padding: 1.5rem 1rem;
  }

  #btnSignIn {
    font-size: 0.9rem;
  }
}
