/* MODAL OVERLAY */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 9999;
    align-items: center;
    justify-content: center;
}

/* MODAL BOX */
.modal-box {
    background: #ffffff;
    width: 95%;
    max-width: 540px;
    border-radius: 12px;
    padding: 32px;
    position: relative;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.25);
    animation: modalFade 0.3s ease;
}

/* ANIMATION */
@keyframes modalFade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* HEADER */
.modal-title {
    text-align: center;
    margin-bottom: 5px;
    font-size: 24px;
}

.modal-subtitle {
    text-align: center;
    color: #666;
    font-size: 14px;
    margin-bottom: 25px;
}

/* CLOSE BUTTON */
.modal-close {
    position: absolute;
    top: 14px;
    right: 18px;
    font-size: 26px;
    cursor: pointer;
    color: #999;
}

.modal-close:hover {
    color: #000;
}

/* FORM */
.modal-form .form-group {
    margin-bottom: 16px;
}

.modal-form label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
    font-weight: 500;
}

.modal-form input,
.modal-form select {
    width: 100%;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid #ccc;
    font-size: 14px;
    transition: border 0.3s, box-shadow 0.3s;
}

/* FILE INPUT */
.modal-form input[type="file"] {
    padding: 10px;
    background: #f9f9f9;
}

/* FOCUS STATE */
.modal-form input:focus,
.modal-form select:focus {
    outline: none;
    border-color: #0b5ed7;
    box-shadow: 0 0 0 2px rgba(11, 94, 215, 0.15);
}

/* CHECKBOX */
.checkbox-group label {
    display: flex;
    align-items: center;
    font-size: 13px;
}

.checkbox-group input {
    margin-right: 10px;
}

/* BUTTON */
.btn-block {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    font-weight: 600;
    margin-top: 10px;
}

.modal-box {
    max-height: 90vh;
    overflow-y: auto;
}

@media (max-width: 600px) {
    .modal-box {
        max-height: 95vh;
        border-radius: 8px;
    }
}

/* MOBILE */
@media (max-width: 600px) {
    .modal-box {
        padding: 22px;
    }
}

/* DROP ZONE */
.drop-zone {
    position: relative;
    border: 2px dashed #0b5ed7;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    background: #f8faff;
    transition: background 0.3s, border-color 0.3s;
}

.drop-zone p {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.drop-zone span {
    color: #0b5ed7;
    font-weight: 500;
}

.drop-zone.dragover {
    background: #eef3ff;
    border-color: #084298;
}

.drop-zone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

/* FILE LIST */
.file-list {
    margin-top: 10px;
    font-size: 13px;
}

.file-list div {
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

/* CUSTOM CHECKBOX */
.custom-checkbox {
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    font-size: 13px;
    user-select: none;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
}

.custom-checkbox .checkmark {
    position: absolute;
    left: 0;
    top: 2px;
    height: 18px;
    width: 18px;
    border: 2px solid #0b5ed7;
    border-radius: 4px;
}

.custom-checkbox input:checked~.checkmark {
    background: #0b5ed7;
}

.custom-checkbox .checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked~.checkmark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 5px;
    top: 2px;
    width: 5px;
    height: 9px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* BUTTON SPINNER */
.spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.4);
    border-top: 3px solid #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

button.loading .btn-text {
    opacity: 0.6;
}

button.loading .spinner {
    display: inline-block;
}

.alert {
    max-width: 900px;
    margin: 20px auto;
    padding: 14px 18px;
    border-radius: 10px;
    font-size: .95rem;
}

.alert-success {
    background: #e8f7ef;
    color: #0a6b3c;
    border-left: 4px solid #0a6b3c;
}

.alert-error {
    background: #fdeaea;
    color: #9d1c1c;
    border-left: 4px solid #9d1c1c;
}