.ims-auth {
    min-height: 100vh;
    background: url('../assets/media/misc/auth-bg02.png') center / cover no-repeat;
}

.ims-dropzone {
    border: 2px dashed var(--bs-primary, #009ef7);
    border-radius: .75rem;
    background: #fff;
    padding: 1.75rem 1rem;
    text-align: center;
    cursor: pointer;
    transition: background-color .15s, border-color .15s;
}

.ims-dropzone:hover,
.ims-dropzone:focus-visible,
.ims-dropzone.is-dragover {
    background: #f1faff;
    border-style: solid;
    outline: none;
}

.ims-dropzone.is-full {
    opacity: .6;
    cursor: not-allowed;
}

.ims-dropzone.is-invalid {
    border-color: #f1416c;
}

.ims-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: .75rem;
}

.ims-upload-item {
    position: relative;
    border: 1px solid #e4e6ef;
    border-radius: .65rem;
    background: #fff;
    overflow: hidden;
}

.ims-upload-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100px;
    background: #f5f8fa;
}

.ims-upload-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ims-upload-meta {
    padding: .4rem .6rem;
    font-size: .8rem;
    line-height: 1.2;
}

.ims-upload-name {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 600;
}

.ims-upload-remove {
    position: absolute;
    top: .35rem;
    right: .35rem;
    width: 1.6rem;
    height: 1.6rem;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(0, 0, 0, .65);
    color: #fff;
    line-height: 1;
}

.ims-upload-remove:hover {
    background: #f1416c;
}

.ims-doc {
    display: flex;
    flex-direction: column;
    width: 140px;
    border: 1px solid #e4e6ef;
    border-radius: .65rem;
    background: #fff;
    overflow: hidden;
    text-decoration: none;
    text-align: left;
    transition: box-shadow .15s, transform .15s;
}

.ims-doc:hover,
.ims-doc:focus-visible {
    box-shadow: 0 .4rem 1rem rgba(0, 0, 0, .15);
    transform: translateY(-2px);
}

.ims-doc img,
.ims-doc-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100px;
    object-fit: cover;
    background: #f5f8fa;
}

.ims-doc-name {
    display: block;
    padding: .4rem .6rem;
    font-size: .8rem;
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #3f4254;
}

.ims-viewer-body {
    min-height: 50vh;
    background: #f5f8fa;
    overflow: hidden;
}

.ims-viewer-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: .5rem 1rem;
    border-bottom: 1px solid #eff2f5;
}

.ims-viewer-zoom {
    min-width: 3.5rem;
    text-align: center;
    font-weight: 600;
}

.ims-viewer-image {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    transition: transform .15s ease;
    user-select: none;
    touch-action: none;
}

.ims-viewer-image.is-zoomed { cursor: grab; }

.ims-viewer-image.is-dragging {
    cursor: grabbing;
    transition: none;
}

.ims-viewer-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    opacity: .8;
}

.ims-viewer-prev { left: 1rem; }
.ims-viewer-next { right: 1rem; }

.ims-rich img {
    max-width: 100%;
    height: auto;
}

.ims-rich p:last-child {
    margin-bottom: 0;
}
