/* Appsites UMS - layout and theme on top of Bootstrap 5.3 (navy + teal from the Appsites logo). */
:root {
  --ums-navy: #26306b;
  --ums-navy-dark: #1b2350;
  --ums-navy-soft: #343f86;
  --ums-teal: #2bb38a;
  --ums-teal-soft: #e3f6ef;
  --ums-bg: #f3f5f9;
  --ums-sidebar-width: 248px;
  --bs-primary: #26306b;
  --bs-primary-rgb: 38, 48, 107;
  --bs-link-color: #26306b;
  --bs-link-color-rgb: 38, 48, 107;
  --bs-link-hover-color: #1b2350;
  --bs-body-font-size: 0.925rem;
}

.btn-primary {
  --bs-btn-bg: var(--ums-navy);
  --bs-btn-border-color: var(--ums-navy);
  --bs-btn-hover-bg: var(--ums-navy-dark);
  --bs-btn-hover-border-color: var(--ums-navy-dark);
  --bs-btn-active-bg: var(--ums-navy-dark);
  --bs-btn-active-border-color: var(--ums-navy-dark);
  --bs-btn-disabled-bg: var(--ums-navy);
  --bs-btn-disabled-border-color: var(--ums-navy);
}
.btn-outline-primary {
  --bs-btn-color: var(--ums-navy);
  --bs-btn-border-color: var(--ums-navy);
  --bs-btn-hover-bg: var(--ums-navy);
  --bs-btn-hover-border-color: var(--ums-navy);
  --bs-btn-active-bg: var(--ums-navy-dark);
}
.text-teal { color: var(--ums-teal) !important; }
.bg-teal-soft { background: var(--ums-teal-soft) !important; }

body.ums-body { background: var(--ums-bg); }

/* ---------- shell ---------- */
.ums-shell { display: flex; min-height: 100vh; }
.ums-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.ums-content { flex: 1; padding: 1.5rem; }

/* Bootstrap forces .offcanvas-lg transparent on large screens, so the colour sits on an inner box. */
.ums-sidebar { --bs-offcanvas-width: var(--ums-sidebar-width); flex-shrink: 0; }
.ums-sidebar-inner {
  background: var(--ums-navy);
  color: #fff;
  height: 100%;
  min-height: 100vh;
  width: var(--ums-sidebar-width);
  display: flex;
  flex-direction: column;
}
@media (min-width: 992px) {
  .ums-sidebar { position: sticky; top: 0; height: 100vh; }
  .ums-sidebar-inner { overflow-y: auto; }
}

.ums-brand {
  display: flex; align-items: center; gap: .6rem;
  padding: 1.05rem 1.15rem;
  font-size: 1.15rem; font-weight: 600; letter-spacing: .2px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.ums-brand > span { white-space: nowrap; }
.ums-brand .bi { color: var(--ums-teal); font-size: 1.45rem; }
.ums-brand b { color: var(--ums-teal); font-weight: 700; }

.ums-nav { padding: .75rem 0 1.5rem; }
.ums-nav-label {
  padding: 1rem 1.25rem .35rem;
  font-size: .7rem; text-transform: uppercase; letter-spacing: .08em;
  color: rgba(255, 255, 255, .5);
}
.ums-link {
  display: flex; align-items: center; gap: .7rem;
  padding: .55rem 1.25rem;
  color: rgba(255, 255, 255, .82);
  text-decoration: none;
  border-left: 3px solid transparent;
}
.ums-link .bi { font-size: 1.05rem; width: 1.2rem; text-align: center; }
.ums-link:hover { color: #fff; background: rgba(255, 255, 255, .06); }
.ums-link.active { color: #fff; background: var(--ums-navy-soft); border-left-color: var(--ums-teal); }

/* ---------- top bar ---------- */
.ums-topbar {
  background: #fff;
  border-bottom: 1px solid #e3e7ef;
  min-height: 60px;
  padding: .5rem 1.5rem;
  display: flex; align-items: center; gap: 1rem;
  position: sticky; top: 0; z-index: 1020;
}
.ums-college { display: flex; align-items: center; gap: .65rem; min-width: 0; }
.ums-college img { height: 38px; width: auto; max-width: 64px; object-fit: contain; }
.ums-college-name { font-weight: 600; color: var(--ums-navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ums-college-sub { font-size: .75rem; color: #6c757d; }
.ums-year-select { width: auto; min-width: 9.5rem; }
.ums-role-label { font-size: .72rem; }
.min-w-0 { min-width: 0; }
.ums-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--ums-teal-soft); color: var(--ums-navy);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .85rem;
}

.ums-footer {
  padding: .85rem 1.5rem;
  font-size: .8rem; color: #6c757d;
  border-top: 1px solid #e3e7ef; background: #fff;
}

/* ---------- content ---------- */
.ums-page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: 1.25rem; }
.ums-page-head h1 { font-size: 1.35rem; font-weight: 600; color: var(--ums-navy); margin: 0; }
.ums-page-head .ums-sub { color: #6c757d; font-size: .85rem; }

.card { border: 0; box-shadow: 0 1px 3px rgba(16, 24, 64, .08); }
.card-header { background: #fff; font-weight: 600; color: var(--ums-navy); }

.ums-stat { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.25rem; }
.ums-stat-icon {
  width: 48px; height: 48px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.ums-stat-value { font-size: 1.5rem; font-weight: 700; line-height: 1.1; color: #1f2937; }
.ums-stat-label { font-size: .8rem; color: #6c757d; }

.table > thead th {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .04em;
  color: #6c757d; background: #f8f9fc; font-weight: 600; white-space: nowrap;
}
.table td { color: #111827; }

.ums-checklist li { padding: .55rem 0; border-bottom: 1px dashed #e5e7eb; display: flex; align-items: center; gap: .6rem; }
.ums-checklist li:last-child { border-bottom: 0; }

.ums-perm-group { border: 1px solid #e5e7eb; border-radius: .5rem; padding: .85rem 1rem; height: 100%; }
.ums-perm-group h6 { color: var(--ums-navy); font-weight: 600; }

.ums-logo-preview { max-height: 90px; max-width: 220px; object-fit: contain; border: 1px solid #e5e7eb; border-radius: .5rem; padding: .35rem; background: #fff; }

.ums-temp-password { font-family: SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.15rem; letter-spacing: .06em; }

/* ---------- sign-in page ---------- */
.ums-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: var(--ums-bg); }
.ums-auth-card { width: 100%; max-width: 880px; overflow: hidden; border-radius: 1rem; }
.ums-auth-brand {
  background: linear-gradient(160deg, var(--ums-navy) 0%, var(--ums-navy-dark) 70%);
  color: #fff; padding: 2.5rem 2rem;
  display: flex; flex-direction: column; justify-content: space-between; gap: 2rem;
}
.ums-auth-brand .ums-auth-logo { background: #fff; border-radius: .75rem; padding: .6rem .9rem; display: inline-block; }
.ums-auth-brand .ums-auth-logo img { height: 64px; width: auto; }
.ums-auth-brand h2 { font-weight: 700; font-size: 1.6rem; }
.ums-auth-brand h2 b { color: var(--ums-teal); }
.ums-auth-brand p { color: rgba(255, 255, 255, .75); }
.ums-auth-form { padding: 2.5rem 2rem; background: #fff; }

/* ---------- error pages ---------- */
.ums-error { min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 1.5rem; }
.ums-error-code { font-size: 4rem; font-weight: 800; color: var(--ums-navy); line-height: 1; }

@media (max-width: 575.98px) {
  .ums-content { padding: 1rem; }
  .ums-topbar { padding: .5rem 1rem; }
}

@media print {
  .ums-sidebar, .ums-topbar, .ums-footer, .no-print { display: none !important; }
  .ums-content { padding: 0; }
  body.ums-body { background: #fff; }
}
