:root {
  --mstc-blue: #173a72;
  --mstc-blue-dark: #071d3d;
  --mstc-blue-mid: #225f9d;
  --mstc-border: rgba(255, 255, 255, 0.35);
}

/* Global: do not expose Gitea footer/version. */
footer {
  display: none !important;
}

/* Public home and login: no public navbar. */
html.mstc-public-home #navbar,
html.mstc-public-home footer,
html.mstc-login-page #navbar,
html.mstc-login-page footer {
  display: none !important;
}

/* Internal navbar logo replacement. */
#navbar-logo img {
  content: url('/assets/img/mstc_logo.jpg') !important;
  width: 34px !important;
  height: 32px !important;
  object-fit: contain !important;
  background: #ffffff !important;
  border-radius: 6px !important;
  padding: 2px !important;
}

/* Hide public navbar links if navbar ever appears from cache. */
html.mstc-public-home #navbar a,
html.mstc-login-page #navbar a {
  display: none !important;
}

/* Minimal home. */
.mstc-git-minimal-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  background:
    radial-gradient(circle at 12% 16%, rgba(255,255,255,0.14), transparent 28rem),
    radial-gradient(circle at 88% 84%, rgba(255,255,255,0.12), transparent 30rem),
    linear-gradient(135deg, var(--mstc-blue-dark), var(--mstc-blue), var(--mstc-blue-mid));
}

.mstc-git-minimal-card {
  width: 100%;
  max-width: 390px;
  padding: 42px 34px 28px;
  text-align: center;
  border-radius: 26px;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--mstc-border);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.26);
}

.mstc-git-minimal-logo {
  width: 118px;
  height: auto;
  display: block;
  margin: 0 auto 24px;
}

.mstc-git-minimal-title {
  margin: 0 0 28px;
  color: var(--mstc-blue-dark);
  font-size: 30px;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.mstc-git-minimal-btn {
  display: inline-flex;
  min-height: 44px;
  padding: 0 28px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--mstc-blue);
  color: #ffffff !important;
  font-weight: 800;
  text-decoration: none !important;
  border: 1px solid transparent;
}

.mstc-git-minimal-btn:hover {
  background: var(--mstc-blue-dark);
  color: #ffffff !important;
}

.mstc-git-minimal-copy {
  margin-top: 28px;
  color: #49627c;
  font-size: 12px;
}

/* Login page: hard reset broken Gitea grid sizing. */
html.mstc-login-page,
html.mstc-login-page body {
  min-height: 100vh !important;
  background:
    radial-gradient(circle at 12% 16%, rgba(255,255,255,0.14), transparent 28rem),
    radial-gradient(circle at 88% 84%, rgba(255,255,255,0.12), transparent 30rem),
    linear-gradient(135deg, var(--mstc-blue-dark), var(--mstc-blue), var(--mstc-blue-mid)) !important;
}

html.mstc-login-page .full.height {
  min-height: 100vh !important;
  padding: 0 !important;
  background: transparent !important;
}

html.mstc-login-page .page-content {
  min-height: 100vh !important;
  width: 100% !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 32px !important;
  margin: 0 !important;
  background: transparent !important;
}

html.mstc-login-page .page-content > .ui.container,
html.mstc-login-page .page-content > .ui.grid,
html.mstc-login-page .page-content .ui.grid {
  display: block !important;
  width: 100% !important;
  max-width: 410px !important;
  min-width: 0 !important;
  margin: 0 auto !important;
  padding: 0 !important;
}

html.mstc-login-page .ui.grid > .column,
html.mstc-login-page .ui.grid > [class*="wide"].column,
html.mstc-login-page .ui[class*="very relaxed"].grid > .column {
  display: block !important;
  float: none !important;
  flex: none !important;
  width: 100% !important;
  max-width: 410px !important;
  min-width: 0 !important;
  padding: 0 !important;
  margin: 0 auto !important;
}

html.mstc-login-page .ui.top.attached.header {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 34px 30px 18px !important;
  border-radius: 26px 26px 0 0 !important;
  background: rgba(255, 255, 255, 0.97) !important;
  border: 1px solid var(--mstc-border) !important;
  border-bottom: 0 !important;
  color: transparent !important;
  text-align: center !important;
  box-sizing: border-box !important;
  white-space: normal !important;
}

html.mstc-login-page .ui.top.attached.header::before {
  content: "";
  display: block;
  width: 118px;
  height: 112px;
  margin: 0 auto 18px;
  background: url('/assets/img/mstc_logo.jpg') center / contain no-repeat;
}

html.mstc-login-page .ui.top.attached.header::after {
  content: "MSTC";
  display: block;
  color: var(--mstc-blue-dark);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

html.mstc-login-page .ui.attached.segment {
  width: 100% !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding: 24px 30px 30px !important;
  border-radius: 0 0 26px 26px !important;
  background: rgba(255, 255, 255, 0.97) !important;
  border: 1px solid var(--mstc-border) !important;
  border-top: 0 !important;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.26) !important;
  box-sizing: border-box !important;
}

html.mstc-login-page form,
html.mstc-login-page .ui.form,
html.mstc-login-page .field,
html.mstc-login-page .input,
html.mstc-login-page input {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

html.mstc-login-page label {
  display: block !important;
  text-align: left !important;
  color: var(--mstc-blue-dark) !important;
  font-weight: 700 !important;
  white-space: normal !important;
  word-break: normal !important;
  letter-spacing: normal !important;
}

html.mstc-login-page input {
  min-height: 42px !important;
  border-radius: 12px !important;
}

html.mstc-login-page .ui.primary.button,
html.mstc-login-page button[type="submit"] {
  width: 100% !important;
  min-height: 44px !important;
  border-radius: 999px !important;
  background: var(--mstc-blue) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
}

html.mstc-login-page .ui.primary.button:hover,
html.mstc-login-page button[type="submit"]:hover {
  background: var(--mstc-blue-dark) !important;
}

/* Reduce exposed auxiliary login options/text. */
html.mstc-login-page .divider,
html.mstc-login-page .oauth2,
html.mstc-login-page .openid-connect,
html.mstc-login-page a[href*="forgot_password"],
html.mstc-login-page a[href*="user/oauth2"],
html.mstc-login-page a[href*="webauthn"],
html.mstc-login-page .webauthn,
html.mstc-login-page .passkey {
  display: none !important;
}
