/* Structural adaptation of the supplied enterprise workspace concept. */
:root{--workspace-bg:#080d19;--workspace-surface:#0d1728;--workspace-card:#111c2e;--workspace-line:rgba(148,163,184,.15);--workspace-emerald:#10b981;--workspace-emerald-soft:#6ee7b7;--workspace-text:#e8eef7;--workspace-muted:#91a0b6}
html,body{min-height:100%;background:var(--workspace-bg)}
body{background-image:radial-gradient(ellipse at 52% -20%,rgba(16,185,129,.09),transparent 48%),linear-gradient(180deg,#0a1120 0,#080d19 42rem);color:var(--workspace-text)}
.topbar.workspace-topbar{height:68px;min-height:68px;padding:0 max(clamp(16px,3vw,46px),calc((100vw - 1640px)/2));display:grid;grid-template-columns:minmax(230px,1fr) auto minmax(280px,1fr);gap:24px;background:rgba(8,13,26,.94);border-bottom:1px solid var(--workspace-line);box-shadow:none}
.brand{gap:12px;min-width:0}.brand-mark{position:relative;width:40px;height:40px;border-radius:12px;background:linear-gradient(145deg,#10b981,#0f766e 70%,#102235);box-shadow:none;border:1px solid rgba(110,231,183,.3)}.brand-online{position:absolute;width:9px;height:9px;right:-2px;bottom:-1px;border:2px solid #09111f;border-radius:50%;background:#34d399}.brand-copy{min-width:0}.brand-copy b{font-size:14px}.brand-copy small{font-size:10px}.command-status{display:flex;align-items:center;gap:9px;color:#9eacc0;font-size:11px;white-space:nowrap}.status-dot{width:8px;height:8px;border-radius:50%;background:#34d399;box-shadow:0 0 0 4px rgba(52,211,153,.1)}.command-divider{height:16px;width:1px;background:var(--workspace-line);margin:0 3px}.topbar-actions{justify-self:end;display:flex;align-items:center;gap:12px;min-width:0}.account{min-width:0;max-width:230px;padding:0;border:0;background:transparent}.account-avatar{display:grid;place-items:center;width:31px;height:31px;flex:0 0 31px;border-radius:9px;border:1px solid var(--workspace-line);background:#142239;color:#8be5c5;font:700 12px Manrope}.account #accountLabel{max-width:175px;font-size:11px}.sync-button{height:38px;padding:0 13px;display:inline-flex;align-items:center;gap:7px;border:1px solid rgba(16,185,129,.28);border-radius:10px;background:#10b981;color:#06231b;font:700 11px 'DM Sans',sans-serif;white-space:nowrap;cursor:pointer}.sync-button span{font-size:17px;line-height:1}.sync-button:hover:not(:disabled){filter:brightness(1.08)}
.context-bar{border-bottom:1px solid rgba(148,163,184,.1);background:rgba(15,23,42,.42)}.context-inner{width:min(100%,1640px);margin:auto;padding:19px clamp(16px,3vw,46px);display:flex;align-items:center;justify-content:space-between;gap:24px}.context-inner h1{margin:6px 0 0;font:750 clamp(23px,2vw,30px)/1.15 Manrope;letter-spacing:-.045em;color:#f8fafc}.eyebrow{font-size:9px;color:#42d3a5;letter-spacing:.14em}.eyebrow i{color:#55647b;font-style:normal;padding:0 5px}.notice-banner{display:flex;align-items:center;gap:10px;max-width:660px;padding:10px 13px;border:1px solid rgba(16,185,129,.17);border-radius:11px;background:rgba(16,185,129,.055);color:#b9c8d8}.notice-icon{display:grid;place-items:center;width:20px;height:20px;flex:0 0 20px;border:1px solid rgba(52,211,153,.42);border-radius:50%;color:#6ee7b7;font:700 11px Manrope}.notice-banner p{margin:0;font-size:10px;line-height:1.55}
.mobile-workspace-tabs{display:none}.shell.workspace-shell{width:min(100%,1640px);max-width:1640px;padding:22px clamp(16px,3vw,46px) 24px;margin:0 auto}.workspace-grid{display:grid;grid-template-columns:minmax(280px,4fr) minmax(0,8fr);gap:20px;align-items:start}.workspace-sidebar{display:grid;gap:16px;position:sticky;top:88px;min-width:0}.panel.workspace-card{padding:0;overflow:hidden;border:1px solid var(--workspace-line);border-radius:15px;background:linear-gradient(180deg,rgba(17,28,46,.97),rgba(13,23,40,.98));box-shadow:0 10px 28px rgba(0,0,0,.12);backdrop-filter:blur(16px)}.card-titlebar{min-height:68px;padding:14px 18px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid rgba(148,163,184,.1)}.card-titlebar h2{margin:5px 0 0;color:#f2f6fc;font:700 16px/1.2 Manrope;letter-spacing:-.025em}.step-badge{padding:6px 9px;border:1px solid rgba(148,163,184,.14);border-radius:8px;background:rgba(148,163,184,.06);color:#b8c5d7;font:700 9px 'DM Sans',sans-serif;white-space:nowrap}.step-badge span{color:#8291a8;font-weight:500}.scan-card{grid-column:auto;grid-row:auto}.scan-card .card-titlebar{margin-bottom:0}.dropzone{margin:16px 16px 12px;min-height:168px;padding:18px;border:1px dashed rgba(16,185,129,.32);border-radius:12px;background:linear-gradient(145deg,rgba(16,185,129,.055),rgba(8,17,31,.32));gap:8px}.dropzone:hover,.dropzone.dragover{border-color:#34d399;background:linear-gradient(145deg,rgba(16,185,129,.1),rgba(8,17,31,.36))}.upload-icon{display:grid;place-items:center;width:42px;height:42px;border:1px solid rgba(52,211,153,.2);border-radius:12px;background:rgba(16,185,129,.09);font:400 25px/1 'DM Sans',sans-serif;color:#6ee7b7}.dropzone b{font-size:12px;color:#e7edf5}.dropzone small{max-width:275px;font-size:10px;line-height:1.55;color:#91a0b6}.scan-action{padding:0 16px 4px;display:flex;align-items:center;gap:10px}.scan-action .primary{display:flex;align-items:center;justify-content:center;gap:8px;min-height:40px;margin:0;padding:0 16px;background:#10b981;box-shadow:none;color:#06231b;font-size:11px}.scan-action .primary span{font-size:18px}.scan-hint{color:#718199;font-size:10px}.scan-card .status{padding:0 16px 13px}
.profiles-card{grid-column:auto;grid-row:auto}.profiles-card .card-titlebar{min-height:62px}.profile-search-wrap{margin:14px 15px 7px;position:relative}.profile-search-wrap>span{position:absolute;left:12px;top:50%;transform:translateY(-50%);color:#8392a8;font-size:19px}.profile-search-wrap .search{margin:0;min-height:39px;padding:9px 11px 9px 36px;border-radius:9px;border-color:rgba(148,163,184,.14);background:#0a1424;font-size:11px}.profile-list{max-height:min(58vh,570px);margin:9px 12px 13px;padding:0 3px;gap:6px}.profile-row{padding:10px 9px;border:1px solid transparent;border-bottom-color:rgba(148,163,184,.09);border-radius:9px;background:transparent;box-shadow:none}.profile-row:hover{transform:none;border-color:rgba(16,185,129,.2);background:rgba(16,185,129,.045)}.profile-row.selected{border-color:rgba(52,211,153,.38);background:rgba(16,185,129,.08)}.profile-info b{font-size:11px;color:#e4ebf4}.profile-info small{font-size:10px;color:#8393aa}.row-actions button{padding:5px 7px;border-radius:7px;font-size:9px}.profile-list .empty-editor{margin:8px 0}
.profile-library-actions{display:flex;align-items:center;gap:7px}.export-pdf{min-height:29px;padding:5px 9px;border:1px solid rgba(16,185,129,.25);border-radius:8px;background:rgba(16,185,129,.08);color:#a4ecd1;font:700 9px 'DM Sans',sans-serif;white-space:nowrap;cursor:pointer}.export-pdf:hover:not(:disabled){border-color:rgba(52,211,153,.5);background:rgba(16,185,129,.16)}.export-pdf:disabled{opacity:.45;cursor:not-allowed}
.editor-card{grid-column:auto;grid-row:auto;min-width:0}.editor-card-head{background:rgba(5,12,23,.14)}.editor-titlebar{min-height:78px;padding:15px 21px;border:0}.editor-titlebar h2{max-width:min(60vw,520px);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:18px}.editor-head-actions{gap:9px}.editor-head-actions .secondary{padding:8px 11px;border-color:rgba(16,185,129,.25);background:rgba(16,185,129,.07);color:#87e7c5;font-size:10px}.wizard-bar{display:flex;align-items:center;padding:0 20px 16px;gap:8px}.wizard-step{display:flex;align-items:center;gap:8px;min-width:0;padding:8px 10px;border:1px solid transparent;border-radius:9px;background:transparent;color:#8594a9;text-align:left;cursor:pointer}.wizard-step span{display:grid;place-items:center;width:23px;height:23px;flex:0 0 23px;border:1px solid rgba(148,163,184,.2);border-radius:7px;background:rgba(148,163,184,.06);font:700 9px Manrope}.wizard-step b{font:600 10px 'DM Sans',sans-serif;white-space:nowrap}.wizard-step.active{border-color:rgba(16,185,129,.22);background:rgba(16,185,129,.075);color:#a9f0d5}.wizard-step.active span,.wizard-step.complete span{border-color:rgba(52,211,153,.38);background:#10b981;color:#06231b}.wizard-step.complete{color:#9ccbb9}.wizard-connector{height:1px;min-width:8px;flex:1;background:rgba(148,163,184,.15)}.form-sections{max-height:none;overflow:visible;padding:18px 20px 0}.form-section{min-height:310px;padding:18px 0 22px;margin:0;border:0;border-radius:0;background:transparent}.form-section h3{margin:0 0 18px;color:#e5edf7;font:700 14px Manrope;letter-spacing:-.02em}.form-note{margin:-9px 0 16px;color:#8493a9;font-size:10px;line-height:1.6}.fields{grid-template-columns:repeat(2,minmax(0,1fr));column-gap:16px;row-gap:14px}.field label{font-size:10px;color:#aab7c9}.field input,.field select{min-height:41px;margin-top:6px;padding:10px 11px;border-color:rgba(148,163,184,.15);border-radius:9px;background:#0a1424;color:#e7edf6;font-size:11px}.field input:focus,.field select:focus{border-color:#20bd8d;box-shadow:0 0 0 3px rgba(16,185,129,.1)}.form-section .field-error{font-size:9px}.wizard-section-hidden{display:none!important}.editor-empty-state{min-height:330px;display:flex;align-items:center;justify-content:center;flex-direction:column;padding:35px;text-align:center}.empty-state-icon{display:grid;place-items:center;width:48px;height:48px;border:1px solid rgba(52,211,153,.2);border-radius:14px;background:rgba(16,185,129,.08);color:#6ee7b7;font-size:27px}.editor-empty-state b{margin-top:14px;color:#dbe5f1;font:700 13px Manrope}.editor-empty-state p{max-width:350px;color:#8998ae;font-size:11px;line-height:1.7}.attachment-step{margin:0 20px 16px;padding:16px;border:1px solid rgba(148,163,184,.13);border-radius:11px;background:rgba(5,12,23,.25)}.attachment-step-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}.attachment-step-heading h3{margin:4px 0 0;color:#e6edf6;font:700 13px Manrope}.attachment-count{color:#8090a7;font-size:9px}.attachment-summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.attachment-row{min-width:0;padding:9px 10px;border:1px solid rgba(148,163,184,.1);border-radius:8px;background:rgba(148,163,184,.035)}.attachment-description span{color:#dbe5f0;font-size:10px}.attachment-description small{color:#8493a9;font-size:9px}.attachment-view{font-size:9px;padding:5px 9px}.certificate-upload{margin-top:11px;padding-top:11px;border-top:1px solid rgba(148,163,184,.1);display:flex;align-items:center;justify-content:space-between;gap:12px}.certificate-upload b,.certificate-upload small{display:block}.certificate-upload b{color:#dbe5f0;font-size:10px}.certificate-upload small{max-width:420px;margin-top:4px;color:#8796ac;font-size:9px;overflow-wrap:anywhere}.certificate-upload input{display:none}.file-select-button{padding:7px 10px;border:1px solid rgba(16,185,129,.24);border-radius:8px;background:rgba(16,185,129,.08);color:#a4ecd1;font-size:10px;white-space:nowrap;cursor:pointer}.file-select-button:hover{background:rgba(16,185,129,.15)}.editor-footer{position:sticky;bottom:0;z-index:4;padding:13px 20px;background:rgba(12,21,36,.96);border-top:1px solid rgba(148,163,184,.12);backdrop-filter:blur(14px);display:flex;align-items:center;justify-content:space-between;gap:14px}.editor-footer-status{min-width:0;display:flex;align-items:center;gap:8px}.editor-footer-status .status{margin:0}.editor-footer-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex:0 0 auto}.editor-footer-actions button{min-width:105px;min-height:38px;padding:9px 13px;font-size:10px}.editor-footer-actions .primary{background:#10b981;color:#06231b;box-shadow:none}.wizard-next{display:flex;align-items:center;justify-content:center;gap:8px;color:#a9edd3}.workspace-footer{display:flex;align-items:center;justify-content:space-between;padding:17px 3px 4px;color:#65758c;font-size:9px}.workspace-footer span:first-child{color:#91a1b7;font-weight:700}
.attachment-dialog{background:#101b2d;color:var(--workspace-text)}
@media(max-width:1150px){.topbar.workspace-topbar{grid-template-columns:minmax(190px,1fr) auto;gap:10px}.command-status{display:none}.context-inner{align-items:flex-start;flex-direction:column;gap:13px}.notice-banner{max-width:none;width:100%}.workspace-grid{grid-template-columns:minmax(250px,4fr) minmax(0,8fr);gap:14px}.wizard-bar{gap:4px;padding-inline:15px}.wizard-step{padding:7px 6px;gap:5px}.wizard-step b{font-size:9px}.form-sections{padding-inline:16px}.attachment-step{margin-inline:16px}.editor-footer{padding-inline:16px}}
@media(max-width:850px){.mobile-workspace-tabs{position:sticky;top:68px;z-index:6;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:4px;padding:7px 14px;border-bottom:1px solid var(--workspace-line);background:rgba(8,13,26,.96);backdrop-filter:blur(14px)}.mobile-panel-btn{min-height:36px;padding:7px 5px;border:1px solid transparent;border-radius:8px;background:transparent;color:#8e9db2;font:600 10px 'DM Sans',sans-serif;cursor:pointer}.mobile-panel-btn.active{border-color:rgba(16,185,129,.2);background:rgba(16,185,129,.1);color:#a7edcf}.workspace-grid{grid-template-columns:minmax(0,1fr)}.workspace-sidebar{position:static;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start}.scan-card,.profiles-card{grid-column:auto;grid-row:auto}.profile-list{max-height:320px}.workspace-grid .editor-card{grid-column:1}body[data-mobile-view="sidebar"] #workspaceEditor{display:none}body[data-mobile-view="form"] .workspace-sidebar{display:none}}
@media(max-width:600px){.topbar.workspace-topbar{height:60px;min-height:60px;padding:0 13px;grid-template-columns:minmax(0,1fr) auto;gap:8px}.brand-mark{width:35px;height:35px}.brand-copy b{font-size:12px}.brand-copy small{font-size:9px}.topbar-actions{gap:8px}.account{max-width:35px}.account #accountLabel{display:none}.account-avatar{width:30px;height:30px;flex-basis:30px}.sync-button{width:37px;height:37px;justify-content:center;padding:0;font-size:0}.sync-button span{font-size:20px}.context-inner{padding:15px 14px}.context-inner h1{font-size:23px}.notice-banner{padding:9px 10px}.notice-banner p{font-size:9px}.mobile-workspace-tabs{top:60px;padding-inline:10px}.shell.workspace-shell{padding:14px 10px 18px}.workspace-sidebar{grid-template-columns:minmax(0,1fr);gap:11px}.workspace-sidebar .scan-card{order:0}.workspace-sidebar .profiles-card{order:1}.panel.workspace-card{border-radius:12px}.card-titlebar{min-height:59px;padding:12px 14px}.card-titlebar h2{font-size:14px}.dropzone{min-height:142px;margin:12px;padding:14px}.scan-action{padding-inline:12px}.scan-action .primary{flex:1}.scan-hint{display:none}.profile-list{max-height:260px;margin-inline:10px}.editor-titlebar{min-height:66px;padding:12px 13px;align-items:flex-start}.editor-titlebar h2{max-width:47vw;font-size:14px}.editor-head-actions{flex-direction:column-reverse;align-items:flex-end;gap:5px}.editor-head-actions .secondary{padding:6px 8px;font-size:9px}.step-badge{padding:5px 7px;font-size:8px}.wizard-bar{overflow-x:auto;justify-content:flex-start;padding:0 10px 11px;scrollbar-width:none}.wizard-bar::-webkit-scrollbar{display:none}.wizard-step{flex:0 0 auto;padding:6px 7px}.wizard-step span{width:21px;height:21px;flex-basis:21px}.wizard-step b{font-size:9px}.wizard-connector{min-width:9px;flex:0 0 9px}.form-sections{padding:12px 13px 0}.form-section{min-height:0;padding:11px 0 18px}.form-section h3{font-size:13px;margin-bottom:14px}.fields{grid-template-columns:minmax(0,1fr);row-gap:10px}.field input,.field select{font-size:16px;min-height:44px}.attachment-step{margin:0 12px 12px;padding:12px}.attachment-step-heading{align-items:flex-start;flex-direction:column;gap:5px}.attachment-summary{grid-template-columns:minmax(0,1fr)}.certificate-upload{align-items:flex-start}.certificate-upload small{max-width:54vw}.editor-footer{position:sticky;bottom:0;padding:10px 11px;flex-direction:column;align-items:stretch;gap:6px}.editor-footer-status{min-height:16px}.editor-footer-actions{display:grid;grid-template-columns:.75fr 1.25fr;gap:7px}.editor-footer-actions #saveProfile{grid-column:1/-1}.editor-footer-actions button{min-width:0;min-height:40px}.editor-footer-actions .wizard-back{grid-column:1}.editor-footer-actions .wizard-next{grid-column:2}.workspace-footer{padding:13px 2px;gap:9px;align-items:flex-start;flex-direction:column}.editor-empty-state{min-height:245px;padding:25px}.form-note{font-size:10px}}
@media(prefers-reduced-motion:reduce){.profile-row,.dropzone,.sync-button{transition:none}}

/* Keep all profile sections together on one continuous page. */
.form-section{min-height:0;border-bottom:1px solid rgba(148,163,184,.1)}
.form-section:last-child{border-bottom:0}
.attachment-step{display:block}
@media(max-width:600px){.editor-footer-actions{display:flex;justify-content:flex-end}.editor-footer-actions #saveProfile{grid-column:auto;min-width:140px}}

/* Reference layout pass: restore the supplied concept's spacious 4/8 workspace,
   distinct information cards, and an animated passport scanner surface. */
:root {
  --workspace-accent-violet: #9a8cff;
  --workspace-accent-blue: #6387ff;
}
.topbar.workspace-topbar {
  height: 64px;
  min-height: 64px;
  padding-inline: clamp(16px, 2.2vw, 34px);
  grid-template-columns: minmax(230px, 1fr) auto minmax(280px, 1fr);
  background: rgba(8, 13, 26, .96);
}
.context-bar { background: rgba(15, 23, 42, .30); }
.context-inner {
  width: min(100%, 1640px);
  padding: 14px clamp(16px, 2.2vw, 34px);
}
.context-inner h1 { font-size: clamp(21px, 1.8vw, 26px); }
.notice-banner { max-width: 700px; }
.shell.workspace-shell {
  width: min(100%, 1640px);
  max-width: 1640px;
  padding: 20px clamp(16px, 2.2vw, 34px) 28px;
}
.workspace-grid {
  grid-template-columns: minmax(310px, 4fr) minmax(0, 8fr);
  gap: clamp(18px, 1.6vw, 26px);
  align-items: start;
}
.workspace-sidebar { top: 82px; gap: 18px; }
.panel.workspace-card {
  border-radius: 18px;
  border-color: rgba(148, 163, 184, .16);
  background: linear-gradient(180deg, rgba(18, 28, 47, .98), rgba(12, 20, 36, .99));
  box-shadow: 0 12px 32px rgba(0, 0, 0, .22), inset 0 1px rgba(255, 255, 255, .035);
}
.scan-card .card-titlebar {
  min-height: 94px;
  padding: 21px 24px 18px;
  border-bottom-color: rgba(148, 163, 184, .12);
}
.scan-card .card-titlebar .eyebrow { color: #aa9cff; font-size: 10px; letter-spacing: .18em; }
.scan-card .card-titlebar h2 { margin-top: 9px; font-size: 22px; letter-spacing: -.04em; }
.scan-card .step-badge {
  border: 0;
  background: transparent;
  color: #aab5c8;
  font-size: 12px;
  letter-spacing: .04em;
}
.scan-card .step-badge span { color: inherit; }
.dropzone {
  position: relative;
  isolation: isolate;
  min-height: 250px;
  margin: 19px 20px 14px;
  padding: 28px 24px;
  gap: 13px;
  overflow: hidden;
  border: 1px dashed rgba(137, 132, 214, .58);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(9, 19, 38, .78), rgba(13, 24, 44, .72));
  transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}
.dropzone:hover, .dropzone.dragover {
  border-color: rgba(169, 153, 255, .9);
  background: linear-gradient(145deg, rgba(34, 34, 73, .38), rgba(12, 31, 55, .8));
  box-shadow: inset 0 0 38px rgba(111, 115, 255, .08);
}
.dropzone .upload-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #b3a4ff;
}
.dropzone .upload-icon svg { width: 38px; height: 38px; }
.dropzone b {
  max-width: 100%;
  color: #e8eaf7;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 750;
}
.dropzone small {
  max-width: 430px;
  color: #9ba9c0;
  font-size: 11px;
  line-height: 1.55;
}
.dropzone .file-chip { position: relative; z-index: 2; }
.scan-laser {
  display: none;
  position: absolute;
  z-index: 0;
  left: 7%;
  right: 7%;
  top: 3%;
  height: 2px;
  border-radius: 50%;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, #9e8bff 24%, #74dfff 50%, #a68cff 76%, transparent);
  box-shadow: 0 0 10px 2px rgba(116, 208, 255, .68), 0 0 26px 5px rgba(145, 126, 255, .38);
}
.dropzone.scanning .scan-laser { display: block; animation: passport-laser-track 1.7s ease-in-out infinite alternate; }
.dropzone.scanning::after { content: none; }
.dropzone.scanning {
  border-style: solid;
  border-color: rgba(164, 147, 255, .9);
  background: linear-gradient(145deg, rgba(34, 34, 73, .26), rgba(7, 19, 37, .88));
  box-shadow: inset 0 0 44px rgba(111, 115, 255, .12), 0 0 24px rgba(99, 145, 255, .11);
}
.dropzone.scanning > :not(.scan-laser):not(input) { position: relative; z-index: 1; }
@keyframes passport-laser-track {
  from { top: 5%; opacity: .55; transform: translateY(0); }
  to { top: 88%; opacity: 1; transform: translateY(0); }
}
.scan-action { padding: 0 20px 2px; gap: 10px; }
.scan-action .primary {
  flex: 1;
  min-height: 48px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(100deg, #6654d6, #3f6fd5 62%, #0f8290);
  color: #f6f5ff;
  box-shadow: none;
  font-size: 12px;
}
.scan-action .primary:disabled { opacity: .5; }
.scan-hint { font-size: 10px; white-space: nowrap; }
.scan-card .status { padding: 0 20px 16px; }
.profiles-card .card-titlebar { min-height: 76px; padding: 17px 20px; }
.editor-card { overflow: visible !important; }
.editor-card-head { border-bottom: 1px solid rgba(148, 163, 184, .12); }
.editor-titlebar { min-height: 86px; padding: 18px 24px; }
.editor-titlebar .eyebrow { font-size: 10px; letter-spacing: .15em; }
.editor-titlebar h2 { font-size: 21px; }
.form-sections {
  max-height: none;
  overflow: visible;
  padding: 20px 22px 4px;
}
.form-section {
  min-height: 0;
  margin: 0 0 16px;
  padding: 19px 20px 21px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(21, 33, 53, .74), rgba(11, 20, 36, .64));
}
.form-section h3 {
  margin: 0 0 17px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(148, 163, 184, .13);
  color: #c0b5ff;
  font-size: 14px;
  letter-spacing: -.01em;
}
.form-note { margin: -8px 0 15px; }
.fields { column-gap: 16px; row-gap: 14px; }
.field input, .field select { min-height: 43px; }
.attachment-step {
  margin: 0 22px 17px;
  padding: 18px 19px;
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(21, 33, 53, .74), rgba(11, 20, 36, .64));
}
.editor-footer { border-radius: 0 0 18px 18px; }
@media (max-width: 1000px) {
  .workspace-grid { grid-template-columns: minmax(260px, 4fr) minmax(0, 8fr); }
  .dropzone { min-height: 220px; margin-inline: 16px; padding-inline: 16px; }
}
@media (max-width: 850px) {
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .workspace-sidebar { position: static; grid-template-columns: minmax(0, 1fr); }
  .dropzone { min-height: 230px; }
}
@media (max-width: 600px) {
  .context-inner { padding: 14px; }
  .shell.workspace-shell { padding: 13px 10px 18px; }
  .scan-card .card-titlebar { min-height: 78px; padding: 16px 17px; }
  .scan-card .card-titlebar h2 { font-size: 19px; }
  .dropzone { min-height: 210px; margin: 13px; padding: 20px 15px; border-radius: 16px; }
  .dropzone b { font-size: 14px; }
  .dropzone small { font-size: 10px; }
  .scan-action { padding-inline: 13px; }
  .form-sections { padding: 12px 11px 2px; }
  .form-section { margin-bottom: 11px; padding: 15px 13px 17px; border-radius: 12px; }
  .form-section h3 { font-size: 13px; }
  .attachment-step { margin: 0 11px 12px; padding: 14px 12px; }
  .editor-titlebar { min-height: 72px; padding: 14px 15px; }
  .editor-titlebar h2 { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .dropzone.scanning .scan-laser { animation: none; top: 50%; }
}

/* Keep an empty helper slot from taking space while preserving Cancel editing. */
.editor-footer-status { min-width: 0; }
.editor-footer-status #saveStatus:empty { display: none; }
.editor-footer-actions { flex: 1 1 auto; width: 100%; justify-content: flex-end; }
.editor-footer-actions #saveProfile {
  min-width: 176px;
  min-height: 46px;
  padding-inline: 24px;
  font-size: 12px;
  letter-spacing: .01em;
}
@media (max-width: 600px) {
  .editor-footer-actions { flex: 1 1 auto; width: 100%; justify-content: flex-end; }
  .editor-footer-actions #saveProfile { min-width: 156px; min-height: 44px; }
}

/* Full form workspace styling from the supplied Pilgrim Registration concept. */
.workspace-grid { grid-template-columns: minmax(260px, .27fr) minmax(0, 1fr); }
.editor-titlebar {
  min-height: 112px;
  padding: 22px 28px;
  align-items: center;
  gap: 22px;
}
.profile-heading-copy { min-width: 0; }
.profile-heading-badges { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; }
.profile-heading-badges .eyebrow { color: #5ee3b2; font: 700 10px 'DM Sans', sans-serif; letter-spacing: .17em; }
.profile-count-badge, .profile-state-badge, .required-summary {
  display: inline-flex;
  align-items: center;
  min-height: 29px;
  padding: 5px 11px;
  border: 1px solid rgba(16, 185, 129, .24);
  border-radius: 9px;
  background: rgba(16, 185, 129, .07);
  color: #35d69e;
  font: 700 10px 'DM Sans', sans-serif;
  white-space: nowrap;
}
#profileCountBadge { margin-right: 4px; }
.profile-state-badge { border-color: rgba(148, 163, 184, .16); background: rgba(148, 163, 184, .055); color: #9baac0; }
.required-summary { border-color: rgba(244, 169, 48, .22); background: rgba(245, 158, 11, .06); color: #f4b84a; }
.required-summary.complete { border-color: rgba(16, 185, 129, .28); background: rgba(16, 185, 129, .09); color: #38dda5; }
.editor-titlebar h2#editorTitle {
  max-width: none;
  margin: 10px 0 0;
  color: #f5f7fc;
  font: 750 clamp(18px, 1.55vw, 24px)/1.2 Manrope, sans-serif;
  letter-spacing: -.035em;
  white-space: normal;
}
.editor-head-actions { flex: 0 0 auto; align-items: center; gap: 10px; }
.form-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid rgba(148, 163, 184, .14);
  border-radius: 13px;
  background: rgba(6, 15, 29, .42);
  color: #9aa9bf;
  font: 600 11px 'DM Sans', sans-serif;
  white-space: nowrap;
}
.form-view-toggle span, .form-view-toggle b { padding: 9px 13px; }
.form-view-toggle b { border-radius: 9px; background: #10b981; color: #041d17; font-weight: 750; }
.editor-head-actions #manualProfile { min-height: 46px; padding: 0 17px; border: 1px solid rgba(244, 63, 94, .32); border-radius: 11px; background: rgba(244, 63, 94, .075); color: #fb7185; font-size: 12px; }
.form-sections { padding: 22px 28px 6px; }
.form-section {
  padding: 24px 0 28px;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.form-section + .form-section { border-top: 1px solid rgba(148, 163, 184, .13); }
.form-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; padding-bottom: 13px; border-bottom: 1px solid rgba(148, 163, 184, .13); }
.form-section-heading h3 { display: flex; align-items: center; gap: 11px; margin: 0; padding: 0; border: 0; color: #f2f5fb; font: 750 17px/1.25 Manrope, sans-serif; letter-spacing: -.02em; }
.form-section-heading h3::before { content: ''; width: 7px; height: 26px; flex: 0 0 7px; border-radius: 99px; background: #10b981; }
.form-section[data-form-section="personal"] .form-section-heading h3::before { background: #f59e0b; }
.form-section-meta { color: #3dd8a4; font: 650 10px 'DM Sans', sans-serif; letter-spacing: .025em; text-align: right; }
.form-section[data-form-section="contact"] .form-section-meta { color: #91a3bb; font-weight: 500; }
.fields { column-gap: 20px; row-gap: 17px; }
.form-section[data-form-section="passport"] .fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-section[data-form-section="personal"] .fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-section[data-form-section="contact"] .fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.field label { color: #d3dbea; font: 600 12px 'DM Sans', sans-serif; }
.field input, .field select { min-height: 49px; margin-top: 7px; padding: 11px 13px; border-color: rgba(112, 132, 164, .2); border-radius: 12px; background: #0c1729; color: #f1f4fb; font: 500 14px 'DM Sans', sans-serif; }
.form-section .field:nth-child(n+5):nth-child(-n+8) input { border-color: rgba(16, 185, 129, .38); }
.form-section[data-form-section="personal"] .field input[dir="rtl"] { color: #e9edfa; font-family: 'Noto Naskh Arabic', 'Noto Sans Arabic', serif; }
.translation-note { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 0 0 18px; padding: 14px 16px; border: 1px solid rgba(245, 158, 11, .24); border-radius: 13px; background: rgba(245, 158, 11, .065); }
.translation-note .form-note { margin: 0; color: #d8ddea; font-size: 12px; line-height: 1.55; }
.resync-arabic { flex: 0 0 auto; padding: 10px 13px; border: 0; border-radius: 9px; background: rgba(245, 158, 11, .17); color: #ffc541; font: 700 11px 'DM Sans', sans-serif; cursor: pointer; }
.resync-arabic:hover { background: rgba(245, 158, 11, .25); }
.attachment-step { margin-inline: 28px; }
@media (max-width: 1250px) {
  .form-section[data-form-section="personal"] .fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .editor-titlebar { align-items: flex-start; }
}
@media (max-width: 1000px) {
  .workspace-grid { grid-template-columns: minmax(250px, 4fr) minmax(0, 8fr); }
  .form-section[data-form-section="personal"] .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-section[data-form-section="passport"] .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-section[data-form-section="contact"] .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .workspace-grid { grid-template-columns: minmax(0, 1fr); }
  .editor-titlebar { flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 600px) {
  .editor-titlebar { min-height: 0; padding: 18px 16px; flex-direction: column; align-items: stretch; }
  .editor-titlebar h2#editorTitle { max-width: none; font-size: 19px; }
  .profile-heading-badges { gap: 6px; }
  .profile-count-badge, .profile-state-badge, .required-summary { min-height: 25px; padding: 4px 8px; font-size: 9px; }
  .editor-head-actions { width: 100%; justify-content: space-between; }
  .form-view-toggle { font-size: 10px; }
  .form-view-toggle span, .form-view-toggle b { padding: 8px 10px; }
  .form-sections { padding: 12px 15px 2px; }
  .form-section { padding: 18px 0 21px; }
  .form-section-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .form-section-heading h3 { font-size: 15px; }
  .form-section-meta { text-align: left; font-size: 9px; }
  .form-section[data-form-section="personal"] .fields,
  .form-section[data-form-section="passport"] .fields,
  .form-section[data-form-section="contact"] .fields { grid-template-columns: minmax(0, 1fr); }
  .translation-note { align-items: flex-start; flex-direction: column; gap: 11px; padding: 12px; }
  .translation-note .form-note { font-size: 11px; }
  .attachment-step { margin-inline: 12px; }
}

/* Document cards and save progress, following the supplied attachment panel. */
.attachment-step {
  margin: 12px 28px 20px;
  padding: 20px 22px 18px;
  border: 1px solid rgba(112, 132, 164, .17);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(14, 23, 40, .98), rgba(10, 18, 33, .98));
}
.attachment-step-heading {
  min-height: 46px;
  margin: 0 0 17px;
  padding: 0 0 13px;
  border-bottom: 1px solid rgba(148, 163, 184, .14);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.attachment-step-heading h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #f3f6fb;
  font: 750 17px Manrope, sans-serif;
}
.attachment-step-heading h3::before { content: ''; width: 7px; height: 28px; border-radius: 99px; background: #24d5a3; }
.attachment-step-heading .attachment-count { color: #27d8a6; font: 700 11px 'DM Sans', sans-serif; letter-spacing: .04em; }
.attachment-card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.attachment-card {
  min-width: 0;
  min-height: 142px;
  padding: 19px 20px 16px;
  border: 1px solid rgba(112, 132, 164, .19);
  border-radius: 15px;
  background: rgba(15, 24, 41, .74);
}
.attachment-card-title { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.attachment-card-title h4 { margin: 0; color: #f0f4fb; font: 750 13px Manrope, sans-serif; }
.attachment-card p { min-height: 19px; margin: 8px 0 15px; color: #94a5bf; font: 400 11px 'DM Sans', sans-serif; line-height: 1.5; }
.attachment-card p.attachment-fallback { color: #ffbd28; }
.attachment-state { flex: 0 0 auto; padding: 5px 10px; border-radius: 7px; background: rgba(16, 185, 129, .12); color: #26d8a1; font: 700 9px 'DM Sans', sans-serif; white-space: nowrap; }
.attachment-state.neutral { background: rgba(112, 132, 164, .16); color: #b7c5d9; }
.attachment-state.warning { background: rgba(245, 158, 11, .13); color: #ffc32c; }
.attachment-file-line { display: flex; align-items: center; gap: 12px; min-width: 0; }
.attachment-file-line > span { overflow: hidden; color: #8da0bc; font: 400 11px 'DM Sans', sans-serif; text-overflow: ellipsis; white-space: nowrap; }
.attachment-file-line input[type="file"] { display: none; }
.attachment-choose { display: inline-flex; align-items: center; justify-content: center; min-width: 110px; min-height: 39px; padding: 0 14px; border-radius: 10px; background: rgba(16, 185, 129, .12); color: #28dba6; font: 700 11px 'DM Sans', sans-serif; cursor: pointer; }
.attachment-choose:hover { background: rgba(16, 185, 129, .2); }
.attachment-choose.muted { background: rgba(112, 132, 164, .16); color: #c4d0e1; }
.attachment-card-view { flex: 0 0 auto; padding: 6px 9px; border: 1px solid rgba(16, 185, 129, .24); border-radius: 7px; background: transparent; color: #7de4c1; font: 650 10px 'DM Sans', sans-serif; cursor: pointer; }
.attachment-progress-row { display: flex; align-items: center; gap: 14px; margin-top: 20px; padding-top: 17px; border-top: 1px solid rgba(148, 163, 184, .14); }
.attachment-progress { width: 168px; height: 8px; flex: 0 1 168px; overflow: hidden; border-radius: 99px; background: rgba(112, 132, 164, .22); }
.attachment-progress span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #10b981, #35d4b5); transition: width .22s ease; }
.attachment-progress-row > b { color: #d8e1ef; font: 700 11px 'DM Sans', sans-serif; white-space: nowrap; }
.attachment-progress-row .editor-footer-status { flex: 1 1 auto; }
.attachment-progress-row #saveStatus { font-size: 10px; line-height: 1.45; }
.attachment-progress-row > #saveProfile { min-width: 174px; min-height: 52px; margin-left: auto; border: 0; border-radius: 12px; background: #10b981; color: #041b15; font: 750 13px 'DM Sans', sans-serif; }
.attachment-progress-row > #saveProfile:disabled { opacity: .45; }
@media (max-width: 760px) {
  .attachment-step { margin-inline: 15px; padding: 16px 14px; }
  .attachment-card-grid { grid-template-columns: minmax(0, 1fr); gap: 11px; }
  .attachment-card { min-height: 130px; padding: 16px; }
  .attachment-progress-row { flex-wrap: wrap; gap: 10px; }
  .attachment-progress { width: min(44%, 168px); flex-basis: min(44%, 168px); }
  .attachment-progress-row .editor-footer-status { order: 3; flex-basis: 100%; }
  .attachment-progress-row > #saveProfile { flex: 1 1 100%; width: 100%; min-height: 46px; }
}

/* The profile editor always stays in full-form mode; remove the view selector. */
.editor-head-actions #manualProfile {
  min-height: 46px;
  padding: 0 18px;
  border: 1px solid #285184;
  border-radius: 11px;
  background: #123967;
  color: #fff;
  font-size: 12px;
}
.editor-head-actions #manualProfile:hover { border-color: #3971b6; background: #194a80; color: #fff; }

.form-sections > .attachment-step { margin: 12px 0 20px; }

.form-section > .attachment-step { margin: 24px 0 0; padding: 20px 0 0; border: 0; border-top: 1px solid rgba(148, 163, 184, .14); border-radius: 0; background: transparent; }

/* Keep all four contact fields on one row on desktop, with a compact country-code control. */
.form-section[data-form-section="contact"] .fields {
  grid-template-columns: minmax(0, 1.45fr) minmax(132px, .62fr) minmax(0, 1.2fr) minmax(0, .68fr);
  align-items: end;
}
.form-section[data-form-section="contact"] .field:nth-child(2) select {
  padding-inline: 9px;
  font-size: 12px;
}

/* Deep red manual-profile action requested for the workspace header. */
.editor-head-actions #manualProfile {
  border-color: #a51f35;
  background: #7f1d2d;
  color: #fff;
}
.editor-head-actions #manualProfile:hover {
  border-color: #d12d49;
  background: #9b2338;
  color: #fff;
}

@media (max-width: 1150px) {
  .form-section[data-form-section="contact"] .fields {
    grid-template-columns: minmax(0, 1.5fr) minmax(118px, .7fr) minmax(0, 1.3fr) minmax(0, .8fr);
  }
}
@media (max-width: 760px) {
  .form-section[data-form-section="contact"] .fields { grid-template-columns: minmax(0, 1fr); }
}

/* Refined passport scanner: a soft scan field, bright beam, and framed corners. */
.dropzone.scanning {
  border-color: rgba(117, 227, 255, .78);
  background:
    linear-gradient(#80edff, #80edff) left 15px top 15px / 22px 1px no-repeat,
    linear-gradient(#80edff, #80edff) left 15px top 15px / 1px 22px no-repeat,
    linear-gradient(#80edff, #80edff) right 15px top 15px / 22px 1px no-repeat,
    linear-gradient(#80edff, #80edff) right 15px top 15px / 1px 22px no-repeat,
    linear-gradient(#80edff, #80edff) left 15px bottom 15px / 22px 1px no-repeat,
    linear-gradient(#80edff, #80edff) left 15px bottom 15px / 1px 22px no-repeat,
    linear-gradient(#80edff, #80edff) right 15px bottom 15px / 22px 1px no-repeat,
    linear-gradient(#80edff, #80edff) right 15px bottom 15px / 1px 22px no-repeat,
    radial-gradient(ellipse at 50% 48%, rgba(27, 133, 169, .16), transparent 68%),
    linear-gradient(145deg, rgba(25, 39, 75, .94), rgba(7, 18, 36, .98));
  box-shadow: inset 0 0 54px rgba(72, 171, 220, .12), 0 0 32px rgba(64, 173, 221, .12);
}
.dropzone.scanning::after {
  content: "";
  position: absolute;
  z-index: 0;
  inset: 0 7%;
  height: 42%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(73, 202, 235, .12) 42%, rgba(121, 135, 255, .08) 58%, transparent);
  animation: passport-scan-field 1.7s ease-in-out infinite alternate;
}
.dropzone.scanning .scan-laser {
  left: 9%;
  right: 9%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #9bf3ff 18%, #f3ffff 50%, #91dfff 82%, transparent);
  box-shadow: 0 0 7px 2px rgba(157, 241, 255, .9), 0 0 20px 7px rgba(79, 189, 239, .42), 0 0 38px 12px rgba(123, 130, 255, .2);
  animation: passport-laser-track 1.7s cubic-bezier(.45, 0, .35, 1) infinite alternate;
}
.dropzone.scanning .upload-icon {
  border-radius: 15px;
  background: radial-gradient(circle, rgba(84, 200, 235, .17), rgba(84, 200, 235, .025) 70%);
  filter: drop-shadow(0 0 12px rgba(106, 216, 255, .42));
  animation: passport-icon-focus 1.7s ease-in-out infinite alternate;
}
.dropzone.scanning b { color: #f4f8ff; text-shadow: 0 0 16px rgba(123, 217, 255, .22); }
@keyframes passport-scan-field {
  from { transform: translateY(0); opacity: .45; }
  to { transform: translateY(135%); opacity: 1; }
}
@keyframes passport-icon-focus {
  from { transform: translateY(2px) scale(.97); opacity: .72; }
  to { transform: translateY(-2px) scale(1.04); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .dropzone.scanning::after,
  .dropzone.scanning .scan-laser,
  .dropzone.scanning .upload-icon { animation: none; }
  .dropzone.scanning::after { top: 29%; opacity: .75; }
  .dropzone.scanning .scan-laser { top: 50%; }
}

/* Keep every top-level workspace card and its inner panels on one surface. */
#dashboard .workspace-card,
#workspaceEditor .form-section,
#workspaceEditor .attachment-step {
  background: #121c2f !important;
  background-image: none !important;
}

/* Compact the profile editor vertically so more fields fit in view. */
#workspaceEditor .form-section {
  min-height: 0 !important;
  margin: 0 0 8px !important;
  padding: 12px 14px !important;
}
#workspaceEditor .form-section-heading {
  gap: 10px;
  margin-bottom: 9px;
  padding-bottom: 8px;
}
#workspaceEditor .fields {
  row-gap: 8px;
  column-gap: 12px;
}
#workspaceEditor .field input,
#workspaceEditor .field select {
  min-height: 36px;
  margin-top: 3px;
  padding-block: 7px;
}
#workspaceEditor .translation-note {
  margin-bottom: 10px;
  padding: 10px 12px;
}
#workspaceEditor .attachment-step {
  margin-top: 8px;
  margin-bottom: 10px;
  padding: 14px 16px;
}
@media (max-width: 760px) {
  #workspaceEditor .field input,
  #workspaceEditor .field select { min-height: 44px; }
}

/* Attachment preview can be repositioned and resized while comparing passport details. */
.attachment-dialog{position:fixed;inset:auto;left:50%;top:50%;transform:translate(-50%,-50%);margin:0;display:flex;flex-direction:column;box-sizing:border-box;width:min(900px,calc(100vw - 28px));height:min(78vh,760px);min-width:min(360px,calc(100vw - 20px));min-height:280px;max-width:calc(100vw - 20px);max-height:calc(100vh - 20px);overflow:hidden;resize:both}
.attachment-dialog-head{flex:none;cursor:grab;touch-action:none;user-select:none}
.attachment-dialog-head:active{cursor:grabbing}
.attachment-dialog-head button,.attachment-dialog-head a{cursor:pointer}
.attachment-preview{flex:1;min-height:0;max-height:none;width:100%;margin:15px 0;box-sizing:border-box}
.attachment-preview img{max-height:100%}
.attachment-preview iframe{height:100%;min-height:200px}

.attachment-dialog:not([open]){display:none}
.attachment-dialog[open]{display:flex}

.row-actions button.view-profile{border-color:rgba(52,211,153,.36);background:rgba(16,185,129,.13);color:#8cf0c6}
.row-actions button.view-profile:hover{border-color:rgba(52,211,153,.7);background:rgba(16,185,129,.24);color:#d2ffea;box-shadow:0 4px 12px rgba(16,185,129,.15)}
.row-actions button.view-profile:disabled{opacity:.55;cursor:wait}

.attachment-dialog{resize:none}
.attachment-dialog-actions{padding-right:18px}
.attachment-resize-handle{position:absolute;right:3px;bottom:3px;width:17px;height:17px;z-index:2;cursor:nwse-resize;touch-action:none;background:linear-gradient(135deg,transparent 0 48%,rgba(148,163,184,.35) 49% 55%,transparent 56%),linear-gradient(135deg,transparent 0 64%,rgba(148,163,184,.55) 65% 71%,transparent 72%),linear-gradient(135deg,transparent 0 80%,#8cf0c6 81% 87%,transparent 88%)}
.attachment-resize-handle:hover{filter:brightness(1.35)}

.attachment-dialog{width:min(812px,calc(100vw - 24px));height:min(686px,calc(100vh - 24px));min-width:min(360px,calc(100vw - 24px));min-height:min(280px,calc(100vh - 24px))}
.attachment-dialog-head-actions{display:flex;align-items:center;gap:8px;flex:none}
.attachment-dialog-head-actions .secondary{min-height:34px;padding:0 13px;border:1px solid rgba(52,211,153,.34);border-radius:9px;background:rgba(16,185,129,.14);color:#9af2cf;text-decoration:none;display:inline-flex;align-items:center;justify-content:center;font:700 11px 'DM Sans',sans-serif}
.attachment-dialog-head-actions .secondary:hover{border-color:rgba(52,211,153,.65);background:rgba(16,185,129,.23);color:#d7ffeb}
.attachment-dialog-head-actions #closeAttachment{min-height:34px;padding:0 14px;border:1px solid rgba(255,82,102,.55);border-radius:9px;background:linear-gradient(135deg,#e11d3f,#a90e2c);color:#fff;font-weight:700}
.attachment-dialog-head-actions #closeAttachment:hover{background:linear-gradient(135deg,#f0274b,#c20e35);border-color:#ff657a;box-shadow:0 5px 14px rgba(220,25,60,.24)}
@media(max-width:480px){.attachment-dialog{width:calc(100vw - 20px);height:min(686px,calc(100vh - 20px));min-width:calc(100vw - 20px);min-height:min(260px,calc(100vh - 20px))}}

.attachment-preview{position:relative}
.passport-magnifier{position:absolute;display:none;z-index:3;border:2px solid #a7f3d0;border-radius:50%;box-shadow:0 8px 24px rgba(0,0,0,.48),0 0 0 1px rgba(255,255,255,.48);background-repeat:no-repeat;background-color:#fff;pointer-events:none}
.passport-magnifier::after{content:'';position:absolute;inset:50% auto auto 50%;width:7px;height:7px;transform:translate(-50%,-50%);border:1px solid rgba(255,255,255,.85);border-radius:50%;box-shadow:0 0 2px rgba(0,0,0,.8)}

.passport-magnifier{box-sizing:border-box;border:2px solid #a7f3d0;background:none}
.passport-magnifier::after{content:none}

/* Premium passport scan beam: one crisp horizontal laser with a restrained glow halo. */
.dropzone.scanning::after{content:none}
.dropzone.scanning .scan-laser{left:8%;right:8%;height:5px;z-index:2;border-radius:999px;background:linear-gradient(90deg,transparent 0%,rgba(91,214,255,.72) 15%,#b9f8ff 35%,#fff 50%,#b9f8ff 65%,rgba(91,214,255,.72) 85%,transparent 100%);box-shadow:0 0 4px 1px rgba(202,250,255,.95),0 0 12px 3px rgba(87,216,255,.72),0 0 24px 6px rgba(108,146,255,.34);animation:passport-laser-track 1.65s cubic-bezier(.42,0,.28,1) infinite alternate}
.dropzone.scanning .scan-laser::before{content:'';position:absolute;left:0;right:0;top:-13px;height:31px;border-radius:999px;background:linear-gradient(180deg,transparent,rgba(70,211,255,.17) 36%,rgba(126,155,255,.22) 55%,rgba(70,211,255,.12) 72%,transparent);filter:blur(6px);pointer-events:none}
@media(prefers-reduced-motion:reduce){.dropzone.scanning .scan-laser{animation:none;top:50%}.dropzone.scanning .scan-laser::before{filter:blur(4px)}}
