/* Entrega de EPP: tarjetas, controles y confirmación */
.delivery-flow { max-width: 980px; margin: 0 auto; padding: 24px; color: #172335; }
.delivery-panel { border: 1px solid #dce3ec; border-radius: 12px; background: #fff; box-shadow: 0 5px 20px #17233508; overflow: clip; }
.delivery-header { padding: 22px 26px 18px; background: linear-gradient(135deg,#fff 30%,#f4f7fb); border-bottom: 1px solid #e8edf3; }
.delivery-heading { display: flex; align-items: center; gap: 12px; }
.delivery-heading-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px; background: #fff2c5; color: #9d6400; flex: none; }
#mainContent .delivery-heading h1 { font-size: 20px; font-weight: 700; margin: 0; line-height: 1.3; color: #172335; }
.delivery-heading p { margin: 3px 0 0; color: #728095; font-size: 12px; }
.delivery-progress { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); margin: 20px 0 0; padding: 0; list-style: none; }
.delivery-progress li { display: flex; flex-direction: column; align-items: center; position: relative; gap: 7px; color: #728095; }
.delivery-progress li::before { content: ''; position: absolute; top: 12px; right: 50%; width: 100%; height: 2px; background: #dce3eb; }
.delivery-progress li:first-child::before { display: none; }
.delivery-progress li span { display: grid; place-items: center; position: relative; z-index: 1; width: 26px; height: 26px; border: 3px solid #f6f8fb; border-radius: 50%; background: #8b99ab; color: #fff; font-size: 11px; font-weight: 700; }
.delivery-progress small { font-size: 11px; }
.delivery-progress .is-active span { color: #172335; background: #ffbd13; }
.delivery-progress .is-active small { color: #172335; font-weight: 700; }
.delivery-progress .is-done span { background: #172335; }
.delivery-progress .is-done::before, .delivery-progress .is-active::before { background: #aab7c5; }
.delivery-body { padding: 22px 26px; }
.delivery-body input:not([type=checkbox]), .delivery-body textarea, .delivery-body select { border: 1px solid #dce3eb; border-radius: 6px; background: #fbfcfe; color: #243247; min-width: 0; max-width: 100%; }
.delivery-body input:focus, .delivery-body select:focus, .delivery-body textarea:focus { outline: 2px solid #ffc631; outline-offset: 1px; }
.delivery-search { display: flex; gap: 8px; margin-bottom: 18px; }
.delivery-search-icon { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: #7c899a; pointer-events: none; }
.delivery-body #employeeSearch, .delivery-body #ppeSearch { padding-left: 36px; }
.delivery-qr { width: 44px; flex: none; border: 1px solid #dce3eb; background: #f7f9fc; border-radius: 6px; display: grid; place-items: center; }
.delivery-section-title { font-size: 14px; font-weight: 700; margin: 0 0 14px; }
.delivery-employee-results { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.delivery-employee-results[hidden] { display: none; }
.delivery-employee-option { display: flex; align-items: center; gap: 10px; padding: 12px; border: 1px solid #e1e7ef; border-radius: 8px; text-align: left; min-width: 0; background: #fafbfd; }
.delivery-employee-option:hover, .delivery-employee-option.is-selected { border-color: #f2b616; background: #fffae9; }
.delivery-employee-option > span:nth-child(2) { flex: 1; min-width: 0; }
.delivery-employee-option strong, .delivery-employee-option small { display: block; overflow-wrap: anywhere; }
.delivery-employee-option strong { font-size: 13px; }
.delivery-employee-option small { font-size: 11px; color: #728095; margin-top: 3px; }
.delivery-avatar { display: grid; place-items: center; width: 45px; height: 45px; flex: none; border-radius: 8px; background: linear-gradient(145deg,#354961,#172335); color: #ffce41; font-weight: 700; font-size: 14px; }
.delivery-employee-summary { background: #f5f8fc; border: 1px solid #e8edf4; border-radius: 8px; padding: 16px; }
.delivery-identity { display: flex; align-items: flex-start; gap: 12px; }
.delivery-identity .delivery-avatar { width: 64px; height: 76px; font-size: 20px; }
.delivery-identity > div { flex: 1; min-width: 0; }
.delivery-identity strong { display: block; font-size: 14px; overflow-wrap: anywhere; margin-bottom: 4px; }
.delivery-identity small { display: block; font-size: 11px; line-height: 1.6; color: #6a788b; overflow-wrap: anywhere; }
.delivery-link { color: #886000; font-size: 11px; text-decoration: underline; min-height: 36px; }
.delivery-employee-stats { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; margin-top: 16px; }
.delivery-employee-stats > div { display: flex; align-items: center; gap: 7px; min-width: 0; background: #eaf0f7; border-radius: 6px; padding: 10px; }
.delivery-employee-stats svg { flex: none; color: #52647b; }
.delivery-employee-stats small, .delivery-employee-stats strong { display: block; }
.delivery-employee-stats small { color: #748196; font-size: 10px; }
.delivery-employee-stats strong { font-size: 12px; overflow-wrap: anywhere; }
.delivery-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 26px; border-top: 1px solid #e5ebf2; background: #fafbfd; }
.delivery-actions > button, .delivery-success-actions button { min-height: 44px; padding: 10px 24px; font-size: 13px; border-radius: 6px; }
.delivery-panel .bg-amber-500 { background: #ffbd13; color: #172335; box-shadow: none; }
.delivery-panel .bg-amber-500:hover { background: #f4af00; }
.delivery-panel button:focus-visible { outline: 2px solid #d19400; outline-offset: 3px; }
.delivery-selection { display: grid; grid-template-columns: 270px minmax(0,1fr); gap: 22px; }
.delivery-selection aside .delivery-identity { flex-wrap: wrap; }
.delivery-selection aside .delivery-identity .delivery-avatar { width: 44px; height: 52px; font-size: 15px; }
.delivery-selection aside .delivery-employee-stats { grid-template-columns: repeat(2,minmax(0,1fr)); }
.delivery-selection aside .delivery-employee-stats > div { padding: 8px; gap: 4px; }
.delivery-selection aside .delivery-employee-stats svg { width: 16px; }
.delivery-catalog { min-width: 0; }
.delivery-tabs { display: flex; gap: 5px; max-width: 100%; overflow-x: auto; padding: 0 0 9px; scrollbar-width: thin; }
.delivery-tabs button { flex: none; padding: 8px 10px; border-radius: 5px; color: #627186; background: #f0f3f7; font-size: 11px; min-height: 36px; }
.delivery-tabs button.is-active { background: #ffbd13; color: #172335; font-weight: 700; }
.delivery-ppe-list { margin-top: 10px; }
.delivery-ppe-row { display: grid; grid-template-columns: 20px 36px minmax(0,1fr) auto; align-items: center; gap: 8px; padding: 12px 8px; border-bottom: 1px solid #e7edf4; }
.delivery-ppe-row.is-selected { background: #fffbec; }
.delivery-ppe-row input[type=checkbox] { width: 18px; height: 18px; accent-color: #dda400; cursor: pointer; }
.delivery-ppe-icon { font-size: 25px; text-align: center; }
.delivery-ppe-name strong, .delivery-ppe-name small { display: block; }
.delivery-ppe-name strong { font-size: 12px; overflow-wrap: anywhere; }
.delivery-ppe-name small { font-size: 10px; margin-top: 2px; }
.stock-ok { color: #238551; }.stock-low { color: #ac7500; }.stock-empty { color: #cf3543; }
.delivery-ppe-options { grid-column: 3; display: flex; flex-wrap: wrap; gap: 6px; }
.delivery-ppe-options:empty { display: none; }
.delivery-ppe-options label { display: flex; gap: 4px; align-items: center; color: #738197; font-size: 10px; }
.delivery-ppe-options select { padding: 5px; font-size: 12px; min-height: 36px; max-width: 140px; }
.delivery-quantity { grid-column: 4; grid-row: 1 / span 2; display: flex; align-items: center; background: #fff; border: 1px solid #e3e8ef; border-radius: 6px; overflow: hidden; }
.delivery-quantity button { width: 32px; height: 42px; background: #f1f4f8; font-size: 17px; }
.delivery-quantity button:disabled { color: #aeb8c5; cursor: not-allowed; }
.delivery-quantity output { width: 27px; text-align: center; font-size: 12px; font-weight: 600; }
.delivery-selection-actions { background: #172335; color: #fff; }
.delivery-back { color: inherit; padding-inline: 0!important; }
.delivery-count { display: flex; gap: 5px; align-items: center; flex: 1; font-size: 12px; }
.delivery-count strong { color: #ffbd13; }
.delivery-review-employee .delivery-employee-stats { display: none; }
.delivery-review-table { width: 100%; border-collapse: collapse; margin-top: 18px; font-size: 12px; }
.delivery-review-table th { text-align: left; padding: 10px; background: #edf2f8; color: #607087; font-size: 10px; text-transform: uppercase; }
.delivery-review-table td { padding: 12px 10px; border-bottom: 1px solid #e7edf4; }
.delivery-review-table select { width: 100%; max-width: 200px; padding: 8px; font-size: 12px; }
.delivery-review-fields { display: grid; grid-template-columns: 190px minmax(0,1fr); gap: 18px; margin-top: 18px; }
.delivery-review-fields label { display: block; font-size: 12px; font-weight: 600; }
.delivery-review-fields input, .delivery-review-fields textarea { margin-top: 7px; font-weight: 400; }
.delivery-warning { margin-top: 12px; display: flex; gap: 10px; padding: 12px; background: #fff7d9; color: #916100; font-size: 12px; border-radius: 6px; }
.delivery-warning svg { flex: none; }
.delivery-sign-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 12px; color: #68768a; margin-bottom: 16px; }
.delivery-auth-tabs { margin-bottom: 10px; }
.delivery-signature { border: 1px solid #dce3eb; background: #f8fafc; border-radius: 8px; overflow: hidden; }
.delivery-signature canvas { display: block; width: 100%; height: 220px; touch-action: none; background: linear-gradient(#f8fafc,#f3f6fa); }
.delivery-signature > div { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 5px 12px; color: #8b96a5; font-size: 11px; }
.delivery-signature button { display: flex; align-items: center; gap: 5px; min-height: 38px; color: #4f5e72; font-size: 11px; }
.delivery-sign-consent { font-size: 11px; line-height: 1.6; color: #8390a1; margin-top: 12px; }
.delivery-evidence { margin-top: 16px; border-top: 1px solid #e9edf3; padding-top: 12px; }
.delivery-evidence summary { cursor: pointer; font-size: 12px; color: #617086; padding: 8px 0; }
.delivery-evidence #deliveryEvidenceBlock { margin-top: 8px; }
.delivery-pin { max-width: 300px; margin: 0 auto; font-size: 12px; text-align: center; }
#pinBox { display: flex; justify-content: center; gap: 6px; margin: 16px 0; }
#pinBox span { display: grid; place-items: center; width: 38px; height: 46px; border: 1px solid #dce3eb; border-radius: 6px; font-size: 20px; }
#pinPad { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
#pinPad button { height: 44px; border: 1px solid #dce3eb; border-radius: 6px; background: #f5f8fc; }
.delivery-boss-confirm { display: flex; align-items: flex-start; gap: 12px; padding: 20px; background: #fff8df; border-radius: 8px; font-size: 13px; }
.delivery-boss-confirm input { flex: none; width: 20px; height: 20px; accent-color: #b98b00; }
.delivery-success { max-width: 540px; margin: 0 auto; text-align: center; padding-block: 30px; }
.delivery-success-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: #10864c; color: #fff; margin: 0 auto 16px; }
.delivery-success h2 { font-size: 23px; font-weight: 700; color: #157443; line-height: 1.35; }
.delivery-success p { font-size: 12px; color: #7b8797; margin-top: 10px; }
.delivery-success dl { margin: 24px 0; border: 1px solid #e5eaf0; text-align: left; }
.delivery-success dl > div { display: grid; grid-template-columns: 110px minmax(0,1fr); gap: 12px; padding: 10px 12px; border-bottom: 1px solid #e9edf2; font-size: 12px; }
.delivery-success dl > div:last-child { border: 0; }
.delivery-success dt { color: #7b8797; }.delivery-success dd { font-weight: 600; overflow-wrap: anywhere; }
.delivery-success-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
.delivery-success-actions button:last-child { grid-column: 1 / -1; }
.delivery-empty { padding: 28px 12px; text-align: center; color: #7b8797; grid-column: 1 / -1; font-size: 13px; }
.delivery-empty button { display: block; margin: 10px auto 0; }
/* Un único desplazamiento dentro de cada modal. */
body.modal-open { overflow: hidden; }
#modalBackdrop { padding: 20px; overscroll-behavior: contain; backdrop-filter: blur(3px); }
#modalBox { display: flex; flex-direction: column; max-height: calc(100dvh - 40px); width: min(760px,100%); max-width: 760px; border-radius: 12px; min-width: 0; }
#modalBox .modal-header { flex: none; background: #f4f7fb; border-bottom: 1px solid #e0e7ef; }
#modalBox .modal-header h3 { color: #172335; font-size: 18px; overflow-wrap: anywhere; min-width: 0; }
#modalBox .modal-header > button { flex: none; min-width: 40px; min-height: 40px; }
#modalBox > .modal-scroll { flex: 1; min-height: 0; max-height: none; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #bac6d4 transparent; }
#modalBox form > * { min-width: 0; }
#modalBox input:not([type=checkbox]), #modalBox select, #modalBox textarea { max-width: 100%; min-height: 42px; }
#modalBox .modal-form-actions { position: sticky; bottom: -20px; padding-block: 12px; background: #fff; border-top: 1px solid #e7edf4; z-index: 1; grid-column: 1 / -1; flex-wrap: wrap; }
#modalBox .modal-form-actions button { min-height: 44px; }
#modalBox .bg-amber-500 { background: #ffbd13; color: #172335; }
#modalBox .modal-table-wrap { max-width: 100%; overflow-x: auto; scrollbar-width: thin; }
#modalBox .modal-table-wrap table { min-width: 540px; }
#modalBox :focus-visible { outline: 2px solid #dda000; outline-offset: 2px; }
@media(max-width:767px) {
  .delivery-flow { padding: 14px 12px; }
  .delivery-flow:not(:has(.delivery-success)) { padding-bottom: 90px; }
  .delivery-header { padding: 16px; }
  #mainContent .delivery-heading h1 { font-size: 17px; }
  .delivery-heading-icon { width: 36px; height: 36px; }
  .delivery-body { padding: 16px; }
  .delivery-selection { display: block; }
  .delivery-selection aside { margin-bottom: 12px; }
  .delivery-selection aside .delivery-identity { align-items: center; flex-wrap: nowrap; }
  .delivery-selection aside .delivery-identity small, .delivery-selection aside .delivery-employee-stats { display: none; }
  .delivery-selection aside .delivery-employee-summary { padding: 10px; }
  .delivery-selection aside .delivery-avatar { width: 32px!important; height: 32px!important; font-size: 12px!important; }
  .delivery-employee-results { grid-template-columns: 1fr; }
  .delivery-employee-stats { gap: 6px; }
  .delivery-employee-stats > div { flex-direction: column; align-items: flex-start; gap: 5px; padding: 8px; }
  .delivery-identity { gap: 9px; }
  .delivery-identity .delivery-avatar { width: 48px; height: 65px; }
  .delivery-employee-summary { padding: 12px; }
  .delivery-actions { padding: 12px 16px; gap: 8px; }
  .delivery-actions { position: fixed; bottom: calc(66px + env(safe-area-inset-bottom,0px)); left: 12px; right: 12px; z-index: 20; border: 1px solid #e1e7ef; border-radius: 8px; box-shadow: 0 -4px 18px #17233512; }
  .delivery-actions > button { padding: 10px 14px; font-size: 12px; }
  .delivery-count { font-size: 11px; gap: 4px; flex-wrap: wrap; }
  .delivery-selection-actions { flex-wrap: wrap; }
  .delivery-selection-actions .delivery-back { font-size: 18px; min-width: 24px; }
  .delivery-selection-actions .delivery-back span { display: none; }
  .delivery-count > span { flex-basis: 100%; padding-left: 20px; font-size: 9px; }
  .delivery-ppe-row { grid-template-columns: 18px 30px minmax(0,1fr) auto; padding: 12px 0; gap: 6px; }
  .delivery-ppe-icon { font-size: 23px; }
  .delivery-quantity button { width: 28px; }.delivery-quantity output { width: 22px; }
  .delivery-ppe-options { grid-column: 3 / -1; }
  .delivery-quantity { grid-row: 1; }
  .delivery-review-table thead { display: none; }
  .delivery-review-table, .delivery-review-table tbody { display: block; }
  .delivery-review-table tr { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); border: 1px solid #e3e9f0; border-radius: 6px; margin-bottom: 8px; padding: 8px; background: #fbfcfe; }
  .delivery-review-table td { border: 0; padding: 5px; min-width: 0; }
  .delivery-review-table td:first-child, .delivery-review-table td:last-child { grid-column: 1 / -1; }
  .delivery-review-table td::before { content: attr(data-label); display: block; color: #8190a4; font-size: 10px; margin-bottom: 3px; }
  .delivery-review-table td:first-child::before { display: none; }
  .delivery-review-table select { max-width: none; }
  .delivery-review-fields { grid-template-columns: 1fr; gap: 12px; }
  .delivery-signature canvas { height: 190px; }
  .delivery-signature > div { flex-wrap: wrap; }
  .delivery-success-actions button { padding: 10px; font-size: 11px; }
  #modalBackdrop { padding: 10px; }
  #modalBox { max-height: calc(100dvh - 20px); border-radius: 10px; }
  #modalBox .modal-header { padding: 12px 16px; }
  #modalBox .modal-header h3 { font-size: 16px; }
  #modalBox > .modal-scroll { padding: 16px; }
  #modalBox form.grid { grid-template-columns: minmax(0,1fr)!important; gap: 14px; }
  #modalBox form.grid > * { grid-column: 1!important; }
  #modalBox input:not([type=checkbox]), #modalBox select, #modalBox textarea, .delivery-body input:not([type=checkbox]), .delivery-body textarea { font-size: 16px; }
  #modalBox .modal-form-actions { bottom: -16px; }
  #modalBox .modal-form-actions button { flex: 1; }
}
.receipt-export-card{padding:20px;border:1px solid #d7e0eb;border-radius:12px;background:#edf2f8;border-left:5px solid #ffbb16;color:#142235}
.receipt-export-card>span{font-size:11px;font-weight:700;letter-spacing:.08em;color:#52637a}
.receipt-export-card h4{margin:8px 0;font-size:22px;font-weight:800}
.receipt-export-card p{margin:6px 0;font-size:14px}
.receipt-export-description{margin:18px 0;color:#52637a;font-size:14px;line-height:1.6}
.receipt-export-buttons{display:flex;flex-wrap:wrap;gap:10px}
@media(max-width:600px){.receipt-export-buttons>button{flex:1 1 100%}}
.receipt-export-scope{display:block;margin:16px 0;font-size:13px;font-weight:600;color:#34455b}
.receipt-export-scope select{display:block;width:100%;padding:10px;margin-top:7px;border:1px solid #ccd6e2;border-radius:8px;background:#f5f7fa;color:#142235}
.employee-register-export{padding:22px;margin-bottom:20px;background:#edf2f8;border:1px solid #d2deec;border-top:4px solid #ffbb16;border-radius:12px;color:#142235}
.register-export-heading{display:flex;align-items:center;gap:14px;margin-bottom:18px}
.register-export-heading>span{display:grid;place-items:center;flex:none;width:46px;height:46px;background:#142235;border-radius:10px;color:#ffbb16}
.register-export-heading h3{margin:0 0 5px;font-size:18px;font-weight:800}
.register-export-heading p,#registerExportStatus{margin:0;font-size:13px;color:#52637a;line-height:1.5}
.register-export-controls{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:18px;align-items:end}
.register-export-controls label{display:block;font-size:12px;font-weight:700;margin-bottom:5px}
.register-export-controls input,.register-export-controls select{display:block;width:100%;border:1px solid #c5d2e1;background:white;border-radius:8px;padding:10px 12px;margin-bottom:10px;font-size:14px;color:#142235}
.register-export-actions{display:flex;gap:10px;padding-bottom:10px}
#registerExportStatus{margin-top:8px}
@media(max-width:700px){.employee-register-export{padding:16px}.register-export-controls{grid-template-columns:1fr;gap:6px}.register-export-actions{flex-wrap:wrap}.register-export-actions button{flex:1 1 140px}.register-export-heading{align-items:start}.register-export-heading h3{font-size:17px}}
.employee-profile-actions{display:flex;flex-wrap:wrap;gap:10px}
@media(max-width:600px){.employee-profile-actions>a,.employee-profile-actions>button{width:100%;justify-content:center}}
.delivery-storage-notice{padding:16px;border:1px solid #f0ce75;border-radius:12px;background:#fff8e5;color:#695019;margin:16px 0}
.delivery-storage-notice strong{display:block;font-size:14px}
.delivery-storage-notice p{margin:6px 0 0;font-size:13px;line-height:1.5}
