.files-shell {
    display: grid;
    gap: 14px;
}

.files-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.files-metric-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 58px;
    padding: 12px 14px;
    border: 1px solid rgba(0, 128, 123, .18);
    border-radius: 8px;
    background: #f8fdfc;
    color: #0f172a;
    box-shadow: 0 1px 4px rgba(15, 23, 42, .05);
}

.files-metric-card strong {
    color: #004d4a;
    font-size: 28px;
    line-height: 1;
}

.files-metric-card span {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    text-align: right;
}

.files-metric-card.warn {
    background: #fff8e6;
    border-color: rgba(217, 119, 6, .24);
}

.files-metric-card.danger {
    background: #fff1f2;
    border-color: rgba(225, 29, 72, .22);
}

.files-tabs,
.files-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.files-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 8px 11px;
    border: 1px solid rgba(0, 128, 123, .20);
    border-radius: 8px;
    background: #fff;
    color: #004d4a;
    cursor: pointer;
    font-weight: 900;
}

.files-tab small {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 22px;
    height: 22px;
    padding: 0 6px;
    border-radius: 999px;
    background: #e8f7f5;
    color: #006c67;
    font-size: 12px;
}

.files-tab.active {
    background: #00807b;
    color: #fff;
    border-color: #00807b;
    box-shadow: 0 2px 8px rgba(0, 128, 123, .18);
}

.files-tab.active small {
    background: rgba(255, 255, 255, .22);
    color: #fff;
}

.files-toolbar {
    padding: 12px;
    border: 1px solid rgba(0, 128, 123, .16);
    border-radius: 8px;
    background: #f7fbfb;
}

.files-primary-btn,
.files-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 900;
    white-space: nowrap;
}

.files-primary-btn {
    background: #00807b;
    color: #fff;
}

.files-primary-btn:hover {
    background: #006d69;
}

.files-primary-btn:disabled,
.files-secondary-btn:disabled {
    cursor: wait;
    opacity: .65;
}

.files-secondary-btn {
    background: #fff;
    color: #004d4a;
    border-color: rgba(0, 128, 123, .24);
}

.files-search {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 320px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid rgba(0, 128, 123, .22);
    border-radius: 8px;
    background: #fff;
    color: #00807b;
}

.files-search input {
    width: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #0f172a;
    font-weight: 800;
}

.files-filter {
    display: grid;
    gap: 3px;
    min-width: 170px;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.files-filter select,
.files-form-grid select,
.files-form-grid input,
.files-wide-label textarea {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid rgba(0, 128, 123, .22);
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-weight: 800;
    outline: 0;
}

.files-wide-label textarea:not(.files-address-line) {
    min-height: 68px;
    resize: vertical;
}

.files-address-line {
    min-height: 40px;
    height: 40px;
    resize: vertical;
}

.files-table-wrap {
    overflow: auto;
    border: 1px solid rgba(0, 128, 123, .16);
    border-radius: 8px;
    background: #fff;
}

.files-workspace {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.files-workspace.with-preview {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 34%);
    align-items: start;
}

.files-main-list {
    min-width: 0;
}

.files-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 1180px;
}

.files-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 11px 12px;
    background: #00807b;
    color: #fff;
    font-size: 12px;
    text-align: left;
    text-transform: uppercase;
    letter-spacing: .02em;
}

.files-table td {
    padding: 11px 12px;
    border-bottom: 1px solid #e2eeee;
    color: #0f172a;
    font-size: 14px;
    vertical-align: top;
}

.files-table td strong {
    display: block;
    font-size: 14px;
    line-height: 1.25;
}

.files-table td small {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.files-date-main {
    display: block;
    font-weight: 900;
}

.files-date-danger {
    color: #b91c1c !important;
}

.files-row.status-expired {
    background: #fff1f2;
}

.files-row {
    cursor: pointer;
}

.files-row.selected {
    outline: 2px solid rgba(0, 128, 123, .38);
    outline-offset: -2px;
    background: #eefaf8;
}

.files-row.status-needs_review {
    background: #fff8e6;
}

.files-row.status-superseded,
.files-row.status-archived {
    color: #64748b;
    opacity: .78;
}

.files-address-text {
    display: inline-block;
    max-width: 260px;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
}

.files-vin-line {
    max-width: 280px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.files-agent-text {
    display: inline-block;
    max-width: 300px;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
}

.files-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #e6f6f4;
    color: #006d69;
    font-size: 11px;
    font-weight: 900;
    white-space: nowrap;
}

.files-status-pill.expired {
    background: #ffe4e6;
    color: #9f1239;
}

.files-status-pill.needs_review {
    background: #fef3c7;
    color: #92400e;
}

.files-status-pill.superseded,
.files-status-pill.archived {
    background: #e2e8f0;
    color: #475569;
}

.files-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.files-row-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(0, 128, 123, .22);
    border-radius: 8px;
    background: #fff;
    color: #004d4a;
    cursor: pointer;
}

.files-row-actions button:hover {
    background: #e8f7f5;
}

.files-row-actions button.danger {
    border-color: rgba(225, 29, 72, .24);
    color: #be123c;
}

.files-row-actions button.danger:hover {
    background: #fff1f2;
}

.files-confirm-modal {
    width: min(460px, calc(100vw - 28px));
    padding: 18px;
    border: 1px solid rgba(0, 128, 123, .20);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .22);
}

.files-confirm-modal p {
    margin: 12px 0 0;
    color: #475569;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
}

.files-confirm-modal p strong {
    color: #9f1239;
    font-weight: 950;
}

.files-delete-key {
    display: grid;
    gap: 6px;
    margin: 14px 0 0;
    color: #475569;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
}

.files-delete-key input {
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid rgba(225, 29, 72, .36);
    border-radius: 8px;
    background: #fff7f8;
    color: #0f172a;
    font: inherit;
    font-size: 15px;
    font-weight: 900;
    text-transform: lowercase;
}

.files-delete-key input:focus {
    outline: 2px solid rgba(225, 29, 72, .22);
    outline-offset: 1px;
}

.files-delete-key-error {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 10px;
    padding: 9px 10px;
    border: 1px solid rgba(225, 29, 72, .28);
    border-radius: 8px;
    background: #fff1f2;
    color: #9f1239;
    font-size: 12px;
    font-weight: 900;
}

.files-packet-modal {
    width: min(1280px, calc(100vw - 32px));
    max-height: calc(100vh - 32px);
    overflow: hidden;
    border-radius: 14px;
    background: #f8fbfc;
    box-shadow: 0 20px 70px rgba(15, 23, 42, .26);
}

.files-packet-body {
    display: grid;
    grid-template-columns: minmax(420px, .9fr) minmax(380px, 1.1fr);
    gap: 14px;
    max-height: calc(100vh - 178px);
    padding: 16px 20px;
    overflow: auto;
}

.files-packet-modal > .files-modal-actions {
    padding: 0 20px 18px;
}

.files-packet-config,
.files-packet-preview {
    display: grid;
    align-content: start;
    gap: 12px;
    min-width: 0;
}

.files-packet-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
    border: 1px solid rgba(0, 128, 123, .17);
    border-radius: 10px;
    background: #fff;
}

.files-packet-grid label {
    display: grid;
    gap: 5px;
    color: #475569;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
}

.files-packet-grid select,
.files-packet-doc-row select {
    width: 100%;
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid rgba(0, 128, 123, .22);
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
    font: inherit;
    font-weight: 800;
}

.files-packet-pairing,
.files-packet-docs,
.files-packet-preview {
    padding: 12px;
    border: 1px solid rgba(0, 128, 123, .17);
    border-radius: 10px;
    background: #fff;
}

.files-packet-pairing {
    display: grid;
    gap: 4px;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.files-packet-pairing strong,
.files-packet-docs-head strong,
.files-packet-preview-head strong {
    color: #004d4a;
}

.files-packet-docs {
    display: grid;
    gap: 8px;
}

.files-packet-docs-head,
.files-packet-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.files-packet-docs-head span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.files-packet-doc-row {
    display: grid;
    grid-template-columns: minmax(150px, .7fr) minmax(220px, 1fr) 34px;
    align-items: center;
    gap: 8px;
    padding: 9px;
    border: 1px solid #e2eeee;
    border-radius: 8px;
    background: #fbfefe;
}

.files-packet-doc-row.status-expired,
.files-packet-doc-row.status-missing {
    background: #fff8e6;
    border-color: rgba(217, 119, 6, .25);
}

.files-packet-doc-row > span strong,
.files-packet-doc-row > span small {
    display: block;
}

.files-packet-doc-row > span strong {
    color: #0f172a;
    font-size: 13px;
}

.files-packet-doc-row > span small {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.files-packet-doc-row button,
.files-packet-preview-head button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 32px;
    padding: 6px 9px;
    border: 1px solid rgba(0, 128, 123, .22);
    border-radius: 8px;
    background: #fff;
    color: #004d4a;
    cursor: pointer;
    font-weight: 900;
}

.files-packet-warnings {
    display: grid;
    gap: 6px;
    padding: 10px 12px;
    border: 1px solid rgba(217, 119, 6, .24);
    border-radius: 8px;
    background: #fff8e6;
    color: #92400e;
    font-size: 12px;
    font-weight: 900;
}

.files-packet-warnings span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.files-packet-preview-frame {
    min-height: 640px;
    overflow: auto;
    border: 1px solid #dbe8e8;
    border-radius: 8px;
    background: #f8fafc;
}

.files-packet-preview-frame iframe {
    display: block;
    width: 100%;
    height: 640px;
    border: 0;
}

.files-packet-preview-frame img {
    display: block;
    max-width: 100%;
    max-height: 640px;
    margin: 0 auto;
    object-fit: contain;
}

.files-packet-preview-empty {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 640px;
    padding: 20px;
    color: #64748b;
    text-align: center;
    font-weight: 800;
}

.files-packet-preview-empty.error {
    color: #9f1239;
    background: #fff1f2;
}

.files-packet-preview-empty i {
    color: #00807b;
    font-size: 34px;
}

.files-danger-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 9px 14px;
    border: 1px solid rgba(225, 29, 72, .28);
    border-radius: 8px;
    background: #be123c;
    color: #fff;
    cursor: pointer;
    font-weight: 900;
}

.files-danger-btn:disabled {
    cursor: wait;
    opacity: .75;
}

.files-empty {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 230px;
    padding: 28px;
    border: 1px dashed rgba(0, 128, 123, .28);
    border-radius: 8px;
    background: #fbfefe;
    color: #64748b;
    text-align: center;
}

.files-empty i {
    color: #00807b;
    font-size: 32px;
}

.files-empty strong {
    color: #0f172a;
    font-size: 18px;
}

.files-empty.error {
    border-color: rgba(225, 29, 72, .28);
    background: #fff1f2;
    color: #9f1239;
}

.files-side-preview {
    position: sticky;
    top: 12px;
    display: grid;
    gap: 10px;
    min-height: 620px;
    padding: 12px;
    border: 1px solid rgba(0, 128, 123, .17);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 6px rgba(15, 23, 42, .06);
}

.files-side-preview-head,
.files-side-preview-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.files-side-preview-head {
    justify-content: space-between;
}

.files-side-preview-head strong,
.files-side-preview-head small {
    display: block;
}

.files-side-preview-head strong {
    color: #0f172a;
    font-size: 14px;
    line-height: 1.2;
}

.files-side-preview-head small {
    margin-top: 2px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
}

.files-side-preview-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(0, 128, 123, .22);
    border-radius: 8px;
    background: #fff;
    color: #004d4a;
    cursor: pointer;
}

.files-side-preview-actions button:hover {
    background: #eef8f7;
}

.files-side-preview-actions button:disabled {
    cursor: wait;
    opacity: .68;
}

.files-side-preview-frame {
    min-height: 570px;
    overflow: auto;
    border: 1px solid #dbe8e8;
    border-radius: 8px;
    background: #f8fafc;
}

.files-side-preview-frame iframe {
    display: block;
    width: 100%;
    height: 570px;
    border: 0;
}

.files-side-preview-frame img {
    display: block;
    max-width: 100%;
    max-height: 570px;
    margin: 0 auto;
    object-fit: contain;
}

.files-side-preview-empty {
    display: grid;
    place-items: center;
    gap: 8px;
    min-height: 570px;
    padding: 20px;
    color: #64748b;
    text-align: center;
    font-weight: 800;
}

.files-side-preview-empty.error {
    color: #9f1239;
    background: #fff1f2;
}

.files-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 7000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 24px;
    overflow: auto;
    background: rgba(15, 23, 42, .38);
}

.files-modal {
    width: min(1240px, calc(100vw - 32px));
    max-height: none;
    margin: auto 0;
    overflow: visible;
    border-radius: 14px;
    background: #f8fbfc;
    box-shadow: 0 20px 70px rgba(15, 23, 42, .26);
}

.files-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    border-bottom: 1px solid #dbe8e8;
    background: #fff;
}

.files-modal-head h2 {
    margin: 2px 0 0;
    color: #0f172a;
}

.files-modal-head button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(0, 128, 123, .24);
    border-radius: 8px;
    background: #fff;
    color: #004d4a;
    cursor: pointer;
}

.files-upload-form {
    display: grid;
    gap: 14px;
    padding: 16px 20px 20px;
    overflow: visible;
}

.files-modal-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 42%);
    gap: 14px;
    align-items: start;
}

.files-modal-main {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.files-form-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid rgba(0, 128, 123, .17);
    border-radius: 10px;
    background: #fff;
}

.files-form-card h3 {
    margin: 0;
    color: #004d4a;
    font-size: 15px;
}

.files-form-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.files-form-grid label,
.files-wide-label {
    display: grid;
    gap: 5px;
    color: #475569;
    font-size: 12px;
    font-weight: 900;
}

.files-check-row {
    display: flex !important;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding-top: 18px;
    text-transform: none;
}

.files-check-row input {
    width: auto;
    min-height: 0;
}

.files-check-row span {
    color: #004d4a;
    font-size: 12px;
    font-weight: 900;
}

.files-unit-picker {
    display: grid;
    gap: 8px;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid rgba(0, 128, 123, .18);
    border-radius: 8px;
    background: #f8fdfc;
}

.files-unit-picker.disabled {
    opacity: .72;
}

.files-unit-picker-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: #004d4a;
    font-size: 12px;
    font-weight: 900;
}

.files-unit-picker-head span {
    color: #64748b;
    font-size: 11px;
}

.files-unit-picker-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(104px, 1fr));
    gap: 7px;
    max-height: 168px;
    overflow: auto;
}

.files-unit-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 2px 7px;
    align-items: center;
    min-height: 42px;
    padding: 7px 8px;
    border: 1px solid rgba(0, 128, 123, .16);
    border-radius: 8px;
    background: #fff;
    color: #0f172a;
}

.files-unit-option input {
    grid-row: span 2;
    width: auto;
    min-height: 0;
}

.files-unit-option strong {
    font-size: 12px;
    line-height: 1;
}

.files-unit-option small {
    min-width: 0;
    color: #64748b;
    font-size: 10px;
    font-weight: 800;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.files-expired-field span {
    color: #b91c1c;
}

.files-expired-field input {
    border-color: rgba(225, 29, 72, .55);
    background: #fff1f2;
    color: #9f1239;
}

.files-paste-zone {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 54px;
    padding: 10px 12px;
    border: 1px dashed rgba(0, 128, 123, .34);
    border-radius: 8px;
    background: #f7fbfb;
    color: #004d4a;
    cursor: pointer;
    outline: 0;
}

.files-hidden-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.files-paste-zone:focus,
.files-paste-zone:hover {
    border-style: solid;
    background: #eefaf8;
}

.files-paste-zone.has-file {
    border-style: solid;
    background: #ecfdf5;
}

.files-paste-zone i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 32px;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: #d8f3ef;
    color: #00807b;
}

.files-paste-zone.has-file i {
    background: #bbf7d0;
    color: #15803d;
}

.files-paste-zone strong,
.files-paste-zone span {
    display: block;
    line-height: 1.25;
}

.files-paste-zone strong {
    color: #0f172a;
    font-size: 13px;
}

.files-paste-zone span {
    margin-top: 2px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.files-paste-zone span.files-parse-ok {
    color: #047857;
}

.files-paste-zone span.files-parse-error {
    color: #b91c1c;
}

.files-paste-zone span.files-parse-ok i,
.files-paste-zone span.files-parse-error i {
    display: inline;
    flex: initial;
    width: auto;
    height: auto;
    margin-right: 4px;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-size: 11px;
}

.files-parsed-summary {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(0, 128, 123, .18);
    border-radius: 8px;
    background: #f0fdfa;
    color: #004d4a;
}

.files-parsed-summary > i {
    margin-top: 3px;
    color: #00807b;
}

.files-parsed-summary > div {
    display: grid;
    gap: 5px;
}

.files-parsed-summary span {
    display: block;
    color: #334155;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.25;
}

.files-parsed-summary strong {
    display: inline-block;
    min-width: 102px;
    margin-right: 6px;
    color: #004d4a;
    font-size: 11px;
    text-transform: uppercase;
}

.files-modal-error {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid rgba(225, 29, 72, .28);
    border-radius: 8px;
    background: #fff1f2;
    color: #9f1239;
    font-size: 13px;
    font-weight: 900;
}

.files-modal-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.files-preview-card {
    position: sticky;
    top: 12px;
    display: grid;
    gap: 10px;
    min-height: 520px;
    padding: 14px;
    border: 1px solid rgba(0, 128, 123, .17);
    border-radius: 10px;
    background: #fff;
}

.files-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.files-preview-card h3 {
    margin: 0;
    color: #004d4a;
    font-size: 15px;
}

.files-preview-actions {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.files-preview-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid rgba(0, 128, 123, .22);
    border-radius: 8px;
    background: #fff;
    color: #004d4a;
    cursor: pointer;
}

.files-preview-actions button:hover {
    background: #e8f7f5;
}

.files-preview-frame {
    min-height: 470px;
    overflow: auto;
    border: 1px solid #dbe8e8;
    border-radius: 8px;
    background: #f8fafc;
}

.files-preview-rotator {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 100%;
    min-height: 470px;
    transform-origin: center;
    transition: transform .18s ease;
}

.files-preview-rotator iframe {
    display: block;
    width: 100%;
    height: 470px;
    border: 0;
}

.files-preview-rotator img {
    display: block;
    max-width: 100%;
    max-height: 470px;
    border: 0;
}

.files-preview-rotator img {
    object-fit: contain;
    background: #f8fafc;
}

.files-preview-empty {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 470px;
    padding: 20px;
    color: #64748b;
    text-align: center;
    font-weight: 800;
}

.files-preview-empty i {
    color: #00807b;
    font-size: 34px;
}

.files-image-editor-modal {
    width: min(940px, calc(100vw - 32px));
    margin: auto 0;
    overflow: hidden;
    border-radius: 14px;
    background: #f8fbfc;
    box-shadow: 0 20px 70px rgba(15, 23, 42, .26);
}

.files-image-editor-body {
    display: grid;
    gap: 10px;
    padding: 16px 20px 10px;
}

.files-image-editor-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 520px;
    max-height: 68vh;
    overflow: hidden;
    border: 1px solid #dbe8e8;
    border-radius: 10px;
    background: #0f172a;
    cursor: crosshair;
    user-select: none;
}

.files-image-editor-stage img {
    display: block;
    max-width: 100%;
    max-height: 68vh;
    object-fit: contain;
    pointer-events: none;
}

.files-image-editor-crop-wrap {
    position: relative;
    display: inline-flex;
    max-width: 100%;
    max-height: 68vh;
}

.files-image-crop-box {
    position: absolute;
    display: block;
    border: 2px solid #f8fafc;
    background: rgba(20, 184, 166, .16);
    box-shadow: 0 0 0 9999px rgba(15, 23, 42, .42);
    pointer-events: none;
}

.files-image-crop-box:not([style]),
.files-image-crop-box[style=""] {
    display: none;
}

.files-image-editor-help {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #64748b;
    font-size: 12px;
    font-weight: 900;
}

.files-image-editor-help span {
    min-width: 0;
}

.files-image-editor-help i {
    color: #00807b;
}

.files-image-editor-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 20px 12px;
}

.files-image-editor-tools button {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid rgba(0, 128, 123, .22);
    border-radius: 8px;
    background: #fff;
    color: #004d4a;
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
}

.files-image-editor-tools button:hover {
    background: #e8f7f5;
}

.files-image-editor-empty {
    display: grid;
    place-items: center;
    gap: 10px;
    min-height: 420px;
    padding: 24px;
    color: #64748b;
    text-align: center;
    font-weight: 900;
}

.files-image-editor-empty i {
    color: #00807b;
    font-size: 34px;
}

.files-image-editor-empty.error {
    color: #9f1239;
}

@media (max-width: 900px) {
    .files-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .files-form-grid {
        grid-template-columns: 1fr;
    }

    .files-modal-backdrop {
        align-items: stretch;
        padding: 8px;
    }

    .files-modal {
        width: 100%;
        max-height: 100%;
    }

    .files-modal-body {
        grid-template-columns: 1fr;
    }

    .files-workspace.with-preview,
    .files-packet-body,
    .files-packet-grid,
    .files-packet-doc-row {
        grid-template-columns: 1fr;
    }

    .files-side-preview {
        position: static;
        min-height: 360px;
    }

    .files-side-preview-frame,
    .files-side-preview-frame iframe,
    .files-side-preview-empty {
        min-height: 320px;
        height: 320px;
    }

    .files-side-preview-frame img {
        max-height: 320px;
    }

    .files-packet-modal {
        width: 100%;
        max-height: 100%;
    }

    .files-packet-body {
        max-height: none;
    }

    .files-packet-preview-frame,
    .files-packet-preview-frame iframe,
    .files-packet-preview-empty {
        min-height: 360px;
        height: 360px;
    }

    .files-packet-preview-frame img {
        max-height: 360px;
    }

    .files-preview-card {
        position: static;
        min-height: 360px;
    }

    .files-preview-frame,
    .files-preview-rotator,
    .files-preview-rotator iframe,
    .files-preview-empty {
        min-height: 320px;
        height: 320px;
    }

    .files-preview-rotator img {
        max-height: 320px;
    }

    .files-image-editor-modal {
        width: 100%;
    }

    .files-image-editor-stage {
        min-height: 360px;
        max-height: 58vh;
    }

    .files-image-editor-stage img {
        max-height: 58vh;
    }

    .files-image-editor-crop-wrap {
        max-height: 58vh;
    }

    .files-image-editor-help {
        display: grid;
    }
}
