.rental-dossier {
    display: grid;
    gap: 1rem;
}

.rental-dossier-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--surface);
}

.rental-dossier-hero h2 {
    margin: 0.2rem 0 0;
    font-size: clamp(1.25rem, 3vw, 1.8rem);
}

.rental-dossier-hero p {
    margin: 0.25rem 0 0;
    color: var(--text-secondary);
}

.rental-dossier-kicker {
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.rental-dossier-steps {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.rental-dossier-step {
    min-width: 0;
    display: grid;
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    color: var(--text);
    text-align: left;
    cursor: pointer;
}

.rental-dossier-step.is-done {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.rental-dossier-step.is-pending {
    background: #f8fafc;
}

.rental-dossier-step:not(:disabled):hover {
    border-color: var(--primary);
    box-shadow: 0 6px 18px rgba(37, 99, 235, 0.09);
}

.rental-dossier-step-status {
    width: 2rem;
    height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #e2e8f0;
    color: #64748b;
    font-size: 1rem;
    font-weight: 900;
}

.rental-dossier-step.is-done .rental-dossier-step-status {
    background: #22c55e;
    color: #fff;
}

.rental-dossier-step-copy {
    min-width: 0;
    display: grid;
    gap: 0.2rem;
}

.rental-dossier-step-copy strong {
    font-size: 1rem;
}

.rental-dossier-step-copy small {
    overflow: hidden;
    color: var(--text-secondary);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rental-dossier-step-arrow {
    color: var(--text-secondary);
    font-size: 1.6rem;
}

.rental-dossier-lifecycle-action {
    display: flex;
    justify-content: flex-end;
    margin-top: -0.15rem;
}

.rental-dossier-future-locations {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--surface);
}

.rental-dossier-future-locations > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem;
    color: var(--text);
    cursor: pointer;
    font-weight: 800;
    list-style: none;
}

.rental-dossier-future-locations > summary::-webkit-details-marker {
    display: none;
}

.rental-dossier-future-locations > summary::after {
    content: '›';
    color: var(--text-secondary);
    font-size: 1.6rem;
    transition: transform 0.2s ease;
}

.rental-dossier-future-locations[open] > summary {
    border-bottom: 1px solid var(--border);
}

.rental-dossier-future-locations[open] > summary::after {
    transform: rotate(90deg);
}

.rental-dossier-future-list {
    display: grid;
    gap: 0.8rem;
    padding: 0.9rem;
}

.rental-dossier-future {
    display: grid;
    gap: 0.75rem;
    padding: 0.9rem;
    border: 1px solid var(--border);
    border-radius: 0.85rem;
    background: #f8fafc;
}

.rental-dossier-future-heading {
    display: grid;
    gap: 0.2rem;
}

.rental-dossier-future-heading small {
    color: var(--text-secondary);
}

.rental-dossier-empty,
.rental-dossier-section {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 1rem;
    background: var(--surface);
}

.rental-dossier-empty p,
.rental-dossier-section p {
    margin: 0;
    color: var(--text-secondary);
}

.rental-dossier-fixed-choice {
    padding: 0.75rem;
    border: 1px solid #bfdbfe;
    border-radius: 0.5rem;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 700;
}

.rental-dossier-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 0.75rem;
}

.rental-dossier-photo-card {
    position: relative;
}

.rental-dossier-photo {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 0.75rem;
    background: #f8fafc;
    cursor: pointer;
}

.rental-dossier-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rental-dossier-photo-delete {
    position: absolute;
    top: 0.35rem;
    right: 0.35rem;
    width: 1.8rem;
    height: 1.8rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.8);
    color: #fff;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.rental-dossier-photo-progress {
    display: grid;
    gap: 0.45rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 700;
}

.rental-dossier-photo-progress-track {
    height: 0.55rem;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
}

.rental-dossier-photo-progress-track span {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--primary);
    transition: width 0.2s ease;
}

.rental-dossier-photo-progress.is-starting .rental-dossier-photo-progress-track span {
    animation: rental-dossier-photo-upload-start 1s ease-in-out infinite alternate;
}

.rental-dossier-photo-upload-notice {
    position: fixed;
    right: max(1rem, env(safe-area-inset-right));
    bottom: max(1rem, env(safe-area-inset-bottom));
    left: max(1rem, env(safe-area-inset-left));
    z-index: 3100;
    display: grid;
    gap: 0.45rem;
    padding: 0.85rem 1rem;
    border: 1px solid #bfdbfe;
    border-radius: 0.8rem;
    background: #eff6ff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.22);
    color: #1e3a8a;
    font-size: 0.9rem;
    font-weight: 800;
}

.rental-dossier-photo-upload-notice .rental-dossier-photo-progress-track {
    width: 100%;
}

.rental-dossier-photo-upload-notice.is-starting .rental-dossier-photo-progress-track span {
    animation: rental-dossier-photo-upload-start 1s ease-in-out infinite alternate;
}

@keyframes rental-dossier-photo-upload-start {
    from { opacity: 0.45; transform: translateX(-0.25rem); }
    to { opacity: 1; transform: translateX(0.25rem); }
}

.rental-dossier-photo-undo {
    position: fixed;
    left: 50%;
    right: auto;
    bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    z-index: 3000;
    display: flex;
    max-width: calc(100vw - 2rem);
    box-sizing: border-box;
    align-items: center;
    gap: 1rem;
    padding: 0.8rem 1rem;
    border-radius: 0.8rem;
    background: #0f172a;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.3);
    color: #fff;
}

.rental-dossier-photo-undo button {
    padding: 0;
    border: 0;
    background: transparent;
    color: #86efac;
    font: inherit;
    font-weight: 800;
    cursor: pointer;
}

.rental-contract-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: 0.8rem;
    background: #eff6ff;
}

.rental-contract-file > div:first-child {
    min-width: 0;
}

.rental-contract-file strong {
    display: block;
    overflow-wrap: anywhere;
}

.rental-contract-file-actions {
    display: flex;
    gap: 0.45rem;
    flex-wrap: wrap;
}

@media (max-width: 680px) {
    .rental-dossier-hero {
        align-items: stretch;
        flex-direction: column;
    }

    .rental-dossier-hero .btn {
        width: 100%;
    }

    .rental-dossier-steps {
        grid-template-columns: 1fr;
    }

    .rental-dossier-lifecycle-action .btn {
        width: 100%;
    }

    .rental-contract-file {
        align-items: stretch;
        flex-direction: column;
    }
}
