/* RECUPERO · CONFIGURACIÓN · Centro administrativo */
#tab-ajustes{max-width:100%}
#tab-ajustes .settings-page-heading{margin-bottom:20px}
.settings-shell{display:grid;grid-template-columns:270px minmax(0,1fr);gap:18px;align-items:start}
.settings-sidebar{position:sticky;top:98px;overflow:hidden}
.settings-sidebar-head{padding:20px;border-bottom:1px solid var(--line);display:grid;gap:5px}
.settings-sidebar-head strong{font-size:19px}
.settings-nav{padding:10px}
.settings-nav-btn{width:100%;border:0;background:transparent;border-radius:12px;padding:12px 11px;display:flex;align-items:center;gap:11px;text-align:left;color:#5f728b;margin-bottom:3px}
.settings-nav-btn>span{width:30px;height:30px;display:grid;place-items:center;border-radius:9px;background:#f2f6fa;color:#6c829c;font-weight:900;flex-shrink:0}
.settings-nav-btn div{display:grid;gap:2px;min-width:0}
.settings-nav-btn strong{font-size:13px;color:#38516f}
.settings-nav-btn small{font-size:11px;color:#8a9aab}
.settings-nav-btn:hover{background:#f5f8fb}
.settings-nav-btn.active{background:#edf4fb;color:var(--navy)}
.settings-nav-btn.active>span{background:var(--navy);color:#fff}
.settings-nav-btn.active strong{color:var(--navy)}
.settings-sidebar-foot{margin:8px 14px 14px;padding:12px;border:1px solid #e3ebf3;border-radius:11px;background:#f7fafc;display:grid;gap:6px}
.settings-sidebar-foot .status-dot{font-size:11px;color:var(--green)}
.settings-sidebar-foot small{font-size:10px;color:#7c8da2;line-height:1.45}
.settings-main{min-width:0}
.settings-section{display:none;animation:settingsIn .18s ease-out}
.settings-section.active{display:block}
@keyframes settingsIn{from{opacity:.35;transform:translateY(4px)}to{opacity:1;transform:none}}
.settings-section-heading{display:flex;justify-content:space-between;gap:20px;align-items:flex-end;margin:2px 2px 16px}
.settings-section-heading h3{font-size:24px;margin:5px 0 5px;letter-spacing:-.02em}
.settings-section-heading p{margin:0;color:var(--muted);line-height:1.5}
.profile-layout{display:grid;grid-template-columns:290px minmax(0,1fr);gap:15px}
.profile-identity{overflow:hidden}
.profile-cover{height:76px;background:linear-gradient(135deg,#0b2b57,#1f63b3);position:relative}
.profile-cover:after{content:"";position:absolute;width:170px;height:170px;border-radius:50%;border:28px solid rgba(255,255,255,.08);right:-60px;top:-95px}
.profile-identity-body{padding:0 20px 22px;display:flex;align-items:center;flex-direction:column;text-align:center}
.profile-avatar-large{width:92px;height:92px;border:6px solid #fff;margin-top:-46px;box-shadow:0 8px 22px rgba(22,45,78,.15);font-size:34px;position:relative}
.profile-photo-action{margin:9px 0 15px;color:var(--blue);font-size:12px;cursor:pointer}
.profile-identity-body>strong{font-size:17px}
.profile-identity-body>span{color:var(--blue);font-size:12px;font-weight:800;margin-top:4px}
.profile-identity-body>small{color:var(--muted);line-height:1.45;margin-top:9px}
.settings-form-footer{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-top:18px;padding-top:16px;border-top:1px solid #edf1f5}
.security-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}
.security-card .panel-body{display:grid;gap:14px}
.security-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:10px;background:#eef4fb;color:var(--navy)}
.security-callout{padding:12px 14px;border:1px solid #dce8f4;background:#f5f9fd;border-radius:11px;display:grid;gap:3px}
.security-callout strong{color:var(--navy)}
.security-callout span{color:var(--muted);font-size:12px}
.password-rules{display:flex;gap:7px;flex-wrap:wrap}
.password-rules span{padding:5px 8px;border-radius:999px;background:#f2f6fa;color:#637792;font-size:10px;font-weight:800}
.compact-list{padding:6px 20px 15px}
.reset-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:13px 0;border-bottom:1px solid #edf1f5}
.reset-row strong{display:block;font-size:13px}.reset-row small{display:block;color:var(--muted);margin-top:4px;font-size:11px}
.team-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin-bottom:15px}
.team-stat{background:#fff;border:1px solid var(--line);border-radius:14px;padding:15px 17px;box-shadow:var(--shadow);position:relative;overflow:hidden}
.team-stat:before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:var(--blue)}
.team-stat.accent:before{background:var(--green)}.team-stat.dark:before{background:var(--navy)}
.team-stat span{font-size:10px;letter-spacing:.1em;font-weight:900;color:#71839a}.team-stat strong{display:block;font-size:26px;margin:5px 0 2px}.team-stat small{color:var(--muted)}
.initial-password-mini{font-size:10px;font-weight:800;color:#68809b;background:#f4f8fb;border:1px solid #e0e8f0;border-radius:999px;padding:7px 10px;white-space:nowrap}
.settings-user-create{grid-template-columns:1.5fr 1fr .8fr auto}
.team-list-panel{margin-top:15px}.team-list-head{align-items:center}.team-tools{display:flex;gap:8px;min-width:420px}.team-tools input{min-width:0;flex:1}.team-tools select{width:120px}
.team-list{padding:4px 20px 10px}
.team-user-row{display:grid;grid-template-columns:42px minmax(0,1fr) auto auto;align-items:center;gap:13px;padding:14px 0;border-bottom:1px solid #edf1f5}
.team-user-row:last-child{border-bottom:0}.team-user-row.inactive{opacity:.65}
.team-user-avatar{width:42px;height:42px;border-radius:12px;display:grid;place-items:center;background:#eaf1f8;color:var(--blue);font-weight:900}
.team-user-main{min-width:0}.team-user-main strong{display:block;font-size:13px}.team-user-main>div{display:flex;align-items:center;gap:7px;margin-top:3px}.team-user-main>div>span:first-child{color:#67809e;font-size:11px}.team-user-main small{display:block;color:var(--muted);font-size:11px;margin-top:4px}
.role-pill{font-size:9px!important;font-weight:900!important;border-radius:999px;padding:3px 6px!important;background:#edf3f9;color:#5b7694!important}.role-pill.admin{background:#eaf0f8;color:var(--navy)!important}.role-pill.gestor{background:#e8f6ef;color:#167149!important}
.team-user-status{display:grid;justify-items:end;gap:4px}.first-login-tag{font-size:9px;color:#9a6a00}.team-user-action{min-width:95px;text-align:right}.team-user-action .btn{padding:8px 11px;font-size:11px}
.reminder-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}.reminder-card{background:#fff;border:1px solid var(--line);border-radius:15px;padding:18px;box-shadow:var(--shadow);display:grid;grid-template-columns:40px 1fr;gap:13px}.reminder-number{width:36px;height:36px;border-radius:10px;background:#edf4fb;color:var(--navy);display:grid;place-items:center;font-size:10px;font-weight:900}.reminder-card strong{font-size:15px}.reminder-card p{font-size:12px;color:var(--muted);line-height:1.45;min-height:52px;margin:7px 0 10px}.reminder-card label{display:flex;align-items:center;gap:8px;font-size:11px;color:#5e718a}.reminder-card input{width:90px}.settings-explainer{margin-top:15px}.settings-explainer .panel-body{display:flex;justify-content:space-between;align-items:center;gap:18px}.settings-explainer p{margin:5px 0 0;color:var(--muted);line-height:1.5}
.report-layout{display:grid;grid-template-columns:1.35fr .65fr;gap:15px}.report-builder .panel-body{padding-bottom:22px}.report-summary{display:grid;grid-template-columns:repeat(4,1fr);gap:8px;margin:18px 0}.report-summary div{background:#f5f8fb;border-radius:10px;padding:11px}.report-summary span{display:block;font-size:9px;text-transform:uppercase;letter-spacing:.08em;color:#71839a;font-weight:900}.report-summary strong{display:block;font-size:11px;margin-top:4px}.report-guide .panel-body{height:100%;display:flex;flex-direction:column;justify-content:center}.report-guide h3{font-size:20px;margin:8px 0}.report-guide p{color:var(--muted);line-height:1.6}.report-file-chip{display:inline-flex;align-self:flex-start;margin-top:8px;border:1px solid #dbe5ef;background:#f6f9fc;border-radius:999px;padding:8px 11px;color:#4f6b89;font-size:10px;font-weight:900}
.report-type-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-bottom:16px}.report-type-card{appearance:none;position:relative;min-height:112px;padding:14px;border:1px solid #dfe7f0;border-radius:13px;background:#fff;color:inherit;text-align:left;cursor:pointer;transition:.18s}.report-type-card:hover{transform:translateY(-2px);border-color:#b9cce3;box-shadow:0 8px 20px rgba(20,55,92,.07)}.report-type-card.active{border-color:#3d79d3;background:linear-gradient(145deg,#f7fbff,#edf5ff);box-shadow:0 0 0 3px rgba(47,109,246,.08)}.report-type-card.active:after{position:absolute;right:10px;top:9px;display:grid;place-items:center;width:20px;height:20px;border-radius:50%;background:#2f6df6;color:#fff;font-size:11px;content:"✓"}.report-type-card span{display:block;color:#71849b;font-size:8px;font-weight:900;letter-spacing:.1em}.report-type-card strong{display:block;margin:7px 0 5px;color:#17365b;font-size:14px}.report-type-card small{display:block;color:#7d8da0;font-size:10px;line-height:1.4}.report-parameters{grid-template-columns:repeat(5,minmax(0,1fr))}.report-type-description{margin:0 0 14px;padding:11px 13px;border-left:3px solid #2f6df6;border-radius:0 9px 9px 0;background:#f4f8fd;color:#5f738c;font-size:11px;line-height:1.5}.report-sheet-map{display:grid;gap:7px;margin-top:17px}.report-sheet-map span{display:flex;justify-content:space-between;gap:12px;padding:9px 10px;border-bottom:1px solid #edf1f5;color:#6b7e94;font-size:11px}.report-sheet-map b{color:#17365b}
.system-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}.system-card .panel-body{display:grid;gap:12px}.system-warning{padding:12px 14px;border:1px solid #f0dfb6;background:#fff9eb;border-radius:11px;display:grid;gap:3px}.system-warning strong{color:#8b6507}.system-warning span{font-size:11px;color:#8b7a55;line-height:1.45}.system-rules{gap:0!important}.system-rules>div{display:grid;grid-template-columns:120px 1fr;gap:10px;padding:12px 0;border-bottom:1px solid #edf1f5}.system-rules>div:last-child{border-bottom:0}.system-rules strong{font-size:10px;color:#5d7692;letter-spacing:.08em}.system-rules span{font-size:12px;color:var(--muted)}
.empty-state{padding:25px 8px;color:var(--muted);text-align:center}

@media(max-width:1150px){.settings-shell{grid-template-columns:220px minmax(0,1fr)}.profile-layout,.security-grid,.report-layout,.system-grid{grid-template-columns:1fr}.reminder-grid{grid-template-columns:1fr}.report-summary{grid-template-columns:repeat(2,1fr)}.report-parameters{grid-template-columns:repeat(3,1fr)}.team-tools{min-width:300px}}
@media(max-width:900px){.settings-shell{grid-template-columns:1fr}.settings-sidebar{position:relative;top:auto}.settings-nav{display:grid;grid-template-columns:repeat(2,1fr);gap:4px}.settings-sidebar-foot{display:none}.team-stats{grid-template-columns:1fr}.team-list-head{align-items:flex-start}.team-tools{width:100%;min-width:0}.team-list-head{flex-direction:column}.team-user-row{grid-template-columns:42px minmax(0,1fr) auto}.team-user-action{grid-column:2/-1;text-align:left}.settings-form-footer,.settings-explainer .panel-body{align-items:flex-start;flex-direction:column}.report-summary{grid-template-columns:1fr 1fr}}
@media(max-width:700px){.report-type-grid,.report-parameters{grid-template-columns:1fr}}
@media(max-width:600px){.settings-nav{grid-template-columns:1fr}.settings-user-create{grid-template-columns:1fr}.team-tools{flex-direction:column}.team-user-row{grid-template-columns:42px minmax(0,1fr)}.team-user-status{grid-column:2;justify-items:start}.team-user-action{grid-column:2}.report-summary{grid-template-columns:1fr}.settings-section-heading h3{font-size:21px}}

.reset-row-focus{animation:resetFocus 1.8s ease;border-radius:12px;box-shadow:0 0 0 3px rgba(21,87,166,.16);padding-left:10px!important;padding-right:10px!important}@keyframes resetFocus{0%{background:#eaf4ff}100%{background:transparent}}
.reminder-grid-v2{grid-template-columns:repeat(3,minmax(0,1fr))}.reminder-card small{display:block;color:#7f92a7;font-size:10px;margin-top:8px}.settings-notification-controls{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:14px}.notification-rule-card{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:16px 18px;border:1px solid #dfe8f0;border-radius:14px;background:linear-gradient(135deg,#fbfdff,#f6faf8)}.notification-rule-card strong{display:block;color:#17365c;font-size:13px}.notification-rule-card small{display:block;color:#71849a;font-size:10px;line-height:1.45;margin-top:4px}.notification-rule-actions{display:flex;align-items:center;gap:8px}.switch-control{display:inline-flex;align-items:center;gap:7px;color:#27476a;font-size:10px;font-weight:900;white-space:nowrap}.switch-control input{position:absolute;opacity:0;pointer-events:none}.switch-control span{width:38px;height:21px;border-radius:999px;background:#d4dee8;position:relative;transition:.18s}.switch-control span:after{content:"";position:absolute;top:3px;left:3px;width:15px;height:15px;border-radius:50%;background:#fff;box-shadow:0 2px 5px rgba(15,42,70,.18);transition:.18s}.switch-control input:checked+span{background:#1a8f66}.switch-control input:checked+span:after{left:20px}.switch-control input:focus+span{box-shadow:0 0 0 3px rgba(79,136,255,.12)}
@media(max-width:950px){.reminder-grid-v2,.settings-notification-controls{grid-template-columns:1fr}.notification-rule-card{align-items:flex-start;flex-direction:column}.notification-rule-actions{width:100%;justify-content:space-between}}

/* Sesiones administrativas */
.team-user-actions{display:flex;gap:8px;justify-content:flex-end;align-items:center}.team-user-actions .btn:disabled{opacity:.45;cursor:not-allowed}.session-status{display:inline-block;margin-left:8px;font-size:11px}.session-status.online{color:#159f6d}.session-status.offline{color:#8090a6}.btn-danger-text{color:#b42318;border-color:#efb2ad}.btn-danger-text:hover{background:#fff3f2}
@media(max-width:900px){.team-user-actions{flex-direction:column;align-items:stretch}.team-list-head{align-items:flex-start;gap:14px}.team-tools{flex-wrap:wrap}.team-tools .btn{width:100%}}


/* BETA 1.0 · Apariencia: restauración explícita del modo claro */
html[data-theme="claro"] .settings-sidebar,
html[data-theme="claro"] .appearance-card,
html[data-theme="claro"] .appearance-hero,
html[data-theme="claro"] .appearance-footer,
html[data-theme="claro"] .system-card {
  background:#fff !important;
  border-color:#dfe7f0 !important;
  color:#11233e !important;
}
html[data-theme="claro"] .appearance-card .panel-head,
html[data-theme="claro"] .appearance-card .panel-body {
  background:transparent !important;
  color:#11233e !important;
}
html[data-theme="claro"] .appearance-card h3,
html[data-theme="claro"] .appearance-card p,
html[data-theme="claro"] .appearance-copy h3,
html[data-theme="claro"] .appearance-copy p,
html[data-theme="claro"] .settings-sidebar-head strong,
html[data-theme="claro"] .settings-nav-btn strong,
html[data-theme="claro"] .settings-nav-btn small,
html[data-theme="claro"] .settings-sidebar-foot small,
html[data-theme="claro"] .settings-section-heading h3,
html[data-theme="claro"] .settings-section-heading p {
  color:var(--user-font-color,#11233e) !important;
}
html[data-theme="claro"] .theme-option {
  background:#fff !important;
  border-color:#dfe7f0 !important;
  color:#11233e !important;
}
html[data-theme="claro"] .theme-option small { color:#71839a !important; }
html[data-theme="claro"] .font-preview,
html[data-theme="claro"] .color-value,
html[data-theme="claro"] .background-note {
  background:#f8fafc !important;
  border-color:#dfe7f0 !important;
  color:var(--user-font-color,#11233e) !important;
}

/* ═══════════════════════════════════════════════════════════════════════
   SEGURIDAD · DESCARTE DE SOLICITUDES
   ═══════════════════════════════════════════════════════════════════════ */
.reset-row-copy{min-width:0;flex:1}
.reset-row-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.reset-delete-btn{width:40px;height:40px;padding:0;border:1px solid #f0c8c5;border-radius:11px;background:#fff8f7;color:#b42318;display:grid;place-items:center;cursor:pointer;transition:.16s ease;box-shadow:0 4px 12px rgba(180,35,24,.04)}
.reset-delete-btn svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.reset-delete-btn:hover{background:#fff0ee;border-color:#e8aaa5;transform:translateY(-1px);box-shadow:0 8px 18px rgba(180,35,24,.10)}
.reset-delete-btn:focus-visible{outline:2px solid rgba(180,35,24,.25);outline-offset:2px}

/* ═══════════════════════════════════════════════════════════════════════
   INFORME EJECUTIVO · CONTROL DEL CORTE
   Reemplaza la antigua tabla de auditoría operativa duplicada.
   ═══════════════════════════════════════════════════════════════════════ */
.report-cut-preview{margin-top:15px;overflow:hidden}
.report-cut-head{align-items:flex-start;gap:18px}
.report-cut-head p{margin:5px 0 0;max-width:680px;color:var(--muted);font-size:11px;line-height:1.5}
.report-ready-badge{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;padding:7px 10px;border-radius:999px;border:1px solid #bfe1d1;background:#edf9f3;color:#167149;font-size:9px;font-weight:900;letter-spacing:.08em;white-space:nowrap}
.report-ready-badge.warning{border-color:#f0d7a3;background:#fff7e3;color:#9b6500}
.report-cut-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.report-cut-grid article{min-width:0;padding:14px 15px;border:1px solid #e0e8f1;border-radius:13px;background:linear-gradient(145deg,#fbfdff,#f6f9fd)}
.report-cut-grid article>span{display:block;font-size:8px;font-weight:900;letter-spacing:.11em;color:#7589a1}
.report-cut-grid article>strong{display:block;margin:6px 0 4px;color:#17365b;font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.report-cut-grid article>small{display:block;color:#8a9aae;font-size:9px;line-height:1.35}
.report-cut-content{display:grid;grid-template-columns:minmax(0,1fr) 310px;gap:14px;margin-top:14px;padding-top:14px;border-top:1px solid #edf1f5}
.report-cut-content h4{margin:6px 0 10px;color:#17365b;font-size:14px}
.report-includes{display:flex;flex-wrap:wrap;gap:7px}
.report-includes span{display:inline-flex;align-items:center;gap:6px;padding:7px 9px;border:1px solid #dce7f1;border-radius:9px;background:#f8fbfe;color:#526a84;font-size:10px;font-weight:700}
.report-includes i{font-style:normal;color:#16835c;font-weight:900}
.report-control-note{padding:14px 15px;border:1px solid #d8e7f7;border-left:4px solid #2f6df6;border-radius:12px;background:#f5f9fe;display:grid;align-content:center;gap:5px}
.report-control-note strong{color:#17365b;font-size:12px}
.report-control-note span{color:#667b94;font-size:10px;line-height:1.55}

html[data-theme="dark"] .reset-delete-btn{background:#291a1d;border-color:#62383b;color:#ff9b94;box-shadow:none}
html[data-theme="dark"] .reset-delete-btn:hover{background:#3a2023;border-color:#875057;color:#ffb2ad}
html[data-theme="dark"] .report-ready-badge{background:#123229;border-color:#285c49;color:#7dd7ae}
html[data-theme="dark"] .report-ready-badge.warning{background:#352b18;border-color:#66532b;color:#f4ca72}
html[data-theme="dark"] .report-cut-grid article{background:linear-gradient(145deg,#132338,#101d30);border-color:#2b4057}
html[data-theme="dark"] .report-cut-grid article>span{color:#8da3bb}
html[data-theme="dark"] .report-cut-grid article>strong{color:#eef5ff}
html[data-theme="dark"] .report-cut-grid article>small{color:#8fa4bc}
html[data-theme="dark"] .report-cut-content{border-color:#26384d}
html[data-theme="dark"] .report-cut-content h4{color:#eef5ff}
html[data-theme="dark"] .report-includes span{background:#13263c;border-color:#30475f;color:#b5c5d8}
html[data-theme="dark"] .report-includes i{color:#6fd0a5}
html[data-theme="dark"] .report-control-note{background:#132840;border-color:#2d527b;border-left-color:#6e9fff}
html[data-theme="dark"] .report-control-note strong{color:#eef5ff}
html[data-theme="dark"] .report-control-note span{color:#a5b7ca}

@media(max-width:1100px){.report-cut-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.report-cut-content{grid-template-columns:1fr}}
@media(max-width:650px){.reset-row{align-items:flex-start}.reset-row-actions{flex-direction:column;align-items:stretch}.reset-delete-btn{width:100%}.report-cut-grid{grid-template-columns:1fr}.report-cut-head{flex-direction:column}.report-ready-badge{align-self:flex-start}}

/* ═══════════════════════════════════════════════════════════════════════
   PERFIL · FOTOGRAFÍA INTERACTIVA
   ═══════════════════════════════════════════════════════════════════════ */
.profile-avatar-button{
  appearance:none;
  -webkit-appearance:none;
  padding:0;
  cursor:pointer;
  overflow:hidden;
  isolation:isolate;
  transition:transform .18s ease,box-shadow .18s ease,border-color .18s ease;
}
.profile-avatar-button::before{
  content:'';
  position:absolute;
  inset:0;
  border-radius:inherit;
  background:linear-gradient(180deg,transparent 42%,rgba(7,25,48,.62));
  opacity:0;
  transition:opacity .18s ease;
  z-index:1;
  pointer-events:none;
}
.profile-avatar-button::after{
  content:'VER FOTO';
  position:absolute;
  left:50%;bottom:10px;
  transform:translate(-50%,6px);
  opacity:0;
  z-index:2;
  color:#fff;
  font-size:8px;
  line-height:1;
  font-weight:900;
  letter-spacing:.1em;
  white-space:nowrap;
  transition:.18s ease;
  pointer-events:none;
}
.profile-avatar-button:hover{transform:translateY(-2px);box-shadow:0 14px 30px rgba(22,45,78,.22)}
.profile-avatar-button:hover::before,.profile-avatar-button:focus-visible::before{opacity:1}
.profile-avatar-button:hover::after,.profile-avatar-button:focus-visible::after{opacity:1;transform:translate(-50%,0)}
.profile-avatar-button:focus-visible{outline:3px solid rgba(47,109,246,.22);outline-offset:3px}
.profile-avatar-button:not(.has-photo)::after{content:'AGREGAR FOTO'}
.profile-avatar-view-hint{display:none}

.profile-photo-actions{display:flex;align-items:center;justify-content:center;gap:8px;margin:12px 0 17px;flex-wrap:wrap}
.profile-photo-btn{
  min-height:38px;
  border:1px solid #d4e1ef;
  border-radius:11px;
  padding:0 13px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  background:#fff;
  color:#234f82;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
  box-shadow:0 6px 16px rgba(18,54,91,.06);
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease,background .16s ease;
}
.profile-photo-btn>span{font-size:14px;line-height:1}
.profile-photo-btn:hover{transform:translateY(-1px);box-shadow:0 10px 22px rgba(18,54,91,.10);border-color:#b7cee8}
.profile-photo-change{background:linear-gradient(135deg,#f8fbff,#edf5ff);border-color:#c9dcf3;color:#1e5eaf}
.profile-photo-delete{background:#fff8f7;border-color:#efcfcb;color:#b42318}
.profile-photo-delete:hover{background:#fff0ee;border-color:#e6aaa5;color:#9f1f16}

.profile-photo-viewer{
  position:fixed;
  inset:0;
  z-index:260000;
  display:grid;
  place-items:center;
  padding:22px;
}
.profile-photo-viewer.hidden{display:none!important}
.profile-photo-viewer-backdrop{position:absolute;inset:0;border:0;background:rgba(4,17,34,.74);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);cursor:default}
.profile-photo-viewer-card{
  position:relative;
  z-index:1;
  width:min(620px,calc(100vw - 32px));
  max-height:calc(100vh - 42px);
  overflow:auto;
  padding:20px;
  border:1px solid #dbe5ef;
  border-radius:24px;
  background:#fff;
  box-shadow:0 34px 100px rgba(0,0,0,.35);
}
.profile-photo-viewer-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:15px}
.profile-photo-viewer-head h3{margin:5px 0 0;color:#17365b;font-size:20px}
.profile-photo-viewer-close{width:38px;height:38px;border:1px solid #dbe5ef;border-radius:12px;background:#f6f9fc;color:#526b87;font-size:24px;line-height:1;cursor:pointer;display:grid;place-items:center;transition:.16s ease}
.profile-photo-viewer-close:hover{background:#fff;color:#17365b;transform:translateY(-1px)}
.profile-photo-viewer-stage{display:grid;place-items:center;min-height:320px;padding:18px;border:1px solid #e0e8f1;border-radius:18px;background:linear-gradient(145deg,#f5f8fc,#eef4fa)}
.profile-photo-viewer-stage img{display:block;width:min(430px,100%);max-height:62vh;aspect-ratio:1/1;object-fit:cover;border-radius:50%;border:8px solid #fff;box-shadow:0 20px 45px rgba(15,42,70,.20)}
.profile-photo-viewer-actions{display:flex;justify-content:flex-end;gap:9px;margin-top:15px;flex-wrap:wrap}

html[data-theme="dark"] .profile-avatar-large{border-color:#13263b;box-shadow:0 10px 28px rgba(0,0,0,.32)}
html[data-theme="dark"] .profile-photo-btn{box-shadow:none}
html[data-theme="dark"] .profile-photo-change{background:linear-gradient(135deg,#142b45,#11243a);border-color:#31577d;color:#83baff}
html[data-theme="dark"] .profile-photo-change:hover{background:#17324f;border-color:#4675a4}
html[data-theme="dark"] .profile-photo-delete{background:#2c1b1e;border-color:#694044;color:#ffaaa3}
html[data-theme="dark"] .profile-photo-delete:hover{background:#3b2226;border-color:#8b5459;color:#ffc0bb}
html[data-theme="dark"] .profile-photo-viewer-card{background:#101f32;border-color:#2b435d}
html[data-theme="dark"] .profile-photo-viewer-head h3{color:#eef5ff}
html[data-theme="dark"] .profile-photo-viewer-close{background:#142a43;border-color:#31506d;color:#c2d3e5}
html[data-theme="dark"] .profile-photo-viewer-close:hover{background:#19324d;color:#fff}
html[data-theme="dark"] .profile-photo-viewer-stage{background:linear-gradient(145deg,#0c192a,#13263b);border-color:#2a435d}
html[data-theme="dark"] .profile-photo-viewer-stage img{border-color:#1a3048;box-shadow:0 22px 52px rgba(0,0,0,.42)}

@media(max-width:560px){
  .profile-photo-viewer{padding:10px}
  .profile-photo-viewer-card{width:calc(100vw - 20px);padding:15px;border-radius:20px}
  .profile-photo-viewer-stage{min-height:250px;padding:12px}
  .profile-photo-viewer-actions{flex-direction:column-reverse}
  .profile-photo-viewer-actions .profile-photo-btn{width:100%}
}
