/* Login and other lightweight auth pages — Bootstrap 3 + app palette */

/* Mbale logo brand colors (crest red + sky blue) */
:root {
    --auth-brand-red: #c61d2f;
    --auth-brand-red-mid: #9e1628;
    --auth-brand-blue: #52b4e0;
    --auth-brand-blue-mid: #2e93c4;
    --auth-brand-blue-deep: #1e6f96;
}

.auth-body {
    margin: 0;
    min-height: 100vh;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    background: #e4e7ea;
    background: linear-gradient(160deg, #dfe4e8 0%, #c5cdd6 45%, #b8c2cc 100%);
}

/* Login only: animated gradient + radial accents from logo palette */
.auth-body.auth-body--login {
    background-color: var(--auth-brand-blue-deep);
    background-image:
        radial-gradient(ellipse 90% 70% at 15% 25%, rgba(198, 29, 47, 0.55) 0%, transparent 55%),
        radial-gradient(ellipse 85% 65% at 88% 72%, rgba(82, 180, 224, 0.5) 0%, transparent 52%),
        radial-gradient(ellipse 120% 80% at 50% 100%, rgba(30, 111, 150, 0.35) 0%, transparent 45%),
        linear-gradient(125deg,
            var(--auth-brand-red-mid) 0%,
            var(--auth-brand-red) 22%,
            var(--auth-brand-blue-mid) 55%,
            var(--auth-brand-blue) 78%,
            var(--auth-brand-blue-deep) 100%);
    background-size: 100% 100%, 100% 100%, 100% 100%, 280% 280%;
    animation: auth-bg-flow 16s ease-in-out infinite;
}

@keyframes auth-bg-flow {
    0% {
        background-position: 0% 40%, 0% 0%, 0% 0%, 0% 50%;
    }
    50% {
        background-position: 0% 40%, 0% 0%, 0% 0%, 100% 50%;
    }
    100% {
        background-position: 0% 40%, 0% 0%, 0% 0%, 0% 50%;
    }
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 24px 12px;
}

.auth-body--login .auth-shell {
    animation: auth-shell-fade 0.9s ease-out both;
}

@keyframes auth-shell-fade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.auth-card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 12px 40px rgba(52, 73, 94, 0.18);
    overflow: hidden;
}

/* Login: very rounded "pill" card, entrance + hover */
.auth-body--login .auth-card.panel {
    border-radius: 28px;
    box-shadow:
        0 8px 32px rgba(30, 40, 55, 0.12),
        0 24px 56px rgba(198, 29, 47, 0.15);
    transform-origin: center center;
    animation: auth-card-enter 0.85s cubic-bezier(0.22, 1, 0.36, 1) both;
    transition:
        transform 0.45s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.45s ease;
}

.auth-body--login .auth-card.panel:hover {
    transform: translateY(-6px) scale(1.012);
    box-shadow:
        0 16px 48px rgba(30, 40, 55, 0.14),
        0 32px 64px rgba(46, 147, 196, 0.22);
}

@keyframes auth-card-enter {
    from {
        opacity: 0;
        transform: translateY(36px) scale(0.94) rotateX(6deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

.auth-body--login .auth-card .panel-body {
    border-radius: 28px;
}

.auth-card .panel-body {
    padding: 32px 28px 28px;
}

@media (min-width: 768px) {
    .auth-card .panel-body {
        padding: 40px 36px 32px;
    }

    .auth-body--login .auth-card.panel {
        border-radius: 32px;
    }

    .auth-body--login .auth-card .panel-body {
        border-radius: 32px;
    }
}

.auth-logo-wrap {
    margin: 0 auto 8px;
}

.auth-logo {
    max-width: 220px;
    width: 100%;
    height: auto;
    margin: 0 auto;
    display: block;
}

.auth-body--login .auth-logo-wrap {
    animation: auth-logo-float 5s ease-in-out 1s infinite;
}

.auth-body--login .auth-logo {
    animation: auth-logo-enter 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.12s both;
    transition: transform 0.35s ease;
}

.auth-body--login .auth-logo:hover {
    transform: scale(1.04);
}

@keyframes auth-logo-enter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.88);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes auth-logo-float {
    0%,
    100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

.auth-heading {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 600;
    color: #34495e;
    letter-spacing: 0.02em;
}

.auth-body--login .auth-heading {
    animation: auth-fade-up 0.65s ease-out 0.22s both;
}

.auth-tagline {
    margin: 0 0 24px;
    font-size: 13px;
    color: #6a6c6f;
}

.auth-body--login .auth-tagline {
    animation: auth-fade-up 0.65s ease-out 0.3s both;
}

.auth-body--login .auth-form {
    animation: auth-fade-up 0.7s ease-out 0.38s both;
}

.auth-body--login .auth-footer {
    animation: auth-fade-up 0.65s ease-out 0.48s both;
}

@keyframes auth-fade-up {
    from {
        opacity: 0;
        transform: translateY(14px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-form .form-group {
    margin-bottom: 16px;
}

.auth-form .input-group-addon {
    background: #f7f9fa;
    border-color: #d2d6de;
    color: #6a6c6f;
    min-width: 42px;
    transition: border-color 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.auth-body--login .auth-form .input-group:focus-within .input-group-addon {
    border-color: var(--auth-brand-blue-mid);
    color: var(--auth-brand-red);
    background: rgba(82, 180, 224, 0.12);
}

.auth-form .form-control {
    height: 40px;
    border-color: #d2d6de;
    box-shadow: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.auth-form .form-control:focus {
    border-color: #34495e;
    box-shadow: 0 0 0 1px rgba(52, 73, 94, 0.2);
}

.auth-body--login .auth-form .form-control:focus {
    border-color: var(--auth-brand-blue-mid);
    box-shadow: 0 0 0 2px rgba(82, 180, 224, 0.25);
}

.auth-form .field-validation-error {
    display: block;
    margin-top: 6px;
    font-size: 12px;
}

.auth-btn {
    margin-top: 8px;
    height: 42px;
    font-weight: 600;
    letter-spacing: 0.03em;
    background-color: #34495e;
    border-color: #2c3e50;
    transition:
        transform 0.2s ease,
        box-shadow 0.25s ease,
        background-color 0.2s ease,
        border-color 0.2s ease;
}

.auth-body--login .auth-btn {
    background: linear-gradient(135deg, var(--auth-brand-red) 0%, var(--auth-brand-red-mid) 45%, var(--auth-brand-blue-mid) 100%);
    background-size: 160% 160%;
    border: none;
    box-shadow: 0 6px 20px rgba(198, 29, 47, 0.35);
    animation: auth-btn-shine 8s ease-in-out infinite;
}

@keyframes auth-btn-shine {
    0%,
    100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

.auth-btn:hover,
.auth-btn:focus {
    background-color: #2c3e50;
    border-color: #243342;
}

.auth-body--login .auth-btn:hover,
.auth-body--login .auth-btn:focus {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 10px 28px rgba(46, 147, 196, 0.4);
}

.auth-body--login .auth-btn:active {
    transform: translateY(0) scale(0.99);
}

.auth-footer {
    margin-top: 20px;
    font-size: 13px;
}

.auth-footer a {
    color: #34495e;
    font-weight: 600;
    transition: color 0.2s ease, transform 0.2s ease;
}

.auth-footer a:hover,
.auth-footer a:focus {
    color: #2c3e50;
}

.auth-body--login .auth-footer a {
    color: var(--auth-brand-blue-deep);
}

.auth-body--login .auth-footer a:hover,
.auth-body--login .auth-footer a:focus {
    color: var(--auth-brand-red);
}

.validation-summary-errors {
    margin-bottom: 16px;
}

.validation-summary-errors ul {
    margin: 0;
    padding-left: 18px;
}

@media (prefers-reduced-motion: reduce) {
    .auth-body.auth-body--login {
        animation: none;
        background-size: auto;
    }

    .auth-body--login .auth-shell,
    .auth-body--login .auth-card.panel,
    .auth-body--login .auth-logo-wrap,
    .auth-body--login .auth-logo,
    .auth-body--login .auth-heading,
    .auth-body--login .auth-tagline,
    .auth-body--login .auth-form,
    .auth-body--login .auth-footer,
    .auth-body--login .auth-btn {
        animation: none;
    }

    .auth-body--login .auth-card.panel,
    .auth-body--login .auth-btn,
    .auth-body--login .auth-footer a,
    .auth-form .form-control,
    .auth-form .input-group-addon {
        transition: none;
    }

    .auth-body--login .auth-card.panel:hover,
    .auth-body--login .auth-logo:hover,
    .auth-body--login .auth-btn:hover,
    .auth-body--login .auth-btn:focus,
    .auth-body--login .auth-btn:active {
        transform: none;
    }
}
