.assign-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(4, 7, 15, 0.80);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}

    .assign-modal-overlay.open {
        opacity: 1;
        visibility: visible;
    }

.assign-modal {
    background: var(--navy);
    border-radius: 24px;
    border: 1px solid var(--border);
    max-width: 520px;
    width: 90%;
    padding: 2rem 2.25rem;
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.75);
    position: relative;
}

.assign-modal-header {
    margin-bottom: 1.5rem;
}

.assign-modal-title {
    font-family: 'Lora', serif;
    font-size: 1.55rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #e5e7eb;
    margin-bottom: 0.4rem;
}

.assign-modal-subtitle {
    font-size: 0.88rem;
    color: #9ca3af;
    line-height: 1.6;
}

.assign-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(15, 23, 42, 0.9);
    color: var(--off-white);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

    .assign-modal-close:hover {
        background: var(--blue);
        border-color: var(--blue);
        transform: translateY(-1px);
    }

.assign-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.assign-form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.assign-form-label {
    font-size: 0.78rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #9ca3af;
    font-weight: 600;
}

.assign-form-input {
    width: 100%;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--dark-blue);
    color: var(--off-white);
    font-size: 0.92rem;
    padding: 0.8rem 1.1rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

    .assign-form-input::placeholder {
        color: #64748b;
    }

    .assign-form-input:focus {
        border-color: var(--blue);
        box-shadow: 0 0 0 1px rgba(74, 144, 226, 0.35);
        background: #223349;
    }

.assign-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.assign-btn-primary {
    padding: 0.8rem 1.7rem;
    border-radius: 999px;
    border: none;
    background: var(--blue);
    color: var(--white);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    white-space: nowrap;
}

    .assign-btn-primary:hover {
        background: var(--light-blue);
        box-shadow: 0 10px 35px rgba(74, 144, 226, 0.35);
        transform: translateY(-1px);
    }

    .assign-btn-primary:disabled {
        opacity: 0.7;
        cursor: default;
        box-shadow: none;
        transform: none;
    }

.assign-btn-ghost {
    padding: 0.8rem 1.5rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: transparent;
    color: #9ca3af;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
}

    .assign-btn-ghost:hover {
        background: var(--slate);
        color: var(--off-white);
        border-color: var(--blue);
    }

/* ===== Fancy file upload ===== */

.assign-form-file {
    display: none;
}

.assign-file-dropzone {
    border-radius: 18px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: #0f172a;
    padding: 0.9rem 1.1rem;
    display: flex;
    align-items: center;
    gap: 0.85rem;
    cursor: pointer;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.18s ease, background 0.25s ease;
}

    .assign-file-dropzone:hover {
        border-color: rgba(229, 231, 235, 0.9);
        box-shadow: 0 14px 45px rgba(15, 23, 42, 0.9);
        transform: translateY(-1px);
        background: #111827;
    }

.assign-file-icon {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: #111827;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 30px rgb(130 70 122 / 76%);
    overflow: hidden;
    flex-shrink: 0;
}

.assign-file-icon-svg {
    width: 22px;
    height: 22px;
    display: block;
}

.assign-file-text {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.assign-file-title {
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #e5e7eb;
}

.assign-file-sub {
    font-size: 0.78rem;
    color: #9ca3af;
}

.assign-file-preview {
    margin-top: 0.6rem;
    font-size: 0.8rem;
    color: #9ca3af;
    line-height: 1.5;
    background: rgba(15, 23, 42, 0.75);
    border-radius: 12px;
    border: 1px dashed rgba(148, 163, 184, 0.4);
    padding: 0.5rem 0.7rem;
    max-height: 180px;
    overflow-y: auto;
}

.assign-file-empty {
    opacity: 0.7;
    padding-left: 0.2rem;
}

.assign-file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem;
    padding: 0.2rem 0;
}

.assign-file-item-left {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-width: 0;
}

.assign-file-item-icon {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    background: #111827;
    border: 1px solid rgb(83 47 127 / 87%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.9);
    position: relative;
    flex-shrink: 0;
}

    .assign-file-item-icon::before {
        content: "";
        position: absolute;
        inset: 3px 3px 6px 3px;
        border-radius: 4px;
        border: 1px solid rgba(148, 163, 184, 0.6);
    }

    .assign-file-item-icon::after {
        content: "";
        position: absolute;
        left: 4px;
        right: 4px;
        bottom: 4px;
        height: 6px;
        border-radius: 3px;
        background: #4b5563;
        clip-path: polygon(0 100%, 0 40%, 35% 15%, 60% 55%, 80% 30%, 100% 70%, 100% 100%);
    }

.assign-file-item-name {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 260px;
    font-size: 0.82rem;
    color: #e5e7eb;
}

.assign-file-item-remove {
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 0.82rem;
    cursor: pointer;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    transition: background 0.2s ease, color 0.2s ease;
}

    .assign-file-item-remove:hover {
        background: rgba(248, 113, 113, 0.12);
        color: #fecaca;
    }

.assign-file-error,
.assign-input-error {
    margin-top: 0.3rem;
    font-size: 0.78rem;
    color: #fecaca;
    display: none;
}

/* Thank you state */
.assign-thankyou {
    display: none;
    text-align: center;
    padding-top: 0.5rem;
}

.assign-thankyou-title {
    font-family: 'Lora', serif;
    font-size: 1.4rem;
    color: #e5e7eb;
    margin-bottom: 0.4rem;
}

.assign-thankyou-subtitle {
    font-size: 0.9rem;
    color: #9ca3af;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .assign-modal-overlay {
        align-items: center;
    }

    .assign-modal {
        width: 100%;
        max-width: none;
        border-radius: 24px;
        padding: 1.5rem 1.25rem 1.75rem;
    }

    .assign-modal-title {
        font-size: 1.4rem;
    }

    .assign-modal-footer {
        flex-direction: column-reverse;
        align-items: stretch;
    }

    .assign-btn-primary,
    .assign-btn-ghost {
        width: 100%;
        text-align: center;
    }

    .assign-modal-close {
        top: 0.8rem;
        right: 0.8rem;
    }

    .assign-file-item-name {
        max-width: 180px;
    }
}

.assign-modal-overlay[hidden] { display: none; }
.assign-modal { max-height: calc(100dvh - 24px); overflow-y: auto; }
.assign-modal :focus-visible { outline: 2px solid var(--light-blue); outline-offset: 3px; }
