@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,600&family=Manrope:wght@400;500;600;700&display=swap');

/* TSIS UI theme - loaded after the template styles.
   Palette follows the Kosovo emblem used in the header: deep blue + gold.
   Keep this file identical in TSIS and TSIS-Portal. */

:root {
    --tsis-navy: #0e2747;
    --tsis-navy-2: #153b66;
    --tsis-blue: #2f6fb0;
    --tsis-primary: #5994c5;
    --tsis-primary-dark: #3f7aab;
    --tsis-gold: #f2b632;
    --tsis-ink: #1c2b40;
    --tsis-muted: #6b7b90;
    --tsis-field: #f2f5fa;
    --tsis-focus: rgba(89, 148, 197, .30);
    --tsis-font-body: 'Manrope', 'Segoe UI', sans-serif;
    --tsis-font-display: 'Fraunces', Georgia, serif;
}

/* ====================================================================
   Global (all pages)
   ==================================================================== */

.form-control:focus,
.select2-container--default.select2-container--focus .select2-selection--single,
.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: var(--tsis-primary);
    box-shadow: 0 0 0 .2rem var(--tsis-focus);
}

a:focus-visible,
button:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--tsis-primary);
    outline-offset: 2px;
}

.btn {
    border-radius: 8px;
    transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.btn-primary:hover:not(:disabled) {
    box-shadow: 0 4px 12px rgba(89, 148, 197, .45);
}

.card.custom-card {
    border-radius: 12px;
    box-shadow: 0 1px 4px rgba(15, 40, 80, .08);
}

.table thead th,
.k-grid-header .k-header {
    font-weight: 600;
}

/* ====================================================================
   Public pages: login, register, password reset, access denied
   ==================================================================== */

body.main-body .main-signin-wrapper,
body.main-body .signpages {
    font-family: var(--tsis-font-body);
}

/* The photo stays, a navy wash gives it depth and keeps the card legible */
.main-signin-wrapper {
    position: relative;
    padding-top: 100px;
    padding-bottom: 100px;
    box-sizing: border-box;
}

.main-signin-wrapper::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(242, 182, 50, .18), transparent 40%),
        linear-gradient(135deg, rgba(10, 32, 64, .82), rgba(35, 95, 155, .55));
    pointer-events: none;
}

.signpages {
    position: relative;
    z-index: 1;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

/* Header with the ministry identity */
.public-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background: rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 3px solid var(--tsis-gold);
    box-shadow: 0 2px 14px rgba(8, 28, 56, .18);
}

.public-header .row {
    margin-left: 0;
    margin-right: 0;
}

.ministry-brand {
    color: var(--tsis-navy);
    line-height: 1.3;
    font-family: var(--tsis-font-body);
}

.ministry-brand .ministry-name {
    font-family: var(--tsis-font-display);
    font-size: 18px;
    font-weight: 600;
    letter-spacing: .1px;
}

.ministry-brand .ministry-sub {
    font-size: 13px;
    color: var(--tsis-muted);
}

/* The card */
.signpages .card {
    -webkit-animation: tsis-rise .7s cubic-bezier(.2, .7, .2, 1) both;
    animation: tsis-rise .7s cubic-bezier(.2, .7, .2, 1) both;
}

.signpages .row-costumize {
    border-radius: 20px !important;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 30px 70px rgba(6, 22, 46, .45), 0 0 0 1px rgba(255, 255, 255, .12) !important;
}

/* Brand panel */
.signpages .details {
    position: relative;
    background:
        radial-gradient(circle at 85% 12%, rgba(242, 182, 50, .22), transparent 45%),
        radial-gradient(rgba(255, 255, 255, .07) 1.2px, transparent 1.4px) 0 0 / 18px 18px,
        linear-gradient(160deg, var(--tsis-navy), var(--tsis-navy-2) 60%, var(--tsis-blue)) !important;
    color: #fff;
}

.signpages .details h4,
.signpages .details h5 {
    font-family: var(--tsis-font-display);
    font-weight: 600;
    font-size: 24px;
    line-height: 1.3;
    letter-spacing: .2px;
    text-shadow: none;
}

.signpages .details h4::after,
.signpages .details h5::after {
    content: "";
    display: block;
    width: 44px;
    height: 3px;
    border-radius: 2px;
    background: var(--tsis-gold);
    margin: 16px auto 0;
}

.signpages .details h5 + h4 {
    font-family: var(--tsis-font-body);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--tsis-gold) !important;
}

.signpages .details h5 + h4::after {
    display: none;
}

.signpages .details img.header-brand-img {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .3));
}

/* Form side */
.signpages .login_form {
    background: #fff;
}

.signpages .login_form .card-body {
    padding: 2rem 2.25rem;
}

.signpages .login_form h5 {
    font-family: var(--tsis-font-display);
    font-weight: 600;
    font-size: 30px;
    color: var(--tsis-navy);
    margin-bottom: .4rem !important;
}

.signpages .login_form p.text-muted {
    color: var(--tsis-muted) !important;
    font-size: 14px !important;
}

.signpages label {
    font-size: 13px;
    font-weight: 600;
    color: #3a4a60;
    margin-bottom: .35rem;
}

.signpages .form-control,
.signpages .select2-container--default .select2-selection--single {
    height: 48px;
    border-radius: 10px;
    border: 1.5px solid transparent;
    background-color: var(--tsis-field);
    color: var(--tsis-ink);
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.signpages textarea.form-control {
    height: auto;
}

.signpages .form-control::placeholder {
    color: #9aa8ba;
}

.signpages .form-control:hover {
    background-color: #eaf0f8;
}

.signpages .form-control:focus {
    background-color: #fff;
    border-color: var(--tsis-primary);
    box-shadow: 0 0 0 .22rem var(--tsis-focus);
}

.signpages .btn-primary,
.signpages .btn-main-primary {
    height: 50px;
    border: 0;
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: .3px;
    background: linear-gradient(135deg, var(--tsis-navy-2), var(--tsis-blue));
    box-shadow: 0 8px 20px rgba(21, 59, 102, .35);
}

.signpages .btn-primary:hover,
.signpages .btn-main-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 26px rgba(21, 59, 102, .42);
    background: linear-gradient(135deg, var(--tsis-navy), var(--tsis-blue));
}

.signpages .btn-primary:active,
.signpages .btn-main-primary:active {
    transform: translateY(0);
}

.signpages .login_form a {
    color: var(--tsis-blue);
    font-weight: 600;
    transition: color .15s ease;
}

.signpages .login_form a:hover {
    color: var(--tsis-navy);
}

/* Footer */
.public-footer {
    z-index: 100;
    background: rgba(255, 255, 255, .94) !important;
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 3px solid var(--tsis-gold);
    box-shadow: 0 -2px 14px rgba(8, 28, 56, .15);
    font-family: var(--tsis-font-body);
}

.public-footer .font-weight-bold {
    white-space: nowrap;
    color: var(--tsis-muted);
    font-size: 13px;
}

.public-footer img {
    max-width: 100%;
    height: auto;
}

@-webkit-keyframes tsis-rise {
    from { opacity: 0; -webkit-transform: translateY(24px); transform: translateY(24px); }
    to { opacity: 1; -webkit-transform: none; transform: none; }
}

@keyframes tsis-rise {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
    .signpages .card {
        -webkit-animation: none;
        animation: none;
    }
}

@media (max-width: 767.98px) {
    .main-signin-wrapper {
        padding-top: 84px;
        padding-bottom: 88px;
    }

    .ministry-brand img {
        height: 46px !important;
    }

    .ministry-brand .ministry-name {
        font-size: 15px;
    }

    .ministry-brand .ministry-sub {
        font-size: 11.5px;
    }

    .signpages .row-costumize {
        border-radius: 16px !important;
    }

    .signpages .login_form .card-body {
        padding: 1.5rem 1.25rem;
    }

    /* one compact row instead of a tall stack that covers the form */
    .public-footer .row > div {
        flex-wrap: nowrap !important;
        gap: .5rem;
    }

    .public-footer .row > div > div {
        display: flex;
        align-items: center;
    }

    .public-footer span {
        font-size: 11px;
        margin-right: .4rem !important;
    }

    .public-footer img {
        width: 64px !important;
    }

    .public-footer .my-auto {
        display: none !important;
    }
}

/* ====================================================================
   CMS sidebar
   ==================================================================== */

.main-sidebar-sticky.side-menu,
.main-sidebar-sticky {
    background: linear-gradient(185deg, #0b2142 0%, var(--tsis-navy) 45%, #143760 100%);
    box-shadow: 4px 0 24px rgba(8, 28, 56, .18);
    font-family: var(--tsis-font-body);
}

.color-leftmenu.main-body.leftmenu .main-sidebar .sidemenu-logo,
body.main-body.leftmenu .side-menu .sidemenu-logo {
    background: rgba(255, 255, 255, .04) !important;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.main-sidebar-body {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, .18) transparent;
}

.main-body .main-sidebar-body .nav {
    padding: 0 12px 0 12px;
}

/* Section captions */
.main-sidebar-body .nav-header {
    margin: 18px 0 4px 8px;
}

.main-sidebar-body .nav-label {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 1.4px;
    color: rgba(255, 255, 255, .38);
    padding: 0;
}

/* Items */
.side-menu .nav-item {
    margin: 3px 0;
}

.main-sidebar-body .nav-item + .nav-item {
    margin-top: 3px;
}

.main-sidebar-body .nav-link {
    position: relative;
    padding: 7px 10px 7px 8px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    color: rgba(255, 255, 255, .66);
    transition: background-color .2s ease, color .2s ease;
}

/* the old curved "tab" decoration is replaced by a pill */
.main-sidebar-body .nav-item.active .nav-link:before,
.main-sidebar-body .nav-item.active .nav-link:after,
.main-sidebar-body .nav-item.active .nav-link .shape1,
.main-sidebar-body .nav-item.active .nav-link .shape2,
.main-sidebar-body .nav-link .shape1,
.main-sidebar-body .nav-link .shape2 {
    display: none !important;
}

.main-sidebar-body .nav-link .sidemenu-icon {
    width: 34px;
    height: 34px;
    line-height: 34px;
    margin-right: 12px;
    font-size: 16px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .07);
    color: rgba(255, 255, 255, .82);
    transition: background-color .2s ease, color .2s ease, transform .2s ease;
}

.side-menu .nav-link:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

.side-menu .nav-link:hover .sidemenu-label {
    margin-left: 0;
}

.side-menu .nav-link:hover .sidemenu-icon {
    background: rgba(255, 255, 255, .14);
    color: #fff;
    transform: scale(1.06);
}

/* Active page */
.main-sidebar-body li.nav-item.active > .nav-link {
    margin: 0;
    text-align: left;
    border-radius: 12px;
    background: linear-gradient(90deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .05)) !important;
    color: #fff !important;
    box-shadow: inset 3px 0 0 var(--tsis-gold);
}

.main-sidebar-body li.nav-item.active > .nav-link .sidemenu-label {
    color: #fff !important;
    font-weight: 700;
}

.main-sidebar-body li.nav-item.active > .nav-link .sidemenu-icon {
    background: linear-gradient(135deg, #f7c850, var(--tsis-gold)) !important;
    color: var(--tsis-navy) !important;
    box-shadow: 0 4px 12px rgba(242, 182, 50, .35);
}

.main-sidebar-body li.nav-item.active > .nav-link i.angle {
    color: #fff !important;
}

/* Expand arrow */
.side-menu i.angle,
.side-menu .nav-item.show i.angle {
    top: 50%;
    margin-top: -8px;
    right: 14px;
    color: rgba(255, 255, 255, .5);
    transition: transform .25s ease;
}

/* Sub menu */
.side-menu .nav-sub {
    margin: 4px 0 6px 21px;
    padding: 0 0 0 10px;
    border-left: 1px solid rgba(255, 255, 255, .14);
}

.main-sidebar-body .nav-sub .nav-sub-link:before {
    content: "";
    width: 5px;
    height: 5px;
    margin-right: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .35);
    opacity: 1;
    font-family: inherit;
    transition: background-color .2s ease, transform .2s ease;
}

.main-sidebar-body .nav-sub-link {
    border-radius: 8px;
    padding: 7px 10px;
    font-size: 13.5px;
    color: rgba(255, 255, 255, .6);
}

.main-sidebar-body .nav-sub-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, .06);
}

.main-sidebar-body .nav-sub-item.active > .nav-sub-link {
    color: #fff;
    font-weight: 700;
}

.main-sidebar-body .nav-sub-item.active > .nav-sub-link:before,
.main-sidebar-body .nav-sub-link:hover:before {
    background: var(--tsis-gold);
    transform: scale(1.4);
}

/* Top bar */
.main-header.side-header {
    box-shadow: 0 1px 12px rgba(8, 28, 56, .08);
}
