html {
    height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    box-sizing: border-box;
    min-height: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
}

body.has-dev-banner {
    padding-top: 20px;
}

.dev-environment-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1080;
    background: #f59e0b;
    color: #111827;
    font-size: 12px;
    line-height: 1.2;
    padding: 4px 12px;
    text-align: center;
    font-weight: 600;
}

.dev-environment-banner a {
    color: #111827;
    margin-left: 12px;
    text-decoration: underline;
}

.environment-switcher {
    position: fixed;
    top: 10px;
    right: 12px;
    z-index: 1080;
    background: #111827;
    border-radius: 4px;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    padding: 7px 10px;
    text-decoration: none;
}

.environment-switcher:hover,
.environment-switcher:focus {
    color: #fff;
    text-decoration: none;
}

main > .container {
    padding: 70px 15px 20px;
}

.kpi_id_button {
    color: #fff !important;
    text-decoration: none !important;
}

.wrap {
    flex: 1 0 auto;
    min-height: auto;
    height: auto;
    margin: 0;
    padding: 0 0 24px;
}

.wrap > .container {
    padding: 20px 15px 10px;
}

@media (min-width: 1200px) {
    .main-layout-container {
        max-width: 1230px;
    }
}

.hero-unit {
    padding: 60px;
    margin-bottom: 30px;
    font-size: 18px;
    font-weight: 200;

    color: inherit;
    background-color: #EEE;
    border-radius: 6px;
}

.footer {
    margin-top: auto;
    background: linear-gradient(180deg, #f9fbfd 0%, #f1f6fb 100%);
    border-top: 1px solid #d7e4f0;
    font-size: .84em;
    height: auto;
    flex-shrink: 0;
}

.footer > .container {
    padding-right: 15px;
    padding-left: 15px;
}

.footer > .container,
.footer > .container-fluid {
    padding-top: 8px;
    padding-bottom: 8px;
}

.app-footer-inner {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.app-footer-copy {
    margin: 0;
    color: #314963;
    font-weight: 600;
}

.app-footer-support-label {
    color: #61778f;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.app-footer-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid #c6d8eb;
    background: #fff;
    color: #0f4879;
    text-decoration: none;
    font-weight: 600;
    line-height: 1.2;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.app-footer-link:hover,
.app-footer-link:focus {
    color: #083456;
    text-decoration: none;
    background: #edf5ff;
    border-color: #9ec1e2;
    box-shadow: 0 0 0 0.2rem rgba(16, 98, 163, 0.12);
}

.app-footer-link--student {
    border-color: #9ecbe3;
}

.app-footer-link--staff {
    border-color: #9fbce2;
}

.app-footer-link--wa {
    border-color: #9ddfc0;
}

@media (min-width: 768px) {
    .app-footer-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.not-set {
    color: #c55;
    font-style: italic;
}

/* add sorting icons to gridview sort links */
a.asc:after, a.desc:after {
    content: '';
    left: 3px;
    display: inline-block;
    width: 0;
    height: 0;
    border: solid 5px transparent;
    margin: 4px 4px 2px 4px;
    background: transparent;
}

a.asc:after {
    border-bottom: solid 7px #212529;
    border-top-width: 0;
}

a.desc:after {
    border-top: solid 7px #212529;
    border-bottom-width: 0;
}

.grid-view th {
    white-space: nowrap;
}

.hint-block {
    display: block;
    margin-top: 5px;
    color: #999;
}

.error-summary {
    color: #a94442;
    background: #fdf7f7;
    border-left: 3px solid #eed3d7;
    padding: 10px 20px;
    margin: 0 0 15px 0;
}

/* align the logout "link" (button in form) of the navbar */
.nav li > form > button.logout {
    padding-top: 7px;
    color: rgba(255, 255, 255, 0.5);
}

@media (max-width: 767px) {
    .nav li > form > button.logout {
        display: block;
        text-align: left;
        width: 100%;
        padding: 10px 0;
    }
}

.nav > li > form > button.logout:focus,
.nav > li > form > button.logout:hover {
    text-decoration: none;
    color: rgba(255, 255, 255, 0.75);
}

.nav > li > form > button.logout:focus {
    outline: none;
}

/* Cabinet role dropdown */
.navbar .cabinet-dropdown .dropdown-menu {
    border: 1px solid #d8e3ef;
    border-radius: 12px;
    box-shadow: 0 12px 28px rgba(13, 42, 74, 0.14);
    padding: 6px;
    min-width: 280px;
}

.navbar .cabinet-dropdown .dropdown-item {
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    padding: 9px 12px;
    color: #1f334a;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.navbar .cabinet-dropdown .dropdown-item:hover,
.navbar .cabinet-dropdown .dropdown-item:focus {
    background-color: #edf5ff;
    color: #0b4a84;
}

.navbar .cabinet-dropdown .dropdown-item.active,
.navbar .cabinet-dropdown .dropdown-item:active {
    background-color: #1062a3;
    color: #fff;
}

.navbar .departament-dropdown .dropdown-menu {
    min-width: 480px;
    max-width: 560px;
    padding: 12px;
    display: none;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.navbar .departament-dropdown.show .dropdown-menu {
    display: grid;
}

.navbar .departament-dropdown .departament-dropdown-item {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    border: 1px solid #8cb7dd;
    background-color: #fff;
    text-align: center;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.15;
    white-space: normal;
}

.navbar .departament-dropdown .departament-dropdown-item:hover,
.navbar .departament-dropdown .departament-dropdown-item:focus {
    border-color: #4b8fc6;
    background-color: #edf5ff;
}

.navbar .departament-dropdown .departament-dropdown-item.active,
.navbar .departament-dropdown .departament-dropdown-item:active {
    border-color: #1062a3;
    background-color: #1062a3;
    color: #fff;
}

@media (max-width: 991px) {
    .navbar .departament-dropdown .dropdown-menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575px) {
    .navbar .departament-dropdown .dropdown-menu {
        min-width: 0;
        width: 100%;
        grid-template-columns: 1fr;
    }
}

@media (min-width: 992px) {
    .room-nav-tabs .dropdown-menu {
        display: block;
        opacity: 0;
        visibility: hidden;
        transform: translateY(4px);
        pointer-events: none;
        margin-top: 0;
        transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.18s;
    }

    .room-nav-tabs .dropdown:hover > .dropdown-menu,
    .room-nav-tabs .dropdown:focus-within > .dropdown-menu,
    .room-nav-tabs .show > .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
        transition-delay: 0s;
    }

    .navbar .cabinet-dropdown .dropdown-menu {
        display: block;
        opacity: 0;
        visibility: hidden;
        transform: translateY(4px);
        pointer-events: none;
        margin-top: 0;
        transition: opacity 0.16s ease, transform 0.16s ease, visibility 0s linear 0.18s;
    }

    .navbar .cabinet-dropdown:hover .dropdown-menu,
    .navbar .cabinet-dropdown:focus-within .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
        transition-delay: 0s;
    }

    .navbar .departament-dropdown .dropdown-menu,
    .navbar .departament-dropdown.show .dropdown-menu {
        display: grid;
    }
}

#summary {
    /*font-size: 16px;*/
    line-height: 1.5;
}

#summary div.collapse:not(.show) {
    height: 165px !important;
    overflow: hidden;

    display: -webkit-box;
    -webkit-line-clamp: 7;
    -webkit-box-orient: vertical;
}

#summary div.collapsing {
    min-height: 165px !important;
}

#summary a.collapsed:after {
    content: ' Показати більше';
}

#summary a:not(.collapsed):after {
    content: ' Згортути';
}

/* css for custom picker for activeform {*/
.option-wrapper {
    width: 100%;
}

.option-btn {
    display: block;
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.option-btn:hover {
    background: #f2f2f2;
}

.option-wrapper input[type="radio"] {
    display: none;
}

.option-wrapper input[type="radio"]:checked + .option-btn {
    background: #1062a3;
    color: #fff;
    font-weight: 500;
    border-color: #007bff;
}

/*splitting weeks in calendar select2 widget view*/
.odd-week a {
    background: #faefbe !important;
    color: black !important;
    border-radius: 50% !important;
}

.even-week a {
    background: #e0f0ff !important;
    color: black !important;
    border-radius: 50% !important;
}

.ui-datepicker td a {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 28px; /* adjust size */
    height: 28px; /* same as width for perfect circle */
    border-radius: 50% !important;
    margin: auto;
    text-align: center;
}

/* Today = white */
.ui-datepicker-today a {
    background: white !important;
    color: black !important;
    border: 3px solid black !important;
}

/* Selected day = dark background */
.ui-datepicker td a.ui-state-active {
    background: #333333 !important;
    color: white !important;
}

.bg-dark {
    background-color: rgb(16 98 163) !important;
}

.bg-brand {
    background-color: rgb(16 98 163) !important;
}

a {
    color: rgb(16 98 163);
}

.navbar-dark .navbar-nav .nav-link {
    color: #FFF;
}

.navbar-dark .navbar-nav .active > .nav-link,
.navbar-dark .navbar-nav .nav-link.active,
.navbar-dark .navbar-nav .show > .nav-link {
    color: #FFF;
}

.navbar-dark .navbar-brand {
    color: #FFF;
}

.avatar-wrapper {
    width: 150px;
    height: 150px;
    border-radius: 16px;
    padding: 4px;
    background: #fff;
    box-shadow: 0 0 0 1px #cbd5e1;
}

.avatar-img {
    width: 100%;
    height: 100%;
    border-radius: 12px;
    object-fit: cover;
    display: block;
}

.main-navbar {
    background: linear-gradient(120deg, #0d4f83 0%, #1062a3 55%, #2b7fbc 100%) !important;
    box-shadow: 0 10px 24px rgba(10, 44, 74, 0.18);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.main-navbar .navbar-brand {
    font-weight: 700;
    letter-spacing: 0.2px;
}

.main-navbar .navbar-nav .nav-link {
    font-weight: 600;
    border-radius: 8px;
    padding: 6px 10px !important;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.main-navbar .navbar-nav .nav-link:hover,
.main-navbar .navbar-nav .nav-link:focus {
    background-color: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.main-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, 0.45);
}

.auth-shell {
    position: relative;
    padding: 22px 0 30px;
}

.auth-shell::before {
    content: "";
    position: absolute;
    top: 0;
    left: 15%;
    width: 70%;
    height: 220px;
    background: radial-gradient(circle at center, rgba(16, 98, 163, 0.14), rgba(16, 98, 163, 0));
    pointer-events: none;
    z-index: 0;
}

.auth-shell .row {
    position: relative;
    z-index: 1;
}

.auth-card {
    border: 0;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 16px 35px rgba(15, 44, 72, 0.12);
}

.auth-card .card-header {
    background: linear-gradient(140deg, #1062a3 0%, #0f4f83 100%);
    border-bottom: 0;
    color: #fff;
    padding: 18px 24px 14px;
}

.auth-card .card-title {
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0;
}

.auth-subtitle {
    margin-top: 5px;
    margin-bottom: 0;
    font-size: 0.92rem;
    opacity: 0.9;
}

.auth-card .card-body {
    padding: 24px;
    background: #fff;
}

.auth-card .form-group label {
    font-weight: 600;
    margin-bottom: 0.35rem;
}

.auth-card .form-control {
    border-radius: 10px;
    min-height: 44px;
    padding: 0.6rem 0.85rem;
    border: 1px solid #d4dce5;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-card .form-control:focus {
    border-color: rgba(16, 98, 163, 0.55);
    box-shadow: 0 0 0 0.2rem rgba(16, 98, 163, 0.14);
}

.auth-actions {
    margin-top: 1.1rem;
}

.auth-btn {
    border-radius: 10px;
    min-height: 44px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    line-height: 1.2;
}

.auth-links {
    margin-top: 1rem;
    text-align: center;
}

.auth-links a {
    font-weight: 500;
}
.profile-photo-frame {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.08);
}

.profile-photo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-photo-frame--lg {
    width: 150px;
    height: 150px;
}

.profile-photo-frame--md {
    width: 75px;
    height: 75px;
    border-radius: 12px;
}

.profile-photo-frame--sm {
    width: 30px;
    height: 30px;
    border-radius: 999px;
}

.profile-photo-frame--xs {
    width: 24px;
    height: 24px;
    border-radius: 999px;
}

/* Eduadmin report by group */
.reportbygroup-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.reportbygroup-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.reportbygroup-filter-block + .reportbygroup-filter-block {
    margin-top: 1rem;
}

.reportbygroup-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.7rem;
}

.reportbygroup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.reportbygroup-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.reportbygroup-stat-card {
    padding: 0.5rem 0.6rem;
    border: 1px solid #c8d6e5;
    border-radius: 12px;
    background: #f8fbff;
}

.reportbygroup-stat-card--accent {
    background: #e9f4ff;
    border-color: #8cb6de;
}

.reportbygroup-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: #15324c;
    line-height: 1.15;
}

.reportbygroup-stat-label {
    margin-top: 0.18rem;
    font-size: 0.74rem;
    color: #5a6b7b;
    line-height: 1.2;
}

.reportbygroup-discipline-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.reportbygroup-status-group {
    display: block;
    padding: 0.5rem 0.55rem;
    border: 1px solid #c8d6e5;
    border-radius: 12px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.reportbygroup-status-group--warning {
    border-color: #c65a1e;
    background: linear-gradient(180deg, #fff6ec 0%, #ffe9d6 100%);
}

.reportbygroup-status-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0.4rem;
}

.reportbygroup-status-title {
    display: inline-flex;
    align-items: center;
    padding: 0.22rem 0.6rem;
    border-radius: 999px;
    background: #1c5d8f;
    color: #fff;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.reportbygroup-status-flag {
    display: inline-flex;
    align-items: center;
    padding: 0.16rem 0.48rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.reportbygroup-status-flag--warning {
    background: #8b1e1e;
    color: #fff;
}

.reportbygroup-status-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.reportbygroup-choice-btn {
    min-width: 14rem;
    max-width: 24rem;
    text-align: left;
    border-width: 2px;
    border-radius: 12px;
    padding: 0.38rem 0.5rem;
    line-height: 1.15;
    box-shadow: none;
}

.reportbygroup-choice-btn:hover,
.reportbygroup-choice-btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(31, 41, 55, 0.08);
}

.reportbygroup-choice-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: #17212b;
    white-space: normal;
}

.reportbygroup-choice-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.28rem;
    margin-top: 0.22rem;
    font-size: 0.72rem;
    color: #4b5563;
}

.reportbygroup-choice-badge {
    display: inline-block;
    padding: 0.1rem 0.36rem;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #fff;
}

.reportbygroup-choice-meta-text {
    min-width: 0;
}

.reportbygroup-choice-empty .reportbygroup-choice-label {
    color: #9b1c1c;
}

.reportbygroup-table-wrap {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 0.25rem;
}

.reportbygroup-table {
    width: 100%;
    min-width: 980px;
    border: 2px solid #8ea3b7;
    border-radius: 16px;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.reportbygroup-table thead td {
    background: #dce8f4;
    color: #17324d;
    font-weight: 700;
    border-bottom: 3px solid #8ea3b7;
    padding: 0.62rem 0.65rem;
    white-space: nowrap;
}

.reportbygroup-table td {
    vertical-align: top;
    border-top: 1px solid #c2d0dd;
    border-bottom: 1px solid #c2d0dd;
    border-right: 1px solid #d6e0ea;
    padding: 0.58rem 0.6rem;
}

.reportbygroup-table td:last-child {
    border-right: 0;
}

.reportbygroup-table tbody tr:nth-child(odd) td {
    background-color: #f8fbff;
}

.reportbygroup-table tbody tr:hover td {
    background-color: #eef5fb;
}

.reportbygroup-col-index {
    text-align: center;
    font-weight: 700;
    color: #28425b;
    white-space: nowrap;
}

.reportbygroup-col-student {
    min-width: 16rem;
}

.reportbygroup-col-choices {
    min-width: 32rem;
}

.reportbygroup-col-count {
    text-align: center;
    white-space: nowrap;
    font-weight: 700;
    color: #28425b;
}

.reportbygroup-student-name {
    font-size: 0.92rem;
    font-weight: 700;
    color: #10273d;
    line-height: 1.25;
}

.reportbygroup-student-meta {
    margin-top: 0.2rem;
    font-size: 0.76rem;
    color: #5a6b7b;
    line-height: 1.2;
}

.reportbygroup-count-pill {
    display: inline-block;
    padding: 0.18rem 0.45rem;
    border-radius: 999px;
    background: #e4edf6;
    color: #1c3f61;
    font-size: 0.78rem;
}

.reportbygroup-table tbody tr td:first-child {
    border-left: 4px solid transparent;
}

.reportbygroup-table tbody tr:hover td:first-child {
    border-left-color: #2f80ed;
}

.reportbygroup-filter-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.reportbygroup-filter-label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 600;
}

.reportbygroup-btn-group,
.reportbygroup-group-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.reportbygroup-filter-btn {
    border-radius: 999px;
}

.reportbygroup-filter-btn.is-active {
    background-color: #008acf;
    border-color: #008acf;
    color: #fff;
}

.reportbygroup-group-panel {
    display: none;
}

.reportbygroup-group-panel.is-active {
    display: block;
}

.reportbygroup-level-section {
    border: 1px solid #d7dee7;
    border-radius: 14px;
    padding: 0.75rem;
    background: #fff;
}

.reportbygroup-level-section + .reportbygroup-level-section {
    margin-top: 0.75rem;
}

.reportbygroup-level-title {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4b5563;
}

@media (max-width: 1200px) {
    .reportbygroup-choice-btn {
        min-width: 12.5rem;
        max-width: 20rem;
    }
}
