:root{
  --brand:#0d7a25;
  --brand-700:#085c1b;

  --blue:#8fc3e8;
  --blue-700:#5aaee0;

  --text:#0f172a;
  --muted:#64748b;
  --card:#ffffff;
  --border:#e2e8f0;
  --shadow:0 20px 50px rgba(15,23,42,.18);

  /* layout tuning */
  --hero-top:50px;   /* distance from topbar to contents */
  --hero-gap:48px;    /* gap between heading at card */
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:system-ui, Segoe UI, Roboto, Arial;
  color:var(--text);
  background:#f1f5f9;
}

/* Top banner (square) */
.topbar{
  position:relative;
  height:96px;
  background:var(--blue);
  border-bottom-left-radius:0;
  border-bottom-right-radius:0;
  overflow:visible;
  z-index:10;
}

/* Logo circle overlapping the banner */
.logo-wrap{
  position:absolute;
  left:50%;
  top:0;
  transform:translate(-50%, 28px);
  width:120px;
  height:120px;
  background:#fff;
  border-radius:999px;
  display:grid;
  place-items:center;
  box-shadow:0 10px 25px rgba(0,0,0,.2);
  overflow:hidden;
  z-index:20;
}
.logo-wrap img{
  width:100%;
  height:100%;
  object-fit:cover;
}

/* Background + centered content */
.hero{
  position:relative;
  min-height:calc(100vh - 96px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;          /* <-- from center to flex-start */
  gap:var(--hero-gap);                 /* space between heading at card */
  padding:var(--hero-top) 20px 40px;   /* <-- big top padding instead of negative margin */
  z-index:1;
}
.hero::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:-2;
  background:url('../img/classroom.jpg') center/cover no-repeat;
  filter:brightness(.75);
}
.hero::after{
  content:"";
  position:absolute;
  inset:0;
  z-index:-1;
  backdrop-filter:blur(2px);
  background:linear-gradient(to bottom, rgba(255,255,255,.15), rgba(255,255,255,.35));
}

/* School headings */
.school{
  text-align:center;
  margin:0;                           /* <-- removed big negative margin */
  color:#111827;
  text-shadow:0 1px 0 rgba(255,255,255,.5);
}
.school h1{
  margin:0;
  font-size:clamp(22px, 3.6vw, 36px);
  font-weight:800;
  letter-spacing:.2px;
}
.school .sub{
  margin-top:4px;
  color:#111827;
  font-weight:500;
}
.school .sy {
  margin-top:2px;
  color:#111827;
  font-weight:600;
}

/* Login Card */
.card{
  width:min(520px, 94vw);
  margin:0 auto;
  background:var(--card);
  border:1px solid var(--border);
  border-radius:14px;
  box-shadow:var(--shadow);
  padding:26px;
  backdrop-filter:saturate(120%) blur(2px);
}

.field{margin-top:14px}
.label{
  font-size:13px;
  color:var(--muted);
  margin:0 0 6px 2px;
}

/* Input shell */
.control{
  position:relative;
  display:flex;
  align-items:center;
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
}

/* Left icon */
.icon{
  position:absolute;
  left:12px;
  top:50%;
  transform:translateY(-50%);
  width:20px;
  height:20px;
  opacity:.55;
  display:grid;
  place-items:center;
  pointer-events:none;
}

/* Actual inputs fill the shell */
.card input[type="text"],
.card input[type="password"]{
  display:block;
  width:100%;
  min-width:0;
  height:44px;
  padding:12px 48px 12px 42px;  /* room for right eye + left icon */
  border:0;
  outline:0;
  background:transparent;
  font-size:15px;
  border-radius:10px;
  appearance:none;
}

/* Toggle button INSIDE the shell */
button.toggle-pass{
  position:absolute;
  right:10px;
  top:50%;
  transform:translateY(-50%);
  width:34px;
  height:34px;
  display:grid;
  place-items:center;
  border:0 !important;
  background:transparent !important;
  box-shadow:none !important;
  outline:none;
  cursor:pointer;
  border-radius:8px;
  z-index:2;
}
button.toggle-pass:hover{ opacity:1 }
button.toggle-pass svg{ pointer-events:none }

/* Hide native reveal buttons on Edge/IE */
input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear{
  display:none;
  width:0;
  height:0;
}

/* Links + button */
.row{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-top:10px;
}
.link{
  font-size:14px;
  color:#0b5bd3;
  text-decoration:none;
}
.link:hover{text-decoration:underline}

.btn{
  margin-top:16px;
  width:100%;
  border:0;
  cursor:pointer;
  background:var(--blue);
  color:#0b1b2a;
  font-weight:700;
  padding:12px 16px;
  border-radius:12px;
  font-size:16px;
  box-shadow:0 8px 20px rgba(95,163,208,.35);
  transition:transform .05s ease, background .2s ease;
}
.btn:hover{background:var(--blue-700)}
.btn:active{transform:translateY(1px)}

.alert{
  margin-top:10px;
  padding:10px 12px;
  border-radius:10px;
  font-size:14px;
  border:1px solid #fecaca;
  background:#fff1f2;
  color:#7f1d1d;
}
[hidden]{display:none !important}

/* Small screens */
@media (max-width:480px){
  .logo-wrap{
    width:92px;
    height:92px;
    transform:translate(-50%, 20px);
  }

  :root{
    --hero-top:110px;   /* a bit tighter on mobile */
    --hero-gap:32px;
  }
}
