/*
 * Academic Management System - shared brand theme.
 * Primary and accent colours are sampled from public/global_assets/images/logo.webp.
 */
:root {
    --brand-primary: #00AEEF;
    --brand-primary-dark: #008DBF;
    --brand-primary-soft: #E8F8FE;
    --brand-accent: #F58220;
    --brand-accent-soft: #FFF2E7;
    --brand-navy: #123447;
    --brand-ink: #243746;
    --brand-muted: #718391;
    --brand-page: #F4F8FB;
    --brand-border: #E3EDF3;
    --brand-white: #FFFFFF;
    --bs-primary: #00AEEF;
    --bs-primary-rgb: 0, 174, 239;
    --bs-link-color: #008DBF;
    --bs-link-hover-color: #006F98;
    --bs-body-color: #243746;
    --bs-body-bg: #F4F8FB;
    --bs-border-color: #E3EDF3;
}

html,
body {
    min-height: 100%;
}

body {
    color: var(--brand-ink);
    background: var(--brand-page);
    font-family: "Public Sans", "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Core Sneat theme colour overrides. */
.text-primary,
.link-primary {
    color: var(--brand-primary-dark) !important;
}

.bg-primary,
.badge.bg-primary,
.list-group-item-primary.active {
    color: #fff !important;
    background-color: var(--brand-primary) !important;
}

.border-primary {
    border-color: var(--brand-primary) !important;
}

a {
    color: var(--brand-primary-dark);
}

a:hover {
    color: #006F98;
}

.btn-primary {
    color: #fff !important;
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    box-shadow: 0 4px 10px rgba(0, 174, 239, .18) !important;
}

.btn-primary:hover,
.btn-primary:focus,
.btn-primary:active,
.btn-primary.active {
    color: #fff !important;
    background-color: var(--brand-primary-dark) !important;
    border-color: var(--brand-primary-dark) !important;
}

.btn-outline-primary {
    color: var(--brand-primary-dark) !important;
    border-color: var(--brand-primary) !important;
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    color: #fff !important;
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: rgba(0, 174, 239, .65) !important;
    box-shadow: 0 0 0 .2rem rgba(0, 174, 239, .14) !important;
}

.form-check-input:checked {
    background-color: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
}

/* Backend shell. */
.layout-wrapper,
.layout-page,
.content-wrapper {
    background-color: var(--brand-page);
}

.layout-menu.side-dark-menu {
    background: linear-gradient(180deg, #123447 0%, #0D2A3A 100%) !important;
    color: rgba(255, 255, 255, .88);
    box-shadow: 8px 0 28px rgba(18, 52, 71, .08);
}

.side-dark-menu .app-brand {
    min-height: 116px;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.side-dark-menu .app-brand-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.side-dark-menu .app-brand img {
    display: block;
    width: auto;
    max-width: 100%;
    height: 88px;
    object-fit: contain;
    padding: 5px;
    border-radius: 12px;
    background: #fff;
}

.side-dark-menu .menu-inner {
    padding: 12px 10px 20px !important;
}

.side-dark-menu .menu-header-text {
    color: rgba(255, 255, 255, .52) !important;
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .11em;
}

.side-dark-menu .menu-link {
    min-height: 44px;
    margin: 3px 0;
    border-radius: 10px;
    color: rgba(255, 255, 255, .82) !important;
    transition: background-color .18s ease, color .18s ease, transform .18s ease;
}

.side-dark-menu .menu-link .menu-icon,
.side-dark-menu .menu-link > i {
    color: rgba(255, 255, 255, .68) !important;
}

.side-dark-menu .menu-link:hover,
.side-dark-menu .menu-item.open > .menu-link {
    color: #fff !important;
    background: rgba(0, 174, 239, .15) !important;
}

.side-dark-menu .menu-link:hover .menu-icon,
.side-dark-menu .menu-link:hover > i {
    color: #63D2FF !important;
}

.side-dark-menu .menu-item.active > .menu-link,
.side-dark-menu .menu-item.active > .menu-link:not(.menu-toggle) {
    color: #fff !important;
    background: linear-gradient(100deg, #00AEEF 0%, #0796C9 100%) !important;
    box-shadow: 0 7px 18px rgba(0, 174, 239, .22);
    border-left: 3px solid var(--brand-accent);
}

.side-dark-menu .menu-item.active > .menu-link .menu-icon,
.side-dark-menu .menu-item.active > .menu-link > i {
    color: #fff !important;
}

.side-dark-menu .menu-sub {
    padding-left: 8px;
    background: transparent !important;
}

.side-dark-menu .menu-sub .menu-link {
    min-height: 39px;
    color: rgba(255, 255, 255, .68) !important;
    font-size: .88rem;
}

.side-dark-menu .menu-sub .menu-item.active > .menu-link {
    color: #fff !important;
    background: rgba(0, 174, 239, .16) !important;
    box-shadow: none;
}

.side-dark-menu .menu-inner-shadow {
    background: linear-gradient(rgba(13, 42, 58, .45), rgba(13, 42, 58, 0)) !important;
}

.side-dark-menu .layout-menu-toggle {
    color: #fff !important;
    background: var(--brand-primary) !important;
    border-color: #123447 !important;
}

.layout-navbar {
    border: 1px solid rgba(227, 237, 243, .9);
    border-radius: 14px;
    box-shadow: 0 5px 20px rgba(27, 62, 82, .055) !important;
}

.layout-navbar .nav-link,
.layout-navbar .bx {
    color: var(--brand-navy);
}

.layout-navbar .nav-link:hover {
    color: var(--brand-primary-dark);
}

.content-wrapper > .container-xxl {
    padding-top: 1.5rem;
}

/* Cards, tables, forms and common data components. */
.card {
    border: 1px solid var(--brand-border);
    border-radius: 14px;
    box-shadow: 0 5px 20px rgba(27, 62, 82, .045);
}

.card-header {
    border-bottom-color: var(--brand-border);
}

.card-title,
.card-header h1,
.card-header h2,
.card-header h3,
.card-header h4,
.card-header h5,
.card-header h6 {
    color: var(--brand-navy);
    font-weight: 650;
}

.table thead th {
    color: var(--brand-navy);
    background: #EFF8FC;
    border-bottom-color: #DCEAF1;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .025em;
    white-space: nowrap;
}

.table > :not(caption) > * > * {
    border-bottom-color: #EAF0F4;
}

.table tbody tr:hover > * {
    background-color: #F6FBFE;
}

.page-item.active .page-link,
.pagination li.active > a:not(.page-link) {
    color: #fff !important;
    background: var(--brand-primary) !important;
    border-color: var(--brand-primary) !important;
    box-shadow: 0 3px 8px rgba(0, 174, 239, .2);
}

.dropdown-menu {
    border: 1px solid var(--brand-border);
    border-radius: 12px;
    box-shadow: 0 12px 30px rgba(18, 52, 71, .12);
}

.dropdown-item:active,
.dropdown-item.active {
    color: #fff;
    background: var(--brand-primary);
}

.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
    min-height: 38px;
    border-color: #D8E3EA;
    border-radius: 8px;
}

.select2-container--default.select2-container--focus .select2-selection--multiple,
.select2-container--default.select2-container--open .select2-selection--single {
    border-color: var(--brand-primary);
}

.badge.bg-label-primary {
    color: #007DAA !important;
    background: var(--brand-primary-soft) !important;
}

.badge.bg-label-warning {
    color: #A95408 !important;
    background: var(--brand-accent-soft) !important;
}

.bg-footer-theme {
    background: #EDF4F8 !important;
}

/* Login and guest authentication pages. */
.auth-layout {
    background: var(--brand-page);
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 42px 22px;
    background:
        radial-gradient(circle at 8% 12%, rgba(0, 174, 239, .10), transparent 27rem),
        radial-gradient(circle at 92% 90%, rgba(245, 130, 32, .09), transparent 23rem),
        #F4F8FB;
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(300px, .92fr) minmax(380px, 1.08fr);
    width: min(1080px, 100%);
    min-height: 630px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(220, 234, 241, .9);
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(18, 52, 71, .12);
}

.auth-brand-panel {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    overflow: hidden;
    padding: 42px 40px 34px;
    color: #fff;
    background: linear-gradient(145deg, #123447 0%, #075879 58%, #008DBF 100%);
}

.auth-brand-panel::before,
.auth-brand-panel::after {
    position: absolute;
    content: "";
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 50%;
}

.auth-brand-panel::before {
    width: 440px;
    height: 440px;
    right: -210px;
    top: 110px;
}

.auth-brand-panel::after {
    width: 300px;
    height: 300px;
    right: -140px;
    top: 180px;
    border-color: rgba(245, 130, 32, .55);
}

.auth-brand-logo {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 116px;
    padding: 7px;
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .13);
}

.auth-brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.auth-brand-copy,
.auth-brand-footer {
    position: relative;
    z-index: 1;
}

.auth-brand-eyebrow {
    display: inline-block;
    margin-bottom: 16px;
    color: #8DE1FF;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .15em;
}

.auth-brand-copy h1 {
    max-width: 390px;
    margin: 0 0 18px;
    color: #fff;
    font-size: clamp(2rem, 3.2vw, 2.8rem);
    font-weight: 750;
    line-height: 1.16;
    letter-spacing: -.04em;
}

.auth-brand-copy p {
    max-width: 390px;
    margin: 0;
    color: rgba(255, 255, 255, .78);
    font-size: .98rem;
    line-height: 1.8;
}

.auth-brand-accent {
    display: block;
    width: 54px;
    height: 4px;
    margin-bottom: 20px;
    border-radius: 99px;
    background: var(--brand-accent);
}

.auth-brand-footer {
    color: rgba(255, 255, 255, .58);
    font-size: .78rem;
}

.auth-form-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 58px clamp(30px, 6vw, 76px);
}

.auth-form-heading {
    margin-bottom: 30px;
}

.auth-form-kicker {
    margin: 0 0 8px;
    color: var(--brand-primary-dark);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.auth-form-heading h2 {
    margin: 0 0 10px;
    color: var(--brand-navy);
    font-size: 2rem;
    font-weight: 750;
    letter-spacing: -.035em;
}

.auth-form-heading p:last-child {
    margin: 0;
    color: var(--brand-muted);
    line-height: 1.7;
}

.auth-form-label {
    display: block;
    margin-bottom: 8px;
    color: #294454;
    font-size: .88rem;
    font-weight: 650;
}

.auth-form-control {
    min-height: 50px;
    padding: 12px 15px;
    border: 1px solid #DCE7ED;
    border-radius: 10px;
    background: #FBFDFE;
    box-shadow: none;
}

.auth-form-control:focus {
    border-color: var(--brand-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 174, 239, .12);
}

.auth-password-wrap {
    position: relative;
}

.auth-password-wrap .auth-form-control {
    padding-right: 52px;
}

.auth-password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    color: #78909D;
    background: transparent;
    border: 0;
    border-radius: 7px;
    transform: translateY(-50%);
}

.auth-password-toggle:hover {
    color: var(--brand-primary-dark);
    background: var(--brand-primary-soft);
}

.auth-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 17px 0 24px;
    font-size: .86rem;
}

.auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #5F7280;
}

.auth-remember input {
    width: 16px;
    height: 16px;
    accent-color: var(--brand-primary);
}

.auth-link {
    color: var(--brand-primary-dark);
    font-weight: 650;
    text-decoration: none;
}

.auth-link:hover {
    color: #006F98;
    text-decoration: underline;
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 51px;
    border-radius: 10px;
    font-size: .96rem;
    font-weight: 700;
}

.auth-register {
    margin: 25px 0 0;
    color: var(--brand-muted);
    font-size: .88rem;
    text-align: center;
}

.auth-alert {
    margin-bottom: 20px;
    padding: 13px 16px;
    border: 1px solid #F3C9C4;
    border-radius: 10px;
    color: #9E342B;
    background: #FFF4F2;
    font-size: .88rem;
}

.auth-alert ul {
    margin: 0;
    padding-left: 19px;
}

.auth-status {
    margin-bottom: 18px;
    padding: 12px 15px;
    border: 1px solid #C6E8D5;
    border-radius: 10px;
    color: #17663C;
    background: #F0FBF4;
    font-size: .88rem;
}

@media (max-width: 767.98px) {
    .auth-page {
        align-items: flex-start;
        padding: 18px 12px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        min-height: auto;
        border-radius: 18px;
    }

    .auth-brand-panel {
        min-height: 245px;
        padding: 22px 24px;
    }

    .auth-brand-logo {
        width: 58px;
        height: 72px;
        padding: 4px;
        border-radius: 10px;
    }

    .auth-brand-copy {
        margin-top: 22px;
    }

    .auth-brand-copy h1 {
        max-width: 520px;
        font-size: 1.55rem;
    }

    .auth-brand-copy p {
        font-size: .86rem;
        line-height: 1.55;
    }

    .auth-brand-footer {
        display: none;
    }

    .auth-form-panel {
        padding: 32px 24px 36px;
    }

    .auth-form-heading h2 {
        font-size: 1.65rem;
    }
}

@media (max-width: 380px) {
    .auth-options {
        align-items: flex-start;
        flex-direction: column;
    }
}
