.swal2-popup.person-map-picker {
    --desk-ink: #243449;
    --desk-muted: #68798b;
    --desk-border: #e3e9ef;
    --desk-surface: #fff;
    --desk-soft: #f5f8fa;
    --desk-accent: var(--green-dark, #267052);
    padding: 28px;
    border-radius: 20px;
    background: var(--desk-surface);
    box-shadow: 0 24px 80px rgba(18, 35, 51, .2);
}
.person-map-picker .swal2-title { margin: 0; padding: 0 40px 0 0; text-align: left; font-size: 26px; font-weight: 700; color: var(--desk-ink); }
.person-map-picker .swal2-close { top: 16px; right: 16px; border-radius: 50%; color: var(--desk-muted); }
.person-map-picker .swal2-html-container { margin: 14px 0 0; padding: 0; text-align: left; overflow: visible; color: var(--desk-ink); }
.desk-picker-intro { margin-bottom: 12px; }
.desk-picker-event, .desk-picker-count, .desk-picker-search-toggle { display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 4px 9px; border: 0; border-radius: 7px; background: var(--desk-soft); color: var(--desk-accent); font-size: 12px; font-weight: 600; }
.desk-picker-count { color: var(--desk-muted); flex-shrink: 0; }
.desk-picker-intro p { margin: 0; color: var(--desk-muted); font-size: 12px; line-height: 1.4; }
.desk-picker-toolbar { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; flex-wrap: wrap; }
.desk-picker-search-toggle { width: 32px; padding: 0; cursor: pointer; }
.desk-picker-search-toggle:hover, .desk-picker-search-toggle[aria-expanded=true] { color: var(--desk-accent); box-shadow: inset 0 0 0 1px var(--desk-accent); }
.desk-picker-search-toggle:focus-visible { outline: 2px solid var(--desk-accent); outline-offset: 2px; }
.desk-picker-search { display: flex; align-items: center; width: 0; min-width: 0; overflow: hidden; padding: 0; border: 0 solid var(--desk-border); border-radius: 7px; background: var(--desk-soft); opacity: 0; transition: width .2s ease, opacity .2s ease; }
.desk-picker-search.is-open { width: min(240px, calc(100vw - 80px)); padding: 0 9px; border-width: 1px; opacity: 1; }
.desk-picker-search:focus-within { border-color: var(--desk-accent); }
.desk-picker-search input { width: 100%; min-width: 0; height: 30px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--desk-ink); font-size: 12px; }
.desk-picker-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; max-height: min(470px, 56vh); overflow-y: auto; padding: 3px 5px 6px 3px; }
.desk-picker-card { display: flex; flex-wrap: nowrap; align-items: center; gap: 12px; min-width: 0; padding: 14px; border: 1px solid var(--desk-border); border-radius: 13px; background: var(--desk-surface); color: var(--desk-ink); text-align: left; cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; }
.desk-picker-card:hover { border-color: var(--desk-accent); box-shadow: 0 6px 18px rgba(18, 35, 51, .09); transform: translateY(-2px); }
.desk-picker-card:focus-visible { outline: 3px solid var(--desk-accent); outline-offset: 2px; }
.desk-picker-card[hidden], .desk-picker-initials[hidden], .desk-picker-empty[hidden] { display: none; }
.desk-picker-emblem { display: flex; align-items: center; justify-content: center; width: 52px; height: 52px; flex-shrink: 0; border-radius: 12px; background: var(--desk-soft); overflow: hidden; color: var(--desk-accent); font-size: 18px; font-weight: 700; }
.desk-picker-emblem img { max-width: 100%; max-height: 100%; object-fit: contain; }
.desk-picker-details { flex: 1; min-width: 0; }
.desk-picker-alias { display: block; margin-bottom: 5px; color: var(--desk-muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; overflow-wrap: anywhere; }
.desk-picker-name { display: block; font-size: 14px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.desk-picker-arrow { flex-shrink: 0; color: var(--desk-accent); font-size: 12px; }
.desk-picker-empty { margin: 30px 0; color: var(--desk-muted); text-align: center; font-size: 14px; }
html.admin-dark-mode .swal2-popup.person-map-picker { --desk-ink: #e5edf6; --desk-muted: #aab9ca; --desk-border: #3d4b60; --desk-surface: #1f2937; --desk-soft: #263244; --desk-accent: #8cdbb3; }
@media (max-width: 850px) { .desk-picker-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 540px) {
    .swal2-popup.person-map-picker { padding: 20px; border-radius: 15px; }
    .person-map-picker .swal2-title { font-size: 22px; }
    .desk-picker-toolbar { flex-wrap: wrap; gap: 8px; }
    .desk-picker-grid { grid-template-columns: 1fr; max-height: 50vh; }
    .desk-picker-card { padding: 14px; }
}
@media (prefers-reduced-motion: reduce) { .desk-picker-card, .desk-picker-search { transition: none; } .desk-picker-card:hover { transform: none; } }
/* Delegation desk: compact actions and a focused editor on every screen size. */
body.desk-editor-open{overflow:hidden}
.person-map{--desk-panel:#f5f7fb;--desk-line:#e1e7ef;--desk-text:#263449;--desk-secondary:#64748b}
.person-map .desk-editor{display:flex;flex-direction:column;overflow:hidden}
.person-map .desk-editor>.card-body{overflow:auto;min-height:0;background:var(--desk-panel)}
.person-map .desk-editor fieldset{min-width:0}
.person-map .desk-editor .form-group>label{font-size:.8rem;font-weight:600;color:var(--desk-text)}
.person-map .desk-editor .form-control{border-radius:10px;border-color:var(--desk-line);box-shadow:none;font-size:.92rem}
.person-map .desk-editor .form-control:focus{border-color:#779be4;box-shadow:0 0 0 3px #4e73df15}
.person-map .desk-editor .btn{border-radius:9px;font-size:.82rem}
.person-map .desk-section-intro{display:flex;align-items:center;gap:12px;margin:0 0 22px;color:var(--desk-text)}
.person-map .desk-section-copy{flex:1;min-width:0}
.person-map .desk-history-action{display:grid;place-items:center;width:36px;height:36px;padding:0;margin-left:auto;flex:0 0 36px;border-radius:10px;align-self:flex-start}
.person-map .desk-section-intro h2{font-size:1.1rem;font-weight:700;margin:0 0 4px}
.person-map .desk-section-intro p{font-size:.8rem;color:var(--desk-secondary);margin:0}
.person-map .desk-step{display:grid;place-items:center;width:42px;height:42px;border-radius:13px;background:#4e73df12;color:#4e73df;font-weight:700;flex-shrink:0}
.person-map .desk-count{margin-left:auto;white-space:nowrap;border:1px solid var(--desk-line);padding:6px 10px;border-radius:20px;font-size:.75rem}
.person-map .desk-capture-panel{background:var(--white,#fff);border:1px solid var(--desk-line);border-radius:14px;padding:18px!important}
.person-map .desk-data-panel{padding-left:24px}
.person-map .desk-rule-chips{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:16px}
.person-map .desk-rule-chips>span{background:#4e73df10;color:var(--desk-text);border:1px solid #4e73df22;border-radius:20px;padding:6px 10px;font-size:.74rem}
.person-map .desk-quota{padding:4px 15px 10px;font-size:.75rem;color:var(--desk-secondary);overflow-wrap:anywhere}
.person-map .desk-quota-warning{color:#926000;font-size:.74rem;display:block}
.person-map .desk-history-trials{display:flex;flex-direction:column;border-top:1px solid var(--desk-line);padding:8px 0;font-size:.8rem}.person-map .desk-history-trials>span{color:var(--desk-secondary);font-size:.73rem}
.person-map .desk-field-reference{border:1px solid #e5be46;background:#fff8d8;border-radius:12px;padding:12px;color:#72540d}
.person-map .desk-field-reference:before{content:'Del evento anterior';display:block;font-size:.68rem;font-weight:700;margin-bottom:5px;color:#795a13}
.person-map .desk-save-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;border-radius:0 0 12px 12px;padding-left:16px;padding-right:16px}
.person-map .desk-save-status{font-size:.78rem;color:var(--desk-secondary)}
html.admin-dark-mode .person-map{--desk-panel:#182233;--desk-line:#3b4a60;--desk-text:#e5edf9;--desk-secondary:#b2bfd0}
html.admin-dark-mode .person-map .desk-capture-panel{background:#202638}
html.admin-dark-mode .person-map .desk-field-reference{background:#42391d;color:#ffe293;border-color:#a78b35}
html.admin-dark-mode .person-map .desk-field-reference:before,html.admin-dark-mode .person-map .desk-quota-warning{color:#ffe293}
.person-map .desk-editor-identity{display:flex;flex-direction:column;align-items:flex-start;gap:6px;min-width:0}
.person-map .desk-editor-identity strong{font-size:16px;line-height:1.35;overflow-wrap:anywhere}
.person-map .desk-type-badge{display:inline-block;font-size:11px;font-weight:600;border-radius:6px;padding:3px 8px;background:#4e73df14;color:var(--desk-text)}
@media(max-width:767px){.person-map .desk-capture-panel{margin:0 15px 20px}.person-map .desk-data-panel{padding-left:15px}.person-map .desk-section-intro{align-items:flex-start}.person-map .desk-count{font-size:.68rem}.person-map .desk-save-status{display:none}.person-map .desk-save-bar{justify-content:center}}
.person-map .desk-toolbar{display:flex;gap:12px;align-items:center;flex-wrap:wrap}
.person-map .desk-delegation-heading{display:flex;align-items:center;gap:12px;min-width:0;flex:1}
.person-map .desk-delegation-copy{min-width:0}.person-map .desk-delegation-copy h1{overflow-wrap:anywhere}
.person-map .desk-delegation-flag{display:flex;align-items:center;justify-content:center;width:72px;height:46px;flex:0 0 72px}
.person-map .desk-delegation-flag img{display:block;max-width:100%;max-height:100%;object-fit:contain}
.person-map .desk-delegation-flag.desk-image-missing{display:none}
@media(max-width:600px){.person-map .desk-delegation-flag{width:52px;height:36px;flex-basis:52px}.person-map .desk-delegation-heading{gap:8px}}
.person-map .desk-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(340px,1fr));gap:16px}
.person-map .desk-heading-skeleton-copy{flex:1;min-width:0}
.person-map .desk-skeleton-title{width:min(340px,90%);height:28px;margin-bottom:4px}
.person-map .desk-skeleton-subtitle{width:min(180px,65%);height:24px}
.person-map .desk-skeleton-summary{width:210px;max-width:100%;height:24px}
.person-map .desk-skeleton-avatar{width:54px;height:54px;border-radius:14px}
.person-map .desk-skeleton-name{width:85%;height:18px;margin-bottom:7px}
.person-map .desk-skeleton-meta{width:70%;height:12px;margin-bottom:6px}
.person-map .desk-skeleton-birth{width:78%;height:11px}
.person-map .desk-skeleton-document{width:76px;height:48px;border-radius:8px}
.person-map .desk-skeleton-icon{width:24px;height:24px}
.person-map .desk-skeleton-label{width:80%;height:12px}
.person-map .desk-skeleton-state{width:60%;height:10px}
html.admin-dark-mode .person-map .skeleton{background:#354157}
@media(prefers-reduced-motion:reduce){.person-map .skeleton::after{animation:none}}
.person-map .desk-person-heading{display:grid;grid-template-columns:54px minmax(0,1fr) 76px;align-items:start;gap:12px;min-width:0;height:72px}
.person-map .desk-person-details{min-width:0;overflow:hidden}
.person-map .desk-person-details strong{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;line-height:1.25;text-transform:uppercase}
.person-map .desk-person-details>div{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.person-map .desk-person-details>.desk-person-meta{font-size:.8rem;line-height:1.4}
.person-map .desk-person-details>.desk-person-birth{font-size:.75rem;line-height:1.4;color:var(--desk-secondary)}
.person-map .desk-document-slot{width:76px;height:72px;display:flex;flex-direction:column;align-items:flex-end;gap:4px}
.person-map .desk-avatar{display:grid;place-items:center;width:44px;height:44px;flex-shrink:0;border-radius:14px;background:rgba(111,96,225,.1);color:var(--primary,#6f60e1);font-weight:700}
.person-map .desk-actions{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:6px}
.person-map .desk-section{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px;border:1px solid #e3e6ee;border-radius:12px;padding:12px 4px;background:transparent;color:inherit;min-height:108px;cursor:pointer}
.person-map .desk-section:hover,.person-map .desk-section:focus-visible{background:rgba(111,96,225,.08);outline:2px solid var(--primary,#6f60e1);outline-offset:2px}
.person-map .desk-section-icon{font-size:22px;position:relative}
.person-map .desk-check{font-size:12px;position:absolute;right:-10px;bottom:-3px;background:var(--white,#fff);border-radius:50%}
.person-map .desk-done{color:#24815d;border-color:#b7dfd0;background:rgba(36,129,93,.05)}
.person-map .desk-section-name{font-size:11px;text-align:center;font-weight:600;line-height:1.3}
.person-map .desk-section small{font-size:10px}
.person-map .desk-note{font-size:.85rem}
.person-map .desk-overlay{position:fixed;inset:0;z-index:1040;background:rgba(17,24,39,.5);display:flex;align-items:center;justify-content:center;padding:24px}
.person-map .desk-editor{width:100%;max-width:1020px;max-height:calc(100dvh - 48px);overflow:hidden;overscroll-behavior:contain;border:0;border-radius:18px;box-shadow:0 24px 80px rgba(0,0,0,.2)}
.person-map .desk-editor>.card-header{position:sticky;top:0;z-index:2;background:var(--white,#fff);padding:18px 24px}
.person-map .desk-editor>.card-body{position:relative;z-index:0;padding:24px}
.person-map .desk-tabs{display:flex;gap:8px;overflow-x:auto;padding:3px 2px 10px}
.person-map .desk-tabs button{flex:1;white-space:nowrap;min-height:44px}
.person-map .desk-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 18px}
.person-map .desk-phone-input{display:flex;align-items:stretch}
.person-map .desk-phone-input select.form-control{flex:0 0 112px;width:112px;border-top-right-radius:0;border-bottom-right-radius:0}
.person-map .desk-phone-input input.form-control{flex:1;min-width:0;width:0;border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}
.person-map .desk-phone-input .form-control:focus{position:relative;z-index:1}
.person-map .desk-editor input:not([type=checkbox]):not([type=radio]):not([type=hidden]),.person-map .desk-editor select{min-height:44px}
.person-map .desk-photo{display:block;max-width:100%;max-height:300px;object-fit:contain;background:#fff;border-radius:12px}
.person-map .desk-save-bar{position:sticky;bottom:-24px;background:var(--white,#fff);padding-bottom:18px;z-index:1}
html.admin-dark-mode .person-map .desk-editor>.card-header,html.admin-dark-mode .person-map .desk-save-bar{background:#202638}
html.admin-dark-mode .person-map .desk-section{border-color:#41485e}
html.admin-dark-mode .person-map .desk-done{color:#7cdbb0;border-color:#487c69}
@media(max-width:600px){
 .person-map{padding:0 10px}.person-map .desk-grid{grid-template-columns:minmax(0,1fr)}
 .person-map .desk-overlay{padding:0}.person-map .desk-editor{max-height:100dvh;height:100dvh;border-radius:0}
 .person-map .desk-editor>.card-header{padding:14px 16px}.person-map .desk-editor>.card-body{padding:16px}
 .person-map .desk-fields{grid-template-columns:minmax(0,1fr)}.person-map .desk-save-bar{bottom:-16px}
 .person-map .desk-save-bar>.btn{width:100%;min-height:48px}.person-map .desk-tabs{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));overflow:visible;gap:5px}.person-map .desk-tabs button{white-space:normal;font-size:10px;padding:8px 3px;line-height:1.3}.person-map .desk-tabs button .fa{display:block;font-size:18px;margin-bottom:5px}
 .person-map .desk-toolbar>input{flex-basis:100%;min-width:0}.person-map .desk-section{padding:10px 3px;min-height:100px}
}


.person-map .desk-profile-preview{border:0;padding:0;overflow:hidden;width:54px;height:54px;cursor:pointer;flex-shrink:0}
.person-map .desk-profile-preview img{width:100%;height:100%;object-fit:cover}
.person-map .desk-dni-preview{display:block;width:76px;height:48px;flex-shrink:0;padding:0;border:0;background:transparent;color:inherit;cursor:pointer}
.person-map .desk-dni-preview img{width:76px;height:48px;object-fit:contain;background:#fff;border:1px solid #e3e6ee;border-radius:6px}
.person-map .desk-editor{font-size:14px;max-width:980px;height:min(790px,calc(100dvh - 48px))}
.person-map .desk-editor>.card-header{flex-shrink:0;padding:16px 22px}
.person-map .desk-editor>.card-body{padding:20px 22px}
.person-map .desk-editor .form-control{font-size:14px;min-height:42px!important;height:42px}
.person-map .desk-editor .form-group>label{font-size:12px}
.person-map .desk-editor .btn{font-size:12px}
.person-map .desk-tabs{margin-top:14px!important;padding-bottom:0;gap:6px}
.person-map .desk-tabs button{min-height:40px;border-radius:9px}
.person-map .desk-identity-layout{display:grid;grid-template-columns:260px minmax(0,1fr);gap:20px;align-items:start}
.person-map .desk-document-panel,.person-map .desk-person-data,.person-map .desk-details-panel{padding:16px;background:#fff;border:1px solid var(--desk-line);border-radius:12px;min-width:0}
.person-map .desk-document-panel>label{font-size:12px;font-weight:600;color:var(--desk-text)}
.person-map .desk-document-panel .btn{padding:7px 10px}
.person-map .desk-document-placeholder{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;aspect-ratio:1.6;border:1px dashed var(--desk-line);border-radius:10px;background:var(--desk-panel);color:var(--desk-secondary);font-size:12px;margin:12px 0}
.person-map .desk-document-placeholder .fa{font-size:32px;opacity:.55}
.person-map .desk-document-photo{width:100%;height:150px;max-height:150px;object-fit:contain;border:1px solid var(--desk-line);border-radius:10px;background:var(--desk-panel)}
.person-map .desk-image-failed{display:none!important}
.person-map .desk-person-data .form-group{margin-bottom:14px}
.person-map .desk-person-type{margin-bottom:14px!important}
.person-map .desk-details-panel{margin:20px 0 14px}
.person-map .desk-details-panel h3{font-size:13px;font-weight:700;color:var(--desk-text);margin:0 0 16px}
.person-map .desk-details-panel .form-group{margin-bottom:12px}
.person-map .desk-editor>.desk-save-bar{position:static;flex-shrink:0;margin:0;padding:13px 22px;border-radius:0;background:#fff}
.person-map .desk-save-bar .btn{min-height:40px;padding:8px 18px}
html.admin-dark-mode .person-map .desk-document-panel,html.admin-dark-mode .person-map .desk-person-data,html.admin-dark-mode .person-map .desk-details-panel,html.admin-dark-mode .person-map .desk-editor>.desk-save-bar{background:#202b3b}
@media(max-width:700px){
 .person-map .desk-identity-layout{grid-template-columns:minmax(0,1fr);gap:14px}
 .person-map .desk-document-panel{order:2}.person-map .desk-person-data{order:1}
 .person-map .desk-document-placeholder{aspect-ratio:auto;min-height:115px}
 .person-map .desk-editor{height:100dvh;max-height:100dvh}.person-map .desk-editor>.card-body{padding:16px}
 .person-map .desk-editor>.card-header{padding:14px 16px}.person-map .desk-editor>.desk-save-bar{padding:12px 16px}
 .person-map .desk-editor-identity strong{font-size:14px}.person-map .desk-tabs button{font-size:10px}
}
.person-map .desk-crop-zone{width:min(100%,420px);aspect-ratio:1;background:#fff;overflow:hidden;border-radius:12px}
.person-map .desk-crop-zone>img{display:block;max-width:100%}


.person-map .desk-crop-zone .cropper-face{background:transparent;opacity:1}
.person-map .desk-crop-zone .cropper-face::before{content:'';position:absolute;inset:0;background:url('/img/facecheck.png') center/contain no-repeat;pointer-events:none;z-index:22}

/* Sports cards from public registration, scoped to desks. */
.person-map .sports-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.person-map .sport-card {
    position: relative;
    width: 100%;
    text-align: left;
    border: 1px solid #d6dcff;
    border-radius: 14px;
    background: #f2efff;
    padding: 18px;
    transition: all .18s ease;
}

.person-map .sport-card:hover {
    border-color: #8ca0ff;
    background: #e9e6ff;
}

.person-map .sport-card.active {
    border-color: var(--primary);
    border-left-width: 4px;
    box-shadow: 0 8px 24px rgba(42, 43, 81, 0.08);
    background: #ffffff;
}

.person-map .sport-card-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    border: 0;
    background: transparent;
    padding: 0;
    text-align: left;
}

.person-map .sport-card-toggle:disabled {
    cursor: not-allowed;
    opacity: .58;
}

.person-map .sport-card:has(.sport-card-toggle:disabled) {
    opacity: .72;
}

.person-map .sport-card-main {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.person-map .sport-thumb-wrap {
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #dde5ff;
    color: #6a75a8;
    flex: 0 0 auto;
    transition: all .18s ease;
}

.person-map .sport-thumb-wrap.active {
    background: rgba(0, 73, 230, 0.1);
    color: var(--primary);
}

.person-map .sport-check-right {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 2px solid #9eaddb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: transparent;
    flex: 0 0 auto;
    transition: all .18s ease;
}

.person-map .sport-check-right .material-symbols-outlined {
    font-size: 15px;
}

.person-map .sport-check-right.on {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.person-map .sport-thumb {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    object-fit: cover;
    background: transparent;
    border: 0;
    flex: 0 0 auto;
}

.person-map .sport-meta {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.person-map .sport-name {
    font-family: 'Lexend', sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: #2a2b51;
    line-height: 1.2;
}

.person-map .sport-alias {
    margin-top: 2px;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .1em;
    color: #98a0be;
    text-transform: uppercase;
}

.person-map .sport-alias.active {
    color: var(--primary);
}

.person-map .sports-empty {
    grid-column: 1 / -1;
    padding: 12px;
    border-radius: 12px;
    border: 1px dashed #cdd6ff;
    background: #f8faff;
    color: #6672ae;
    font-weight: 700;
    text-align: center;
}

.person-map .tourney-group-inline {
    margin-top: 14px;
    padding-left: 14px;
    border-left: 1px solid #d7dfff;
}

.person-map .tourney-subtitle {
    display: block;
    margin-bottom: 10px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #6070b8;
}

.person-map .tourney-options {
    display: grid;
    gap: 10px;
}

.person-map .tourney-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: #f2efff;
    border: 1px solid #d9d7f2;
    cursor: pointer;
}

.person-map .tourney-option:hover {
    background: #ebe7ff;
}

.person-map .tourney-option-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.person-map .tourney-option-name {
    font-size: 13px;
    font-weight: 600;
    color: #263061;
}

.person-map .tourney-option-meta {
    margin-top: 3px;
    font-size: 11px;
    color: #6a77b6;
}

.person-map .tourney-checkbox {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    accent-color: var(--primary);
}

/* One shared legend; numbers stay beside the sport heading and trial category. */
.person-map .desk-limits-heading{display:flex;align-items:center;justify-content:space-between;gap:8px 16px;flex-wrap:wrap;margin-bottom:12px}
.person-map .desk-limits-heading .desk-rule-chips{margin-bottom:0}
.person-map .desk-quota-legend{display:flex;flex-wrap:wrap;gap:6px 14px;font-size:11px;color:var(--desk-secondary)}
.person-map .desk-quota-legend>span{display:inline-flex;align-items:center;gap:5px}
.person-map .desk-legend-dot{display:inline-block;width:7px;height:7px;border-radius:50%;background:currentColor;color:#2269ae}
.person-map .desk-quota-row{display:inline-flex;align-items:center;flex-wrap:wrap;gap:0;margin-top:3px;line-height:1.3}
.person-map .desk-quota-number{color:#2269ae;font-size:12px;font-weight:700;font-variant-numeric:tabular-nums;white-space:nowrap;letter-spacing:0;text-transform:none}
.person-map .desk-quota-number+.desk-quota-number:before{content:'·';color:var(--desk-secondary);font-weight:400;margin:0 7px}
.person-map .desk-quota-category{color:#7946b7}
.person-map .desk-quota-full{color:#ba3543}
.person-map .desk-trial-details{display:flex;align-items:baseline;flex-wrap:wrap;gap:3px 12px}
.person-map .desk-trial-details .desk-quota-row{margin-top:0}
html.admin-dark-mode .person-map .desk-quota-number,html.admin-dark-mode .person-map .desk-legend-dot{color:#8bc5ff}
html.admin-dark-mode .person-map .desk-quota-category{color:#ccacff}
html.admin-dark-mode .person-map .desk-quota-full{color:#ff9da6}

.person-map .tourney-empty {
    padding: 12px;
    border-radius: 12px;
    background: #f1f4ff;
    color: #6975b1;
    font-weight: 700;
    text-align: center;
}


.person-map .sports-cards {grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;--primary:#6b60df;}
.person-map .sport-card {padding:16px;min-width:0;}
.person-map .sport-name {font-family:inherit;font-size:16px;overflow-wrap:anywhere;}
.person-map .sport-thumb-wrap {width:64px;height:64px;}
.person-map .sport-thumb {width:52px;height:52px;}
.person-map .sport-card .desk-fields {grid-template-columns:1fr;margin-top:16px;}
.person-map .sport-card .form-group {min-width:0;}
.person-map .sport-card-toggle:focus-visible {outline:2px solid #6b60df;outline-offset:5px;border-radius:8px;}
@media(max-width:640px){.person-map .sports-cards {grid-template-columns:1fr;}}
html.admin-dark-mode .person-map .sport-card {background:var(--admin-dark-surface,#242c3c);border-color:var(--admin-dark-border,#445066);}
html.admin-dark-mode .person-map .sport-name,html.admin-dark-mode .person-map .tourney-option-name {color:var(--admin-dark-text,#eef2fa);}
html.admin-dark-mode .person-map .tourney-option {background:var(--admin-dark-surface-soft,#303a4d);border-color:var(--admin-dark-border,#445066);}

.person-map .desk-dni-crop {aspect-ratio:4/3;}
.person-map .desk-dni-crop .cropper-face::before {background-image:url('/img/dniCheck.png');opacity:.8;}
.person-map .desk-camera-zone {position:relative;width:min(100%,420px);aspect-ratio:1;overflow:hidden;background:#111;border-radius:12px;}
.person-map .desk-camera-zone.desk-camera-dni {aspect-ratio:4/3;}
.person-map .desk-camera-zone video {width:100%;height:100%;object-fit:cover;}
.person-map .desk-camera-mirror {transform:scaleX(-1);}
.person-map .desk-camera-guide {position:absolute;inset:0;pointer-events:none;background:url('/img/facecheck.png') center/contain no-repeat;}
.person-map .desk-camera-guide-dni {background-image:url('/img/dniCheck.png');opacity:.8;}

/* Preserve the selector's opening height as its filtered results change. */
.swal2-popup.person-map-picker.is-height-locked {display:flex !important;flex-direction:column;max-height:calc(100dvh - 32px);}
.person-map-picker.is-height-locked .swal2-close {position:absolute;}
.person-map-picker.is-height-locked .swal2-title {flex-shrink:0;}
.person-map-picker.is-height-locked .swal2-html-container {flex:1;min-height:0;overflow:hidden;}
.person-map-picker.is-height-locked .desk-picker {display:flex;flex-direction:column;height:100%;min-height:0;}
.person-map-picker.is-height-locked .desk-picker-toolbar,.person-map-picker.is-height-locked .desk-picker-intro {flex-shrink:0;}
.person-map-picker.is-height-locked .desk-picker-results {position:relative;flex:1;min-height:0;}
.person-map-picker.is-height-locked .desk-picker-grid {height:100%;max-height:none;align-content:start;}
.person-map-picker.is-height-locked .desk-picker-empty {position:absolute;inset:0;margin:0;padding:20px;display:grid;place-items:center;}
.person-map-picker.is-height-locked .desk-picker-empty[hidden] {display:none;}

.public-register-picker .desk-picker-grid {grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;}
.public-register-picker .register-picker-card {min-width:0;border:1px solid var(--desk-border);border-radius:13px;padding:14px;background:var(--desk-surface);}
.public-register-picker .register-picker-card[hidden] {display:none;}
.public-register-picker .register-picker-heading {display:flex;align-items:center;gap:10px;margin-bottom:10px;}
.public-register-picker .register-picker-link {display:flex;align-items:center;gap:6px;min-width:0;}
.public-register-picker .register-picker-link input {min-width:0;flex:1;height:32px;padding:6px 8px;font-size:11px;background:var(--desk-soft);border-color:var(--desk-border);color:var(--desk-muted);}
.public-register-picker .register-picker-link button,.public-register-picker .register-picker-link a {display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;flex-shrink:0;border:0;border-radius:7px;background:var(--desk-soft);color:var(--desk-accent);cursor:pointer;font-size:13px;}
.public-register-picker .register-picker-link button:hover,.public-register-picker .register-picker-link a:hover {box-shadow:inset 0 0 0 1px var(--desk-accent);}
/* Navigation first; keep the close control reachable on small screens. */
.person-map .desk-editor-header{position:relative}
.person-map .desk-editor-header .desk-tabs{margin:0 42px 12px 0!important;overflow:visible;min-width:0}
.person-map .desk-editor-header .desk-editor-identity{display:flex;flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px;padding-right:42px}
.person-map .desk-editor-dni{font-size:12px;color:var(--desk-secondary)}
.person-map .desk-close{position:absolute;top:16px;right:16px;width:32px;height:32px;display:grid;place-items:center;border:1px solid var(--desk-line);border-radius:50%;background:var(--desk-panel);color:var(--desk-text);padding:0;font-size:14px;cursor:pointer}
.person-map .desk-close:hover{background:#4e73df15}.person-map .desk-close:focus-visible{outline:2px solid #4e73df;outline-offset:3px}.person-map .desk-close:disabled{opacity:.5;cursor:default}
.person-map .desk-section.desk-not-applicable{background:#f1f3f5;border-color:#dfe3e8;color:#89929e;cursor:default;box-shadow:none;outline:none}
.person-map .desk-not-applicable .desk-section-icon{opacity:.6}
html.admin-dark-mode .person-map .desk-section.desk-not-applicable{background:#1b2430;border-color:#344051;color:#798697}
.person-map .desk-image-placeholder{display:none;align-items:center;justify-content:center;width:100%;height:100%}
.person-map .desk-image-missing>img{display:none!important}
.person-map .desk-image-missing>.desk-image-placeholder{display:flex}
.person-map .desk-dni-preview .desk-image-placeholder{width:76px;height:48px;border-radius:6px;border:1px solid var(--desk-line);background:var(--desk-panel);color:var(--desk-secondary);font-size:22px}
@media(max-width:600px){.person-map .desk-editor-header .desk-tabs{gap:4px;margin-right:38px!important}.person-map .desk-editor-header .desk-tabs button{min-width:0;padding:7px 2px;font-size:9px}.person-map .desk-editor-header .desk-tabs button .fa{font-size:16px}.person-map .desk-close{top:14px;right:12px;width:30px;height:30px}.person-map .desk-editor-header .desk-editor-identity{gap:6px;padding-right:0}}
@media(max-width:600px){.public-register-picker .desk-picker-grid {grid-template-columns:minmax(0,1fr);}}

.person-map .desk-capacity-status{flex:1;min-width:0;min-height:32px;display:flex;align-items:center;font-size:.8rem;white-space:nowrap;overflow:hidden}.person-map .desk-capacity-status>span{overflow:hidden;text-overflow:ellipsis}.person-map .desk-capacity-status .btn{padding:3px 7px}
@media(max-width:600px){.person-map .desk-capacity-status{font-size:.65rem}.person-map .desk-capacity-status .btn{font-size:.65rem}.person-map .desk-save-bar{gap:8px}}

/* Optional previous-event data, separate from the current registration. */
.person-map .desk-history-card{border:1px solid #dce6ec;border-radius:14px;background:#f8fafc;margin:0 0 18px;overflow:hidden}
.person-map .desk-history-header{display:flex;align-items:center;gap:12px;padding:14px 16px}
.person-map .desk-history-icon{display:grid;place-items:center;width:36px;height:36px;flex-shrink:0;border-radius:10px;background:#e8f2f5;color:#28748a}
.person-map .desk-history-title{flex:1;min-width:0}.person-map .desk-history-title h3{font-size:15px;font-weight:600;margin:0 0 3px}.person-map .desk-history-title>span{font-size:12px;color:#68798b;overflow-wrap:anywhere}
.person-map .desk-history-content{padding:0 16px 16px}.person-map .desk-history-help{font-size:12px;color:#68798b;margin:0 0 12px}
.person-map .desk-history-values{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 14px}.person-map .desk-history-values>div{padding:10px 12px;border:1px solid #e3e9ef;border-radius:9px;background:#fff;min-width:0}.person-map .desk-history-values dt{font-size:11px;font-weight:500;color:#68798b;margin-bottom:3px}.person-map .desk-history-values dd{font-size:14px;margin:0;overflow-wrap:anywhere}.person-map .desk-history-entry>strong,.person-map .desk-history-entry>span{display:block;font-size:12px;overflow-wrap:anywhere}.person-map .desk-history-entry>span{color:#68798b;margin-top:4px}
.person-map .desk-history-actions{display:flex;flex-wrap:wrap;gap:8px}.person-map .desk-history-actions .btn{font-size:12px}.person-map .desk-history-card.is-collapsed .desk-history-header{padding:9px 12px}.person-map .desk-history-card.is-collapsed .desk-history-icon{width:28px;height:28px}
html.admin-dark-mode .person-map .desk-history-card{background:#232d3c;border-color:#414e62}html.admin-dark-mode .person-map .desk-history-values>div{background:#202638;border-color:#414e62}html.admin-dark-mode .person-map .desk-history-title>span,html.admin-dark-mode .person-map .desk-history-help,html.admin-dark-mode .person-map .desk-history-values dt,html.admin-dark-mode .person-map .desk-history-entry>span{color:#afbdcf}html.admin-dark-mode .person-map .desk-history-icon{background:#2c4350;color:#9bd5df}
@media(max-width:600px){.person-map .desk-history-values{grid-template-columns:minmax(0,1fr)}.person-map .desk-history-actions .btn{width:100%}}

.person-map .desk-extra-person-types .select2-container{width:100%!important;max-width:100%}.person-map .desk-extra-person-types .select2-selection--multiple{min-height:44px!important;border:1px solid #dce3ee!important;border-radius:12px!important;background:#fff}.person-map .desk-extra-person-types .select2-container--focus .select2-selection--multiple{border-color:var(--primary,#6f60e1)!important}html.admin-dark-mode .person-map .desk-extra-person-types .select2-selection--multiple{background:#202638!important;border-color:#414e62!important}

.person-map .desk-sport-heading{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin-bottom:4px}.person-map .desk-sport-heading h2{margin:0}.person-map .desk-sport-search-toggle{margin:-5px 0;display:grid;place-items:center;width:32px;height:32px;padding:0;flex:0 0 32px;border-radius:9px}.person-map .desk-sport-search.form-control{flex:1 1 160px;width:160px;max-width:260px;min-height:36px!important;height:36px;font-size:13px}.person-map .desk-sports-intro>.desk-count{flex-shrink:0}.person-map .desk-sports-intro>.desk-history-action{margin-left:0}
@media(max-width:600px){.person-map .desk-sport-search.form-control{flex-basis:100%;max-width:100%;width:100%}.person-map .desk-sports-intro{gap:8px}}

/* Camera, crop and preview share one frame and a fixed action grid. */
.person-map .desk-media-stage{position:relative;width:min(100%,420px);aspect-ratio:1;overflow:hidden;border-radius:12px;background:var(--desk-panel,#fff);border:1px solid var(--desk-line,#dce3ee)}.person-map .desk-media-stage.desk-media-dni{aspect-ratio:4/3}.person-map .desk-media-stage>.desk-camera-zone,.person-map .desk-media-stage>.desk-crop-zone{width:100%;height:100%;aspect-ratio:auto;border-radius:0}.person-map .desk-media-stage>.desk-photo{width:100%;height:100%;max-height:none;object-fit:contain;margin:0;border:0;border-radius:0}.person-map .desk-media-stage>.desk-document-placeholder,.person-map .desk-media-placeholder{position:absolute;inset:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;color:var(--desk-secondary,#68798b)}.person-map .desk-media-placeholder .fa{font-size:30px}
.person-map .desk-media-toolbar{display:grid;grid-template-columns:minmax(0,1.2fr) minmax(0,1fr) minmax(0,1fr);gap:6px;width:min(100%,420px);margin:12px 0;align-items:start;min-height:44px}.person-map .desk-media-toolbar .btn{width:100%;min-height:44px;font-size:12px;padding:7px 5px}.person-map .desk-media-rotate{display:flex;gap:4px}.person-map .desk-media-tools{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:10px 0}.person-map .desk-media-tools .btn{font-size:12px}.person-map .desk-media-hint{font-size:12px;color:var(--desk-secondary,#68798b);max-width:420px}

.person-map .desk-editor-feedback{flex-shrink:0;max-height:25vh;overflow:auto;padding:10px 16px 0}
.person-map .desk-editor-feedback .alert{margin-bottom:10px}
