:root {
    --brand: #d9313e;
    --brand-dark: #b7242f;
    --success: #27ae60;
    --warning: #e67e22;
    --danger: #c0392b;
    --info: #3498db;
    --text: #333;
    --muted: #888;
    --border: #e4e4e4;
    --surface: #fff;
    --background: #f5f5f5;
    --shadow: 0 4px 20px rgba(0, 0, 0, .06);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100vh; background: var(--background); color: var(--text); font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, [tabindex]:focus-visible { outline: 3px solid rgba(217, 49, 62, .22); outline-offset: 2px; }
.hidden { display: none !important; }
.visually-hidden { position: absolute; width: 1px; height: 1px; clip: rect(0, 0, 0, 0); overflow: hidden; white-space: nowrap; }
.brand-text { color: var(--brand); }
.success-text { color: var(--success) !important; }

.login-page, .download-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; background: linear-gradient(135deg, #f8f8f8, #e8e8e8); }
.login-card { width: min(400px, 100%); padding: 45px 40px; text-align: center; background: #fff; border-radius: 12px; box-shadow: 0 8px 40px rgba(0, 0, 0, .1); }
.login-card img { height: 60px; max-width: 100%; object-fit: contain; margin-bottom: 25px; }
.login-card h1 { margin: 0 0 25px; color: #444; font-size: 18px; font-weight: 400; }
.login-card h1 strong { color: var(--brand); }

.form-group { margin-bottom: 16px; text-align: left; }
.form-group label { display: block; margin-bottom: 6px; color: #888; font-size: 11px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.form-group input, .form-group select { width: 100%; min-height: 44px; padding: 11px 14px; border: 1px solid #d8d8d8; border-radius: 8px; background: #fff; color: #222; font-size: 14px; transition: border-color .2s, box-shadow .2s; }
.form-group input:focus, .form-group select:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(217, 49, 62, .09); outline: 0; }
.form-group input.input-warning { border-color: var(--warning); }
.form-group input.input-ok { border-color: var(--success); }
.field-hint { min-height: 15px; margin-top: 4px; font-size: 11px; }
.field-hint.warning { color: var(--warning); }
.field-hint.ok { color: var(--success); }

.btn-primary, .btn-download { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; padding: 13px 28px; border: 0; border-radius: 8px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .8px; text-decoration: none; text-transform: uppercase; cursor: pointer; transition: background .2s, opacity .2s, transform .1s; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-primary:active, .btn-secondary:active { transform: translateY(1px); }
.btn-primary:disabled { cursor: wait; opacity: .65; }
.btn-secondary { min-height: 42px; padding: 10px 22px; border: 1px solid #d8d8d8; border-radius: 8px; background: #f7f7f7; color: #666; font-size: 14px; font-weight: 600; cursor: pointer; }
.btn-secondary:hover { background: #eee; border-color: #ccc; }
.btn-secondary.compact { min-height: 36px; padding: 7px 18px; font-size: 13px; }

.app-header { position: sticky; z-index: 100; top: 0; display: flex; align-items: center; justify-content: space-between; min-height: 76px; padding: 12px 30px; border-bottom: 3px solid var(--brand); background: #fff; }
.header-brand { display: flex; align-items: center; }
.logo-button { padding: 0; border: 0; background: none; cursor: pointer; }
.logo-button img { display: block; height: 45px; }
.app-header-nav { display: flex; align-items: center; gap: 4px; margin-left: 40px; }
.nav-tab { padding: 9px 16px; border: 0; border-radius: 6px; background: none; color: #888; font-size: 13px; font-weight: 600; cursor: pointer; }
.nav-tab:hover { background: #f5f5f5; color: #555; }
.nav-tab.active { background: #fff5f5; color: var(--brand); }
.nav-icon { margin-right: 4px; font-size: 16px; font-weight: 700; }
.user-info { display: flex; align-items: center; gap: 12px; color: #666; font-size: 13px; }
.user-name { color: #222; font-weight: 700; }
.btn-logout { padding: 6px 14px; border: 1px solid #ddd; border-radius: 6px; background: none; color: #777; font-size: 12px; cursor: pointer; }
.btn-logout:hover { border-color: var(--brand); color: var(--brand); }
.header-datetime { margin-right: 16px; color: #999; font-size: 11px; line-height: 1.4; text-align: right; }
.header-datetime strong { color: #666; }
.hamburger { display: none; padding: 6px 9px; border: 1px solid #ddd; border-radius: 6px; background: #fff; color: #555; font-size: 21px; }
.mobile-nav { position: absolute; top: 73px; right: 12px; display: grid; width: 210px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .15); }
.mobile-nav button { padding: 12px; border: 0; border-radius: 6px; background: none; color: #555; text-align: left; }
.mobile-nav button:hover { background: #fff5f5; color: var(--brand); }

.main-content { width: 100%; max-width: 1320px; margin: 30px auto; padding: 0 24px; }
.page-title { margin: 0 0 25px; color: #444; font-size: 22px; font-weight: 300; }
.page-title strong { color: var(--brand); }
.stepper { display: flex; align-items: center; justify-content: center; margin-bottom: 30px; }
.step { display: flex; align-items: center; gap: 8px; padding: 8px 16px; border: 0; border-radius: 20px; background: transparent; color: #aaa; font-size: 12px; font-weight: 600; cursor: pointer; }
.step-num { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border: 2px solid #ddd; border-radius: 50%; font-size: 11px; }
.step.active { background: #fff5f5; color: var(--brand); }
.step.active .step-num { border-color: var(--brand); background: var(--brand); color: #fff; }
.step.done { color: var(--success); }
.step.done .step-num { border-color: var(--success); background: var(--success); color: #fff; }
.step-line { width: 40px; height: 2px; background: #e8e8e8; }

.upload-card, .history-card, .settings-card, .info-card, .success-card { border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); }
.upload-card { padding: 35px; margin-bottom: 20px; }
.upload-card h2, .history-card h2, .settings-card h2, .info-card h2 { margin: 0 0 18px; color: var(--brand); font-size: 15px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; }
.section-intro { margin: 0 0 18px; color: #777; font-size: 13px; line-height: 1.6; }
.drop-zone { padding: 45px 30px; border: 2px dashed #cfcfcf; border-radius: 12px; background: #fafafa; text-align: center; cursor: pointer; transition: border-color .25s, background .25s; }
.drop-zone:hover, .drop-zone.drag-over { border-color: var(--brand); background: #fff5f5; }
.drop-icon { margin-bottom: 8px; font-size: 48px; }
.drop-zone p { margin: 0; color: #777; font-size: 15px; }
.drop-zone .hint { margin-top: 8px; color: #aaa; font-size: 12px; }
.file-choice-buttons { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.upload-kind-heading { display: flex; align-items: baseline; gap: 10px; margin-bottom: 10px; }
.upload-kind-heading strong { color: #555; font-size: 13px; }
.upload-kind-heading span { color: #888; font-size: 11px; }
.upload-format-guide { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.format-guide-item { display: flex; align-items: flex-start; gap: 11px; padding: 14px; border: 1px solid #e8e8e8; border-radius: 10px; background: #fafafa; text-align: left; cursor: pointer; transition: border-color .2s, background .2s, box-shadow .2s; }
.format-guide-item:hover { border-color: #ccc; background: #fff; }
.format-guide-item.selected { border-color: var(--brand); background: #fff7f7; box-shadow: 0 0 0 2px rgba(217, 49, 62, .08); }
.format-guide-copy { display: block; min-width: 0; }
.format-guide-copy strong, .format-guide-copy > span { display: block; }
.format-guide-copy strong { color: #444; font-size: 13px; }
.format-guide-copy > span { margin-top: 5px; color: #777; font-size: 11px; line-height: 1.55; }
.format-guide-icon { display: inline-flex; flex: 0 0 38px; align-items: center; justify-content: center; height: 38px; border-radius: 8px; color: #fff; font-size: 9px; font-weight: 800; letter-spacing: .5px; }
.format-guide-icon.image { background: #2e8bce; }
.format-guide-icon.pdf { background: var(--brand); }
.format-guide-icon.dicom { background: #6b5ca5; }
.file-info { display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 18px; border: 1px solid #eee; border-radius: 8px; background: #f8f9fa; }
.file-icon { display: flex; flex: 0 0 44px; align-items: center; justify-content: center; height: 44px; border-radius: 8px; background: var(--brand); color: #fff; font-size: 11px; font-weight: 800; }
.file-details { min-width: 0; flex: 1; }
.file-name { overflow: hidden; color: #222; font-size: 14px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.file-size { margin-top: 3px; color: #888; font-size: 12px; }
.file-remove { padding: 4px; border: 0; background: none; color: #bbb; font-size: 24px; cursor: pointer; }
.file-remove:hover { color: var(--brand); }
.zip-notice, .upload-lock { padding: 10px 14px; margin-bottom: 16px; border-radius: 8px; font-size: 12px; }
.zip-notice { border: 1px solid #ffe082; background: #fff8e1; color: #795548; }
.upload-lock { display: flex; align-items: center; gap: 12px; border: 1px solid #ffcc80; background: #fff8e1; color: #8a4f00; }
.upload-lock-icon { display: inline-flex; flex: 0 0 30px; align-items: center; justify-content: center; height: 30px; border-radius: 50%; background: var(--warning); color: #fff; font-size: 17px; font-weight: 800; }
.upload-lock strong, .upload-lock span { display: block; }
.upload-lock strong { margin-bottom: 2px; font-size: 13px; }
.upload-lock.processing-email { border-color: #90caf9; background: #e3f2fd; color: #1565c0; }
.upload-lock.processing-email .upload-lock-icon { background: var(--info); }
.progress-container { margin-bottom: 18px; }
.progress-header { display: flex; justify-content: space-between; margin-bottom: 7px; font-size: 13px; }
.progress-label { color: #666; font-weight: 600; }
.progress-percent { color: var(--brand); font-weight: 700; }
.progress-bar { height: 8px; overflow: hidden; border-radius: 4px; background: #eee; }
.progress-fill { width: 0; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--brand), #e85d68); transition: width .15s; }
.progress-speed { margin-top: 5px; color: #999; font-size: 11px; }
.upload-safety { margin-top: 8px; color: var(--success); font-size: 11px; }
.dentist-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.actions-row { display: flex; gap: 12px; margin-top: 20px; }
.actions-row .btn-primary { flex: 1; }

.history-card { padding: 30px 35px; margin-top: 25px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; }
.text-button { padding: 5px; border: 0; background: none; color: var(--brand); font-size: 12px; cursor: pointer; }
.table-wrap { overflow-x: auto; }
.history-table { width: 100%; min-width: 1100px; border-collapse: collapse; font-size: 13px; }
.history-table th { padding: 10px 12px; border-bottom: 2px solid #eee; background: #f8f8f8; color: #777; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-align: left; text-transform: uppercase; }
.history-table td { padding: 12px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.history-table tbody tr:hover { background: #fafafa; }
.history-table tbody tr.inactive { opacity: .55; }
.history-id { color: #888; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; font-weight: 600; }
.subtext { margin-top: 3px; color: #888; font-size: 11px; }
.time-remaining { color: #777; font-size: 12px; }
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.status-badge.active { background: #e8f5e9; color: var(--success); }
.status-badge.warning { background: #fff3e0; color: var(--warning); }
.status-badge.expired { background: #fce4ec; color: var(--danger); }
.email-status-badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 9px; border-radius: 12px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.email-status-badge.sent { background: #e8f5e9; color: var(--success); }
.email-status-badge.failed { background: #fff3e0; color: var(--warning); }
.email-status-badge.pending { background: #e3f2fd; color: var(--info); }
.history-actions { display: flex; gap: 4px; }
.history-actions button, .history-actions a { padding: 5px 9px; border: 1px solid #ddd; border-radius: 6px; background: none; color: #777; font-size: 11px; text-decoration: none; white-space: nowrap; cursor: pointer; }
.history-actions button:hover, .history-actions a:hover { border-color: var(--brand); color: var(--brand); }
.empty-state { padding: 28px !important; color: #999; text-align: center; }

.success-card { padding: 40px; text-align: center; }
.success-icon { display: inline-flex; align-items: center; justify-content: center; width: 70px; height: 70px; margin-bottom: 18px; border-radius: 50%; background: var(--success); color: #fff; font-size: 34px; }
.success-card > h1 { margin: 0 0 10px; font-size: 24px; }
.success-card > p { color: #666; font-size: 14px; }
.delivery-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 22px 0; text-align: left; }
.delivery-card { padding: 18px; border: 1px solid #eee; border-radius: 10px; background: #f8f9fa; }
.dc-label { margin-bottom: 8px; color: #888; font-size: 10px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.dc-status { margin-bottom: 6px; font-size: 13px; font-weight: 700; }
.dc-status.sent { color: var(--success); }
.dc-status.failed { color: var(--warning); }
.whatsapp-color { color: #25d366; }
.dc-detail { color: #777; font-size: 12px; line-height: 1.6; }
.link-box { display: flex; align-items: center; gap: 10px; padding: 9px 10px; margin-top: 10px; border: 1px solid #ddd; border-radius: 8px; background: #fff; }
.link-box input { min-width: 0; flex: 1; border: 0; outline: 0; color: #555; font-family: ui-monospace, monospace; font-size: 12px; }
.btn-copy { padding: 8px 14px; border: 0; border-radius: 6px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; cursor: pointer; }
.btn-whatsapp { padding: 12px 20px; border: 0; border-radius: 8px; background: #25d366; color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
.btn-whatsapp:hover { background: #1daa50; }
.expiry-line { color: #aaa !important; font-size: 12px !important; }
.expiry-line strong { color: var(--brand); }
.email-section-title { margin: 28px 0 12px; padding-top: 20px; border-top: 1px solid #eee; color: #777; font-size: 13px; text-align: left; }
.email-preview { max-width: 600px; margin: 0 auto 22px; overflow: hidden; border: 1px solid #ddd; border-radius: 10px; background: #fff; text-align: left; }
.email-preview-header { padding: 12px 16px; border-bottom: 1px solid #eee; background: #f5f5f5; color: #777; font-size: 12px; line-height: 1.5; }
.email-logo-bar { padding: 18px; background: var(--brand); text-align: center; }
.email-logo-bar img { height: 54px; }
.download-card-header img { height: 40px; filter: invert(1) grayscale(1) brightness(2); mix-blend-mode: screen; }
.email-preview-body { padding: 24px; text-align: center; }
.email-preview-body h2 { margin: 0 0 14px; font-size: 18px; font-weight: 400; }
.email-preview-body h2 strong { color: var(--brand); }
.email-preview-body p { color: #555; font-size: 13px; }
.email-file-box { padding: 16px; margin: 16px 0; border-radius: 8px; background: #f8f9fa; text-align: left; }
.email-file-box strong, .email-file-box span { display: block; }
.email-file-box span { margin-top: 4px; color: #888; font-size: 12px; }
.email-btn { display: inline-block; padding: 14px 38px; margin: 8px 0; border-radius: 8px; background: var(--brand); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; }
.email-footer-text { padding-top: 14px; margin-top: 18px !important; border-top: 1px solid #eee; color: #aaa !important; font-size: 11px !important; line-height: 1.7; }

.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.settings-card { padding: 30px 35px; }
.user-list { margin-top: 4px; }
.user-item { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #f0f0f0; }
.user-item-info { display: flex; align-items: center; gap: 12px; }
.user-avatar { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; }
.user-avatar.secretary { background: var(--info); }
.user-item-name { color: #333; font-size: 13px; font-weight: 600; }
.user-item-email { color: #888; font-size: 11px; }
.user-role { padding: 3px 8px; border-radius: 10px; background: #fff5f5; color: var(--brand); font-size: 10px; font-weight: 600; }
.user-role.secretary { background: #e8f4fd; color: var(--info); }
.btn-add-user { width: 100%; padding: 12px; margin-top: 12px; border: 2px dashed #ddd; border-radius: 8px; background: none; color: #888; font-size: 13px; cursor: pointer; }
.btn-add-user:hover { border-color: var(--brand); color: var(--brand); }
.new-user-form { padding: 18px; margin-top: 12px; border-radius: 8px; background: #f8f9fa; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.inline-actions { display: flex; gap: 8px; }
.btn-small { padding: 8px 16px; border-radius: 6px; font-size: 12px; font-weight: 600; cursor: pointer; }
.btn-small.primary { border: 0; background: var(--brand); color: #fff; }
.btn-small.secondary { border: 1px solid #ddd; background: #fff; color: #666; }
.info-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 24px; margin-top: 24px; }
.info-card { padding: 24px 28px; }
.storage-bar-bg { height: 14px; margin-bottom: 8px; overflow: hidden; border-radius: 7px; background: #eee; }
.storage-bar-fill { width: 0; height: 100%; border-radius: 7px; background: linear-gradient(90deg, var(--success), #2ecc71); }
.storage-bar-fill.warning { background: linear-gradient(90deg, var(--warning), #f39c12); }
.storage-bar-fill.danger { background: linear-gradient(90deg, var(--danger), #e74c3c); }
.storage-legend { display: flex; justify-content: space-between; color: #777; font-size: 12px; }
.info-list { padding: 0; margin: 14px 0 0; list-style: none; }
.info-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.info-list li:last-child { border-bottom: 0; }
.info-list span { color: #777; }
.info-list strong { color: #333; text-align: right; }
.info-list a { color: var(--info); font-size: 12px; overflow-wrap: anywhere; text-align: right; text-decoration: none; }
.stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-item { padding: 10px 0; text-align: center; }
.stat-item strong { display: block; color: var(--brand); font-size: 32px; line-height: 1; }
.stat-item span { display: block; margin-top: 5px; color: #777; font-size: 12px; }

.toast-container { position: fixed; z-index: 9999; top: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; }
.toast { min-width: 280px; max-width: min(420px, calc(100vw - 40px)); padding: 14px 20px; border-radius: 10px; background: var(--info); box-shadow: 0 8px 30px rgba(0, 0, 0, .18); color: #fff; font-size: 13px; line-height: 1.5; animation: toast-in .35s ease; }
.toast.success { background: var(--success); }
.toast.warning { background: var(--warning); }
.toast.error { background: var(--danger); }
.toast.hiding { animation: toast-out .3s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(40px); } }

.modal-overlay { position: fixed; z-index: 9998; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0, 0, 0, .45); }
.modal-box { width: min(440px, 100%); padding: 30px 35px; border-radius: 14px; background: #fff; box-shadow: 0 12px 50px rgba(0, 0, 0, .2); }
.modal-box h2 { margin: 0 0 14px; color: var(--danger); font-size: 16px; }
.modal-box p { color: #555; font-size: 13px; line-height: 1.7; }
.modal-detail { padding: 14px; margin: 14px 0; border: 1px solid #eee; border-radius: 8px; background: #f8f9fa; font-size: 13px; line-height: 1.6; }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions button { flex: 1; padding: 12px; border-radius: 8px; font-size: 14px; font-weight: 700; cursor: pointer; }
.btn-cancel { border: 1px solid #ddd; background: #f5f5f5; color: #666; }
.btn-danger { border: 0; background: var(--danger); color: #fff; }

.download-card { width: min(480px, 100%); overflow: hidden; border-radius: 12px; background: #fff; box-shadow: 0 8px 40px rgba(0, 0, 0, .1); text-align: center; }
.download-card-header { padding: 22px; background: var(--brand); }
.download-card-body { padding: 30px 35px; }
.download-icon { display: inline-flex; align-items: center; justify-content: center; width: 58px; height: 58px; margin-bottom: 12px; border-radius: 50%; background: #e8f5e9; color: var(--success); font-size: 31px; font-weight: 700; }
.download-icon.unavailable { background: #fce4ec; color: var(--danger); }
.download-card h1 { margin: 0 0 10px; color: #333; font-size: 21px; }
.download-card p { color: #777; font-size: 13px; line-height: 1.6; }
.download-file-info { padding: 18px; margin: 18px 0; border-radius: 8px; background: #f8f9fa; }
.download-file-info .fname { overflow-wrap: anywhere; color: #222; font-size: 15px; font-weight: 700; }
.download-file-info .fsize { margin-top: 4px; color: #777; font-size: 12px; }
.download-file-info .fexpiry { margin-top: 7px; color: var(--brand); font-size: 11px; }
.btn-download { background: var(--success); }
.btn-download:hover { background: #219a52; }
.download-security { margin: 18px 0 0 !important; color: #aaa !important; font-size: 11px !important; }

@media (max-width: 900px) {
    .settings-grid, .info-row, .delivery-cards, .dentist-form { grid-template-columns: 1fr; }
    .upload-format-guide { grid-template-columns: 1fr; }
    .upload-kind-heading { align-items: flex-start; flex-direction: column; gap: 4px; }
    .app-header-nav, .header-datetime { display: none; }
    .hamburger { display: inline-block; }
    .user-info > span, .btn-logout { display: none; }
    .history-card { padding: 24px 20px; }
}

@media (max-width: 600px) {
    .app-header { min-height: 68px; padding: 10px 16px; }
    .logo-button img { height: 38px; }
    .mobile-nav { top: 65px; }
    .main-content { margin: 20px auto; padding: 0 14px; }
    .login-card { padding: 36px 24px; }
    .upload-card, .success-card, .settings-card { padding: 24px 20px; }
    .drop-zone { padding: 34px 14px; }
    .step { padding: 7px 8px; font-size: 11px; }
    .step-line { width: 18px; }
    .step-num { width: 22px; height: 22px; }
    .actions-row { flex-direction: column-reverse; }
    .delivery-card { min-width: 0; }
    .form-row { grid-template-columns: 1fr; }
    .email-preview-header { overflow-wrap: anywhere; }
    .download-card-body { padding: 28px 22px; }
    .toast-container { right: 12px; left: 12px; }
    .toast { min-width: 0; max-width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
