.txam-form-wrap,
.txam-lookup-wrap {
    padding: 24px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
}

.txam-form h3,
.txam-lookup-result h3 {
    margin: 30px 0 16px;
    font-size: 20px;
    color: #0f172a;
    border-bottom: 1px solid #e5e7eb;
    padding-bottom: 10px;
}


.txam-alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
}

.title_label {
    font-size: 14px;
}

.txam-alert-success {
    background: #dcfce7;
    color: #166534;
}

.txam-alert-error {
    background: #fee2e2;
    color: #991b1b;
}

.txam-lookup-row {
    display: flex;
    gap: 12px;
}

.txam-lookup-result {
    margin-top: 20px;
    padding: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #f8fafc;
}

.select2-container .select2-selection--single {
    height: 38px;
    border-radius: 3px;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    line-height: 38px;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 38px;
}

.select2-container--default .select2-selection--single .select2-selection__clear {
    height: 38px;
    margin-right: 25px;
}

.select2-container--default .select2-selection--single {
    border: var(--bs-border-width) solid var(--bs-border-color);
}

.txam-field-feedback {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.4;
}

.txam-field-feedback.is-success {
    color: #15803d;
}

.txam-field-feedback.is-error {
    color: #dc2626;
}

.txam-field-feedback.is-loading {
    color: #b45309;
}

.txam-file-preview {
    margin-top: 10px;
}

.txam-preview-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    background: #fafafa;
    max-width: 160px;
}

.txam-preview-item img {
    display: block;
    width: 100%;
    height: 100px;
    object-fit: cover;
    margin-bottom: 6px;
}

.txam-preview-item iframe {
    display: block;
    width: 100%;
    height: 120px;
    margin-bottom: 6px;
}

.txam-success-page {
    padding: 60px 0;
    /*background: #f9fafb;*/
}

.txam-success-box {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.txam-success-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.txam-success-box h1 {
    font-size: 24px;
    margin-bottom: 10px;
}

.txam-success-desc {
    color: #6b7280;
    margin-bottom: 20px;
}

.txam-success-actions {
    margin-top: 25px;
}

.txam-success-actions a {
    display: inline-block;
    padding: 10px 18px;
    border-radius: 6px;
    text-decoration: none;
    margin: 5px;
}

.btn-home {
    background: #16a34a;
    color: #fff;
}

.btn-back {
    background: #e5e7eb;
    color: #111;
}

.txam-field-feedback {
    margin-top: 6px;
    font-size: 13px;
    line-height: 1.4;
}

.txam-field-feedback.is-success {
    color: #15803d;
}

.txam-field-feedback.is-error {
    color: #dc2626;
}

.txam-field-feedback.is-loading {
    color: #b45309;
}

.txam-file-preview {
    margin-top: 10px;
}

.txam-preview-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    background: #fafafa;
    max-width: 160px;
}

.txam-preview-item img {
    display: block;
    width: 100%;
    height: 100px;
    object-fit: cover;
    margin-bottom: 6px;
}

.txam-preview-item iframe {
    display: block;
    width: 100%;
    height: 120px;
    margin-bottom: 6px;
}

.txam-preview-error {
    border-color: #dc2626;
    color: #dc2626;
}

.title_address_detail p {
    margin-bottom: 10px;
    font-size: 14px;
}

.form-select {
    font-size: 14px;
}

.txam-grid-2-column {
    grid-template-columns: repeat(2, 1fr);
}

.text-red {
    color: #dc2626;
}

.text-muted {
    color: red !important;
    font-style: italic;
    font-size: 12px;
}

.mt {
    margin-top: 15px;
}

.txam-checkbox {
    background: #f2f2f2;
    padding: 12px 16px;
    border-radius: 4px;
    border: 1px solid #e0e0e0;
}

.txam-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1.6;
    color: #333;
}

/* Ẩn checkbox mặc định */
.txam-checkbox-label input {
    display: none;
}

/* custom checkbox */
.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #999;
    border-radius: 3px;
    position: relative;
    margin-top: 4px;
    flex-shrink: 0;
    background: #fff;
}

/* khi checked */
.txam-checkbox-label input:checked + .checkmark {
    background: #007cba;
    border-color: #007cba;
}

.txam-preview-item span {
    display: block;
    font-size: 12px;

    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* icon tick */
.checkmark::after {
    content: "";
    position: absolute;
    display: none;
}

.txam-checkbox-label input:checked + .checkmark::after {
    display: block;
}

.checkmark::after {
    left: 5px;
    top: 1px;
    width: 4px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* text */
.txam-text {
    flex: 1;
    font-size: 16px;
}

/* wrapper căn giữa */
.txam-submit-wrap {
    text-align: center;
    margin-top: 20px;
}


/* click */
.txam-submit-btn:active {
    transform: scale(0.97);
}

#button_dangKy {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
    cursor: pointer;
}

#button_dangKy.is-disabled {
    opacity: 0.6;
    cursor: not-allowed;
    background: #999;
    border-color: #999;
}

.txam-submit-wrap {
    text-align: center;
    margin-top: 24px;
}

.txam-submit-holder {
    position: relative;
    display: inline-block;
}

#button_dangKy.is-disabled {
    opacity: 0.65;
    cursor: not-allowed;
}



.txam-checkbox.error {
    border: 1px solid #dc3545;
    background: #fff5f5;
    border-radius: 6px;
    padding: 12px;
}

.txam-submit-wrap {
    text-align: center;
    margin-top: 50px;
}

.txam-submit-holder {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

#button_dangKy.is-disabled {
    opacity: 0.65;
    cursor: not-allowed;
}
.txam-submit-holder.has-tooltip {
    position: relative;
}

.txam-submit-holder.has-tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 0;
    background: #dc3545;
    color: #fff;
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* chỉ hiện khi hover vào nút submit */
.txam-submit-holder:hover::after {
    opacity: 1;
}

/* chỉ hiển thị khi button đang disabled */
#button_dangKy:not(:disabled) ~ * + .txam-submit-holder::after {
    display: none;
}

.txam-success-panel {
    max-width: 760px;
    margin: 0 auto;
    padding: 32px 24px;
    background: #fff;
    /*border: 1px solid #dbeafe;*/
    border-radius: 16px;
    /*box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);*/
    text-align: center;
}

.txam-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 16px;
    border-radius: 50%;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    color: #fff;
    font-size: 32px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 24px rgba(34, 197, 94, 0.25);
}

.txam-success-panel h3 {
    margin: 0 0 10px;
    font-size: 28px;
    color: #111827;
}

.txam-success-message {
    margin-bottom: 20px;
    color: #4b5563;
    font-size: 16px;
}

.txam-success-row {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
    font-size: 15px;
    color: #1f2937;
}

.txam-success-actions {
    margin-top: 24px;
}

.txam-success-btn {
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 22px;
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.txam-success-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.28);
}

.txam-form-wrap .page-title {
    margin-bottom: 0;
    margin-top: 0;
    text-align: center;
    font-weight: 600;
}

.txam-form-wrap .page-subtitle {
    color: #084298;
    background-color: #cfe2ff;
    border-color: #b6d4fe;
    padding: 13px 20px;
    border-radius: .25rem;
}

.txas-admission-page {
    padding-top: 20px;
}

.txam-payment-box {
    max-width: 490px;
    margin: 20px auto;
    padding: 24px;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    text-align: center;
    font-family: system-ui, -apple-system, sans-serif;
}

.txam-payment-box h3 {
    margin-bottom: 16px;
    font-size: 20px;
    font-weight: 600;
    color: #111827;
}

.txam-payment-qr {
    margin-bottom: 16px;
}

.txam-payment-qr img {
    border-radius: 12px;
    border: 1px solid #eee;
    padding: 8px;
    background: #fafafa;
}

.txam-payment-box p {
    margin: 6px 0;
    font-size: 14px;
    color: #374151;
}

.txam-payment-box strong {
    color: #111827;
    font-weight: 600;
}

/* SỐ TIỀN nổi bật */
.txam-payment-box p:first-of-type {
    font-size: 18px;
    font-weight: 600;
    color: #16a34a;
}

/* BADGE học sinh */
.txam-student-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, #2563eb, #3b82f6);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* NOTE */
.txam-payment-note {
    margin-top: 16px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 10px;
    font-size: 12px;
    color: #6b7280;
}

.txam-payment-box.txam-payment-unavailable {
    max-width: 560px;
    border: 1px solid #fecaca;
}

.txam-payment-unavailable-icon {
    width: 52px;
    height: 52px;
    margin: 0 auto 14px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fee2e2;
    color: #991b1b;
    font-size: 26px;
    font-weight: 700;
}

.txam-payment-box.txam-payment-unavailable p {
    max-width: 460px;
    margin: 8px auto 0;
    color: #4b5563;
    line-height: 1.6;
}

/* full width mobile */
@media (max-width: 768px) {
    .txam-submit-btn {
        width: 100%;
    }
}

@media (max-width: 991px) {
    .txam-grid,
    .txam-detail-grid {
        grid-template-columns: 1fr;
    }

    .txam-lookup-row {
        flex-direction: column;
    }
}
