* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

::-webkit-scrollbar {
    width: 2px;
    border-radius: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
    width: 2px;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: #999;
    width: 2px;
    border-radius: 10px;
}

.work-info {
    max-height: 420px;
    overflow-y: auto;
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #fff;
    min-height: 100vh;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-x: hidden;
}

.form-container {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(15px);
    border-radius: 8px;
    box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.25);
    padding: 40px;
    max-width: 1024px;
    width: 100%;
    animation: slideIn 0.8s ease-out;
    border: 1px solid #2a5298;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#addPositionBtn-1:disabled,
#addRepPositionBtn:disabled,
#addPositionBtn:disabled,
.add-position-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.participants-item:nth-child(1) .removeP,
.repposition-item:first-child .remove,
.position-item:first-child .remove,
.chutoa-item:first-child .remove,
.baocaovien-item:first-child .remove {
    display: none;
}

span {
    text-transform: none;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1e3c72;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

input[type="password"],
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="date"],
input[type="time"],
textarea,
select {
    width: 100%;
    padding: 10px 10px;
    box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.1) !important;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

input[name="flightDate"],
input[name="flightTime"] {
    padding: 8px 8px;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
    filter: invert(29%) sepia(89%) saturate(1200%) hue-rotate(195deg) brightness(0.85);
    cursor: pointer;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border: 1px solid #e1e8ed;
    border-color: #2a5298;
}

textarea {
    resize: vertical;
    min-height: 80px;
}

textarea::placeholder,
input::placeholder {
    font-style: italic;
    font-size: 13px;
}

input:focus:not(:placeholder-shown),
input:not(:placeholder-shown) {
    border-color: #2a5298;
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.2);
}


/*==== Custom select ====*/

select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232a5298' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    appearance: none;
}

.custom-select {
    position: relative;
}

.select-search {
    position: relative;
}

.select-search input {
    padding-right: 45px;
}

.select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #2a5298;
    border-radius: 6px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 5px;
    box-shadow: 0 10px 30px rgba(30, 60, 114, 0.2);
}

.select-option {
    padding: 5px 5px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.select-dropdown::-webkit-scrollbar {
    width: 4px;
}

.select-dropdown::-webkit-scrollbar-track {
    background: transparent;
}

.select-dropdown::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.4);
    border-radius: 10px;
}

.select-option:hover {
    background-color: rgba(42, 82, 152, 0.1);
}

.select-option.selected {
    background-color: #2a5298;
    color: white;
}


/*==== Custom border ====*/

.positions-section,
.participants-section {
    border: 2px dashed #2a5298;
    border-radius: 6px;
    padding: 10px;
    margin: 10px 0;
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.05), rgba(42, 82, 152, 0.05));
}

.pay-item,
.repposition-item,
.position-item,
.participants-item,
.chutoa-item,
.baocaovien-item{
    border: 1px solid rgba(42, 82, 152, 0.2);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 10px;
    animation: fadeIn 0.5s ease-out;
    background: rgba(255, 255, 255, 0.5);
    position: relative;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}


/* ==== Custom btn ==== */

.btn {
    padding: 5px 10px;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 100px;
}

.add-position-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 25px rgba(30, 60, 114, 0.3);
}

.remove_listview,
.remove,
.removeP {
    background: #e23e4f;
    color: white;
    border: none;
    padding: 8px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.3);
}

.remove_listview:hover,
.removeP:hover,
.remove:hover {
    background: #c82333;
    transform: scale(1.1);
}

.back-btn:hover,
.submit-btn:hover {
    transform: translateY(-4px);
    box-shadow: 2px 2px 14px rgba(0, 0, 0, 0.4);
}

.btn-primary {
    border-radius: 5px;
    padding: 5px 10px;
    background: linear-gradient(135deg, #18b940, #1fc25d);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
    transform: translateY(-2px);
}

.close-btn {
    position: absolute;
    top: 20px;
    right: 25px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close-btn:hover {
    color: #333;
}

.btn_link {
    font-size: 15px;
    font-style: italic;
    color: #6090e2;
    font-weight: 600;
}

.btn_link:hover {
    color: #41da22;
    transform: translateY(-4px);
}


/* ==== Custom icon + alert ==== */

.search-icon {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #2a5298;
    pointer-events: none;
}

.choices.error .choices__inner {
    border: 1px solid red !important;
}

select.form-select {
    position: absolute !important;
    opacity: 0 !important;
    pointer-events: none;
    width: 0 !important;
    height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.warning-text {
    color: #dc3545;
    font-size: 13px;
    display: none;
}

#participantCount {
    padding: 3px 5px;
    color: #c82333;
}


/*  */

.modal {
    border-radius: 10px;
    padding: 10px;
    height: 100%;
    overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    animation: modalOpen 0.3s ease-out forwards;
}

@keyframes modalOpen {
    to {
        transform: scale(1);
    }
}

.modal-title {
    font-size: 20px;
    color: #333333;
    font-weight: bold;
    background: linear-gradient(135deg, #3ff848, #1b67eb);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-transform: uppercase;
}

.modal-subtitle {
    color: #666;
    padding: 20px;
    font-size: 16px;
    font-style: italic;
}


/* ==== Custom login register ==== */

.login-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
    padding: 1rem 2rem;
    max-width: 400px;
    width: 100%;
}

.login-header {
    background: #fff;
    color: #333;
    padding: 5px;
    text-align: center;
}

.login-header::after {
    content: "";
    display: block;
    width: 80px;
    height: 4px;
    background: #ff6b6b;
    background: linear-gradient(90deg, #4068ec 0%, #43d864 100%);
    margin: 15px auto 0;
    border-radius: 2px;
}

.hospital-name {
    font-size: 20px;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 4px;
}

.hospital-name {
    font-size: 20px;
    font-weight: bold;
    background: linear-gradient( 90deg, #06b6d4, #3b82f6, #8b5cf6, #10b981, #06b6d4);
    background-size: 300%;
    text-transform: uppercase;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 10s linear infinite;
}

@keyframes shimmer {
    0% {
        background-position: 0% 50%;
    }
    100% {
        background-position: 300% 50%;
    }
}

.form-floating>.form-control {
    font-size: 14px;
    padding-top: 1.1rem;
    padding-bottom: 0.5rem;
}

.form-floating>label {
    font-size: 13px;
}

.footer-text {
    justify-content: space-between;
    font-weight: 500;
    font-size: 16px;
    color: #000;
    margin-top: 1.5rem;
    text-align: center;
}

.custom-label {
    position: absolute;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    background: white;
    padding: 0 4px;
    font-size: 14px;
    color: #000;
    pointer-events: none;
    transition: all 0.2s ease;
}

.custom-input:focus+.custom-label,
.custom-input:not(:placeholder-shown):valid+.custom-label {
    top: 0;
    left: 8px;
    font-size: 12px;
    font-weight: bold;
    color: #444;
}

.loading-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid transparent;
    border-top: 2px solid #fff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}


/*  */

.table-responsive::-webkit-scrollbar {
    height: 10px;
    width: 2px;
    background: #fff;
}

.table-responsive::-webkit-scrollbar-thumb {
    width: 2px;
    background: linear-gradient(90deg, #6ed660 0%, #31acdd 100%);
}

textarea::-webkit-scrollbar {
    width: 0px;
}

td,
th {
    font-size: 14px;
    white-space: nowrap;
}

.form-group input {
    width: 100%;
    padding: 8px 15px;
    border: 1px solid #fff;
    border-color: #f1f1f1;
    border-radius: 8px;
    font-size: 1rem;
    color: #333;
    transition: all 0.3s ease;
    box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.1);
}

.form-group input:focus {
    border-color: #5c9acc;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.1);
    outline: none;
}

::placeholder {
    color: #999;
    font-size: 12px;
    font-style: italic;
}

.form-group input:not(:placeholder-shown) {
    border-color: #5c9acc;
}

input[type="checkbox"] {
    accent-color: #28a745;
    box-shadow: none;
}

.pagination .page-link {
    border-radius: 5px;
    color: #333;
}

.pagination .page-item.active .page-link {
    background-color: #5c9acc;
    border-color: #5c9acc;
    color: white;
}

.pagination .page-item.disabled .page-link {
    color: #aaa;
}

.btn-add {
    font-size: 14px;
    font-weight: 500;
    padding: 10px 10px;
    border: 1px solid #5c9acc;
    background-color: #fff;
    box-shadow: 1px 1px 8px rgba(0, 0, 0, 0.1);
}

.btn-add:hover {
    background-color: #f1f1f1;
    transform: translateY(-1px);
    border: 1px solid #5c9acc;
}

.card-header {
    background-color: #15d10eb4;
}

.card-header h5 {
    font-size: 16px;
}

.card-header-detail {
    background: linear-gradient(135deg, rgba(30, 60, 114, 0.05), rgba(42, 82, 152, 0.05));
    padding: 10px;
    border-radius: 6px;
}

mark {
    background-color: #41da22;
    padding: 0 2px;
    border-radius: 5px;
}


/* Payment-method */

.nav-pills .nav-link.active {
    background-color: #18b940;
    color: #fff;
    font-weight: 500;
    border-radius: 8px;
}

.nav-pills .nav-link {
    color: #222;
}

.nav-pills .nav-link:hover {
    color: #18b940;
}

.nav-pills .nav-link.active:hover {
    color: #fff;
}

.accordion-button {
    border: none !important;
    box-shadow: none !important;
    font-size: 14px;
}

.accordion-button.collapsed {
    background-color: rgba(0, 0, 0, 0.05);
}

.accordion-button:not(.collapsed):hover {
    background-color: #cfe2ff;
}

.accordion-button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.accordion-button:not(.collapsed) {
    border: none !important;
    box-shadow: none !important;
}


/* ==== Index ==== */

.registration-box {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 40px 15px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

    .registration-box:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
        /*border-color: #667eea;
        border-color: #667eea;*/
    }

.registration-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.registration-box:hover::before {
    left: 100%;
}

.icon {
    color: #fff;
    font-size: 30px;
    width: 80px;
    height: 80px;
    margin: 0 auto 25px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(204, 205, 209, 0.7);
    }
    70% {
        box-shadow: 0 0 0 20px rgba(102, 126, 234, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}


/* ==== Custom mobile ==== */

@media (max-width: 768px) {
    body {
        padding: 5px;
    }
    .form-container {
        padding: 10px;
    }
    .form-row {
        flex-direction: column;
        gap: 10px;
    }
    .position-fields,
    .participants-fields {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .header {
        margin-bottom: 20px;
    }
    .text-muted {
        font-size: 12px;
    }
    .subtitle {
        display: none;
    }
    .position-header,
    .participants-header {
        margin-bottom: 10px;
    }
    .positions-section {
        padding: 0;
        border: none;
        background: none;
    }
    .add,
    #addPositionBtn {
        width: 40px;
        height: 30px;
        border-radius: 5px;
        overflow: hidden;
        padding: 5px;
        font-size: 12px;
    }
    span.position-number.fw-bold.text-primary,
    label {
        font-size: 14px;
    }
    .participants-item,
    .position-item,
    .pay-item {
        padding: 5px;
    }
    .info-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    .info-row img {
        width: 150px;
        height: 150px;
    }
    .info-item {
        flex-direction: row;
    }
    .info-value,
    .info-label {
        font-size: 11px;
    }
    .info-value {
        padding: 0;
        min-height: 0;
        background: none;
        border-left: none;
    }
    .info-title {
        margin-top: 0;
        font-size: 14px;
    }
    .close-btn {
        display: none;
    }
    .modal-body {
        padding: 20px;
    }
    .modal-actions {
        flex-direction: column;
        margin-top: 0px;
    }
    .footer-text {
        font-size: 12px;
    }
    .container-fluid {
        --bs-gutter-x: .5rem !important;
    }
    .info-title {
        font-size: 20px;
    }
    /*  */
    .table-responsive {
        display: none;
    }
    .card-view {
        display: block;
    }
    .card-view .card {
        background-color: #f9f9f9;
        border-radius: 8px;
        padding: 5px;
        margin-bottom: 10px;
        border-left: 4px solid #007bff;
    }
    .card-header-box {
        display: flex;
        justify-content: space-between;
        align-items: center;
        cursor: pointer;
        padding: 5px 0;
    }
    .card-number {
        margin-left: 5px;
        background-color: #007bff;
        color: white;
        padding: 5px 10px;
        border-radius: 10px;
        font-size: 12px;
        font-weight: bold;
    }
    .card-main-info {
        flex: 1;
        margin-left: 15px;
    }
    .card-name {
        font-weight: bold;
        color: #333;
        font-size: 16px;
    }
    .card-role {
        color: #666;
        font-size: 14px;
        margin-top: 2px;
    }
    .padding_card {
        padding: 0 1rem;
    }
    .expand-btn {
        background-color: #28a745;
        color: white;
        border: none;
        width: 30px;
        height: 30px;
        border-radius: 50%;
        font-size: 18px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.3s ease;
    }
    .expand-btn:hover {
        background-color: #218838;
    }
    .expand-btn.expanded {
        background-color: #dc3545;
        transform: rotate(45deg);
    }
    .card-details {
        display: none;
        margin-top: 5px;
        padding-top: 5px;
        border-top: 1px solid #ddd;
    }
    .card-details.show {
        display: block;
    }
    .card-row {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: 8px 0;
        border-bottom: 1px solid #eee;
    }
    .card-row:last-child {
        border-bottom: none;
    }
    .card-label {
        font-size: 13px;
        font-weight: bold;
        color: #333;
    }
    .card-value {
        font-size: 13px;
        color: #333;
        flex: 1;
        margin-left: 10px;
        word-break: break-word;
    }
    .card-value.yes {
        color: #07942a;
        font-style: italic;
    }
    .card-value.no {
        color: #e91111;
        font-style: italic;
    }
    .icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
        margin: 0 auto 15px;
    }
    .login-card {
        padding: 20px 15px;
        max-width: 350px;
    }
    .registration-box {
        padding: 20px;
    }
    .remove_listview {
        width: 22px;
        height: 22px;
        font-size: 10px;
        padding: 6px;
    }
}

@media (min-width: 768px) {
    .table-container {
        overflow-x: auto;
        padding: 0;
    }
    .responsive-table {
        width: 100%;
        border-collapse: collapse;
        min-width: 800px;
    }
    .responsive-table td {
        padding: 12px 15px;
        text-align: left;
        border-bottom: 1px solid #ddd;
        white-space: nowrap;
    }
    .responsive-table tr:first-child td {
        background-color: #f8f9fa;
        font-weight: bold;
        color: #333;
    }
    .responsive-table tr:not(:first-child):hover {
        background-color: #f8f9fa;
    }
    .card-view {
        display: none;
    }
}