/*
 * The mobile app's look on the web: a wash in the school's colour, white rounded cards with no
 * borders, pill controls and pastel icon tiles. The side menu keeps every item.
 * Loaded after term-time.css. Colours stay the web palette.
 */
html[data-ui="term-time"] {
    --tt-font-display: 'Urbanist', system-ui, sans-serif;
    --tt-font-body: 'Urbanist', system-ui, sans-serif;
    --bs-font-sans-serif: var(--tt-font-body);
    --bs-body-font-family: var(--tt-font-body);
    --tt-wash: color-mix(in srgb, var(--bs-primary) 26%, var(--tt-ground));
    --tt-wash-2: color-mix(in srgb, var(--bs-primary) 12%, var(--tt-ground));
    --tt-hero-1: color-mix(in srgb, var(--bs-primary) 14%, #FFFFFF);
    --tt-hero-2: color-mix(in srgb, var(--bs-primary) 4%, #FFFFFF);
    --tt-card-radius: 20px;
}

html[data-ui="term-time"] body {
    font-size: 15.5px;
    font-weight: 450;
}

/* ---------- Shell: the side menu, as a floating rounded card ---------- */
html[data-ui="term-time"] body::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 380px;
    background: linear-gradient(180deg, var(--tt-wash) 0%, var(--tt-wash-2) 52%, var(--tt-ground) 100%);
    pointer-events: none;
}

html[data-ui="term-time"] #kt_app_root,
html[data-ui="term-time"] .app-page,
html[data-ui="term-time"] .app-wrapper,
html[data-ui="term-time"] .app-main,
html[data-ui="term-time"] #kt_app_content,
html[data-ui="term-time"] #kt_app_footer {
    background: transparent !important;
    position: relative;
}

html[data-ui="term-time"] #kt_app_content {
    padding-top: 24px !important;
    padding-bottom: 32px !important;
}

html[data-ui="term-time"] #kt_app_content_container {
    max-width: 1320px;
    margin-inline: auto;
    padding-inline: 24px !important;
}

html[data-ui="term-time"] .tt-tile-focus:focus-visible,
html[data-ui="term-time"] .tt-rowlink:focus-visible,
html[data-ui="term-time"] .tt-round:focus-visible,
html[data-ui="term-time"] .tt-quick-tile:focus-visible,
html[data-ui="term-time"] .app-sidebar .menu-link:focus-visible {
    outline: 3px solid var(--bs-primary);
    outline-offset: 2px;
}

/* Keen offsets its footer by the menu's width too, which pushed the page sideways */
html[data-ui="term-time"] #kt_app_footer {
    left: auto !important;
    margin-left: 0 !important;
}

/* The items scroll inside the card, so the avatar and sign out always show */
html[data-ui="term-time"] #kt_app_sidebar {
    display: flex;
    flex-direction: column;
}

html[data-ui="term-time"] #kt_app_sidebar_navs {
    flex: 1 1 auto;
    height: auto !important;
    min-height: 0;
    overflow: hidden;
}

html[data-ui="term-time"] #kt_app_sidebar_navs_wrappers {
    height: 100% !important;
    max-height: none !important;
    overflow-y: auto;
}

html[data-ui="term-time"] #kt_app_sidebar_footer {
    flex: none;
    padding: 10px 12px 12px !important;
}

/* Tiny scroller stays out of the way inside the card */
html[data-ui="term-time"] .app-sidebar-navs .hover-scroll-y {
    scrollbar-width: thin;
}

@media (min-width: 992px) {
    html[data-ui="term-time"] body {
        --bs-app-header-height: 0px !important;
        --bs-app-header-height-actual: 0px !important;
        --bs-app-sidebar-width: 320px !important;
        --bs-app-sidebar-width-actual: 320px !important;
    }

    html[data-ui="term-time"] .app-header {
        display: none !important;
    }

    html[data-ui="term-time"] .app-sidebar {
        top: 16px !important;
        left: 16px !important;
        bottom: 16px !important;
        width: 288px !important;
        border-radius: 26px;
        overflow: hidden;
    }
}

@media (max-width: 991.98px) {
    /* The menu button lives in a light header above the wash */
    html[data-ui="term-time"] .app-header {
        position: relative;
        background: var(--tt-wash) !important;
        border-bottom: 0 !important;
    }

    html[data-ui="term-time"] .app-sidebar {
        border-radius: 0 26px 26px 0;
    }

    html[data-ui="term-time"] #kt_app_wrapper {
        margin-top: 0 !important;
    }
}

/* ---------- Page heads ---------- */
html[data-ui="term-time"] .tt-hello {
    display: flex;
    align-items: center;
    gap: 14px;
}

html[data-ui="term-time"] .tt-hello-text {
    flex: 1;
    min-width: 0;
}

html[data-ui="term-time"] .tt-hello h1 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0;
}

html[data-ui="term-time"] .tt-pagehead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 20px;
}

html[data-ui="term-time"] .tt-page-title,
html[data-ui="term-time"] .page-heading {
    margin: 0;
    font-size: 28px !important;
    font-weight: 700 !important;
    letter-spacing: 0;
    color: var(--tt-ink);
}

html[data-ui="term-time"] .tt-avatar {
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-primary-light);
    color: var(--bs-primary);
    font-weight: 700;
    font-size: 16px;
    text-decoration: none;
    overflow: hidden;
}

html[data-ui="term-time"] .tt-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

html[data-ui="term-time"] .tt-avatar-lg {
    width: 72px;
    height: 72px;
    font-size: 24px;
}

html[data-ui="term-time"] .tt-round {
    flex: none;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--tt-surface);
    color: var(--tt-ink);
    text-decoration: none;
    cursor: pointer;
}

html[data-ui="term-time"] .tt-round i {
    color: inherit;
}

html[data-ui="term-time"] .tt-round:hover {
    color: var(--bs-primary);
}

/* The back button term-time.js puts beside a page title */
html[data-ui="term-time"] .tt-titlerow {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

html[data-ui="term-time"] .tt-titlerow .tt-page-title {
    margin: 0;
}

/* ---------- Cards ---------- */
html[data-ui="term-time"] .card,
html[data-ui="term-time"] .tt-panel,
html[data-ui="term-time"] .tt-stat,
html[data-ui="term-time"] .tt-card {
    border: 0 !important;
    border-radius: var(--tt-card-radius) !important;
    box-shadow: none !important;
    background: var(--tt-surface);
}

html[data-ui="term-time"] .tt-card {
    display: block;
    padding: 18px 20px;
}

html[data-ui="term-time"] .card .card-header {
    border-bottom: 0;
    background: transparent;
}

html[data-ui="term-time"] .card .card-footer {
    border-top: 0;
    background: transparent;
}

html[data-ui="term-time"] .tt-herocard {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--tt-hero-1), var(--tt-hero-2));
}

html[data-ui="term-time"] .tt-herocard h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
}

html[data-ui="term-time"] .tt-figure {
    font-size: 36px;
    line-height: 1.1;
    font-weight: 700;
    color: var(--tt-ink);
}

/* ---------- Controls ---------- */
html[data-ui="term-time"] .btn {
    border-radius: 999px !important;
    font-weight: 600;
}

html[data-ui="term-time"] .btn.btn-icon {
    border-radius: 50% !important;
}

html[data-ui="term-time"] .btn-primary {
    min-height: 46px;
}

html[data-ui="term-time"] .btn-tt-main {
    min-height: 54px;
    padding-inline: 28px;
    font-size: 16px;
}

html[data-ui="term-time"] .form-control,
html[data-ui="term-time"] .form-select,
html[data-ui="term-time"] .select2-container .select2-selection {
    border-radius: 16px !important;
    border-color: var(--tt-line);
    font-family: var(--tt-font-body);
}

html[data-ui="term-time"] .badge {
    border-radius: 999px !important;
    padding: 5px 11px;
    font-weight: 600;
}

html[data-ui="term-time"] .modal-content {
    border: 0;
    border-radius: 24px;
}

html[data-ui="term-time"] .dropdown-menu,
html[data-ui="term-time"] .menu-sub-dropdown {
    border: 0;
    border-radius: 18px;
}

html[data-ui="term-time"] .alert {
    border: 0;
    border-radius: 18px;
}

html[data-ui="term-time"] .page-item .page-link {
    border-radius: 50% !important;
    border: 0;
    min-width: 40px;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Tabs inside a page read as the white pill track from the phone */
html[data-ui="term-time"] .nav-tabs,
html[data-ui="term-time"] .nav-line-tabs {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    border: 0 !important;
    border-radius: 26px;
    background: var(--tt-surface);
}

html[data-ui="term-time"] .nav-tabs .nav-link,
html[data-ui="term-time"] .nav-line-tabs .nav-link {
    margin: 0 !important;
    min-height: 42px;
    padding: 8px 18px !important;
    border: 0 !important;
    border-radius: 999px !important;
    color: var(--tt-slate);
    font-weight: 500;
}

html[data-ui="term-time"] .nav-tabs .nav-link.active,
html[data-ui="term-time"] .nav-line-tabs .nav-link.active {
    background: var(--bs-primary-light) !important;
    color: var(--bs-primary) !important;
    font-weight: 600;
}

html[data-ui="term-time"] .tt-segment {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px;
    border-radius: 26px;
    background: var(--tt-surface);
}

html[data-ui="term-time"] .tt-segment > a,
html[data-ui="term-time"] .tt-segment > button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--tt-slate);
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
}

html[data-ui="term-time"] .tt-segment > .is-active {
    background: var(--bs-primary-light);
    color: var(--bs-primary);
    font-weight: 600;
}

html[data-ui="term-time"] .tt-search {
    display: flex;
    align-items: center;
    margin: 0;
    padding-left: 20px;
    min-height: 52px;
    border-radius: 999px;
    background: var(--tt-surface);
}

html[data-ui="term-time"] .tt-search input {
    flex: 1;
    min-width: 0;
    min-height: 52px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 15.5px;
    color: var(--tt-ink);
}

html[data-ui="term-time"] .tt-search:focus-within {
    outline: 2px solid var(--bs-primary);
}

html[data-ui="term-time"] .tt-search i {
    padding: 0 18px;
    color: var(--tt-slate);
}

html[data-ui="term-time"] .tt-chip {
    display: inline-flex;
    align-self: flex-start;
    padding: 3px 12px;
    border-radius: 999px;
    background: var(--bs-primary-light);
    color: var(--bs-primary);
    font-size: 13px;
    font-weight: 600;
}

/* Tables: quiet headings and hairlines on the white card */
html[data-ui="term-time"] .table > thead > tr > th {
    border: 0;
    background: transparent !important;
    color: var(--tt-slate);
    font-weight: 600;
    text-transform: none;
}

html[data-ui="term-time"] .table > tbody > tr > td {
    border-color: var(--tt-line-soft, #EEF1EE);
}

/* ---------- Kit: the pieces the phone screens are made of ---------- */
html[data-ui="term-time"] .tt-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 40px;
}

html[data-ui="term-time"] .tt-head h2 {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
}

html[data-ui="term-time"] .tt-head a {
    font-size: 14px;
    font-weight: 600;
    color: var(--bs-primary);
    text-decoration: none;
}

html[data-ui="term-time"] .tt-tile {
    flex: none;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

html[data-ui="term-time"] .tt-tile i {
    color: inherit;
    font-size: inherit;
}

html[data-ui="term-time"] .tile-purple { background: var(--bs-primary-light); color: var(--bs-primary); }
html[data-ui="term-time"] .tile-blue { background: #E3ECF3; color: #2B6A8E; }
html[data-ui="term-time"] .tile-pink { background: #FBEAE8; color: #A1221B; }
html[data-ui="term-time"] .tile-green { background: #E8F4E0; color: #205E1E; }
html[data-ui="term-time"] .tile-orange { background: #FDF1DC; color: #8A5A00; }
html[data-ui="term-time"] .tile-teal { background: #DFF2EE; color: #17695F; }

html[data-ui="term-time"] .tt-quick {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
}

html[data-ui="term-time"] .tt-quick::-webkit-scrollbar {
    display: none;
}

html[data-ui="term-time"] .tt-quick-tile {
    flex: 1 0 96px;
    max-width: 150px;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 6px;
    border-radius: var(--tt-card-radius);
    background: var(--tt-surface);
    color: var(--tt-ink);
    font-size: 13px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
}

html[data-ui="term-time"] .tt-quick-tile:hover {
    color: var(--bs-primary);
}

html[data-ui="term-time"] .tt-bar {
    display: block;
    height: 12px;
    border-radius: 6px;
    background: #EEF1EE;
    overflow: hidden;
}

html[data-ui="term-time"] .tt-bar > i {
    display: block;
    height: 100%;
    border-radius: 6px;
    background: var(--bs-primary);
}

/* Set --share to a number from 0 to 100 */
html[data-ui="term-time"] .tt-ring {
    --share: 0;
    flex: none;
    position: relative;
    width: 132px;
    height: 132px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: conic-gradient(var(--bs-primary) calc(var(--share) * 1%), #EEF1EE 0);
}

html[data-ui="term-time"] .tt-ring::before {
    content: "";
    position: absolute;
    inset: 13px;
    border-radius: 50%;
    background: var(--tt-surface);
}

html[data-ui="term-time"] .tt-ring > * {
    position: relative;
}

html[data-ui="term-time"] .tt-ring strong {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.1;
}

html[data-ui="term-time"] .tt-ring span {
    font-size: 12px;
    color: var(--tt-slate);
}

html[data-ui="term-time"] .tt-rows {
    padding: 4px 16px !important;
}

html[data-ui="term-time"] .tt-rowlink {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 62px;
    padding: 8px 0;
    color: var(--tt-ink);
    font-weight: 500;
    text-decoration: none;
    border-top: 1px solid #EEF1EE;
}

html[data-ui="term-time"] .tt-rowlink:first-child {
    border-top: 0;
}

html[data-ui="term-time"] .tt-rowlink[hidden],
html[data-ui="term-time"] .tt-menu-group[hidden] {
    display: none;
}

html[data-ui="term-time"] .tt-rowlink:hover {
    color: var(--bs-primary);
}

html[data-ui="term-time"] .tt-rowlink.is-locked {
    color: var(--tt-slate);
}

html[data-ui="term-time"] .tt-rowlink-text {
    flex: 1;
    min-width: 0;
}

html[data-ui="term-time"] .tt-chevron {
    color: var(--tt-control-line);
    font-size: 18px;
}

html[data-ui="term-time"] .tt-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr));
    align-items: start;
    gap: 16px;
}

html[data-ui="term-time"] .tt-menu-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

html[data-ui="term-time"] .tt-profile {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
}

html[data-ui="term-time"] .tt-profile-text {
    flex: 1 1 220px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

html[data-ui="term-time"] .tt-profile-text strong {
    font-size: 20px;
    font-weight: 700;
}

html[data-ui="term-time"] .tt-profile-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* A home page: one column on a phone, main and side columns on a desktop */
html[data-ui="term-time"] .tt-home {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
}

html[data-ui="term-time"] .tt-home-col {
    display: flex;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

@media (min-width: 1100px) {
    html[data-ui="term-time"] .tt-home {
        grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
        align-items: start;
    }
}

/* ---------- Phones ---------- */
@media (max-width: 991.98px) {
    html[data-ui="term-time"] #kt_app_content_container {
        padding-inline: 16px !important;
    }

    html[data-ui="term-time"] #kt_app_content {
        padding-top: 12px !important;
    }

    html[data-ui="term-time"] .tt-hello h1 {
        font-size: 20px;
    }

    html[data-ui="term-time"] .tt-page-title,
    html[data-ui="term-time"] .page-heading {
        font-size: 24px !important;
    }

    html[data-ui="term-time"] .tt-quick {
        margin-inline: -16px;
        padding-inline: 16px;
    }

    html[data-ui="term-time"] .tt-quick-tile {
        flex: 0 0 88px;
    }
}

/* Round avatars, as on the phone */
html[data-ui="term-time"] .symbol .symbol-label,
html[data-ui="term-time"] .symbol > img,
html[data-ui="term-time"] .tt-person img,
html[data-ui="term-time"] .tt-person-initials {
    border-radius: 50% !important;
}

html[data-ui="term-time"] .tt-rowlink,
html[data-ui="term-time"] .tt-rowlink-text {
    font-size: 15.5px;
}

@media (max-width: 767.98px) {
    /* Stacked rows sit as soft blocks inside the white card */
    html[data-ui="term-time"] table.tt-stacks tr {
        border: 0;
        background: var(--tt-ground);
        border-radius: 16px;
    }
}


/* ---------- Pages: the phone screens, page by page ---------- */
/* Shared by the pages below */
html[data-ui="term-time"] .tt-pagehead-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

html[data-ui="term-time"] .tt-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

html[data-ui="term-time"] .tt-cta i {
    color: inherit;
}

html[data-ui="term-time"] .tt-round[aria-pressed="true"] {
    background: var(--bs-primary-light);
    color: var(--bs-primary);
}

html[data-ui="term-time"] .tt-round-danger:hover {
    color: var(--tt-danger);
}

html[data-ui="term-time"] .tt-round-main {
    background: var(--bs-primary);
    color: #FFFFFF;
}

html[data-ui="term-time"] .tt-round-main:hover {
    color: #FFFFFF;
    filter: brightness(0.92);
}

html[data-ui="term-time"] .tt-tools {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}

html[data-ui="term-time"] .tt-tools .tt-search {
    flex: 1 1 320px;
    min-width: 0;
}

html[data-ui="term-time"] .tt-search button {
    flex: none;
    width: 52px;
    height: 52px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

html[data-ui="term-time"] .tt-search button i {
    padding: 0;
}

html[data-ui="term-time"] .tt-search button:hover i {
    color: var(--bs-primary);
}

html[data-ui="term-time"] .tt-segment > a:focus-visible,
html[data-ui="term-time"] .tt-segment > button:focus-visible,
html[data-ui="term-time"] .tt-search button:focus-visible {
    outline: 3px solid var(--bs-primary);
    outline-offset: 1px;
}

html[data-ui="term-time"] .tt-tick {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    cursor: pointer;
}

html[data-ui="term-time"] .tt-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 36px 20px;
    text-align: center;
}

html[data-ui="term-time"] .tt-pager {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
}

html[data-ui="term-time"] .tt-narrow {
    max-width: 720px;
}

html[data-ui="term-time"] .tt-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

html[data-ui="term-time"] .tt-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

html[data-ui="term-time"] .tt-field > label {
    font-weight: 600;
}

html[data-ui="term-time"] .tt-field .form-control,
html[data-ui="term-time"] .tt-field .form-select {
    min-height: 48px;
}

html[data-ui="term-time"] .tt-avatar-sm {
    width: 36px;
    height: 36px;
    font-size: 13px;
}

html[data-ui="term-time"] .tt-dot {
    display: inline-block;
    flex: none;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bs-primary);
}

/* Messages */
html[data-ui="term-time"] .tt-bulk {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    padding: 8px 16px;
}

html[data-ui="term-time"] .tt-bulk[hidden] {
    display: none;
}

html[data-ui="term-time"] .tt-msglist {
    margin: 0;
    padding: 0;
    list-style: none;
    overflow: hidden;
}

html[data-ui="term-time"] .tt-msgrow {
    display: flex;
    align-items: stretch;
    border-top: 1px solid #EEF1EE;
}

html[data-ui="term-time"] .tt-msgrow:first-child {
    border-top: 0;
}

html[data-ui="term-time"] .tt-msgrow.is-unread {
    background: color-mix(in srgb, var(--bs-primary) 5%, var(--tt-surface));
}

html[data-ui="term-time"] .tt-msgrow-pick {
    display: none;
    flex: none;
    width: 52px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

html[data-ui="term-time"] .tt-msglist.is-picking .tt-msgrow-pick {
    display: flex;
}

html[data-ui="term-time"] .tt-msgrow-link {
    flex: 1;
    min-width: 0;
    min-height: 76px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    grid-template-areas: "face who meta" "face text meta";
    align-items: center;
    gap: 2px 14px;
    padding: 12px 16px;
    color: var(--tt-ink);
    text-decoration: none;
}

html[data-ui="term-time"] .tt-msgrow-link:hover {
    background: var(--tt-ground);
}

html[data-ui="term-time"] .tt-msgrow-link:focus-visible {
    outline: 3px solid var(--bs-primary);
    outline-offset: -3px;
}

html[data-ui="term-time"] .tt-msgrow-link .tt-avatar {
    grid-area: face;
}

html[data-ui="term-time"] .tt-msgrow-who {
    grid-area: who;
    display: flex;
    align-items: baseline;
    gap: 8px;
    min-width: 0;
}

html[data-ui="term-time"] .tt-msgrow-who strong {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-weight: 600;
}

html[data-ui="term-time"] .tt-msgrow-who small {
    flex: none;
}

html[data-ui="term-time"] .tt-msgrow-text {
    grid-area: text;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    font-size: 14px;
}

html[data-ui="term-time"] .tt-msgrow-text b {
    font-weight: 500;
}

html[data-ui="term-time"] .tt-msgrow-text b::after {
    content: " · ";
    color: var(--tt-slate);
}

html[data-ui="term-time"] .tt-msgrow-meta {
    grid-area: meta;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

html[data-ui="term-time"] .tt-msgrow-meta i.ki-outline {
    color: var(--tt-slate);
}

html[data-ui="term-time"] .tt-msgrow-status {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--tt-slate);
}

html[data-ui="term-time"] .tt-msgrow-status i.ki-outline {
    color: inherit;
}

html[data-ui="term-time"] .tt-msgrow-status.is-read {
    color: var(--bs-primary);
}

html[data-ui="term-time"] .tt-msgrow.is-unread strong,
html[data-ui="term-time"] .tt-msgrow.is-unread .tt-msgrow-text b {
    font-weight: 700;
}

@media (min-width: 992px) {
    html[data-ui="term-time"] .tt-msgrow-link {
        grid-template-columns: 48px 240px minmax(0, 1fr) auto;
        grid-template-areas: "face who text meta";
    }

    html[data-ui="term-time"] .tt-msgrow-who {
        flex-direction: column;
        gap: 0;
    }

    html[data-ui="term-time"] .tt-msgrow-text {
        font-size: 15px;
    }
}

html[data-ui="term-time"] .tt-thread {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

html[data-ui="term-time"] .tt-daychip {
    align-self: center;
    padding: 4px 14px;
    border-radius: 999px;
    background: var(--tt-surface);
    color: var(--tt-slate);
    font-size: 13px;
    font-weight: 500;
}

html[data-ui="term-time"] .tt-bubblerow {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

html[data-ui="term-time"] .tt-bubblerow.is-mine {
    justify-content: flex-end;
}

html[data-ui="term-time"] .tt-bubblecol {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    max-width: 78%;
    min-width: 0;
}

html[data-ui="term-time"] .is-mine .tt-bubblecol {
    align-items: flex-end;
}

html[data-ui="term-time"] .tt-bubble {
    max-width: 100%;
    padding: 10px 14px;
    border-radius: 20px;
    border-top-left-radius: 6px;
    background: var(--tt-surface);
    color: var(--tt-ink);
}

html[data-ui="term-time"] .is-mine .tt-bubble {
    border-top-left-radius: 20px;
    border-bottom-right-radius: 6px;
    background: var(--bs-primary);
    color: #FFFFFF;
}

html[data-ui="term-time"] .tt-bubble strong {
    display: block;
    margin-bottom: 2px;
    font-size: 14px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

html[data-ui="term-time"] .tt-bubble-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    line-height: 1.45;
}

html[data-ui="term-time"] .tt-bubble-file {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    font-weight: 600;
    color: var(--bs-primary);
}

html[data-ui="term-time"] .tt-bubble-file i {
    color: inherit;
}

html[data-ui="term-time"] .is-mine .tt-bubble-file {
    color: #FFFFFF;
    text-decoration: underline;
}

html[data-ui="term-time"] .tt-composer {
    padding: 10px 12px 10px 18px;
}

html[data-ui="term-time"] .tt-composer-main {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

html[data-ui="term-time"] .tt-composer textarea {
    flex: 1;
    min-width: 0;
    min-height: 48px;
    padding: 10px 0;
    border: 0;
    outline: 0;
    resize: vertical;
    background: transparent;
    color: var(--tt-ink);
}

html[data-ui="term-time"] .tt-composer:focus-within {
    outline: 2px solid var(--bs-primary);
}

html[data-ui="term-time"] .tt-composer-more summary {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    color: var(--tt-slate);
    font-size: 14px;
    cursor: pointer;
}

html[data-ui="term-time"] .tt-composer-more summary i {
    color: inherit;
}

html[data-ui="term-time"] .tt-composer-more .form-control {
    margin-bottom: 6px;
}

html[data-ui="term-time"] .tt-rowlink.text-truncate,
html[data-ui="term-time"] .tt-rowlink-text.text-truncate {
    overflow: hidden;
}

@media (max-width: 575.98px) {
    html[data-ui="term-time"] .tt-tools .tt-search {
        flex-basis: 100%;
    }

    html[data-ui="term-time"] .tt-segment.tt-fill {
        display: flex;
        flex-wrap: nowrap;
        width: 100%;
    }

    html[data-ui="term-time"] .tt-segment.tt-fill > * {
        flex: 1;
        justify-content: center;
        padding-inline: 8px;
        white-space: nowrap;
    }

    /* The main action becomes the phone's round button */
    html[data-ui="term-time"] .tt-cta {
        width: 46px;
        height: 46px;
        min-height: 46px;
        padding: 0;
        justify-content: center;
        border-radius: 50% !important;
    }

    html[data-ui="term-time"] .tt-cta span {
        display: none;
    }
}

html[data-ui="term-time"] .tt-msgrow-who strong {
    font-size: 15.5px;
}

html[data-ui="term-time"] .tt-msgrow-who small,
html[data-ui="term-time"] .tt-msgrow-meta small {
    font-size: 13px;
}

html[data-ui="term-time"] .tt-composer textarea {
    font-size: 15.5px;
}

/* Pills that scroll sideways inside their white track when there are many */
html[data-ui="term-time"] .tt-segment.tt-scroll {
    display: flex;
    flex-wrap: nowrap;
    max-width: 100%;
    width: fit-content;
    overflow-x: auto;
    scrollbar-width: none;
}

html[data-ui="term-time"] .tt-segment.tt-scroll::-webkit-scrollbar {
    display: none;
}

html[data-ui="term-time"] .tt-segment.tt-scroll > * {
    flex: none;
    white-space: nowrap;
}

/* Notifications */
html[data-ui="term-time"] .tt-tile-lg {
    width: 48px;
    height: 48px;
}

html[data-ui="term-time"] .tt-round-soft {
    background: var(--bs-primary-light);
    color: var(--bs-primary);
}

html[data-ui="term-time"] .tt-notifday[hidden],
html[data-ui="term-time"] .tt-notif[hidden],
html[data-ui="term-time"] #ttNotifEmpty[hidden] {
    display: none;
}

html[data-ui="term-time"] .tt-notifgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr));
    gap: 8px 12px;
    margin-top: 4px;
}

html[data-ui="term-time"] .tt-notif {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 72px;
    padding: 12px 14px;
}

html[data-ui="term-time"] .tt-notif-text {
    flex: 1;
    min-width: 0;
    overflow-wrap: anywhere;
}

html[data-ui="term-time"] .tt-notif-text small {
    font-size: 13px;
}

html[data-ui="term-time"] .tt-notif-text h3 {
    margin: 0 0 2px;
    font-size: 15.5px;
    font-weight: 500;
    color: var(--tt-ink);
}

html[data-ui="term-time"] .tt-notif.is-unread h3 {
    font-weight: 700;
}

html[data-ui="term-time"] .tt-notif-text p {
    font-size: 14px;
}

html[data-ui="term-time"] .tt-notif-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-size: 14px;
    font-weight: 600;
    color: var(--bs-primary);
}

html[data-ui="term-time"] .tt-notif-side {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

html[data-ui="term-time"] .tt-notif-side small {
    font-size: 13px;
    white-space: nowrap;
}

html[data-ui="term-time"] .tt-notif-state {
    display: inline-flex;
}

/* Timetable */
html[data-ui="term-time"] .tt-round-quiet {
    width: 44px;
    height: 44px;
    background: var(--tt-ground);
}

html[data-ui="term-time"] .tt-classpick {
    max-width: 420px;
    margin: 0;
}

html[data-ui="term-time"] .tt-dayswitch {
    display: flex;
    gap: 6px;
    padding: 4px;
    border-radius: 26px;
    background: var(--tt-surface);
}

html[data-ui="term-time"] .tt-dayswitch button {
    flex: 1;
    min-width: 0;
    min-height: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    border: 0;
    border-radius: 22px;
    background: transparent;
    color: var(--tt-slate);
    font-weight: 500;
    cursor: pointer;
}

html[data-ui="term-time"] .tt-dayswitch button:focus-visible,
html[data-ui="term-time"] .tt-monthday:focus-visible,
html[data-ui="term-time"] .tt-evrow-open:focus-visible {
    outline: 3px solid var(--bs-primary);
    outline-offset: 1px;
}

html[data-ui="term-time"] .tt-dayswitch button.is-active {
    background: var(--bs-primary);
    color: #FFFFFF;
    font-weight: 700;
}

html[data-ui="term-time"] .tt-daydot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: transparent;
}

html[data-ui="term-time"] .tt-dayswitch .is-today .tt-daydot {
    background: var(--bs-primary);
}

html[data-ui="term-time"] .tt-dayswitch .is-today.is-active .tt-daydot {
    background: #FFFFFF;
}

html[data-ui="term-time"] .tt-dayboard-day {
    display: none;
    flex-direction: column;
    gap: 10px;
    min-width: 0;
}

html[data-ui="term-time"] .tt-dayboard-day.is-day {
    display: flex;
}

html[data-ui="term-time"] .tt-period {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
}

html[data-ui="term-time"] .tt-period-time {
    display: flex;
    flex-direction: column;
    text-align: right;
}

html[data-ui="term-time"] .tt-period-time strong {
    font-size: 14px;
    font-weight: 600;
}

html[data-ui="term-time"] .tt-period-time small {
    font-size: 12.5px;
}

html[data-ui="term-time"] .tt-period-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 68px;
    padding: 10px 12px;
}

html[data-ui="term-time"] .tt-period.is-now .tt-period-card {
    outline: 2px solid var(--bs-primary);
    outline-offset: -2px;
}

html[data-ui="term-time"] .tt-period-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
    overflow-wrap: anywhere;
}

html[data-ui="term-time"] .tt-period-text strong {
    font-weight: 600;
}

html[data-ui="term-time"] .tt-period-text small {
    font-size: 13px;
}

html[data-ui="term-time"] .tt-period-text .tt-now[hidden] {
    display: none;
}

html[data-ui="term-time"] .tt-period-actions {
    flex: none;
    display: flex;
    gap: 4px;
}

/* Wide screens lay the week out side by side and the day switcher steps aside */
@media (min-width: 1280px) {
    html[data-ui="term-time"] .tt-dayswitch {
        display: none;
    }

    html[data-ui="term-time"] .tt-dayboard {
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(0, 1fr);
        gap: 12px;
        align-items: start;
    }

    html[data-ui="term-time"] .tt-dayboard-day {
        display: flex;
    }

    html[data-ui="term-time"] .tt-dayboard-day.is-today .tt-head h2 {
        color: var(--bs-primary);
    }

    html[data-ui="term-time"] .tt-period {
        display: block;
    }

    html[data-ui="term-time"] .tt-period-time {
        flex-direction: row;
        gap: 4px;
        padding: 0 4px 4px;
        text-align: left;
    }

    html[data-ui="term-time"] .tt-period-time small::before {
        content: "to ";
    }

    html[data-ui="term-time"] .tt-period-card {
        flex-wrap: wrap;
    }

    html[data-ui="term-time"] .tt-period-card .tt-tile {
        display: none;
    }

    html[data-ui="term-time"] .tt-period-text {
        flex-basis: 100%;
    }
}

@media print {
    html[data-ui="term-time"] .tt-pagehead-actions,
    html[data-ui="term-time"] .tt-dayswitch,
    html[data-ui="term-time"] .tt-classpick,
    html[data-ui="term-time"] .tt-period-actions,
    html[data-ui="term-time"] #kt_app_sidebar,
    html[data-ui="term-time"] #aiChatWidget {
        display: none !important;
    }

    html[data-ui="term-time"] .tt-dayboard-day {
        display: flex !important;
        margin-bottom: 16px;
        break-inside: avoid;
    }
}

/* Calendar */
html[data-ui="term-time"] .tt-month {
    padding: 14px 12px;
}

html[data-ui="term-time"] .tt-month-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding-bottom: 8px;
}

html[data-ui="term-time"] .tt-month-head h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

html[data-ui="term-time"] .tt-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

html[data-ui="term-time"] .tt-month-week span {
    text-align: center;
    color: var(--tt-slate);
    font-size: 13px;
    font-weight: 500;
    padding-bottom: 4px;
}

html[data-ui="term-time"] .tt-monthday {
    min-height: 54px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 2px 0;
    border: 0;
    border-radius: 14px;
    background: transparent;
    color: var(--tt-ink);
    cursor: pointer;
}

html[data-ui="term-time"] .tt-monthday b {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 500;
}

html[data-ui="term-time"] .tt-monthday.is-today b {
    box-shadow: inset 0 0 0 1.5px var(--bs-primary);
    color: var(--bs-primary);
    font-weight: 700;
}

html[data-ui="term-time"] .tt-monthday.is-selected b {
    background: var(--bs-primary);
    color: #FFFFFF;
    font-weight: 700;
}

html[data-ui="term-time"] .tt-monthdots {
    display: flex;
    align-items: center;
    gap: 3px;
    height: 8px;
}

html[data-ui="term-time"] .tt-evdot {
    display: inline-block;
    flex: none;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: currentColor !important;
}

html[data-ui="term-time"] .tt-evdot[hidden],
html[data-ui="term-time"] .tt-legend [hidden],
html[data-ui="term-time"] .tt-evrow[hidden],
html[data-ui="term-time"] .tt-calday[hidden],
html[data-ui="term-time"] .tt-rows[hidden],
html[data-ui="term-time"] p[data-cal-none][hidden] {
    display: none;
}

html[data-ui="term-time"] .tt-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px 14px;
    padding: 10px 8px 2px;
}

html[data-ui="term-time"] .tt-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--tt-slate);
    font-size: 13px;
}

html[data-ui="term-time"] .tt-calday {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

html[data-ui="term-time"] .tt-evrow {
    display: flex;
    align-items: center;
    gap: 8px;
    border-top: 1px solid #EEF1EE;
}

html[data-ui="term-time"] .tt-evrow:first-child {
    border-top: 0;
}

html[data-ui="term-time"] .tt-evrow-open {
    flex: 1;
    min-width: 0;
    min-height: 62px;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: var(--tt-ink);
    text-align: left;
    cursor: pointer;
}

html[data-ui="term-time"] .tt-evrow-open strong {
    font-weight: 600;
    overflow-wrap: anywhere;
}

html[data-ui="term-time"] .tt-evrow-open small {
    font-size: 13px;
}

@media (min-width: 1100px) {
    html[data-ui="term-time"] .tt-monthday {
        min-height: 78px;
    }
}

/* Library */
html[data-ui="term-time"] .tt-typepick {
    flex: 0 1 220px;
    min-width: 160px;
}

html[data-ui="term-time"] .tt-cover {
    container-type: inline-size;
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1.45;
    overflow: hidden;
    border-radius: 12px;
    background: var(--tt-line);
    color: #FFFFFF;
}

html[data-ui="term-time"] .tt-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

html[data-ui="term-time"] .tt-cover::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6%;
    background: rgba(0, 0, 0, 0.18);
}

html[data-ui="term-time"] .tt-cover:has(img)::before {
    display: none;
}

html[data-ui="term-time"] .tt-cover-text {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4cqw;
    padding: 9cqw 8cqw 9cqw 14cqw;
    overflow: hidden;
}

html[data-ui="term-time"] .tt-cover-text b {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 5;
    overflow: hidden;
    font-size: 12.5cqw;
    line-height: 1.2;
    font-weight: 700;
}

html[data-ui="term-time"] .tt-cover-text small {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    font-size: 9cqw;
    line-height: 1.2;
    font-weight: 500;
}

html[data-ui="term-time"] .tt-cover-0 { background: linear-gradient(135deg, #1B4965, #5B8DAE); }
html[data-ui="term-time"] .tt-cover-1 { background: linear-gradient(135deg, #2E7A2A, #7BC142); }
html[data-ui="term-time"] .tt-cover-2 { background: linear-gradient(135deg, #8A5A00, #F4A836); }
html[data-ui="term-time"] .tt-cover-3 { background: linear-gradient(135deg, #0F2D40, #2B6A8E); }
html[data-ui="term-time"] .tt-cover-4 { background: linear-gradient(135deg, #A1221B, #E0795F); }
html[data-ui="term-time"] .tt-cover-5 { background: linear-gradient(135deg, #17695F, #5BB5A6); }
html[data-ui="term-time"] .tt-cover-6 { background: linear-gradient(135deg, #33474F, #7B8D94); }
html[data-ui="term-time"] .tt-cover-7 { background: linear-gradient(135deg, #5A3E85, #A08BC4); }

html[data-ui="term-time"] .tt-book {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    color: var(--tt-ink);
    text-decoration: none;
    border-radius: 12px;
}

html[data-ui="term-time"] .tt-book:hover .tt-book-title {
    color: var(--bs-primary);
}

html[data-ui="term-time"] .tt-book:focus-visible,
html[data-ui="term-time"] .tt-bookrow:focus-visible,
html[data-ui="term-time"] .tt-featured-cover:focus-visible {
    outline: 3px solid var(--bs-primary);
    outline-offset: 2px;
}

html[data-ui="term-time"] .tt-book-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin-top: 6px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
}

html[data-ui="term-time"] .tt-book small {
    font-size: 12.5px;
}

html[data-ui="term-time"] .tt-book-author {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

html[data-ui="term-time"] .tt-book-ready {
    color: var(--tt-leaf-deep);
    font-weight: 600;
}

html[data-ui="term-time"] .tt-shelfblock {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

html[data-ui="term-time"] .tt-shelf {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    margin-inline: -16px;
    padding: 4px 16px;
    scrollbar-width: none;
}

html[data-ui="term-time"] .tt-shelf::-webkit-scrollbar {
    display: none;
}

html[data-ui="term-time"] .tt-shelf > .tt-book {
    flex: 0 0 116px;
}

html[data-ui="term-time"] .tt-bookgrid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
    gap: 20px 12px;
}

@media (min-width: 768px) {
    html[data-ui="term-time"] .tt-shelf {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 20px 16px;
        overflow: visible;
        margin-inline: 0;
        padding: 4px 0;
    }

    html[data-ui="term-time"] .tt-bookgrid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 20px 16px;
    }
}

html[data-ui="term-time"] .tt-featured {
    flex-direction: row;
    gap: 18px;
    padding: 18px;
}

html[data-ui="term-time"] .tt-featured-cover {
    flex: 0 0 96px;
    align-self: flex-start;
    border-radius: 12px;
}

html[data-ui="term-time"] .tt-featured-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

html[data-ui="term-time"] .tt-featured-text h2 {
    font-size: 20px;
    overflow-wrap: anywhere;
}

html[data-ui="term-time"] .tt-featured-text .tt-bar {
    width: 100%;
    max-width: 360px;
}

html[data-ui="term-time"] .tt-featured-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--bs-primary);
}

html[data-ui="term-time"] .tt-featured-go {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 8px;
}

html[data-ui="term-time"] .tt-featured-go i {
    color: inherit;
}

@media (min-width: 768px) {
    html[data-ui="term-time"] .tt-featured-cover {
        flex-basis: 132px;
    }
}

html[data-ui="term-time"] .tt-bookhero {
    align-items: center;
    text-align: center;
}

html[data-ui="term-time"] .tt-bookhero-cover {
    width: 168px;
}

html[data-ui="term-time"] .tt-bookhero-title {
    margin: 6px 0 0;
    font-size: 24px;
    font-weight: 700;
    overflow-wrap: anywhere;
}

html[data-ui="term-time"] .tt-bookhero-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
}

html[data-ui="term-time"] .tt-bookhero-chips .tt-chip {
    align-self: auto;
}

html[data-ui="term-time"] .tt-bookhero .btn i {
    color: inherit;
}

html[data-ui="term-time"] .tt-bookhero .tt-card {
    text-align: left;
}

html[data-ui="term-time"] .tt-prose {
    line-height: 1.55;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

html[data-ui="term-time"] .tt-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px;
    margin: 0;
}

html[data-ui="term-time"] .tt-facts dt {
    font-size: 13px;
    font-weight: 400;
    color: var(--tt-slate);
}

html[data-ui="term-time"] .tt-facts dd {
    margin: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

@media (min-width: 1100px) {
    html[data-ui="term-time"] .tt-bookpage {
        grid-template-columns: 320px minmax(0, 1fr);
    }
}

html[data-ui="term-time"] .tt-bookrow {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 200px;
    color: var(--tt-ink);
    text-decoration: none;
}

html[data-ui="term-time"] .tt-bookrow strong {
    font-weight: 600;
}

html[data-ui="term-time"] .tt-bookrow-cover {
    flex: none;
    width: 44px;
}

html[data-ui="term-time"] .tt-bookrow-cover .tt-cover-text {
    display: none;
}

html[data-ui="term-time"] .tt-rowactions {
    display: inline-flex;
    justify-content: flex-end;
    gap: 4px;
}

/* Results */
html[data-ui="term-time"] .tt-termcard {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 22px 20px;
    text-align: center;
}

html[data-ui="term-time"] .tt-termcard[hidden],
html[data-ui="term-time"] .tt-childpanel[hidden] {
    display: none;
}

html[data-ui="term-time"] .tt-ring-lg {
    width: 168px;
    height: 168px;
}

html[data-ui="term-time"] .tt-ring-lg::before {
    inset: 16px;
}

html[data-ui="term-time"] .tt-ring-lg strong {
    font-size: 32px;
}

html[data-ui="term-time"] .tt-statstrip {
    display: flex;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

html[data-ui="term-time"] .tt-statstrip > div {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 12px 4px;
    border-radius: 16px;
    background: var(--tt-ground);
}

html[data-ui="term-time"] .tt-statstrip small {
    font-size: 13px;
}

html[data-ui="term-time"] .tt-rowsplit {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

html[data-ui="term-time"] .tt-bar-thin {
    height: 8px;
    margin: 4px 0;
}

html[data-ui="term-time"] .tt-rowlink .tt-bar > i {
    display: block;
}

/* Fees */
html[data-ui="term-time"] .tt-herocard .btn-tt-main {
    align-self: stretch;
}

html[data-ui="term-time"] .tt-feeline {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 62px;
    padding: 12px 0;
    border-top: 1px solid #EEF1EE;
}

html[data-ui="term-time"] .tt-feeline:first-child {
    border-top: 0;
}

html[data-ui="term-time"] .tt-feeline strong {
    font-weight: 600;
}

html[data-ui="term-time"] .tt-feeline small {
    font-size: 13px;
}

html[data-ui="term-time"] .tt-feeline-side {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

html[data-ui="term-time"] .tt-feeline-side .tt-chip {
    align-self: auto;
}

html[data-ui="term-time"] .tt-feelist {
    margin: 0;
    padding: 0;
    list-style: none;
}

html[data-ui="term-time"] .tt-feerow {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    grid-template-areas: "face who status" "face fee fee" "face money money" "face act act";
    gap: 2px 12px;
    align-items: center;
    padding: 14px 16px;
    border-top: 1px solid #EEF1EE;
}

html[data-ui="term-time"] .tt-feerow:first-child {
    border-top: 0;
}

html[data-ui="term-time"] .tt-feerow > .tt-avatar { grid-area: face; align-self: start; }
html[data-ui="term-time"] .tt-feerow-who { grid-area: who; }
html[data-ui="term-time"] .tt-feerow-fee { grid-area: fee; }
html[data-ui="term-time"] .tt-feerow-money { grid-area: money; }
html[data-ui="term-time"] .tt-feerow-status { grid-area: status; }
html[data-ui="term-time"] .tt-feerow-act { grid-area: act; }

html[data-ui="term-time"] .tt-feerow-who,
html[data-ui="term-time"] .tt-feerow-fee,
html[data-ui="term-time"] .tt-feerow-money {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-wrap: anywhere;
}

html[data-ui="term-time"] .tt-feerow strong {
    font-weight: 600;
}

html[data-ui="term-time"] .tt-feerow small {
    font-size: 13px;
}

html[data-ui="term-time"] .tt-overdue {
    color: var(--tt-danger);
}

html[data-ui="term-time"] .tt-feerow-act .btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    margin-top: 6px;
}

@media (min-width: 1200px) {
    html[data-ui="term-time"] .tt-feerow {
        grid-template-columns: 48px minmax(0, 1.2fr) minmax(0, 1.2fr) minmax(0, 1.2fr) 96px 150px;
        grid-template-areas: "face who fee money status act";
        gap: 14px;
    }

    html[data-ui="term-time"] .tt-feerow-act {
        text-align: right;
    }

    html[data-ui="term-time"] .tt-feerow-act .btn {
        margin-top: 0;
    }
}

html[data-ui="term-time"] .tt-bookhero .tt-cover-text {
    text-align: left;
}

html[data-ui="term-time"] .tt-rowlink-text > .tt-rowsplit {
    display: flex !important;
    width: 100%;
}

/* People lists: students and teachers */
html[data-ui="term-time"] .tt-people {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(460px, 100%), 1fr));
    gap: 10px 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

html[data-ui="term-time"] .tt-person-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px 10px 14px;
    min-width: 0;
}

html[data-ui="term-time"] .tt-person-link {
    flex: 1;
    min-width: 0;
    min-height: 56px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--tt-ink);
    text-decoration: none;
    border-radius: 14px;
}

html[data-ui="term-time"] .tt-person-link:hover strong {
    color: var(--bs-primary);
}

html[data-ui="term-time"] .tt-person-link:focus-visible {
    outline: 3px solid var(--bs-primary);
    outline-offset: 2px;
}

html[data-ui="term-time"] .tt-person-main {
    min-width: 0;
    display: flex;
    flex-direction: column;
    overflow-wrap: anywhere;
}

html[data-ui="term-time"] .tt-person-main strong {
    font-weight: 600;
}

html[data-ui="term-time"] .tt-person-main small {
    font-size: 13px;
}

html[data-ui="term-time"] .tt-person-side {
    flex: none;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
}

html[data-ui="term-time"] .tt-person-side .tt-chip {
    align-self: auto;
}

/* People lists: List / Grid switch (Views/Shared/_TtViewSwitch.cshtml) */
html[data-ui="term-time"] .tt-viewswitch {
    display: inline-flex;
    flex: none;
    gap: 2px;
    padding: 3px;
    border-radius: 999px;
    background: var(--tt-surface);
    border: 1px solid var(--tt-line);
}

html[data-ui="term-time"] .tt-tools > .tt-viewswitch { margin-left: auto; }

html[data-ui="term-time"] .tt-viewswitch button {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 38px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--tt-slate);
    font-weight: 600;
    font-size: 13px;
}

html[data-ui="term-time"] .tt-viewswitch button i { color: inherit; }

html[data-ui="term-time"] .tt-viewswitch button:hover { color: var(--tt-ink); }

html[data-ui="term-time"] .tt-viewswitch button[aria-pressed="true"] {
    background: var(--bs-primary);
    color: #fff;
}

html[data-ui="term-time"] .tt-viewswitch button:focus-visible {
    outline: 3px solid var(--bs-primary);
    outline-offset: 2px;
}

/* The column header row exists only in List view */
html[data-ui="term-time"] .tt-people .tt-people-head { display: none; }

/* List view: one card, one row per person, columns lined up (from tablet width; phones keep the stacked cards) */
@media (min-width: 768px) {
    html[data-ui="term-time"] .tt-people.is-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        background: var(--tt-surface);
        border-radius: var(--tt-card-radius);
        overflow: hidden;
    }

    html[data-ui="term-time"] .tt-people.is-list > .tt-person-row {
        border-radius: 0 !important;
        background: transparent;
        padding: 6px 16px 6px 18px;
        border-bottom: 1px solid var(--tt-line) !important;
    }

    html[data-ui="term-time"] .tt-people.is-list > .tt-person-row:last-child { border-bottom: 0 !important; }

    html[data-ui="term-time"] .tt-people.is-list > .tt-person-row:not(.tt-people-head):hover {
        background: color-mix(in srgb, var(--bs-primary) 5%, transparent);
    }

    html[data-ui="term-time"] .tt-people.is-list .tt-person-link { min-height: 52px; }

    html[data-ui="term-time"] .tt-people.is-list .tt-avatar {
        width: 38px;
        height: 38px;
        font-size: 13px;
        flex: none;
    }

    html[data-ui="term-time"] .tt-people.is-list .tt-person-main {
        flex: 1;
        display: grid;
        grid-template-columns: minmax(0, 1.4fr) repeat(var(--tt-cols, 2), minmax(0, 1fr));
        align-items: center;
        column-gap: 16px;
    }

    html[data-ui="term-time"] .tt-people.is-list .tt-person-main small {
        font-size: 14px;
        color: var(--tt-slate);
    }

    html[data-ui="term-time"] .tt-people.is-list .tt-person-side {
        flex: 0 0 var(--tt-side, 200px);
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    html[data-ui="term-time"] .tt-people.is-list .tt-people-head {
        display: flex;
        min-height: 0;
        padding-top: 12px;
        padding-bottom: 10px;
        background: var(--tt-ground) !important;
        color: var(--tt-slate);
        font-size: 12px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    html[data-ui="term-time"] .tt-people.is-list .tt-people-head .tt-person-link { min-height: 0; color: inherit; }

    html[data-ui="term-time"] .tt-people.is-list .tt-people-head .tt-person-main span { font-size: 12px; }

    html[data-ui="term-time"] .tt-people.is-list .tt-people-head .tt-avatar-space { flex: none; width: 38px; }
}

@media (max-width: 767.98px) {
    html[data-ui="term-time"] .tt-viewswitch { display: none; }
}

/* Attendance register */
html[data-ui="term-time"] .tt-regpick {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 12px;
}

html[data-ui="term-time"] .tt-regpick .tt-field {
    flex: 1 1 200px;
}

html[data-ui="term-time"] .tt-regpick-go {
    min-height: 48px;
    flex: 0 1 auto;
}

html[data-ui="term-time"] .tt-reghead {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
}

html[data-ui="term-time"] .tt-reghead .btn {
    min-height: 44px;
}

html[data-ui="term-time"] .tt-reglist {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(440px, 100%), 1fr));
    align-items: start;
    gap: 8px 12px;
}

html[data-ui="term-time"] .tt-reglist .tt-register-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 12px 14px;
    border: 0;
}

html[data-ui="term-time"] .tt-reglist .tt-register-name {
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow-wrap: anywhere;
}

html[data-ui="term-time"] .tt-reglist .tt-register-name strong {
    font-weight: 600;
}

html[data-ui="term-time"] .tt-reglist .tt-register-name span {
    font-size: 13px;
}

html[data-ui="term-time"] .tt-reglist .tt-remark {
    grid-column: 1 / -1;
    min-height: 44px;
    width: 100%;
}

html[data-ui="term-time"] .tt-reglist .tt-remark[hidden] {
    display: none;
}

html[data-ui="term-time"] .tt-reglist .tt-marks {
    display: flex;
    gap: 4px;
}

html[data-ui="term-time"] .tt-reglist .tt-marks input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

html[data-ui="term-time"] .tt-reglist .tt-marks label {
    width: 44px;
    height: 44px;
    margin: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid var(--tt-line);
    border-radius: 50%;
    background: var(--tt-surface);
    color: var(--tt-slate);
    font-weight: 700;
    cursor: pointer;
}

html[data-ui="term-time"] .tt-reglist .tt-marks input:focus-visible + label {
    outline: 3px solid var(--bs-primary);
    outline-offset: 2px;
}

html[data-ui="term-time"] .tt-reglist .tt-marks input[value="Present"]:checked + label {
    background: var(--tt-leaf-deep);
    border-color: var(--tt-leaf-deep);
    color: #FFFFFF;
}

html[data-ui="term-time"] .tt-reglist .tt-marks input[value="Late"]:checked + label {
    background: var(--tt-gold);
    border-color: var(--tt-gold);
    color: var(--tt-ink);
}

html[data-ui="term-time"] .tt-reglist .tt-marks input[value="Absent"]:checked + label {
    background: var(--tt-danger);
    border-color: var(--tt-danger);
    color: #FFFFFF;
}

html[data-ui="term-time"] .tt-reglist .tt-marks input[value="Excused"]:checked + label {
    background: #2B6A8E;
    border-color: #2B6A8E;
    color: #FFFFFF;
}

html[data-ui="term-time"] .tt-savefoot {
    position: sticky;
    bottom: 0;
    z-index: 5;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-inline: -4px;
    padding: 12px 16px;
    border-radius: 22px 22px 0 0;
    background: var(--tt-surface);
    box-shadow: 0 -4px 18px rgba(16, 36, 46, 0.08);
}

@media (max-width: 575.98px) {
    html[data-ui="term-time"] .tt-savefoot .btn {
        width: 100%;
    }
}

/* Profile */
html[data-ui="term-time"] .tt-profile-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 4px;
}

html[data-ui="term-time"] .tt-profile-chips .tt-chip {
    align-self: auto;
}

@media (max-width: 575.98px) {
    html[data-ui="term-time"] .tt-profile-actions,
    html[data-ui="term-time"] .tt-profile-actions .btn {
        width: 100%;
    }
}

/* Sign in: this page has no app shell, so it uses the public page's colours */
.tt-login {
    background: linear-gradient(180deg, color-mix(in srgb, var(--tp-petrol) 26%, var(--tp-ground)) 0, color-mix(in srgb, var(--tp-petrol) 8%, var(--tp-ground)) 340px, var(--tp-ground) 620px);
    background-attachment: scroll;
}

.tt-login .tp-split {
    align-items: center;
    justify-content: center;
    gap: 40px;
    max-width: 1160px;
    margin-inline: auto;
    padding: 32px 16px;
}

.tt-login .tp-split-brand {
    flex: 1 1 420px;
    gap: 24px;
    padding: 0 16px;
    background: transparent;
    color: var(--tp-ink);
}

.tt-login .tp-split-brand .tp-wordmark {
    color: var(--tp-petrol-deep);
}

.tt-login .tp-split-brand h2 {
    color: var(--tp-petrol-deep);
    font-size: clamp(32px, 4vw, 52px);
}

.tt-login .tp-split-brand li::before {
    color: var(--tp-leaf-deep);
}

.tt-login .tp-split-main {
    flex: 0 1 460px;
    width: 100%;
    padding: 0;
    background: transparent;
}

.tt-login .tp-split-main > .tp-form {
    width: 100%;
    max-width: none;
    padding: 28px 24px;
    border-radius: 28px;
    background: #FFFFFF;
    box-shadow: 0 12px 36px rgba(16, 36, 46, 0.08);
}

.tt-login h1 {
    margin-bottom: 0;
    font-size: 30px;
    font-weight: 700;
}

.tt-login-sub {
    margin: 0 0 8px;
}

.tt-login .tp-field input {
    min-height: 52px;
    border-radius: 999px;
    padding-inline: 20px;
}

.tt-login .tp-password button {
    border-radius: 999px;
}

.tt-login .tp-btn-block {
    min-height: 56px;
    border-radius: 999px;
    font-size: 17px;
}

.tt-login .tp-foot {
    border-top: 0;
}

@media (max-width: 991.98px) {
    .tt-login .tp-split-brand {
        flex: 1 1 100%;
        align-items: center;
        text-align: center;
    }

    .tt-login .tp-split-brand ul {
        display: none;
    }

    .tt-login .tp-split-brand h2 {
        font-size: 24px;
    }

    .tt-login .tp-split {
        gap: 20px;
        padding-top: 40px;
    }
}

/* Sign in and small screens, after a look at the pages */
.tt-login .tp-split-brand ul,
.tt-login .tp-split-brand li {
    color: var(--tp-ink);
}

@media (max-width: 575.98px) {
    html[data-ui="term-time"] .tt-person-row {
        flex-wrap: wrap;
    }

    html[data-ui="term-time"] .tt-person-link {
        flex-basis: 100%;
    }

    html[data-ui="term-time"] .tt-person-side {
        flex: 1;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding-left: 60px;
    }
}

/* The assistant button moves up so it does not sit on the save pill */
html[data-ui="term-time"] body:has(.tt-savefoot) #aiChatWidget {
    bottom: 150px !important;
}

/* ---------- Pages: end ---------- */

/* ---------- Dashboards: every role's home page ---------- */
html[data-ui="term-time"] .tt-home-ribbon .tt-ribbon {
    width: 100%;
}

/* The shell's top bar carries the ribbon on a phone */
@media (max-width: 991.98px) {
    html[data-ui="term-time"] .tt-home-ribbon {
        display: none !important;
    }
}

html[data-ui="term-time"] .tt-head a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
}

html[data-ui="term-time"] .tt-head a:focus-visible,
html[data-ui="term-time"] .tt-home-chart summary:focus-visible,
html[data-ui="term-time"] .tt-home-chips > a:focus-visible {
    outline: 3px solid var(--bs-primary);
    outline-offset: 2px;
}

html[data-ui="term-time"] .tt-home-chips > a {
    min-height: 44px;
}

html[data-ui="term-time"] .tt-home-between {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 4px 12px;
}

html[data-ui="term-time"] .tt-home-hero {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
}

html[data-ui="term-time"] .tt-home-hero-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

html[data-ui="term-time"] .tt-home-hero .tt-tile {
    width: 72px;
    height: 72px;
    border-radius: 20px;
    font-size: 34px;
    background: var(--tt-surface);
    color: var(--bs-primary);
}

html[data-ui="term-time"] .tt-home-hero .btn {
    margin-top: 6px;
}

html[data-ui="term-time"] .tt-herocard .tt-figure {
    overflow-wrap: anywhere;
}

html[data-ui="term-time"] .tt-home-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
}

html[data-ui="term-time"] .tt-home-stat {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 16px;
    border-radius: var(--tt-card-radius);
    background: var(--tt-surface);
    min-width: 0;
}

html[data-ui="term-time"] .tt-home-stat strong {
    color: var(--tt-ink);
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

html[data-ui="term-time"] .tt-home-overview {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

html[data-ui="term-time"] .tt-home-overview h2,
html[data-ui="term-time"] .tt-home-chart h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
}

html[data-ui="term-time"] .tt-home-meter {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

html[data-ui="term-time"] .tt-home-ringrow {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 18px;
}

html[data-ui="term-time"] .tt-home-ringrow > div:last-child {
    flex: 1 1 160px;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

html[data-ui="term-time"] .tt-home-rate {
    display: grid;
    grid-template-columns: minmax(0, 110px) minmax(0, 1fr) 44px;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    font-weight: 500;
}

html[data-ui="term-time"] .tt-home-rate > strong {
    text-align: right;
}

html[data-ui="term-time"] .tt-rowlink.is-static:hover {
    color: var(--tt-ink);
}

html[data-ui="term-time"] .tt-rowlink-text > strong,
html[data-ui="term-time"] .tt-rowlink-text > span {
    display: block;
    overflow-wrap: anywhere;
}

html[data-ui="term-time"] .tt-rowlink-text > span {
    font-size: 14px;
    font-weight: 450;
    color: var(--tt-slate);
}

html[data-ui="term-time"] .tt-slot {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    border-radius: 14px;
}

html[data-ui="term-time"] .tt-slot.is-next {
    background: var(--bs-primary-light);
}

html[data-ui="term-time"] .tt-slot-time {
    flex: none;
    width: 74px;
    font-size: 14px;
    font-weight: 600;
    color: var(--tt-slate);
}

html[data-ui="term-time"] .tt-slot-text {
    flex: 1;
    min-width: 0;
}

html[data-ui="term-time"] .tt-slot-text strong,
html[data-ui="term-time"] .tt-slot-text span {
    display: block;
    overflow-wrap: anywhere;
}

html[data-ui="term-time"] .tt-slot-text span {
    font-size: 14px;
    color: var(--tt-slate);
}

html[data-ui="term-time"] .tt-home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

html[data-ui="term-time"] .tt-home-actions > * {
    flex: 1 1 130px;
}

html[data-ui="term-time"] .tt-home-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 44px;
}

/* Status always carries an icon and a word, never colour alone */
html[data-ui="term-time"] .tt-home-status {
    display: inline-flex;
    align-items: center;
    align-self: flex-start;
    gap: 5px;
    padding: 3px 12px 3px 9px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

html[data-ui="term-time"] .tt-home-status i {
    color: inherit;
    font-size: 15px;
}

html[data-ui="term-time"] .tt-home-status.is-good { background: #E8F4E0; color: #205E1E; }
html[data-ui="term-time"] .tt-home-status.is-warn { background: #FDF1DC; color: #8A5A00; }
html[data-ui="term-time"] .tt-home-status.is-bad { background: #FBEAE8; color: #A1221B; }
html[data-ui="term-time"] .tt-home-status.is-plain { background: #EEF1EE; color: var(--tt-slate); }

html[data-ui="term-time"] .tt-home-times {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

html[data-ui="term-time"] .tt-home-times > div {
    padding: 12px;
    border-radius: 14px;
    background: var(--tt-surface);
}

html[data-ui="term-time"] .tt-home-times span {
    display: block;
    font-size: 13px;
    color: var(--tt-slate);
}

html[data-ui="term-time"] .tt-home-times strong {
    font-size: 18px;
}

html[data-ui="term-time"] .tt-home-stop {
    display: flex;
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid #EEF1EE;
}

html[data-ui="term-time"] .tt-home-stop:first-child {
    border-top: 0;
}

html[data-ui="term-time"] .tt-home-stop-no {
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-primary-light);
    color: var(--bs-primary);
    font-weight: 700;
    font-size: 14px;
}

html[data-ui="term-time"] .tt-home-stop-text {
    flex: 1;
    min-width: 0;
}

html[data-ui="term-time"] .tt-home-stop-text ul {
    margin: 6px 0 0;
    padding: 0;
    list-style: none;
    font-size: 14px;
    color: var(--tt-slate);
}

html[data-ui="term-time"] .tt-home-chart {
    display: flex !important;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

html[data-ui="term-time"] .tt-home-chart-plot {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

html[data-ui="term-time"] .tt-home-chart summary {
    display: flex;
    align-items: center;
    min-height: 44px;
    font-size: 14px;
    font-weight: 600;
    color: var(--bs-primary);
    cursor: pointer;
}

html[data-ui="term-time"] .tt-home-chart table {
    width: 100%;
    font-size: 14px;
}

html[data-ui="term-time"] .tt-home-chart th,
html[data-ui="term-time"] .tt-home-chart td {
    padding: 6px 4px;
    border-top: 1px solid #EEF1EE;
    font-weight: 500;
}

html[data-ui="term-time"] .tt-home-chart thead th {
    border-top: 0;
    color: var(--tt-slate);
    font-weight: 600;
}

html[data-ui="term-time"] .tt-home-chart .is-number {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

html[data-ui="term-time"] .tt-home-chart .apexcharts-tooltip {
    border: 0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(16, 36, 46, 0.16);
}

html[data-ui="term-time"] .tt-home-between > .tt-home-status {
    align-self: center;
}

@media (min-width: 992px) {
    html[data-ui="term-time"] .tt-home .tt-quick {
        flex-wrap: wrap;
    }
}

/* ---------- Dashboards: end ---------- */

/* The assistant button floats bottom right: keep it smaller and leave room under the last row */
html[data-ui="term-time"] #kt_app_content {
    padding-bottom: 104px !important;
}

@media (max-width: 991.98px) {
    html[data-ui="term-time"] #aiChatWidget {
        right: 12px !important;
        bottom: 12px !important;
        transform: scale(0.82);
        transform-origin: bottom right;
    }
}

/* ---------- Student wizard: Views/TermTime/Students/Create and Teachers/Create, script js/term-time-wizard.js ---------- */
/* Without JavaScript every step shows, one under the other; .is-wizard turns on one step at a time */
html[data-ui="term-time"] .tt-wiz {
    display: flex;
    flex-direction: column;
    gap: 16px;
    max-width: 980px;
}

html[data-ui="term-time"] .tt-wiz:not(.is-wizard) .tt-wiz-js {
    display: none !important;
}

html[data-ui="term-time"] .tt-wiz-step[hidden] {
    display: none !important;
}

html[data-ui="term-time"] .tt-wiz .tt-card.tt-wiz-step {
    padding: 22px;
}

html[data-ui="term-time"] .tt-req {
    color: var(--tt-danger);
    font-weight: 700;
}

html[data-ui="term-time"] .tt-wiz-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    border-radius: 18px;
    background: color-mix(in srgb, var(--tt-danger) 9%, var(--tt-surface));
    color: var(--tt-danger);
    font-weight: 600;
}

html[data-ui="term-time"] .tt-wiz-alert i {
    color: inherit;
}

/* Step marks: numbered circles joined by a line; names show beside them on wider screens */
html[data-ui="term-time"] .tt-wiz-steps ol {
    display: flex;
    margin: 0;
    padding: 6px;
    list-style: none;
    border-radius: 26px;
    background: var(--tt-surface);
}

html[data-ui="term-time"] .tt-wiz-steps li {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
}

html[data-ui="term-time"] .tt-wiz-steps li:first-child {
    flex: none;
}

html[data-ui="term-time"] .tt-wiz-steps li + li::before {
    content: "";
    flex: 1 1 8px;
    min-width: 6px;
    height: 2px;
    margin-inline: 4px;
    background: var(--tt-line);
}

html[data-ui="term-time"] .tt-wiz-mark {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--tt-slate);
    font-weight: 500;
    cursor: pointer;
}

html[data-ui="term-time"] .tt-wiz-num {
    flex: none;
    width: 36px;
    height: 36px;
    margin: 4px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--tt-line);
    background: var(--tt-surface);
    font-weight: 700;
}

html[data-ui="term-time"] .tt-wiz-name {
    display: none;
    padding-right: 12px;
    white-space: nowrap;
}

html[data-ui="term-time"] .tt-wiz-mark.is-done .tt-wiz-num {
    border-color: var(--bs-primary-light);
    background: var(--bs-primary-light);
    color: var(--bs-primary);
}

html[data-ui="term-time"] .tt-wiz-mark.is-now .tt-wiz-num {
    border-color: var(--bs-primary);
    background: var(--bs-primary);
    color: var(--tt-surface);
}

html[data-ui="term-time"] .tt-wiz-mark.is-now {
    color: var(--tt-ink);
    font-weight: 700;
}

html[data-ui="term-time"] .tt-wiz-mark:hover .tt-wiz-num {
    border-color: var(--bs-primary);
}

html[data-ui="term-time"] .tt-wiz-mark:focus-visible,
html[data-ui="term-time"] .tt-wiz-edit:focus-visible {
    outline: 3px solid var(--bs-primary);
    outline-offset: 2px;
}

@media (min-width: 1100px) {
    html[data-ui="term-time"] .tt-wiz-name {
        display: inline;
    }

    html[data-ui="term-time"] .tt-wiz-steps li + li {
        flex: 1 1 auto;
    }
}

/* One step */
html[data-ui="term-time"] .tt-wiz-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
}

html[data-ui="term-time"] .tt-wiz-head h2 {
    margin: 0;
    font-size: 21px;
    font-weight: 700;
    color: var(--tt-ink);
}

html[data-ui="term-time"] .tt-wiz-head h2:focus {
    outline: none;
}

html[data-ui="term-time"] .tt-wiz-head h2:focus-visible {
    outline: 3px solid var(--bs-primary);
    outline-offset: 4px;
    border-radius: 6px;
}

html[data-ui="term-time"] .tt-wiz:not(.is-wizard) .tt-wiz-kicker {
    display: none;
}

html[data-ui="term-time"] .tt-wiz-kicker {
    margin: 0 0 2px;
    color: var(--tt-slate);
    font-size: 13px;
    font-weight: 600;
}

html[data-ui="term-time"] .tt-wiz-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
}

@media (min-width: 768px) {
    html[data-ui="term-time"] .tt-wiz-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px 22px;
    }

    html[data-ui="term-time"] .tt-wiz-wide {
        grid-column: 1 / -1;
    }
}

html[data-ui="term-time"] .tt-wiz .tt-field .form-control,
html[data-ui="term-time"] .tt-wiz .tt-field .form-select,
html[data-ui="term-time"] .tt-wiz .tt-field .select2-container .select2-selection {
    min-height: 48px;
    background-color: var(--tt-surface);
    color: var(--tt-ink);
}

html[data-ui="term-time"] .tt-wiz .tt-field textarea.form-control {
    min-height: 76px;
}

html[data-ui="term-time"] .tt-wiz .tt-field .select2-container .select2-selection--single {
    display: flex;
    align-items: center;
}

html[data-ui="term-time"] .tt-wiz .input-validation-error,
html[data-ui="term-time"] .tt-wiz .input-validation-error + .select2-container .select2-selection {
    border-color: var(--tt-danger) !important;
}

html[data-ui="term-time"] .tt-wiz-error {
    color: var(--tt-danger);
    font-size: 14px;
    font-weight: 600;
}

html[data-ui="term-time"] .tt-wiz-error:empty {
    display: none;
}

html[data-ui="term-time"] .tt-wiz-note {
    color: var(--tt-danger);
    font-weight: 600;
}

html[data-ui="term-time"] .tt-wiz-photo {
    display: flex;
    align-items: center;
    gap: 16px;
}

html[data-ui="term-time"] .tt-wiz-photo-input {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

html[data-ui="term-time"] .tt-wiz-photo .tt-avatar i {
    color: inherit;
}

/* Back and Next */
html[data-ui="term-time"] .tt-wiz-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 24px;
}

html[data-ui="term-time"] .tt-wiz:not(.is-wizard) .tt-wiz-nav {
    justify-content: flex-end;
}

html[data-ui="term-time"] .tt-wiz-nav .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

html[data-ui="term-time"] .tt-wiz-nav .btn i {
    color: inherit;
}

html[data-ui="term-time"] .tt-wiz-back {
    background: var(--tt-ground) !important;
    color: var(--tt-ink) !important;
}

/* Edit wizards: Save changes sits beside Next on every step */
html[data-ui="term-time"] .tt-wiz-nav-end {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

html[data-ui="term-time"] .tt-wiz-status {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--tt-ground);
}

@media (max-width: 575.98px) {
    html[data-ui="term-time"] .tt-wiz-nav:has(.tt-wiz-nav-end) {
        flex-wrap: wrap;
    }

    html[data-ui="term-time"] .tt-wiz-nav .tt-wiz-nav-end {
        flex: 1 1 100%;
        order: -1;
    }
}

@media (max-width: 575.98px) {
    html[data-ui="term-time"] .tt-wiz .tt-card.tt-wiz-step {
        padding: 18px 16px;
    }

    html[data-ui="term-time"] .tt-wiz-nav .btn {
        flex: 1 1 0;
        padding-inline: 14px;
    }

    html[data-ui="term-time"] .tt-wiz-nav > span:empty {
        display: none;
    }
}

/* Review */
html[data-ui="term-time"] .tt-wiz-summary.validation-summary-valid {
    display: none;
}

html[data-ui="term-time"] .tt-wiz-summary.validation-summary-errors {
    margin-bottom: 18px;
    padding: 14px 18px;
    border-radius: 18px;
    background: color-mix(in srgb, var(--tt-danger) 9%, var(--tt-surface));
    color: var(--tt-danger);
    font-weight: 600;
}

html[data-ui="term-time"] .tt-wiz-summary ul {
    margin: 0;
    padding-left: 18px;
}

html[data-ui="term-time"] .tt-wiz-review {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
}

@media (min-width: 992px) {
    html[data-ui="term-time"] .tt-wiz-review {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

html[data-ui="term-time"] .tt-wiz-group {
    padding: 14px 18px;
    border-radius: 18px;
    background: var(--tt-ground);
}

html[data-ui="term-time"] .tt-wiz-group h3 {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

html[data-ui="term-time"] .tt-wiz-edit {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 44px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: var(--tt-surface);
    color: var(--bs-primary);
    font-weight: 600;
    cursor: pointer;
}

html[data-ui="term-time"] .tt-wiz-edit i {
    color: inherit;
}

html[data-ui="term-time"] .tt-wiz-group dl {
    margin: 8px 0 0;
}

html[data-ui="term-time"] .tt-wiz-group dl > div {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 12px;
    padding: 7px 0;
    border-top: 1px solid var(--tt-line);
}

html[data-ui="term-time"] .tt-wiz-group dt {
    color: var(--tt-slate);
    font-weight: 500;
}

html[data-ui="term-time"] .tt-wiz-group dd {
    margin: 0;
    color: var(--tt-ink);
    font-weight: 600;
    overflow-wrap: anywhere;
    white-space: pre-line;
}

html[data-ui="term-time"] .tt-wiz-group dd.is-empty {
    color: var(--tt-slate);
    font-weight: 450;
}

html[data-ui="term-time"] .tt-wiz-group .has-error dt,
html[data-ui="term-time"] .tt-wiz-group .has-error dd {
    color: var(--tt-danger);
}
/* ---------- Student wizard: end ---------- */


/* ---------- Side menu ---------- */
html[data-ui="term-time"] .app-sidebar {
    background: linear-gradient(180deg, var(--tt-petrol, #1B4965) 0%, var(--tt-petrol-deep) 100%) !important;
    box-shadow: 0 10px 30px rgba(16, 36, 46, 0.18);
}

html[data-ui="term-time"] #kt_app_sidebar_navs > .separator {
    display: none;
}

html[data-ui="term-time"] .tt-side-top {
    display: flex !important;
    flex-direction: column;
    gap: 12px;
    padding: 16px 14px 6px !important;
    flex: none;
}

html[data-ui="term-time"] .tt-side-head {
    display: flex;
    align-items: center;
    gap: 8px;
}

html[data-ui="term-time"] .tt-side-school {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px;
    border-radius: 16px;
    text-decoration: none;
}

html[data-ui="term-time"] .tt-side-logo {
    flex: none;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: #FFFFFF;
    overflow: hidden;
}

html[data-ui="term-time"] .tt-side-logo img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

html[data-ui="term-time"] .tt-side-school-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

html[data-ui="term-time"] .tt-side-school-text strong {
    color: #FFFFFF;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

html[data-ui="term-time"] .tt-side-plan {
    align-self: flex-start;
    padding: 2px 9px;
    border-radius: 999px;
    background: rgba(244, 168, 54, 0.18);
    color: #F8C77A;
    font-size: 11.5px;
    font-weight: 600;
}

html[data-ui="term-time"] .tt-side-collapse,
html[data-ui="term-time"] .tt-side-signout button {
    flex: none;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #DCE6EA;
    cursor: pointer;
}

html[data-ui="term-time"] .tt-side-signout button {
    display: inline-flex;
}

html[data-ui="term-time"] .tt-side-collapse i,
html[data-ui="term-time"] .tt-side-signout i {
    font-size: 18px;
    color: inherit;
}

html[data-ui="term-time"] .tt-side-collapse:hover,
html[data-ui="term-time"] .tt-side-signout button:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #FFFFFF;
}

html[data-ui="term-time"] .tt-side-search {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    padding: 0 12px 0 14px;
    min-height: 44px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

html[data-ui="term-time"] .tt-side-search:focus-within {
    background: rgba(255, 255, 255, 0.14);
    outline: 2px solid rgba(255, 255, 255, 0.55);
}

html[data-ui="term-time"] .tt-side-search i {
    color: #B7C9D1;
    font-size: 18px;
}

html[data-ui="term-time"] .tt-side-search input {
    flex: 1;
    min-width: 0;
    min-height: 44px;
    border: 0;
    outline: 0;
    background: transparent;
    color: #FFFFFF;
    font-size: 14.5px;
}

html[data-ui="term-time"] .tt-side-search input::placeholder {
    color: #B7C9D1;
}

html[data-ui="term-time"] .tt-side-search kbd {
    padding: 1px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.12);
    color: #DCE6EA;
    font-family: inherit;
    font-size: 12px;
    box-shadow: none;
}

html[data-ui="term-time"] .tt-side-empty {
    margin: 0;
    padding: 0 6px;
    color: #B7C9D1;
    font-size: 13.5px;
}

/* Section headings */
html[data-ui="term-time"] .app-sidebar .tt-side-section {
    padding: 16px 14px 6px;
}

html[data-ui="term-time"] .app-sidebar .tt-side-section span {
    color: #8FA9B4;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
}

html[data-ui="term-time"] .app-sidebar .tt-side-section[hidden],
html[data-ui="term-time"] .app-sidebar [data-side-item][hidden],
html[data-ui="term-time"] .app-sidebar [data-side-group][hidden] {
    display: none !important;
}

/* Items */
html[data-ui="term-time"] .app-sidebar .menu-item .menu-link {
    min-height: 46px;
    margin: 1px 6px;
    padding: 5px 10px !important;
    gap: 2px;
    border-radius: 16px !important;
    color: #E7EEF0;
}

html[data-ui="term-time"] .app-sidebar .menu-item .menu-link .menu-icon {
    flex: none;
    width: 34px;
    height: 34px;
    margin-right: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.08);
}

html[data-ui="term-time"] .app-sidebar .menu-item .menu-link .menu-icon i {
    font-size: 18px !important;
    color: #DCE6EA;
}

html[data-ui="term-time"] .app-sidebar .menu-item .menu-link .menu-title {
    font-size: 14.5px;
    font-weight: 500;
}

html[data-ui="term-time"] .app-sidebar .menu-item .menu-link:hover:not(.active) {
    background: rgba(255, 255, 255, 0.07) !important;
    color: #FFFFFF;
}

html[data-ui="term-time"] .app-sidebar .menu-item.here > .menu-link {
    background: rgba(255, 255, 255, 0.06) !important;
}

html[data-ui="term-time"] .app-sidebar .menu-item .menu-link.active {
    background: #FFFFFF !important;
    border-radius: 16px !important;
}

html[data-ui="term-time"] .app-sidebar .menu-item .menu-link.active .menu-title {
    color: var(--tt-ink) !important;
    font-weight: 700;
}

html[data-ui="term-time"] .app-sidebar .menu-item .menu-link.active .menu-icon {
    background: var(--bs-primary-light);
}

html[data-ui="term-time"] .app-sidebar .menu-item .menu-link.active .menu-icon i {
    color: var(--bs-primary) !important;
}

/* Pages inside a menu hang off a thin guide line */
html[data-ui="term-time"] .app-sidebar .menu-sub-accordion {
    position: relative;
    margin: 2px 0 6px 28px;
    padding-left: 8px;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
}

html[data-ui="term-time"] .app-sidebar .menu-sub .menu-item .menu-link {
    min-height: 40px;
    margin: 1px 6px 1px 4px;
    padding: 5px 12px !important;
    border-left: 0;
}

html[data-ui="term-time"] .app-sidebar .menu-sub .menu-item .menu-link .menu-title {
    font-size: 14px;
    color: #C9D6DC;
}

html[data-ui="term-time"] .app-sidebar .menu-sub .menu-item .menu-link:hover .menu-title {
    color: #FFFFFF;
}

html[data-ui="term-time"] .app-sidebar .menu-sub .menu-item .menu-link.active .menu-title {
    color: var(--tt-ink) !important;
}

html[data-ui="term-time"] .app-sidebar .tt-nav-section-label {
    color: #8FA9B4;
    font-size: 11.5px;
}

/* A search opens every group that has a match */
html[data-ui="term-time"] .app-sidebar .tt-side-searching > .menu-sub {
    display: flex !important;
    flex-direction: column;
}

html[data-ui="term-time"] .tt-side-badge {
    margin-left: auto;
    min-width: 22px;
    height: 22px;
    padding: 0 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: var(--tt-gold);
    color: var(--tt-ink);
    font-size: 11.5px;
    font-weight: 700;
}

html[data-ui="term-time"] .tt-side-badge[hidden] {
    display: none;
}

html[data-ui="term-time"] .app-sidebar .menu-link .tt-side-badge + .menu-arrow {
    margin-left: 6px;
}

/* Signed-in person */
html[data-ui="term-time"] .tt-side-user {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.07);
}

html[data-ui="term-time"] .tt-side-me {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    border-radius: 14px;
}

html[data-ui="term-time"] .tt-side-avatar {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--bs-primary-light);
    color: var(--bs-primary);
    font-size: 14px;
    font-weight: 700;
}

html[data-ui="term-time"] .tt-side-me-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

html[data-ui="term-time"] .tt-side-me-text strong {
    color: #FFFFFF;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

html[data-ui="term-time"] .tt-side-me-text span {
    color: #B7C9D1;
    font-size: 12.5px;
}

html[data-ui="term-time"] .tt-side-signout {
    margin: 0;
}

html[data-ui="term-time"] .tt-side-school:focus-visible,
html[data-ui="term-time"] .tt-side-me:focus-visible,
html[data-ui="term-time"] .tt-side-collapse:focus-visible,
html[data-ui="term-time"] .tt-side-signout button:focus-visible {
    outline: 3px solid #FFFFFF;
    outline-offset: 2px;
}

/* Collapsed: icons only, on a desktop */
@media (min-width: 992px) {
    html[data-ui="term-time"] body.tt-side-mini {
        --bs-app-sidebar-width: 128px !important;
        --bs-app-sidebar-width-actual: 128px !important;
    }

    html[data-ui="term-time"] body.tt-side-mini .app-sidebar {
        width: 96px !important;
    }

    html[data-ui="term-time"] body.tt-side-mini .tt-side-school-text,
    html[data-ui="term-time"] body.tt-side-mini .tt-side-search,
    html[data-ui="term-time"] body.tt-side-mini .tt-side-empty,
    html[data-ui="term-time"] body.tt-side-mini .tt-side-section,
    html[data-ui="term-time"] body.tt-side-mini .app-sidebar .menu-title,
    html[data-ui="term-time"] body.tt-side-mini .app-sidebar .menu-arrow,
    html[data-ui="term-time"] body.tt-side-mini .app-sidebar .menu-sub,
    html[data-ui="term-time"] body.tt-side-mini .app-sidebar .lock-icon,
    html[data-ui="term-time"] body.tt-side-mini .app-sidebar .tt-side-badge,
    html[data-ui="term-time"] body.tt-side-mini .tt-side-me-text {
        display: none !important;
    }

    html[data-ui="term-time"] body.tt-side-mini .tt-side-head {
        flex-direction: column;
    }

    html[data-ui="term-time"] body.tt-side-mini .tt-side-collapse i {
        transform: rotate(180deg);
    }

    html[data-ui="term-time"] body.tt-side-mini .app-sidebar .menu-item .menu-link {
        justify-content: center;
        padding: 5px !important;
    }

    html[data-ui="term-time"] body.tt-side-mini .app-sidebar .menu-item .menu-link .menu-icon {
        margin-right: 0;
    }

    html[data-ui="term-time"] body.tt-side-mini .tt-side-user {
        flex-direction: column;
        background: transparent;
        padding: 0;
    }

    html[data-ui="term-time"] .app-sidebar,
    html[data-ui="term-time"] #kt_app_wrapper {
        transition: width 0.2s ease, margin-left 0.2s ease;
    }
}

@media (prefers-reduced-motion: reduce) {
    html[data-ui="term-time"] .app-sidebar,
    html[data-ui="term-time"] #kt_app_wrapper {
        transition: none !important;
    }
}

/* The slash hint gives way to the clear button once something is typed */
html[data-ui="term-time"] .tt-side-search input:not(:placeholder-shown) + kbd {
    display: none;
}

/* ---------- Side menu: end ---------- */

/* ---------- Web clock-in and driver trips (home) ---------- */
html[data-ui="term-time"] .tt-home-times[hidden] {
    display: none;
}

html[data-ui="term-time"] .tt-clock,
html[data-ui="term-time"] .tt-trip {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

html[data-ui="term-time"] .tt-clock .btn-tt-main,
html[data-ui="term-time"] .tt-trip-end .btn-tt-main {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
}

html[data-ui="term-time"] .tt-clock .btn-tt-main i {
    color: inherit;
    font-size: 20px;
}

/* Result of the last tap; an icon-free sentence, so it carries words not colour alone */
html[data-ui="term-time"] .tt-clock-msg {
    margin: 0;
    font-weight: 600;
    color: var(--tt-ink);
}

/* Stays in the page while empty so screen readers announce the next message; this only cancels the gap */
html[data-ui="term-time"] .tt-clock-msg:empty {
    margin-top: -10px;
}

html[data-ui="term-time"] .tt-clock-msg.is-good { color: #205E1E; }
html[data-ui="term-time"] .tt-clock-msg.is-bad { color: #A1221B; }

html[data-ui="term-time"] .tt-trip-end {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

html[data-ui="term-time"] .tt-trip-end .tt-field {
    flex: 1 1 160px;
    margin: 0;
}

html[data-ui="term-time"] .tt-trip-end .btn-tt-main {
    flex: 1 1 200px;
    width: auto;
}

html[data-ui="term-time"] .tt-trip-discard {
    align-self: flex-start;
}

html[data-ui="term-time"] .tt-trip-discard .btn {
    min-height: 44px;
}

/* ---------- Web clock-in and driver trips: end ---------- */
