@import url('./ife-fonts.css');

:root {
    --ife-blue: #011e80;
    --ife-blue-hover: #00145d;
    --ife-violet: #4943cb;
    --ife-lilac: #a28aff;
    --ife-green: #21b481;
    --ife-yellow: #f4b400;
    --ife-ink: #001832;
    --ife-muted: #56657b;
    --ife-line: #dce2eb;
    --ife-canvas: #f4f6fa;
    --ife-soft: #eef0fc;
    --ife-radius: 12px;
    --ife-sidebar: 272px;
    --ife-body: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
    --ife-heading: 'Source Serif 4', Georgia, serif;
}

body { font-family: var(--ife-body); color: var(--ife-ink); font-size: .9375rem; line-height: 1.55; background: var(--ife-canvas); }
::selection { background: #dcd4ff; color: var(--ife-ink); }
input, textarea { caret-color: var(--ife-violet); }
a { color: var(--ife-blue); text-underline-offset: 3px; }
a:hover { color: var(--ife-violet); }
:focus-visible { outline: 3px solid var(--ife-violet); outline-offset: 3px; }
.text-dark, .text-primary { color: var(--ife-ink) !important; }
.text-primary { color: var(--ife-blue) !important; }
.text-muted, .text-secondary { color: var(--ife-muted) !important; }
.text-success { color: #08744f !important; }
.text-info { color: var(--ife-violet) !important; }
.text-danger, .text-red { color: #ac2839 !important; }
.text-warning { color: #7d5b00 !important; }
.small, small { font-size: .8125rem; }
.font-weight-bold, strong, b { font-weight: 600 !important; }
.h4, h4 { font-size: 1.1875rem; }
.h5, h5 { font-size: 1.0625rem; }
.shadow-sm, .elevation-4, .elevation-3, .elevation-2 { box-shadow: none !important; }

/* The supplied black logo always sits on white, at its original proportions. */
.main-sidebar, .main-sidebar::before { width: var(--ife-sidebar); }
.main-sidebar { background: var(--ife-blue); box-shadow: none; border-right: 0; }
.main-sidebar .brand-link { width: 100%; height: 110px; padding: 20px 22px; background: white; border: 0; display: flex; align-items: center; justify-content: center; }
.ife-logo { width: 224px; height: auto; max-width: 100%; max-height: 70px; object-fit: contain; display: block; }
.main-sidebar .sidebar { padding: 0 16px 24px; height: calc(100vh - 110px); overflow-y: auto; }
.ife-product-name { display: flex; align-items: center; justify-content: space-between; padding: 23px 12px 18px; color: white; border-bottom: 1px solid #ffffff30; margin-bottom: 16px; }
.ife-product-name strong { font-size: 1.6rem; font-weight: 700 !important; letter-spacing: -.035em; }
.ife-product-name span { font-size: .75rem; color: #d6dfff; }
.main-sidebar .user-panel { padding: 20px 12px 0; border-top: 1px solid #ffffff30; border-bottom: 0; margin: 24px 0 0 !important; }
.main-sidebar .user-panel > span { color: white; overflow-wrap: anywhere; }
.main-sidebar .user-panel .text-muted { color: #c7d2f4 !important; font-size: .8125rem !important; margin-top: 4px; }
.nav-sidebar > .nav-header { padding: 20px 12px 8px; color: #c7d2f4; font-size: .75rem; font-weight: 500; }
.nav-sidebar .nav-item { width: 100%; }
.nav-sidebar > .nav-item > .nav-link { width: 100%; padding: .8rem .75rem; margin-bottom: 4px; border-radius: 8px; color: #e7edff; font-size: .9375rem; transition: background-color 160ms ease-out, color 160ms ease-out; }
.nav-sidebar .nav-link .nav-icon { font-size: .95rem !important; width: 1.25rem; margin-right: 12px; }
.nav-sidebar > .nav-item > .nav-link:hover { background: #ffffff15; color: white; }
.nav-sidebar > .nav-item > .nav-link.active { background: #e9e4ff !important; color: #211b75 !important; box-shadow: none !important; font-weight: 600; }
.nav-sidebar .nav-link p { margin: 0; }
.ife-app .main-header, .ife-app .content-wrapper, .ife-app .main-footer { margin-left: var(--ife-sidebar) !important; transition: none; }
.main-header { min-height: 72px; border-bottom: 1px solid var(--ife-line); padding: 12px 32px; background: white; gap: 12px; }
.main-header .navbar-nav { align-items: center; }
.main-header .nav-link { color: var(--ife-ink); height: auto; }
.ife-topbar-name { color: var(--ife-ink); font-weight: 600; font-size: .9375rem; padding-left: 12px; }
.ife-topbar-divider { color: #bbc5d4; padding: 0 12px; }
.ife-topbar-section { color: var(--ife-muted); font-size: .8125rem; }
.user-menu > .nav-link { background: var(--ife-canvas); border-radius: 8px; padding: 9px 12px !important; font-size: .8125rem; max-width: 280px; }
.user-menu > .nav-link span { overflow-wrap: anywhere; }
.user-menu .fa-chevron-down { font-size: .65rem; color: var(--ife-muted); }
.user-menu .dropdown-menu { padding: 8px; }
.user-menu .user-footer { background: white; padding: 4px; display: flex; flex-direction: column; gap: 6px; }
.user-menu .user-footer .btn { margin: 0 !important; width: 100%; float: none !important; text-align: left; }
.content-wrapper { background: var(--ife-canvas); }
.content-header { padding: 28px 32px 20px; }
.content-header h1 { font-family: var(--ife-heading); font-weight: 500; font-size: 1.875rem; line-height: 1.2; letter-spacing: -.025em; overflow-wrap: anywhere; }
.content-wrapper > .content { padding: 0 32px 32px; }
.content-header .container-fluid, .content > .container-fluid { padding: 0; }
.content > .container-fluid > p { max-width: 75ch; }
.ife-page-note { color: var(--ife-muted); margin: 10px 0 0; max-width: 70ch; font-size: .9375rem; }
.ife-workspace-footer { color: var(--ife-muted); font-size: .75rem; padding: 32px 0 0; margin-top: 12px; }

/* One component vocabulary across all roles, forms and legacy views. */
.card { border: 1px solid var(--ife-line); border-radius: var(--ife-radius); box-shadow: none; background: white; margin-bottom: 24px; }
.card.card-outline { border-top: 1px solid var(--ife-line); }
.card-header { padding: 20px 24px; border-bottom: 1px solid var(--ife-line); background: transparent; border-radius: 12px 12px 0 0 !important; }
.card-header > .card-title { float: none; }
.card-header.d-flex, .card-header > .d-flex { gap: 16px; flex-wrap: wrap; }
.card-title { font-size: 1.0625rem; line-height: 1.4; font-weight: 600; margin: 0; }
.card-body { padding: 24px; }
.card-footer { background: #f9fafc; padding: 18px 24px; border-top: 1px solid var(--ife-line); border-radius: 0 0 12px 12px !important; }
.card-body > p, .modal-body > p { overflow-wrap: anywhere; }
.card-body .row > div, .form-row > div { min-width: 0; }
.card-body form > .row { row-gap: 4px; }
.card-footer .btn-block { width: auto; min-width: 180px; }
.btn { border-radius: 7px; font-size: .875rem; font-weight: 500; padding: .65rem 1rem; line-height: 1.25; min-height: 42px; box-shadow: none !important; transition: background-color 160ms ease-out, border-color 160ms ease-out; white-space: normal; }
.btn-sm { font-size: .8125rem; padding: .5rem .75rem; min-height: 34px; }
.btn-flat { border-radius: 7px; }
.btn-link { color: var(--ife-blue); }
.btn-link:hover { color: var(--ife-violet); }
.btn-primary { color: white; background: var(--ife-blue); border-color: var(--ife-blue); }
.btn-primary:hover, .btn-primary:active, .btn-primary:not(:disabled):not(.disabled):active { color: white; background: var(--ife-blue-hover); border-color: var(--ife-blue-hover); }
.btn-secondary, .btn-default, .users-secondary-action { color: var(--ife-blue); background: var(--ife-soft); border: 1px solid #d5d8f0; }
.btn-secondary:hover, .btn-default:hover, .users-secondary-action:hover { color: var(--ife-blue-hover); background: #e0e3fa; border-color: #b9bfeb; }
.btn-outline-primary, .btn-outline-secondary { color: var(--ife-blue); border-color: #b5bed6; background: white; }
.btn-outline-primary:hover, .btn-outline-secondary:hover { color: var(--ife-blue); background: var(--ife-soft); border-color: var(--ife-violet); }
.btn-danger { color: #ac2839; background: #fff0f1; border-color: #ebc5cd; }
.btn-danger:hover { background: #ac2839; border-color: #ac2839; color: white; }
.btn-warning { background: var(--ife-yellow); color: var(--ife-ink); border-color: var(--ife-yellow); }
.btn-warning:hover { background: #dfaa15; border-color: #dfaa15; color: var(--ife-ink); }
.btn-success { background: #08744f; border-color: #08744f; }
.btn-success:hover { background: #05593d; border-color: #05593d; }
.btn:disabled, .btn.disabled { opacity: 1; color: #63718a; background: #edf0f5; border-color: #dce2eb; cursor: not-allowed; }
.btn-group { gap: 0; }
.btn-group > .btn + .btn { margin-left: -1px; }
.form-group { margin-bottom: 22px; }
label:not(.form-check-label):not(.custom-control-label) { font-weight: 500; font-size: .875rem; margin-bottom: 7px; }
.form-control, .custom-select { border: 1px solid #b9c4d5; border-radius: 7px; color: var(--ife-ink); background: white; font-size: .9375rem; min-height: 44px; height: auto; padding: .625rem .75rem; }
select.form-control:not([size]):not([multiple]), select.form-control[size="1"]:not([multiple]),
select.custom-select:not([size]):not([multiple]), select.custom-select[size="1"]:not([multiple]) {
    -webkit-appearance: none; appearance: none; height: 44px; padding-right: 2.75rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%2356657b' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 16px 16px;
}
textarea.form-control { min-height: 100px; resize: vertical; }
.form-control::placeholder { color: var(--ife-muted); opacity: 1; }
.form-control:focus, .custom-select:focus { color: var(--ife-ink); border-color: var(--ife-violet); box-shadow: 0 0 0 3px #4943cb20; }
.form-control:disabled, .form-control[readonly], .custom-select:disabled { background-color: #edf0f5; color: #526178; border-color: #d0d8e5; }
.form-control.is-invalid { border-color: #ac2839; }
.invalid-feedback { color: #ac2839; font-size: .8125rem; margin-top: 7px; }
.form-text { margin-top: 7px; }
.form-check-input { accent-color: var(--ife-blue); }
.custom-control-input:checked ~ .custom-control-label::before { background: var(--ife-blue); border-color: var(--ife-blue); }
.input-group-text { background: #f5f6fa; color: var(--ife-muted); border-color: #b9c4d5; border-radius: 7px; }
.alert { border: 1px solid transparent; border-radius: 8px; font-size: .9375rem; padding: 16px 20px; }
.alert-success { color: #075b3e; background: #e6f6ef; border-color: #b9e8d6; }
.alert-warning { color: #654c08; background: #fff7dd; border-color: #f1df9d; }
.alert-danger { color: #972233; background: #fff0f1; border-color: #f0cbd1; }
.alert-info { color: #302a94; background: #eeedfc; border-color: #d5d2f6; }
.alert-light { color: var(--ife-muted); background: white; border-color: var(--ife-line); }
.alert a { color: inherit; text-decoration: underline; }
.badge { font-weight: 500; font-size: .75rem; padding: 6px 9px; border-radius: 5px; line-height: 1.3; white-space: normal; }
.badge-success { color: #075b3e; background: #def5e9; }
.badge-primary, .badge-info { color: #302a94; background: #eae7ff; }
.badge-secondary { color: #4c5c73; background: #edf0f5; }
.badge-warning { color: #654c08; background: #fff0be; }
.badge-danger { color: #972233; background: #ffe5e9; }
.bg-primary { background-color: var(--ife-blue) !important; }
.bg-secondary, .bg-info { background-color: var(--ife-violet) !important; }
.bg-success { background-color: #08744f !important; }
.bg-warning { background-color: var(--ife-yellow) !important; color: var(--ife-ink) !important; }
.bg-light { background-color: #f5f6fb !important; }

.table { color: var(--ife-ink); font-size: .875rem; }
.table th, .table td { padding: 16px 20px; vertical-align: middle; border-top: 1px solid #e8ecf2; }
.table thead th { background: #f5f6fb; border-top: 0; border-bottom: 1px solid var(--ife-line); color: #465674; font-size: .8125rem; font-weight: 600; }
.table tbody td { line-height: 1.5; }
.table-hover tbody tr:hover { background: #f6f5ff; }
.table-bordered { border: 1px solid var(--ife-line); }
.table-bordered th, .table-bordered td { border: 1px solid var(--ife-line); }
.table td .btn { margin: 2px 0; }
.table td .btn-group .btn { margin: 0; }
.table td.text-muted[colspan] { padding: 44px 24px !important; white-space: normal; }
.table-responsive { border-radius: 0 0 12px 12px; }
.table-responsive:focus-visible { outline-offset: -3px; }
.table-responsive .text-nowrap { min-width: 720px; }
.dropdown-menu { border: 1px solid var(--ife-line); border-radius: 10px; box-shadow: 0 12px 30px #00183224; padding: 6px; font-size: .875rem; }
.dropdown-item { padding: 10px 12px; border-radius: 5px; color: var(--ife-ink); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--ife-soft); color: var(--ife-blue); }
.dropdown-divider { border-color: var(--ife-line); }
.page-link { color: var(--ife-blue); border-color: var(--ife-line); min-width: 36px; text-align: center; }
.page-item.active .page-link { background: var(--ife-blue); border-color: var(--ife-blue); }
.page-item.disabled .page-link { color: var(--ife-muted); }
.pagination { flex-wrap: wrap; gap: 4px; margin: 0; }
.nav-tabs { gap: 8px; border-color: var(--ife-line); }
.nav-tabs .nav-link { color: var(--ife-muted); border: 0; border-bottom: 2px solid transparent; padding: 12px 16px; border-radius: 0; }
.nav-tabs .nav-link.active { color: var(--ife-blue); background: transparent; border-bottom-color: var(--ife-violet); }
.modal-content { border: 0; border-radius: 14px; box-shadow: 0 18px 50px #00183230; }
.modal-header { padding: 22px 24px; border-color: var(--ife-line); }
.modal-title { font-size: 1.125rem; font-weight: 600; }
.modal-body { padding: 24px; }
.modal-footer { padding: 18px 24px; border-color: var(--ife-line); gap: 4px; }
.modal-backdrop { background: var(--ife-ink); }
.close { opacity: 1; color: var(--ife-muted); text-shadow: none; }
.select2-container { max-width: 100%; }
.select2-container--default .select2-selection--single, .select2-container--default .select2-selection--multiple { border: 1px solid #b9c4d5; border-radius: 7px; min-height: 44px; }
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--ife-ink); line-height: 42px; padding-left: 12px; padding-right: 44px; }
.select2-container--default .select2-selection--single .select2-selection__arrow { right: 14px; top: 0; width: 16px; height: 42px; display: flex; align-items: center; }
.select2-container--default .select2-selection--single .select2-selection__arrow b { position: static; border: 0; margin: 0; width: 16px; height: 16px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%2356657b' stroke-width='1.75' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 16px 16px no-repeat; }
.select2-container--default.select2-container--open .select2-selection--single .select2-selection__arrow b { transform: rotate(180deg); }
.select2-container--default .select2-selection--single .select2-selection__placeholder { color: var(--ife-muted); }
.select2-container--default .select2-selection--multiple .select2-selection__choice { color: var(--ife-blue); background: var(--ife-soft); border-color: #d5d8f0; padding: 3px 8px; }
.select2-container--default.select2-container--focus .select2-selection--multiple, .select2-container--default.select2-container--open .select2-selection--single { border-color: var(--ife-violet); }
.select2-container--default .select2-results__option--highlighted[aria-selected] { background: var(--ife-blue); }
.select2-dropdown { border-color: #b9c4d5; border-radius: 7px; }
.select2-container--default.select2-container--disabled .select2-selection--single { background: #edf0f5; }

/* Layouts consolidated from every page, including the rubric builder. */
.users-filter-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 20px; align-items: end; }
.groups-filter-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: end; }
.group-students-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; align-items: end; }
.existing-student-grid { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 3fr) minmax(160px, 2fr); gap: 8px 16px; align-items: end; }
.existing-student-grid > .form-group { min-width: 0; margin-bottom: 0; }
.existing-student-field { grid-column: 1; grid-row: 1; }
.existing-student-help { grid-column: 1; grid-row: 2; margin-top: 0; }
.existing-student-team { grid-column: 2; grid-row: 1; }
.existing-student-actions { grid-column: 3; grid-row: 1; }
.existing-student-actions .btn { min-height: 44px; }
@media (max-width: 991.98px) {
    .existing-student-grid { grid-template-columns: minmax(0, 1fr); row-gap: 16px; }
    .existing-student-grid > * { grid-column: auto; grid-row: auto; }
    .existing-student-grid > .existing-student-help { margin-top: -8px; }
}
.group-teams-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: end; }
.challenges-filter-bar { display: grid; grid-template-columns: minmax(0, 320px) auto; gap: 20px; align-items: end; margin-bottom: 24px; }
.groups-filter-actions, .challenges-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.groups-filter-actions { justify-content: flex-end; }
.group-teachers-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: end; }
.manual-evaluation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.group-teachers-toolbar .select2-container, .student-entry-card .select2-container, .automatic-evaluation-manual .select2-container { width: 100% !important; }
.group-context-navigation { background: transparent; border: 0; border-radius: 0; margin-bottom: 28px !important; }
.group-context-navigation > .card-body { padding: 0 0 20px !important; border-bottom: 1px solid var(--ife-line); }
.group-context-navigation .font-weight-bold { font-size: 1rem; }
.group-context-actions { gap: 6px; }
.group-context-actions .btn { display: inline-flex; align-items: center; padding: 8px 10px; border-color: transparent; }
.group-context-actions .btn-outline-secondary { background: transparent; color: var(--ife-muted); }
.group-context-actions .btn-primary { color: var(--ife-blue); background: #e7e5fc; border-color: #d4d0f5; }
.group-status-badge { min-width: 116px; text-align: center; }
.group-detail-action { min-width: 164px; }
.rubric-section { border-top: 1px solid var(--ife-line); padding-top: 20px; }
.rubric-section > .card-body { background: transparent !important; padding: 0; }
.challenge-criterion { border-top: 1px solid #e8ecf2; padding-top: 14px; margin-top: 14px; }
.challenge-criterion .btn-danger, .rubric-section [data-remove-section] { min-width: 42px; }
.users-secondary-action { display: inline-block; border-radius: 7px; padding: .65rem 1rem; }
.info-box { border: 0; background: transparent; box-shadow: none; padding: 16px 0; border-radius: 0; align-items: center; }
.info-box .info-box-icon { background: transparent !important; color: var(--ife-violet) !important; font-size: 1.4rem; width: 44px; height: auto; }
.info-box .info-box-number { font-size: 1.5rem; line-height: 1.25; font-weight: 600; }
.info-box .info-box-text { color: var(--ife-muted); font-size: .8125rem; }
.ife-team-link { transition: border-color 160ms ease-out; }
.ife-team-link:hover { border-color: var(--ife-violet); }
.ife-team-link .card-body { text-align: left !important; color: var(--ife-blue) !important; }
.team-dashboard-title { color: var(--ife-blue); font-family: var(--ife-heading); font-size: 1.75rem; }
.team-metric { color: var(--ife-ink); padding: 20px; }
.team-metric h4:first-child, .team-metric label { font-size: .875rem; color: var(--ife-muted); font-weight: 500 !important; }
.team-metric h4:last-child { color: var(--ife-blue); font-size: 1.875rem; font-variant-numeric: tabular-nums; }
.team-summary { min-width: 1280px; background: white; }
.team-summary th { background: #e8e7fb !important; color: #302a94 !important; text-align: left; }
.team-summary td { vertical-align: top; overflow-wrap: normal; }
.team-summary th:first-child, .team-summary td:first-child { min-width: 230px; width: 230px; text-align: left !important; overflow-wrap: break-word; }
.team-summary th:nth-child(2), .team-summary td:nth-child(2) { min-width: 190px; width: 190px; text-align: left !important; }
.team-summary .team-system-cell { background: #f7f7fc; color: var(--ife-ink); }
.team-summary textarea { min-width: 190px; }
.team-summary input { min-width: 100px; }
.student-dashboard-actions { min-width: 190px; gap: 8px; }
.countdown-value { background: white; border: 1px solid var(--ife-line); color: var(--ife-blue); font-size: 1.375rem; font-weight: 600; min-width: 48px; padding: 8px; border-radius: 7px; font-variant-numeric: tabular-nums; }
.countdown-separator { font-size: 1.25rem; color: #8b97a9; padding: 0 6px; }

.ife-novus-mark { width: 180px; height: 180px; border-radius: 100% 0 0 0; background: var(--ife-green); }

/* Authentication shares the identity without inheriting the admin shell. */
.login-page, .register-page { min-height: 100%; height: 100%; background: var(--ife-canvas); display: block; }
.ife-auth-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(320px, 42%) 1fr; align-items: stretch; }
.ife-auth-aside { background: var(--ife-blue); color: white; padding: 64px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.ife-auth-aside h2 { font-family: var(--ife-heading); font-size: 2.625rem; font-weight: 400; line-height: 1.15; max-width: 11ch; margin-bottom: 24px; }
.ife-auth-aside p { color: #d9e2ff; max-width: 36ch; }
.ife-auth-aside .ife-novus-mark { width: 180px; height: 180px; margin-top: 48px; }
.ife-auth-product { font-size: 1.75rem; font-weight: 700; margin-bottom: 64px; }
.ife-auth-main { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px 24px; }
.login-box, .register-box { width: 420px; max-width: 100%; margin: 0; }
.login-logo, .register-logo { padding: 0 0 36px; margin: 0; }
.login-logo a, .register-logo a { display: block; }
.login-logo img, .register-logo img { width: 260px; max-width: 100%; max-height: 90px; object-fit: contain; height: auto; margin: 0 auto; display: block; }
.ife-auth-card { background: transparent; border: 0; border-radius: 0; box-shadow: none; margin: 0; }
.ife-auth-card > .card-header { padding: 0 0 24px; border: 0; }
.ife-auth-card > .card-header .card-title { font-family: var(--ife-heading); font-size: 1.875rem; font-weight: 500; text-align: left !important; }
.ife-auth-card .card-body { background: transparent; padding: 0; color: var(--ife-ink); }
.ife-auth-card .card-footer { padding: 24px 0 0; background: transparent; border: 0; }
.ife-auth-card .btn { min-height: 44px; }
.ife-auth-caption { color: var(--ife-muted); font-size: .8125rem; margin-top: 36px; }

@media (min-width: 992px) and (max-width: 1399.98px) {
    .content-header { padding: 32px 28px 24px; }
    .content-wrapper > .content { padding: 0 28px 32px; }
    .users-filter-grid, .group-students-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .groups-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ife-auth-aside { padding: 48px; }
}
@media (max-width: 991.98px) {
    .main-sidebar { margin-left: calc(-1 * var(--ife-sidebar)); }
    .ife-app.sidebar-collapse .main-sidebar { margin-left: calc(-1 * var(--ife-sidebar)); }
    .ife-app.sidebar-open .main-sidebar { margin-left: 0; }
    .ife-app .main-header, .ife-app .content-wrapper, .ife-app .main-footer { margin-left: 0 !important; }
    .sidebar-open .main-sidebar { margin-left: 0; }
    .main-header { padding: 12px 20px; }
    .content-header { padding: 28px 24px 20px; }
    .content-wrapper > .content { padding: 0 24px 28px; }
    .users-filter-grid, .group-students-grid, .groups-filter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .group-context-actions { margin-top: 4px; }
    .ife-auth-layout { grid-template-columns: minmax(250px, 38%) 1fr; }
    .ife-auth-aside { padding: 36px 28px; }
    .ife-auth-aside h2 { font-size: 2.125rem; }
}
@media (max-width: 767.98px) {
    .main-header { padding: 12px 12px; min-height: 64px; }
    .ife-topbar-section, .ife-topbar-divider { display: none; }
    .ife-topbar-name { padding-left: 4px; }
    .user-menu > .nav-link { max-width: 190px; }
    .content-header { padding: 28px 20px 20px; }
    .content-header h1 { font-size: 1.75rem; }
    .content-wrapper > .content { padding: 0 20px 28px; }
    .card-header, .card-body { padding: 20px; }
    .card-footer { padding: 16px 20px; }
    .card-footer .btn-block { width: 100%; min-width: 0; }
    .content > .container-fluid > .d-flex, .card-body > .d-flex { flex-wrap: wrap; gap: 12px; }
    .users-filter-grid, .groups-filter-grid, .group-students-grid, .group-teams-grid, .challenges-filter-bar, .group-teachers-toolbar, .manual-evaluation-grid { grid-template-columns: 1fr; }
    .groups-filter-actions { justify-content: flex-start; }
    .group-context-actions .btn { flex: 0 1 auto; }
    .card-header .card-title { max-width: 100%; }
    .info-box { padding: 8px 0; }
    .login-page, .register-page { height: auto; }
    .ife-auth-layout { display: block; min-height: 100vh; }
    .ife-auth-aside { padding: 28px 24px; }
    .ife-auth-product { margin-bottom: 16px; font-size: 1.375rem; }
    .ife-auth-aside h2 { max-width: none; font-size: 1.875rem; margin: 0; }
    .ife-auth-aside p, .ife-auth-aside .ife-novus-mark { display: none; }
    .ife-auth-main { padding: 36px 24px; }
    .ife-auth-caption { margin-top: 24px; }
    .team-metric { padding: 12px; }
    .team-metric h4:last-child { font-size: 1.5rem; }
    .student-dashboard-actions { width: 100%; margin-top: 16px; }
    .rubric-section .d-flex { flex-wrap: wrap; gap: 12px; }
    .rubric-section .flex-grow-1 { width: 100%; margin-right: 0 !important; }
    .challenge-criterion [class*='col-md-'] { margin-bottom: 12px; }
    .challenge-criterion [class*='col-md-'] .btn { width: auto; }
    .modal-dialog { margin: 16px; }
    .modal-header, .modal-body { padding: 20px; }
    .modal-footer { padding: 16px 20px; }
    .pagination { font-size: .8125rem; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media print {
    .main-sidebar, .main-header, .ife-workspace-footer, .group-context-navigation, .btn { display: none !important; }
    .content-wrapper { margin-left: 0 !important; background: white; }
    .content-header, .content-wrapper > .content { padding: 0; }
    .table-responsive { overflow: visible; }
}

/* Reviewed task composition: compact context, bounded forms, readable evidence. */
.content-header > .container-fluid, .content > .container-fluid { max-width: none; margin-left: 0; margin-right: 0; }
.ife-form-page { max-width: 880px; }
.ife-form-page .card-body > p { max-width: 72ch; }
.ife-session-note, .ife-context-caption { color: var(--ife-muted); font-size: .875rem; }
.ife-context-caption { margin-top: 8px; max-width: 76ch; }
.group-context-layout { display: flex; flex-wrap: wrap; align-items: end; gap: 14px 24px; justify-content: space-between; }
.group-context-identity { flex: 1 1 280px; }
.group-context-identity .font-weight-bold { font-size: .875rem; }
.group-context-navigation { margin-bottom: 20px !important; }
.group-context-navigation > .card-body { padding-bottom: 14px !important; }
.group-context-actions { display: flex; flex-wrap: wrap; gap: 2px; }
.group-context-actions .btn { padding: 7px 9px; min-height: 32px; }
.team-dashboard-title { font-family: var(--ife-body); font-size: 1.25rem; font-weight: 600; margin-top: 16px; }
.team-id { margin-bottom: 14px; }
.team-metrics { display: flex; align-items: stretch; margin: 0 0 20px; border-top: 1px solid var(--ife-line); border-bottom: 1px solid var(--ife-line); background: white; }
.team-metrics .team-metric { flex: 1 1 0; max-width: none; padding: 16px; text-align: left; }
.team-metrics .team-metric + .team-metric { border-left: 1px solid var(--ife-line); }
.team-metric h4 { margin-bottom: 0; }
.team-metric h4:first-child, .team-metric label { margin-bottom: 8px; }
.team-metric .form-control { margin-left: 0 !important; }
.team-metric h4:last-child { font-size: 1.5rem; }
.team-dashboard-toolbar { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.team-countdown { text-align: left !important; }
.team-countdown > .d-flex { justify-content: start !important; }
.team-countdown strong { font-size: .8125rem; font-weight: 500 !important; margin-bottom: 4px !important; }
.countdown-value { min-width: 32px; padding: 3px 5px; font-size: 1rem; border-radius: 4px; }
.countdown-separator { font-size: .875rem; padding: 0 3px; }
.teacher-dashboard-actions, .student-dashboard-actions { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.teacher-dashboard-actions .btn, .student-dashboard-actions .btn { min-height: 36px; padding: 8px 12px; font-size: .8125rem; }
.rubric-detail-section { border-top: 1px solid var(--ife-line); padding-top: 20px; }
.rubric-detail-heading { gap: 8px; margin-bottom: 12px; }
.rubric-detail-section .table-responsive { border: 1px solid var(--ife-line); border-radius: 0; }
@media (max-width: 767.98px) {
    .content-header { padding: 20px 20px 16px; }
    .content-header h1 { font-size: 1.5rem; }
    .ife-context-caption { font-size: .8125rem; margin-top: 6px; line-height: 1.4; }
    .group-context-layout { display: block; }
    .group-context-identity { margin-bottom: 10px; }
    .group-context-identity .font-weight-bold { font-size: .8125rem; line-height: 1.4; }
    .group-context-actions { display: grid; grid-template-columns: repeat(4, max-content); gap: 2px 0; }
    .group-context-actions .btn { font-size: .75rem; padding: 6px; min-height: 32px; }
    .group-context-actions .btn i { display: none; }
    .group-context-navigation { margin-bottom: 16px !important; }
    .team-dashboard-title { font-size: 1.0625rem; margin-top: 8px; }
    .team-id { margin-bottom: 10px; }
    .team-metrics { margin-bottom: 14px; }
    .team-metrics .team-metric { padding: 12px 10px; }
    .team-metric h4:first-child, .team-metric label { font-size: .75rem; line-height: 1.35; }
    .team-metric h4:last-child { font-size: 1.25rem; }
    .team-metric .form-control { min-width: 0; min-height: 36px; padding: 4px; }
    .team-dashboard-toolbar { display: block; margin-bottom: 16px; }
    .teacher-dashboard-actions, .student-dashboard-actions { margin-top: 12px; width: auto; }
    .student-dashboard-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .student-dashboard-actions .btn { padding: 8px; }
}

@media (max-width: 767.98px) {
    .group-dashboard-stats > .col-md-3 { flex: 0 0 50%; max-width: 50%; }
    .group-dashboard-stats .info-box { padding: 8px 0; margin-bottom: 8px; min-height: 64px; }
    .group-dashboard-stats .info-box-icon { width: 32px; font-size: 1.125rem; }
    .group-dashboard-stats .info-box-content { padding: 0 8px; }
}

.ife-error-page { min-height: 100vh; display: grid; place-items: center; padding: 32px 24px; background: white; }
.ife-error-main { width: 100%; max-width: 560px; }
.ife-error-logo { max-width: 100%; height: auto; display: block; margin-bottom: 64px; }
.ife-error-code { color: var(--ife-muted); font-size: .8125rem; font-weight: 400; margin-bottom: 0; }
.ife-error-main h1 { font-family: var(--ife-heading); font-weight: 500; font-size: 2rem; line-height: 1.2; margin-bottom: 16px; }
.ife-error-main .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    margin-top: 24px;
    border: 1px solid var(--ife-blue);
    text-decoration: none;
}
@media (max-width: 767.98px) {
    .ife-error-main h1 { font-size: 1.625rem; }
    .ife-error-logo { width: 240px; margin-bottom: 40px; }
}

/* Task dialogs open immediately, with no capture-time or interaction-time fade. */
.modal.fade, .modal.fade .modal-dialog, .modal-backdrop.fade { transition: none; }
.modal.fade .modal-dialog { transform: none; }
.ife-error-page { grid-template-rows: 1fr; grid-auto-rows: 0; }

/* Preserve the original desktop mini-sidebar and its hover expansion. */
@media (min-width: 992px) {
    .ife-app:not(.layout-fixed) .main-sidebar .sidebar { height: auto; }
    .ife-app.sidebar-mini.sidebar-collapse .main-sidebar { width: 4.6rem; margin-left: 0; }
    .ife-app.sidebar-mini.sidebar-collapse .main-header,
    .ife-app.sidebar-mini.sidebar-collapse .content-wrapper,
    .ife-app.sidebar-mini.sidebar-collapse .main-footer { margin-left: 4.6rem !important; }
    .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .sidebar { padding-left: 8px; padding-right: 8px; }
    .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .ife-product-name,
    .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .user-panel > span { display: none; }
    .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .brand-link { padding: 12px; }
    .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .nav-link { padding-left: 12px; padding-right: 12px; }
    .sidebar-mini.sidebar-collapse .main-sidebar:not(:hover):not(.sidebar-focused) .nav-icon { margin-right: 0; }
    .ife-app.sidebar-mini.sidebar-collapse .main-sidebar:hover,
    .ife-app.sidebar-mini.sidebar-collapse .main-sidebar.sidebar-focused { width: var(--ife-sidebar); }
}
.preloader img { width: 224px; height: auto; }
.lockscreen-wrapper { max-width: 420px; }
.lockscreen-logo img { width: 260px; height: auto; display: block; margin: 0 auto 20px; }
.lockscreen-item { padding: 16px; border: 1px solid var(--ife-line); border-radius: var(--ife-radius); }


/* Team workspaces: compact summary, balanced evidence and feedback. */
.select2-container--default .select2-selection--single { height: 44px; padding: 0 !important; display: flex; align-items: center; }
.select2-container--default .select2-selection--single .select2-selection__rendered { width: 100%; min-width: 0; margin: 0; }
.manual-evaluation-grid > *, .group-teachers-toolbar > * { min-width: 0; }
.ife-team-dashboard .team-overview { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; margin-bottom: 20px; }
.ife-team-dashboard .team-identity { flex: 1 1 240px; }
.ife-team-dashboard .team-dashboard-title { margin-top: 0; font-size: 1.5rem; }
.ife-team-dashboard .team-id { margin-bottom: 0; }
.ife-team-dashboard .team-metrics { flex: 0 1 auto; margin: 0; border: 0; background: transparent; }
.ife-team-dashboard .team-metrics .team-metric { flex: 0 1 auto; padding: 0 24px; }
.ife-team-dashboard .team-metrics .team-metric:first-child { padding-left: 0; }
.ife-team-dashboard .team-metrics .team-metric:last-child { padding-right: 0; }
.ife-team-dashboard .team-metric h4:last-child { font-size: 1.5rem; }
.ife-team-dashboard .team-metric h4:first-child, .ife-team-dashboard .team-metric label { margin-bottom: 6px; font-size: .8125rem; }
.ife-team-dashboard .team-dashboard-toolbar { padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--ife-line); align-items: center; }
.ife-team-dashboard .team-table-wrap { border: 1px solid var(--ife-line); border-radius: 12px; background: white; }
.ife-team-dashboard .team-summary { width: 100%; table-layout: fixed; margin-bottom: 0; border: 0; }
.ife-team-dashboard--student .team-summary { min-width: 1100px; }
.ife-team-dashboard .team-col-member { width: 210px; }
.ife-team-dashboard .team-col-responsibilities { width: 200px; }
.ife-team-dashboard .team-col-progress { width: 100px; }
.ife-team-dashboard .team-col-system-grade { width: 110px; }
.ife-team-dashboard .team-col-teacher-grade { width: 120px; }
.ife-team-dashboard .team-summary th, .ife-team-dashboard .team-summary td { border: 0; border-bottom: 1px solid var(--ife-line); padding: 16px; }
.ife-team-dashboard .team-summary th { background: #f5f6fb !important; color: #465674 !important; vertical-align: middle; }
.ife-team-dashboard .team-summary td { background: white; color: var(--ife-ink); }
.ife-team-dashboard .team-summary th:first-child, .ife-team-dashboard .team-summary td:first-child,
.ife-team-dashboard .team-summary th:nth-child(2), .ife-team-dashboard .team-summary td:nth-child(2) { width: auto; min-width: 0; }
.ife-team-dashboard .team-summary tbody tr:last-child td { border-bottom: 0; }
.ife-team-dashboard .team-summary .team-system-cell { background: white; }
.ife-team-dashboard .team-summary td:nth-last-child(-n+2) { background: #f9faff; }
.ife-team-dashboard .team-summary th:nth-last-child(2), .ife-team-dashboard .team-summary td:nth-last-child(2) { border-left: 1px solid var(--ife-line); }
.ife-team-dashboard .team-summary th:nth-last-child(-n+2) { background: #eeedfc !important; color: #302a94 !important; }
.ife-team-dashboard .team-summary td:nth-child(3) { font-variant-numeric: tabular-nums; font-weight: 600; }
.ife-team-dashboard .team-summary input { width: 100%; min-width: 0; font-size: .875rem; }
.ife-team-dashboard .team-summary textarea { width: 100%; min-width: 0; min-height: 144px; font-size: .875rem; line-height: 1.5; }
.team-member-name, .team-member-email { display: block; }
.team-member-name { margin-bottom: 4px; }
.team-member-email { font-size: .8125rem; color: var(--ife-muted); overflow-wrap: anywhere; }
.team-feedback { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
.team-feedback > section { padding: 20px; background: white; border: 1px solid var(--ife-line); border-radius: 12px; }
.team-feedback p:last-child, .team-feedback .form-group { margin-bottom: 0; }
.team-feedback p:not(.font-weight-bold) { max-width: 72ch; }
.team-feedback textarea { min-height: 120px; }
.team-update-history { margin-top: 16px; color: var(--ife-muted); font-size: .8125rem; }
@media (max-width: 1199.98px) {
    .ife-team-dashboard .team-overview { display: block; }
    .ife-team-dashboard .team-metrics { margin-top: 20px; }
    .ife-team-dashboard .team-metrics .team-metric { flex: 1 1 0; }
}
@media (max-width: 767.98px) {
    .ife-team-dashboard .team-dashboard-title { font-size: 1.25rem; }
    .ife-team-dashboard .team-metrics { flex-wrap: wrap; gap: 16px 0; }
    .ife-team-dashboard .team-metrics .team-metric { padding: 0 12px; }
    .ife-team-dashboard--teacher .team-metrics .team-metric:last-child { flex-basis: 100%; border-left: 0; padding-left: 0; }
    .ife-team-dashboard .team-dashboard-toolbar { display: block; padding-bottom: 16px; }
    .ife-team-dashboard .teacher-dashboard-actions .btn, .ife-team-dashboard .student-dashboard-actions .btn { min-height: 42px; }
    .team-feedback { grid-template-columns: 1fr; gap: 16px; }
    .team-feedback > section { padding: 16px; }
    .team-update-history > div + div { margin-top: 4px; }
}
