/* ========== Cahaya Bulan brand ========== */

.cb-brand-wrap {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  box-sizing: border-box;
  width: 320px;
  max-width: 75%;
  height: auto;
  max-height: 20vh;
  min-height: 72px;
  margin: auto;
  padding: 0.35rem 0.15rem 0.5rem;
  user-select: none;
}

.cb-brand {
  font-family: "Fira Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(1.55rem, 3.6vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: #0f172a;
  white-space: nowrap;
  background: linear-gradient(120deg, #0f172a 0%, #1e3a5f 45%, #0ea5e9 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.cb-tagline {
  margin-top: 0.35rem;
  font-family: "Fira Sans", "Segoe UI", Helvetica, Arial, sans-serif;
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: #64748b;
}

/* Accent underline under brand */
.cb-brand-wrap::after {
  content: "";
  display: block;
  width: 3.25rem;
  height: 3px;
  margin-top: 0.7rem;
  border-radius: 999px;
  background: linear-gradient(90deg, #0ea5e9, #38bdf8 60%, transparent);
}

/* Splash / unsupported-browser panel */
.cb-brand-splash,
#splash.cb-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 280px;
  max-width: 70vw;
  min-height: 100px;
  margin: 1.5rem auto;
  padding: 1.25rem 1.5rem;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  border-radius: 16px;
  background: linear-gradient(160deg, #f8fafc 0%, #e2e8f0 100%);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  -webkit-text-fill-color: unset;
  color: #0f172a;
  background-image: none;
  background-color: #f8fafc;
}

/* Login panel polish */
#loginContent {
  overflow: hidden;
  border-radius: 18px !important;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.12) !important;
}

.sg-logo {
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 1.5rem !important;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(14, 165, 233, 0.16), transparent 55%),
    radial-gradient(ellipse at 80% 80%, rgba(30, 58, 95, 0.10), transparent 50%),
    linear-gradient(160deg, #f8fafc 0%, #eef2ff 48%, #e0f2fe 100%) !important;
}

.sg-logo .md-padding {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 180px;
}

.sg-login {
  background: linear-gradient(180deg, #0ea5e9 0%, #0284c7 55%, #0369a1 100%) !important;
}

.sg-login-content {
  max-width: 340px !important;
  width: 340px !important;
}

/* Form controls a bit roomier */
.sg-login-content md-input-container,
.sg-login-content .md-button {
  border-radius: 10px;
}

/* Hide leftover stock logo images */
.sg-logo img[src*="sogo-full"],
.sg-logo img[src*="sogo-compact"],
img#splash[src*="sogo-logo"] {
  display: none !important;
}

/* Dark mode */
body.dark-mode .cb-brand,
.md-dark-theme .cb-brand {
  background: linear-gradient(120deg, #f8fafc 0%, #bae6fd 55%, #38bdf8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
body.dark-mode .cb-tagline,
.md-dark-theme .cb-tagline {
  color: #94a3b8;
}
body.dark-mode .sg-logo,
.md-dark-theme .sg-logo {
  background:
    radial-gradient(ellipse at 20% 20%, rgba(14, 165, 233, 0.22), transparent 55%),
    linear-gradient(160deg, #0b1220 0%, #111827 100%) !important;
}

/* Mobile: stack brand comfortably */
@media (max-width: 960px) {
  .cb-brand-wrap {
    width: min(320px, 86vw);
    max-width: 86vw;
    max-height: none;
    min-height: 64px;
    align-items: center;
    text-align: center;
  }
  .cb-brand-wrap::after {
    margin-left: auto;
    margin-right: auto;
  }
  .sg-logo .md-padding {
    min-height: 120px;
  }
  .sg-login-content {
    width: min(340px, 92vw) !important;
    max-width: 92vw !important;
  }
}
