:root {
    --bs-primary: #6f42c1;
    --bs-primary-rgb: 111, 66, 193;
    --bs-link-color: #6f42c1;
    --bs-link-color-rgb: 111, 66, 193;
    --bs-link-hover-color: #59359a;
    --bs-link-hover-color-rgb: 89, 53, 154;
    --ums-sidebar: #2e1a47;
    --ums-sidebar-hover: #43286a;
}

.btn-primary {
    --bs-btn-bg: #6f42c1;
    --bs-btn-border-color: #6f42c1;
    --bs-btn-hover-bg: #59359a;
    --bs-btn-hover-border-color: #59359a;
    --bs-btn-active-bg: #4c2d85;
    --bs-btn-active-border-color: #4c2d85;
    --bs-btn-disabled-bg: #6f42c1;
    --bs-btn-disabled-border-color: #6f42c1;
}

.btn-outline-primary {
    --bs-btn-color: #6f42c1;
    --bs-btn-border-color: #6f42c1;
    --bs-btn-hover-bg: #6f42c1;
    --bs-btn-hover-border-color: #6f42c1;
    --bs-btn-active-bg: #59359a;
    --bs-btn-active-border-color: #59359a;
}

.form-control:focus, .form-select:focus {
    border-color: #a98eda;
    box-shadow: 0 0 0 0.25rem rgba(111, 66, 193, 0.25);
}

.bg-ums { background-color: var(--ums-sidebar); }
.text-ums { color: #6f42c1; }

body { background-color: #f6f3fb; }

.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2e1a47 0%, #6f42c1 100%);
}
/* ===== Campus pictures that appear and disappear softly ===== */
.photo-fade { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.pf-slide { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transform: scale(1); transition: opacity 2.4s ease-in-out, transform 11s linear; }
.pf-slide.on { opacity: 1; transform: scale(1.08); }
/* faint picture behind the whole dashboard page: sits behind everything, covers nothing */
.photo-fade.pf-page { position: fixed; z-index: -1; opacity: .13; filter: saturate(.8); }
/* welcome banner card on the dashboards */
.hero-photo-card { position: relative; overflow: hidden; }
.hero-photo-card .photo-fade { opacity: .38; }
.hero-photo-card::after { content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(90deg, rgba(255,255,255,.97) 0%, rgba(255,255,255,.8) 42%, rgba(255,255,255,.18) 100%); }
.hero-photo-card > .card-body { position: relative; z-index: 1; }
/* login pages */
.login-wrap { position: relative; overflow: hidden; }
.photo-fade.pf-login { opacity: .55; }
.login-shade { position: absolute; inset: 0; z-index: 0; pointer-events: none; background: linear-gradient(135deg, rgba(46,26,71,.82) 0%, rgba(111,66,193,.55) 100%); }
.login-wrap > .card { position: relative; z-index: 2; }

/* ===== Animations ===== */
@keyframes fadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: translateY(18px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes glowPulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(244, 180, 0, .0); } 50% { box-shadow: 0 0 0 10px rgba(244, 180, 0, .18); } }
@keyframes driftBg { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.anim-up { opacity: 0; animation: fadeUp .85s ease-out forwards; }
.anim-pop { opacity: 0; animation: popIn .8s cubic-bezier(.2,.8,.2,1) .1s forwards; }
.anim-float { animation: floaty 5.5s ease-in-out infinite; }
.anim-glow { animation: glowPulse 2.8s ease-in-out infinite; }
.anim-d1 { animation-delay: .15s; } .anim-d2 { animation-delay: .3s; } .anim-d3 { animation-delay: .45s; } .anim-d4 { animation-delay: .6s; } .anim-d5 { animation-delay: .75s; }
/* when no picture is uploaded the login background still moves gently */
.login-wrap { background-size: 200% 200%; animation: driftBg 16s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) {
    .anim-up, .anim-pop { opacity: 1; animation: none; }
    .anim-float, .anim-glow, .login-wrap { animation: none; }
    .pf-slide { transition: none; transform: none; }
}
@media print { .photo-fade, .login-shade { display: none !important; } }
