.app-upload, .dropzone.app-upload-zone {
    --upload-ink: #253a50;
    --upload-accent: #187bab;
    box-sizing: border-box;
    border: 1px dashed #aacbdf;
    border-radius: 14px;
    background: linear-gradient(135deg, #f4faff, #fff 80%);
    color: var(--upload-ink);
    padding: 18px;
    margin: 8px 0 12px;
    min-width: 0;
    text-align: left;
}
.app-upload *, .app-upload-viewer * { box-sizing: border-box; }
.app-upload-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.app-upload-icon { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 44px; background: #e4f2fc; color: #187bab; border-radius: 12px; }
.app-upload-icon svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.app-upload-heading-text { display: grid; gap: 3px; min-width: 0; }
.app-upload-heading-text strong { font-size: 15px; }
.app-upload-heading-text span, .app-upload-hint { color: #5b7083; font-size: 12px; line-height: 1.5; }
.app-upload-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.app-upload-button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid #c6d8e5; background: #fff; color: #284961; padding: 8px 12px; min-height: 36px; border-radius: 8px; font: inherit; font-size: 12px; font-weight: 600; line-height: 1.4; cursor: pointer; text-decoration: none; white-space: normal; }
.app-upload-button:hover { background: #edf6fd; border-color: #80b5d2; color: #184e70; text-decoration: none; }
.app-upload-button.app-upload-primary { background: #187bab; color: #fff; border-color: #187bab; box-shadow: 0 3px 8px #187bab20; }
.app-upload-button.app-upload-primary:hover { background: #11668f; border-color: #11668f; color: #fff; }
.app-upload-button.app-upload-danger { color: #a72d32; border-color: #ebc9cb; }
.app-upload-button[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.app-upload-button:focus-visible, .app-upload-current:focus-visible { outline: 3px solid #5eb8ed; outline-offset: 3px; }
.app-upload-button:disabled { cursor: not-allowed; opacity: .55; }
.app-upload-hint { display: block; margin-top: 10px; overflow-wrap: anywhere; }
.app-upload-file { display: flex; gap: 10px; align-items: center; padding: 10px; background: #fff; border: 1px solid #dbe7ef; border-radius: 9px; margin-top: 10px; }
.app-upload-file-icon { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 42px; height: 44px; font-size: 10px; font-weight: 700; color: #187bab; background: #eaf5fb; border-radius: 7px; }
.app-upload-file-icon img { width: 42px; height: 44px; object-fit: cover; border-radius: 7px; }
.app-upload-file-info { display: grid; flex: 1; min-width: 0; text-align: left; }
.app-upload-file-info strong { font-size: 12px; overflow-wrap: anywhere; }
.app-upload-file-info small { color: #667c8d; font-size: 11px; }
.app-upload-current { display: inline-block; margin-top: 12px; color: #166d9b; font-size: 12px; text-decoration: underline; }
.app-upload-status { font-size: 12px; color: #3c6c57; line-height: 1.5; margin-top: 8px; overflow-wrap: anywhere; }
.app-upload-status:empty { display: none; }
.app-upload-status.app-upload-error { color: #a72d32; }
.app-upload-invalid { border-color: #c64e53; background: #fff9f9; }
.app-upload-dragging { border-color: #187bab; outline: 2px solid #187bab; outline-offset: 2px; background: #e8f6ff; }
.app-upload-disabled { background: #f2f4f6; }
.app-upload input.app-upload-input[type="file"] { display: block !important; position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; overflow: hidden !important; padding: 0 !important; border: 0 !important; margin: 0 !important; }
.app-upload:focus-within { border-color: #187bab; }
.app-upload-old-trigger { display: none !important; }
.app-upload [hidden], .app-upload-zone [hidden] { display: none !important; }
.dropzone.app-upload-zone { min-height: 0; border-width: 1px; }
.dropzone.app-upload-zone .dz-message.app-upload-zone-message { display: block; margin: 0; color: var(--upload-ink); text-align: left; }
.dropzone.app-upload-zone .app-upload-zone-content { min-width: 0; width: 100%; }
.dropzone.app-upload-zone .app-upload-heading { margin-bottom: 14px; }
.dropzone.app-upload-zone .app-upload-heading-text { text-align: left; }
.dropzone.app-upload-zone .app-upload-hint { white-space: normal; }
.dropzone.app-upload-zone.dz-started .dz-message.app-upload-zone-message { display: none; }
.dropzone.app-upload-zone .dz-preview { border: 1px solid #dce7ef; padding: 10px; border-radius: 12px; box-shadow: 0 3px 10px #253a5009; background: #fff; margin: 10px; }
.dropzone.app-upload-zone .dz-preview .dz-image { border-radius: 8px; }
.dropzone .dz-preview .dz-remove {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 34px !important;
    min-width: 34px !important;
    max-width: 34px;
    height: 34px !important;
    min-height: 34px !important;
    padding: 0 !important;
    margin: 10px auto 0 !important;
    border: 1px solid #c72e3d !important;
    border-radius: 50% !important;
    background: #d83443 !important;
    color: #fff !important;
    font-size: 0 !important;
    line-height: 1 !important;
    text-decoration: none !important;
    box-shadow: none !important;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}
.dropzone .dz-preview .dz-remove::before {
    content: '';
    display: block;
    width: 17px;
    height: 17px;
    background-color: currentColor;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6h18M9 6V4h6v2M5 6l1 14h12l1-14M10 10v6m4-6v6'/%3E%3C/svg%3E") center / contain no-repeat;
}
.dropzone .dz-preview .dz-remove:hover,
.dropzone .dz-preview .dz-remove:active {
    background: #b72433 !important;
    border-color: #a61f2d !important;
    color: #fff !important;
    text-decoration: none !important;
}
.dropzone .dz-preview .dz-remove:focus-visible {
    outline: 3px solid #f1a5ad;
    outline-offset: 3px;
}
@media (prefers-reduced-motion: reduce) {
    .dropzone .dz-preview .dz-remove { transition: none; }
}
.dropzone.app-upload-zone .app-upload-zone-view { display: flex; width: 100%; margin-top: 8px; }
.dropzone.app-upload-zone .app-upload-zone-status { display: block; max-width: 160px; color: #45657c; font-size: 11px; text-align: center; margin-top: 8px; }
.dropzone.app-upload-zone .dz-preview .dz-error-message { background: #a72d32; text-align: left; line-height: 1.4; }
.app-upload-viewer { position: fixed; inset: 0; z-index: 12000; padding: 24px; background: #14283cb8; display: flex; align-items: center; justify-content: center; }
.app-upload-viewer-panel { display: flex; flex-direction: column; width: min(100%, 1060px); max-height: 90vh; max-height: 90dvh; border-radius: 16px; background: #fff; box-shadow: 0 22px 80px #10233655; overflow: hidden; color: #253a50; }
.app-upload-viewer-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; border-bottom: 1px solid #e1e9ef; background: #f5f9fc; }
.app-upload-viewer-head strong { overflow-wrap: anywhere; min-width: 0; }
.app-upload-viewer-head button { flex-shrink: 0; }
.app-upload-viewer-body { overflow: auto; padding: 20px; text-align: center; }
.app-upload-viewer-body img { max-width: 100%; max-height: 70vh; object-fit: contain; }
.app-upload-text { max-height: 65vh; overflow: auto; text-align: left; white-space: pre-wrap; overflow-wrap: anywhere; background: #f5f8fb; padding: 16px; border: 1px solid #e0e8ef; border-radius: 9px; font: 13px/1.6 monospace; }
@media (max-width: 480px) {
    .app-upload, .dropzone.app-upload-zone { padding: 12px; }
    .app-upload-file { flex-wrap: wrap; }
    .app-upload-file .app-upload-button { margin-left: auto; }
    .app-upload-viewer { padding: 10px; }
    .app-upload-viewer-head, .app-upload-viewer-body { padding: 12px; }
}
@media print { .app-upload, .app-upload-zone, .app-upload-viewer { display: none !important; } }
