:root {
  --manyanet-wine: #8e1537;
  --manyanet-blue: #003b71;
  --manyanet-blue-deep: #002d57;
  --ink: #182433;
  --muted: #657080;
  --line: #dfe5eb;
  --surface: #ffffff;
  --workspace: #f2f4f7;
  --shadow: 0 18px 50px rgba(0, 45, 87, 0.12);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--workspace);
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
}

body {
  background: var(--workspace);
}

button,
input {
  font: inherit;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 8px;
  left: 8px;
  transform: translateY(-180%);
  padding: 10px 14px;
  border-radius: 8px;
  background: #fff;
  color: var(--manyanet-blue);
  font-weight: 700;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Login */
.siged-login-page {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: 34px 24px 116px;
  background:
    radial-gradient(circle at 50% 9%, rgba(255, 255, 255, 0.98) 0 15%, rgba(255, 255, 255, 0) 44%),
    linear-gradient(145deg, #fbfdff 0%, #f4f7fb 54%, #e9f0f7 100%);
  color: var(--manyanet-blue);
}

.login-background,
.login-background span {
  pointer-events: none;
  user-select: none;
}

.login-background {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.login-orbit {
  position: absolute;
  left: -12vw;
  width: 125vw;
  border-radius: 50%;
  transform: rotate(-7deg);
}

.login-orbit-one {
  top: 37vh;
  height: 47vh;
  border: 72px solid rgba(179, 200, 221, 0.26);
}

.login-orbit-two {
  top: 44vh;
  height: 48vh;
  border: 38px solid rgba(205, 218, 232, 0.5);
}

.login-watermark {
  position: absolute;
  right: -1.5vw;
  top: 43%;
  color: rgba(255, 255, 255, 0.5);
  font-family: Georgia, 'Times New Roman', serif;
  font-size: clamp(260px, 35vw, 640px);
  font-weight: 900;
  line-height: 0.72;
  text-shadow: 0 0 1px rgba(0, 59, 113, 0.03);
}

.login-wine-ribbon {
  position: absolute;
  right: -8vw;
  bottom: -12vh;
  width: 74vw;
  height: 27vh;
  border-radius: 52% 0 0 0;
  background: linear-gradient(165deg, rgba(142, 21, 55, 0) 0 26%, rgba(142, 21, 55, 0.8) 27% 53%, #8e1537 54% 100%);
  transform: rotate(-3deg);
  opacity: 0.96;
}

.login-shell {
  position: relative;
  z-index: 2;
  width: min(100%, 560px);
  text-align: center;
}

.login-school-brand {
  display: grid;
  justify-items: center;
  margin-bottom: 24px;
}

.login-logo {
  display: block;
  width: 142px;
  max-height: 104px;
  object-fit: contain;
}

.login-school-name {
  margin: 8px 0 0;
  color: var(--manyanet-blue);
  font-size: clamp(21px, 2.4vw, 31px);
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
}

.login-school-tagline {
  margin: 5px 0 0;
  color: #234b72;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.login-brand-accent {
  width: 76px;
  height: 4px;
  margin-top: 19px;
  border-radius: 999px;
  background: var(--manyanet-wine);
}

.login-card {
  position: relative;
  padding: 38px 44px 30px;
  border: 1px solid rgba(197, 211, 224, 0.76);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 80px rgba(0, 45, 87, 0.14), 0 5px 18px rgba(0, 45, 87, 0.07);
  backdrop-filter: blur(14px);
}

.login-card-heading h1 {
  margin: 0;
  color: var(--manyanet-blue);
  font-size: clamp(42px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0.015em;
}

.login-card-heading p {
  margin: 8px 0 10px;
  color: #31577c;
  font-size: 15px;
  line-height: 1.4;
}

.login-credential-note {
  margin: 0 0 22px;
  color: #77889a;
  font-size: 12.5px;
  line-height: 1.45;
}

.login-message {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-left: 4px solid var(--manyanet-wine);
  border-radius: 10px;
  background: #fff2f5;
  color: #6f102b;
  font-size: 14px;
  line-height: 1.45;
  text-align: left;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-field {
  position: relative;
}

.login-field-icon {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 17px;
  width: 21px;
  height: 21px;
  transform: translateY(-50%);
  fill: none;
  stroke: #607a94;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}

.login-form input[type="email"],
.login-form input[type="password"] {
  width: 100%;
  min-height: 58px;
  padding: 13px 17px 13px 52px;
  border: 1px solid #cbd7e2;
  border-radius: 12px;
  outline: none;
  background: rgba(255, 255, 255, 0.98);
  color: var(--ink);
  font-size: 15px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.login-form input::placeholder {
  color: #7d8c9c;
  opacity: 1;
}

.login-form input:focus {
  border-color: var(--manyanet-blue);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(0, 59, 113, 0.1);
}

.login-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 58px;
  gap: 11px;
  margin-top: 5px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #07538e, var(--manyanet-blue));
  color: #fff;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  box-shadow: 0 9px 24px rgba(0, 59, 113, 0.17);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.login-submit svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.login-submit:hover {
  background: linear-gradient(135deg, #064878, var(--manyanet-blue-deep));
  box-shadow: 0 12px 28px rgba(0, 59, 113, 0.22);
  transform: translateY(-1px);
}

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

.login-card-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 14px;
  margin-top: 28px;
}

.login-card-footer span {
  height: 1px;
  background: #d7e0e9;
}

.login-card-footer strong {
  color: var(--manyanet-blue);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-location {
  margin: 7px 0 0;
  color: #62758a;
  font-size: 13px;
  letter-spacing: 0.17em;
}

.login-page-footer {
  position: fixed;
  z-index: 3;
  left: 50%;
  bottom: 25px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  width: min(100% - 40px, 760px);
  gap: clamp(28px, 6vw, 72px);
  transform: translateX(-50%);
  color: var(--manyanet-blue);
}

.login-footer-value {
  display: grid;
  justify-items: center;
  width: 150px;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.login-footer-value svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.5;
}

/* SIGED application shell */
.siged-app-page {
  min-width: 320px;
  min-height: 100vh;
}

.siged-header {
  position: relative;
  z-index: 20;
  border-top: 6px solid var(--manyanet-wine);
  background: var(--surface);
  box-shadow: 0 2px 10px rgba(23, 36, 51, 0.11);
}

.siged-header-main {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(360px, 2.4fr) minmax(230px, 1.25fr);
  align-items: center;
  min-height: 112px;
  padding: 14px clamp(18px, 3vw, 48px);
  column-gap: 24px;
}

.siged-logo-area {
  display: flex;
  align-items: center;
  justify-content: flex-start;
}

.siged-logo {
  display: block;
  width: min(150px, 100%);
  max-height: 82px;
  object-fit: contain;
  object-position: left center;
}

.siged-school-area {
  min-width: 0;
  text-align: center;
}

.siged-school-name {
  color: var(--manyanet-blue);
  font-size: clamp(19px, 2vw, 28px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0.025em;
}

.siged-year {
  margin-top: 7px;
  color: var(--manyanet-wine);
  font-size: 15px;
  font-weight: 700;
}

.siged-user-area {
  min-width: 0;
  justify-self: end;
  text-align: right;
  color: #39485a;
  font-size: 14px;
  line-height: 1.35;
}

.siged-user-area strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--manyanet-blue);
  font-size: 15px;
}

.siged-welcome-label {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
}

.siged-nav {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  background: var(--manyanet-blue);
}

.siged-nav-scroll {
  display: flex;
  align-items: stretch;
  justify-content: center;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
}

.siged-nav-item {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  min-height: 45px;
  padding: 0 clamp(12px, 1.3vw, 22px);
  border: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
}

button.siged-nav-item {
  cursor: default;
}

.siged-nav-item:first-child {
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}

.siged-nav-item.is-active {
  background: var(--manyanet-wine);
}

.siged-nav-item:not([aria-disabled="true"]):hover,
.siged-logout:hover {
  background: rgba(255, 255, 255, 0.11);
}

.siged-nav-item.is-active:hover {
  background: var(--manyanet-wine);
}

.siged-nav-item[aria-disabled="true"] {
  opacity: 0.92;
}

.siged-logout-form {
  display: flex;
  flex: 0 0 auto;
  margin: 0;
}

.siged-logout {
  height: 100%;
  cursor: pointer !important;
}

.siged-workspace {
  min-height: calc(100vh - 163px);
  padding: clamp(18px, 3vw, 42px);
  outline: none;
  background: var(--workspace);
}

.siged-workspace-surface {
  min-height: calc(100vh - 230px);
  border: 1px solid #e4e9ee;
  border-radius: 10px;
  background: #f8f9fb;
}

@media (max-width: 900px) {
  .siged-login-page {
    overflow: auto;
    padding-top: 24px;
    padding-bottom: 130px;
  }

  .login-watermark {
    right: -12vw;
    top: 49%;
    font-size: 430px;
  }

  .login-wine-ribbon {
    right: -18vw;
    width: 90vw;
  }

  .login-page-footer {
    bottom: 18px;
    gap: 30px;
  }

  .siged-header-main {
    grid-template-columns: 120px 1fr;
    grid-template-areas:
      "logo school"
      "user user";
    min-height: auto;
    padding-top: 16px;
    padding-bottom: 12px;
    row-gap: 10px;
  }

  .siged-logo-area {
    grid-area: logo;
  }

  .siged-logo {
    width: 110px;
    max-height: 68px;
  }

  .siged-school-area {
    grid-area: school;
    text-align: left;
  }

  .siged-user-area {
    grid-area: user;
    justify-self: stretch;
    padding-top: 8px;
    border-top: 1px solid var(--line);
    text-align: left;
  }

  .siged-user-area .siged-welcome-label,
  .siged-user-area strong {
    display: inline;
  }

  .siged-user-area .siged-welcome-label {
    margin-right: 4px;
  }

  .siged-nav-scroll {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .siged-login-page {
    min-width: 320px;
    padding: 18px 14px 44px;
  }

  .login-orbit-one {
    top: 40vh;
    border-width: 48px;
  }

  .login-orbit-two {
    top: 47vh;
    border-width: 28px;
  }

  .login-watermark {
    right: -28vw;
    top: 52%;
    font-size: 320px;
  }

  .login-wine-ribbon {
    display: none;
  }

  .login-school-brand {
    margin-bottom: 16px;
  }

  .login-logo {
    width: 106px;
    max-height: 82px;
  }

  .login-school-name {
    margin-top: 4px;
    font-size: 18px;
    letter-spacing: 0.055em;
  }

  .login-school-tagline {
    font-size: 9px;
    letter-spacing: 0.13em;
  }

  .login-brand-accent {
    width: 56px;
    height: 3px;
    margin-top: 13px;
  }

  .login-card {
    padding: 28px 20px 23px;
    border-radius: 18px;
  }

  .login-card-heading h1 {
    font-size: 40px;
  }

  .login-card-heading p {
    margin-bottom: 8px;
    font-size: 13px;
  }

  .login-credential-note {
    margin-bottom: 18px;
    font-size: 11.5px;
  }

  .login-form input[type="email"],
  .login-form input[type="password"],
  .login-submit {
    min-height: 52px;
  }

  .login-page-footer {
    position: relative;
    left: auto;
    bottom: auto;
    z-index: 3;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    width: min(100%, 430px);
    margin: 24px auto 0;
    gap: 10px;
    transform: none;
  }

  .login-footer-value {
    width: auto;
    font-size: 10px;
  }

  .login-footer-value svg {
    width: 23px;
    height: 23px;
  }

  .siged-header-main {
    grid-template-columns: 82px 1fr;
    padding: 12px 14px 10px;
    column-gap: 12px;
  }

  .siged-logo {
    width: 78px;
    max-height: 56px;
  }

  .siged-school-name {
    font-size: 17px;
  }

  .siged-year,
  .siged-user-area,
  .siged-user-area strong {
    font-size: 13px;
  }

  .siged-nav-item {
    min-height: 43px;
    padding-inline: 15px;
    font-size: 13px;
  }

  .siged-workspace {
    min-height: calc(100vh - 176px);
    padding: 12px;
  }

  .siged-workspace-surface {
    min-height: calc(100vh - 202px);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
