/**
 * Trang chủ module onlinetest — danh sách đề theo nhóm
 */
.ot-home-hub {
	margin: 0 0 28px;
}
.ot-home-hub__grid {
	display: -ms-flexbox;
	display: flex;
	-ms-flex-wrap: wrap;
	flex-wrap: wrap;
	gap: 16px;
}
.ot-home-hub__card {
	-ms-flex: 1 1 280px;
	flex: 1 1 280px;
	background: #fff;
	border-radius: 12px;
	padding: 22px 20px;
	box-shadow: 0 2px 16px rgba(0,0,0,.06);
	border-top: 4px solid #22a838;
}
.ot-home-hub__card--bank {
	border-top-color: #1e88e5;
}
.ot-home-hub__icon {
	font-size: 28px;
	color: #22a838;
	margin-bottom: 10px;
}
.ot-home-hub__card--bank .ot-home-hub__icon {
	color: #1e88e5;
}
.ot-home-hub__title {
	margin: 0 0 8px;
	font-size: 22px;
	font-weight: 700;
}
.ot-home-hub__desc {
	margin: 0 0 16px;
	color: #555;
	line-height: 1.5;
}
.ot-home-hub__actions {
	display: -ms-flexbox;
	display: flex;
	-ms-flex-wrap: wrap;
	flex-wrap: wrap;
	gap: 8px;
}

.ot-home-exams {
    margin: 0 0 32px;
}

.ot-home-exams .ot-exam-group {
    margin-bottom: 28px;
    border: none;
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.ot-home-exams .ot-exam-group__head {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: justify;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #22a838 0%, #1a8a2e 100%);
}

.ot-home-exams .ot-exam-group__bar {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 0;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    min-width: 0;
}

.ot-home-exams .ot-exam-group__title {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.ot-home-exams .ot-exam-group__title a {
    color: #ffffff !important;
    text-decoration: none !important;
}

.ot-home-exams .ot-exam-group__title a:hover,
.ot-home-exams .ot-exam-group__title a:focus {
    color: #f0fff2 !important;
    text-decoration: underline !important;
}

.ot-home-exams .ot-exam-group__all {
    -ms-flex-negative: 0;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff !important;
    text-decoration: none !important;
    white-space: nowrap;
    opacity: 0.95;
}

.ot-home-exams .ot-exam-group__all:hover,
.ot-home-exams .ot-exam-group__all:focus,
.ot-home-exams .ot-exam-group__back:hover,
.ot-home-exams .ot-exam-group__back:focus {
    opacity: 1;
    text-decoration: underline !important;
}

.ot-home-exams .ot-exam-group__back {
    -ms-flex-negative: 0;
    flex-shrink: 0;
    font-size: 13px;
    font-weight: 600;
    color: #ffffff !important;
    text-decoration: none !important;
    white-space: nowrap;
    opacity: 0.95;
}

.ot-home-exams .ot-exam-sub--active {
    font-weight: 700;
    opacity: 1;
    text-decoration: underline !important;
}

.ot-home-exams .ot-exam-pagination {
    padding: 16px 18px 20px;
    text-align: center;
    background: #fafbfa;
    border-top: 1px solid #e8ece9;
}

.ot-home-exams .ot-exam-pagination .pagination {
    margin: 0;
}

.ot-group-page .ot-exam-group {
    margin-bottom: 0;
}

.ot-group-page .ot-exam-group__head {
    -ms-flex-direction: column;
    flex-direction: column;
    -ms-flex-align: stretch;
    align-items: stretch;
    gap: 0;
    padding: 0;
}

.ot-group-page .ot-exam-group__head-row {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: justify;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    background: linear-gradient(135deg, #22a838 0%, #1a8a2e 100%);
}

.ot-group-page .ot-exam-subnav-btns {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 10px;
    padding: 14px 18px;
    background: #f5f7f6;
    border-bottom: 1px solid #e8ece9;
}

.ot-group-page .ot-exam-sub-btn {
    display: -ms-inline-flexbox;
    display: inline-flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    color: #1a8a2e !important;
    background: #ffffff;
    border: 1px solid #b8dfc0;
    text-decoration: none !important;
    white-space: nowrap;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    -webkit-transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ot-group-page .ot-exam-sub-btn:hover,
.ot-group-page .ot-exam-sub-btn:focus {
    color: #157a28 !important;
    background: #e8f5ea;
    border-color: #22a838;
    text-decoration: none !important;
    box-shadow: 0 2px 6px rgba(34, 168, 56, 0.12);
}

.ot-group-page .ot-exam-sub-btn--active,
.ot-group-page .ot-exam-sub-btn--active:hover,
.ot-group-page .ot-exam-sub-btn--active:focus {
    color: #ffffff !important;
    background: linear-gradient(135deg, #22a838 0%, #1a8a2e 100%);
    border-color: #1a8a2e;
    box-shadow: 0 2px 8px rgba(26, 138, 46, 0.25);
    cursor: default;
}

.ot-home-exams .ot-exam-group__sep-pipe {
    margin: 0 10px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 15px;
    font-weight: 400;
    line-height: 1;
}

.ot-home-exams .ot-exam-group__subs {
    display: -ms-inline-flexbox;
    display: inline-flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    gap: 0;
    min-width: 0;
}

.ot-home-exams .ot-exam-sub {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: #ffffff !important;
    text-decoration: none !important;
    white-space: nowrap;
    opacity: 0.95;
    -webkit-transition: opacity 0.15s ease;
    transition: opacity 0.15s ease;
}

.ot-home-exams .ot-exam-sub:hover,
.ot-home-exams .ot-exam-sub:focus {
    color: #ffffff !important;
    opacity: 1;
    text-decoration: underline !important;
}

.ot-home-exams .ot-exam-sub-sep {
    color: rgba(255, 255, 255, 0.65);
    font-size: 13px;
    font-weight: 400;
    -webkit-user-select: none;
    user-select: none;
}

.ot-home-exams .ot-exam-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
    padding: 18px;
    background: #fafbfa;
}

.ot-home-exams .ot-exam-card {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    height: 100%;
    margin: 0;
    padding: 0;
    border: 1px solid #e8ece9;
    border-radius: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfdfb 100%);
    overflow: hidden;
    position: relative;
    text-align: left;
    -webkit-transition: box-shadow 0.2s ease, border-color 0.2s ease, -webkit-transform 0.2s ease;
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.ot-home-exams .ot-exam-card::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(135deg, #22a838 0%, #1a8a2e 100%);
}

.ot-home-exams .ot-exam-card:hover {
    border-color: #c5e6cc;
    box-shadow: 0 8px 24px rgba(34, 168, 56, 0.12);
    -webkit-transform: translateY(-2px);
    transform: translateY(-2px);
}

.ot-home-exams .ot-exam-card__body {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-direction: column;
    flex-direction: column;
    -ms-flex: 1 1 auto;
    flex: 1 1 auto;
    padding: 16px;
    gap: 12px;
}

.ot-home-exams .ot-exam-card__title {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.4;
}

.ot-home-exams .ot-exam-card__title a {
    display: -webkit-box;
    line-clamp: 2;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    height: auto;
    min-height: 0;
    max-height: 2.8em;
    padding: 0;
    color: #111111 !important;
    font-weight: 700;
    text-decoration: none !important;
    word-break: break-word;
}

.ot-home-exams .ot-exam-card__title a:hover,
.ot-home-exams .ot-exam-card__title a:focus {
    color: #22a838 !important;
}

.ot-home-exams .ot-exam-card__creator,
.ot-home-exams .ot-exam-card__updated {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    gap: 6px;
    min-width: 0;
    color: #666666;
    font-size: 13px;
    line-height: 1.35;
}

.ot-home-exams .ot-exam-card__creator a,
.ot-home-exams .ot-exam-card__creator strong {
    overflow: hidden;
    color: #333333;
    font-weight: 600;
    text-decoration: none !important;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ot-home-exams .ot-exam-card__creator a:hover,
.ot-home-exams .ot-exam-card__creator a:focus {
    color: #22a838;
    text-decoration: underline !important;
}

.ot-home-exams .ot-exam-card__creator .fa,
.ot-home-exams .ot-exam-card__updated .fa {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    color: #22a838;
    font-size: 12px;
}

.ot-home-exams .ot-exam-card__fee {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: justify;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #dcefe0;
    border-radius: 8px;
    background: #f4fbf5;
}

.ot-home-exams .ot-exam-card__fee-label {
    color: #57705d;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
}

.ot-home-exams .ot-exam-card__fee strong {
    color: #1a8a2e;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.3;
    text-align: right;
    white-space: nowrap;
}

.ot-home-exams .ot-exam-card__meta {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 6px;
    margin: 0;
}

.ot-home-exams .ot-badge {
    display: -ms-inline-flexbox;
    display: inline-flex;
    -ms-flex-align: center;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.3;
    color: #444444;
    background: #f0f4f1;
    border-radius: 6px;
}

.ot-home-exams .ot-badge .fa {
    color: #22a838;
    font-size: 11px;
}

.ot-home-exams .ot-exam-card__btn.button-link {
    display: -ms-inline-flexbox !important;
    display: inline-flex !important;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    position: static !important;
    z-index: auto;
    width: 100%;
    margin-top: auto;
    padding: 10px 16px !important;
    font-size: 14px !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    color: #ffffff !important;
    text-align: center;
    text-decoration: none !important;
    background: #22a838 !important;
    border: none !important;
    border-radius: 8px !important;
    box-shadow: none !important;
    -webkit-transform: none !important;
    transform: none !important;
    -webkit-transition: background-color 0.15s ease;
    transition: background-color 0.15s ease;
}

.ot-home-exams .ot-exam-card__btn.button-link:hover,
.ot-home-exams .ot-exam-card__btn.button-link:focus {
    background: #1a8a2e !important;
    color: #ffffff !important;
}

.ot-home-exams .ot-exam-card__btn--muted {
    background: #6c757d !important;
}

.ot-home-exams .ot-exam-card__btn--muted:hover,
.ot-home-exams .ot-exam-card__btn--muted:focus {
    background: #5a6268 !important;
}

.ot-home-exams .ot-exam-card.isclose {
    opacity: 0.92;
}

.ot-home-exams .ot-exam-group:has(.ot-exam-empty) .ot-exam-grid {
    display: none;
}

.ot-home-exams .ot-exam-empty {
    padding: 40px 24px;
    text-align: center;
    background: #fafbfa;
}

.ot-home-exams .ot-exam-empty__icon {
    display: block;
    margin: 0 auto 12px;
    font-size: 36px;
    color: #c5d4c8;
}

.ot-home-exams .ot-exam-empty__text {
    margin: 0 0 12px;
    font-size: 15px;
    color: #666666;
}

.ot-home-exams .ot-exam-empty__link {
    font-size: 14px;
    font-weight: 600;
    color: #22a838 !important;
    text-decoration: none !important;
}

.ot-home-exams .ot-exam-empty__link:hover,
.ot-home-exams .ot-exam-empty__link:focus {
    text-decoration: underline !important;
}

.ot-creator-exams {
    margin-bottom: 32px;
}

.ot-creator-exams__head {
    padding: 18px;
    border-radius: 12px 12px 0 0;
    background: linear-gradient(135deg, #22a838 0%, #1a8a2e 100%);
    color: #ffffff;
}

.ot-creator-exams__title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.35;
}

.ot-creator-exams__summary {
    margin: 0;
    font-size: 14px;
    opacity: 0.95;
}

.ot-creator-exams__body {
    padding: 18px;
    border: 1px solid #e8ece9;
    border-top: 0;
    border-radius: 0 0 12px 12px;
    background: #ffffff;
}

.ot-creator-group + .ot-creator-group {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #edf1ee;
}

.ot-creator-group__title {
    margin: 0 0 10px;
    color: #1a8a2e;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.35;
}

.ot-creator-exam-list {
    margin: 0;
    padding-left: 0;
    list-style: none;
}

.ot-creator-exam-list li + li {
    margin-top: 8px;
}

.ot-creator-exam-list li {
    display: -ms-flexbox;
    display: flex;
    gap: 8px;
    align-items: flex-start;
}

.ot-creator-exam-order {
    -ms-flex: 0 0 auto;
    flex: 0 0 auto;
    min-width: 24px;
    color: #1a8a2e;
    font-weight: 700;
    line-height: 1.45;
    text-align: right;
}

.ot-creator-exam-link {
    display: inline;
    min-width: 0;
    color: #222222;
    font-weight: 600;
    line-height: 1.45;
    text-decoration: none !important;
    white-space: normal;
    word-break: break-word;
}

.ot-creator-exam-link:hover,
.ot-creator-exam-link:focus {
    color: #22a838;
    text-decoration: underline !important;
}

/* Ghi đè style legacy (box cũ) */
.ot-home-exams.BoxGroupExam {
    margin-bottom: 30px;
}

.ot-home-exams .GroupExam {
    border: none;
    margin-bottom: 0;
}

.ot-home-exams .GroupExam ul.list-inline {
    display: none;
}

.ot-home-exams .boxexam {
    border: none;
    padding: 0;
    margin: 0;
    background: transparent;
}

.ot-home-exams .fixed {
    float: none;
    width: auto;
    max-width: none;
    padding: 0;
}

@media (max-width: 767.98px) {
    .ot-home-exams .ot-exam-group__head {
        position: relative;
        -ms-flex-direction: row;
        flex-direction: row;
        -ms-flex-align: center;
        align-items: center;
        gap: 10px;
        padding: 11px 12px;
    }

    .ot-home-exams .ot-exam-group__bar {
        -ms-flex: 1 1 auto;
        flex: 1 1 auto;
        min-width: 0;
        overflow: hidden;
    }

    .ot-home-exams .ot-exam-group__title {
        max-width: 100%;
        font-size: 14px;
        font-weight: 600;
        line-height: 1.3;
        letter-spacing: 0;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        text-transform: none;
    }

    .ot-home-exams .ot-exam-group__title a {
        display: block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .ot-home-exams .ot-exam-group__all {
        -ms-flex: 0 0 auto;
        flex: 0 0 auto;
        font-size: 12px;
        font-weight: 600;
        line-height: 1.3;
        white-space: nowrap;
    }

    .ot-home-exams .ot-exam-grid {
        grid-template-columns: 1fr;
        padding: 14px;
        gap: 12px;
    }

    .ot-home-exams .ot-exam-group__tabs {
        padding: 10px 12px;
    }

    .ot-group-page .ot-exam-group__head-row {
        -ms-flex-direction: column;
        flex-direction: column;
        -ms-flex-align: flex-start;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 14px;
    }

    .ot-group-page .ot-exam-subnav-btns {
        padding: 12px 14px;
        gap: 8px;
    }

    .ot-group-page .ot-exam-sub-btn {
        padding: 8px 14px;
        font-size: 13px;
        white-space: normal;
        text-align: center;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .ot-home-exams .ot-exam-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
