/* =========================================================================
   --- BASE TYPOGRAPHY & BOX MODEL ---
   ========================================================================= */
html, body * { 
  box-sizing: border-box; 
  font-family: 'Open Sans', sans-serif; 
}

body {
  background: url("../img/tohoku_login.5d523eefbb88.png");
  background-size: cover;
  margin: 0;
  padding: 0;
  /* FIX: Full vertical and horizontal viewport alignment using modern Flexbox */
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

/* =========================================================================
   --- LAYOUT WRAPPERS & CONTAINERS ---
   ========================================================================= */
.container {
  width: 100%;
  padding-top: 0;    
  padding-bottom: 0; 
  display: flex;
  justify-content: center;
  align-items: center;
}

.frame {
  height: auto;        /* FIX: Changed from fixed 500px to auto so it expands when alerts show up */
  min-height: 480px;   /* Guarantees the baseline height when clean */
  padding-bottom: 25px; /* Gives nice breathing room at the bottom edge */
  width: 430px;
  background: #262827;
  background-size: cover;
  margin: 0 auto; 
  border-top: solid 1px rgba(255,255,255,.5);
  border-radius: 5px;
  box-shadow: 0px 8px 24px rgba(0,0,0,0.5); 
  overflow: hidden;
  transition: all .5s ease;
}

/* =========================================================================
   --- NAVIGATION HEADER ---
   ========================================================================= */
.nav {
  width: 100%;
  height: 100px;
  padding-top: 40px;
  opacity: 1;
  transition: all .5s ease;
}

.nav-up {
  transform: translateY(-100px);
  opacity: 0;
}

li {
  padding-left: 10px;
  font-size: 18px;
  display: inline;
  text-align: left;
  text-transform: uppercase;
  padding-right: 10px;
  color: #ffffff;
}

.signin-active a {
  padding-bottom: 10px;
  color: #ffffff;
  text-decoration: none;
  border-bottom: solid 2px #fcbb3c;
  transition: all .25s ease;
  cursor: pointer;
}

.signin-inactive a {
  padding-bottom: 0;
  color: #6d6d6d;
  text-decoration: none;
  border-bottom: none;
  cursor: pointer;
}

/* =========================================================================
   --- FORMS, LABELS AND DJANGO AUTO-INPUTS ---
   ========================================================================= */
.form-signin {
  width: 430px;
  height: auto; /* FIX: Changed to auto to allow flexible box tracking metrics */
  font-size: 16px;
  font-weight: 300;
  padding-left: 37px;
  padding-right: 37px;
  padding-top: 35px; 
  transition: opacity .5s ease, transform .5s ease;
}

.form-signin-left {
  transform: translateX(-400px);
  opacity: .0;
}

/* Harmonies default Django auto-generated native inputs */
.form-signin input {
  width: 100%;
  height: 40px; 
  padding-left: 15px;
  padding-right: 15px;
  border: none;
  border-radius: 20px;
  margin-bottom: 25px; /* Core baseline padding separation rule between tracks */
  background: #505458; 
  color: #ffffff;
  font-size: 14px;
  transition: background .3s ease;
}

.form-signin input:focus {
  background: #ffffff;
  color: #000000;
  border: none; 
  outline: none;
}

label {
  font-weight: 400;
  text-transform: uppercase;
  font-size: 13px;
  padding-left: 15px;
  padding-bottom: 10px;
  color: rgba(255,255,255,.7);
  display: block;
}

/* =========================================================================
   --- PRECISE BUTTON SIGN IN COMPONENT ---
   ========================================================================= */
.btn-signin {
  width: 100%;
  height: 42px; /* Fixed button base dimension */
  border: none;
  border-radius: 21px;
  /* FIX: 22px margin perfectly mimics the visual weight of the missing field labels */
  margin-top: 22px; 
  background: transparent;
  padding: 0;
}

.btn-animate {
  font-weight: 700;
  text-transform: uppercase;
  font-size: 13px;
  text-align: center;
  line-height: 42px; /* Accurate text vertical alignment centering */
  color: #212322;    
  width: 100%;
  height: 42px;      /* FIX: Explicit pixel height overrode the fluid 100% bug stretching */
  border: none;
  border-radius: 21px;
  background-color: #fcbb3c;
  
  /* Reset layout position anchors to maintain natural document rendering flow */
  position: relative;
  top: auto;
  left: auto;
  float: none;
  
  transition: all .3s ease; 
}

.btn-animate:hover {
  background-color: #ffca5c;
  cursor: pointer;
  box-shadow: 0px 4px 12px rgba(252, 187, 60, 0.4);
  transform: translateY(-1px);
}

/* =========================================================================
   --- INFO LINK COMPONENT ---
   ========================================================================= */
.info-link-container {
  text-align: center;
  margin-top: 22px; /* Mirrors the vertical balance of the form baseline flows */
  width: 100%;
}

.info-page-link {
  color: rgba(255, 255, 255, 0.5);
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  display: inline-block;
  transition: color 0.3s ease, text-decoration 0.3s ease;
}

.info-page-link:hover {
  color: #fcbb3c; /* Brand secondary orange/yellow focus accent */
  text-decoration: underline;
  cursor: pointer;
}

/* =========================================================================
   --- BRANDING LOGOS HEADER INTERFACE ---
   ========================================================================= */
.logo-wrapper {
  position: absolute;
  top: 20px;
  z-index: 1000;
}

.logo-left {
  left: 20px;
  right: auto; 
}

.logo-right {
  right: 20px;
  left: auto;  
}

.logo-box {
  background-color: rgba(240, 240, 240, 0.9);
  border-radius: 12px;
  padding: 10px 15px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  max-width: 40vw; 
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.logo-box img {
  height: 50px; 
  width: auto;
}

@media (max-width: 500px) {
  .logo-box {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* =========================================================================
   --- PLATFORM MISC UTILITIES ---
   ========================================================================= */
h1 {
  color: #ffffff;
  font-size: 35px;
  font-weight: 300;
  text-align: center;
}

#captcha {
  padding-top: 12px;
  margin-left: 60px;
}

.g-recaptcha {
  transform:scale(0.77);
  transform-origin:0 0;
}

#refresh {
  position: fixed;
  bottom: 20px;
  right: 20px; 
  background-color: #ffffff;
  width: 50px;
  height: 50px;
  border-radius: 25px;
  box-shadow: 0px 2px 7px rgba(0,0,0,0.1);
  padding: 13px 0 0 13px;
}

.refreshicon {
  fill: #d3d3d3;
  transform: rotate(0deg);
  transition: fill .25s ease, transform .25s ease;
}

.refreshicon:hover {
  cursor: pointer;
  fill: #fcbb3c;
  transform: rotate(180deg);
}