/* Estilos del área ajustes (datos reales): Notas privadas y Ajustes (Mi cuenta, Usuarios y permisos). */

/* ---------- Comunes ---------- */
.aj-loading{display:flex;align-items:center;gap:10px;padding:26px 4px;color:var(--ink-3);font-size:13.5px}
.aj-loading .spin{display:inline-grid;place-items:center;width:18px;height:18px}
.aj-loading svg{width:16px;height:16px}
.aj-error{display:flex;align-items:center;gap:14px;padding:18px 20px;flex-wrap:wrap}
.aj-error b{font-weight:600}
.aj-error p{margin:2px 0 0;color:var(--ink-3);font-size:13px}
.aj-error-ico{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--bad-wash);color:var(--bad);flex:none}
.aj-error-ico svg{width:18px;height:18px}
.aj-msg{margin:0;font-size:12.5px;font-weight:550;min-height:0}
.aj-msg:empty{display:none}
.aj-msg.bad{color:var(--bad)} .aj-msg.good{color:var(--good)}
.aj-note-box{display:flex;align-items:flex-start;gap:10px;margin:0;padding:11px 13px;border-radius:13px;background:var(--accent-wash);color:var(--ink-2);font-size:12.5px;line-height:1.45}
.aj-note-box svg{width:16px;height:16px;flex:none;margin-top:1px;color:var(--accent)}
.aj-note-box.warn{background:var(--warn-wash)} .aj-note-box.warn svg{color:var(--warn)}
.aj-note-box.bad{background:var(--bad-wash)} .aj-note-box.bad svg{color:var(--bad)}

/* ---------- Notas privadas ---------- */
.nt-wrap{display:grid;grid-template-columns:minmax(260px,340px) minmax(0,1fr);gap:18px;align-items:start}
.nt-list{padding:16px;display:grid;gap:12px;grid-template-columns:minmax(0,1fr);position:sticky;top:calc(var(--top-h) + 12px)}
.nt-list-head{display:flex;align-items:center;gap:10px}
.nt-list-head h2{margin:0;font:650 16px var(--display);letter-spacing:-.01em}
.nt-count{color:var(--ink-3);font-size:12px}
.nt-add{display:flex;gap:8px}
.nt-add .field{min-height:40px}
.nt-add .field input{min-width:0}
.nt-add .btn-icon{width:40px;height:40px;flex:none}
.nt-search{min-height:38px;background:var(--surface-2);border-color:transparent}
.nt-search svg{width:16px;height:16px;color:var(--ink-3);flex:none}
.nt-search input{min-width:0}
.nt-items{display:grid;grid-template-columns:minmax(0,1fr);gap:2px;max-height:min(62vh,640px);overflow:auto;margin:0 -6px;padding:0 6px;overscroll-behavior:contain}
.nt-item{display:flex;align-items:center;gap:11px;width:100%;padding:9px 10px;border:0;border-radius:12px;background:transparent;color:var(--ink);text-align:left;cursor:pointer;transition:background-color .15s,transform .15s var(--ease-out)}
.nt-item:hover{background:var(--surface-2)}
.nt-item:active{transform:scale(.99)}
.nt-item.on{background:var(--accent-wash)}
.nt-item .lt{flex:1;min-width:0}
.nt-item b{display:block;font-weight:600;font-size:13.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nt-item small{color:var(--ink-3);font-size:11.5px}
.nt-ico{width:32px;height:32px;border-radius:10px;display:grid;place-items:center;background:var(--surface-2);color:var(--ink-3);flex:none;transition:background-color .15s,color .15s}
.nt-ico svg{width:15px;height:15px}
.nt-item.on .nt-ico{background:var(--accent);color:#fff}
.nt-empty{padding:22px 10px;font-size:13px}
.nt-editor{padding:18px 20px 20px;display:grid;gap:14px;grid-template-columns:minmax(0,1fr);min-height:420px;align-content:start}
.nt-placeholder{align-self:center;min-height:360px;align-content:center;gap:10px;max-width:340px;margin:0 auto}
.nt-placeholder .vl-ico{margin-bottom:6px}
.nt-ed-head{display:flex;align-items:center;gap:6px;min-width:0}
.nt-ed-title{min-width:0}
.nt-ed-title h2{margin:0;font:650 19px var(--display);letter-spacing:-.015em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.nt-meta{color:var(--ink-3);font-size:12px}
.nt-back{display:none}
.nt-status{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:550;white-space:nowrap;color:var(--ink-3);background:var(--surface-2);margin-right:4px}
.nt-status .d{width:7px;height:7px;border-radius:50%;background:currentColor}
.nt-status.ok{color:var(--good);background:var(--good-wash)}
.nt-status.wait{color:var(--ink-3)}
.nt-status.busy{color:var(--accent);background:var(--accent-wash)}
.nt-status.busy .d{animation:ntPulse 1s ease-in-out infinite}
.nt-status.bad{color:var(--bad);background:var(--bad-wash)}
.nt-retry{border:0;background:none;color:inherit;font:inherit;text-decoration:underline;cursor:pointer;padding:0 0 0 2px}
@keyframes ntPulse{50%{opacity:.35}}
.nt-text{width:100%;min-height:clamp(320px,58vh,680px);resize:vertical;padding:14px 16px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2);color:var(--ink);font:13.5px/1.6 var(--mono);outline:none;transition:border-color .15s,box-shadow .15s,background-color .15s;tab-size:2}
.nt-text:focus{border-color:var(--accent);background:var(--surface);box-shadow:0 0 0 4px var(--accent-wash)}
@media (max-width:860px){
  .nt-wrap{grid-template-columns:minmax(0,1fr)}
  .nt-list{position:static}
  .nt-items{max-height:none;overflow:visible}
  .nt-wrap .nt-editor{display:none}
  .nt-wrap.show-editor .nt-list{display:none}
  .nt-wrap.show-editor .nt-editor{display:grid;animation:ntIn .22s var(--ease-out)}
  .nt-back{display:inline-flex;flex:none}
  .nt-ed-head{flex-wrap:wrap}
  .nt-ed-title{order:2;flex-basis:100%}
  .nt-ed-head .nt-status{margin-left:auto}
  .nt-editor{padding:14px 14px 16px;min-height:0}
  .nt-text{min-height:58vh}
}
@keyframes ntIn{from{opacity:0;transform:translateX(12px)}}

/* ---------- Mi cuenta ---------- */
.aj-hero{position:relative;overflow:hidden}
.aj-hero .avatar.lg{background:var(--hero);color:#fff}
.aj-name{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.aj-name .badge svg,.aj-table .badge svg{width:12px;height:12px}
.aj-mail{overflow-wrap:anywhere}
.aj-hico{width:36px;height:36px;border-radius:11px;display:grid;place-items:center;background:var(--accent-wash);color:var(--accent);flex:none}
.aj-hico svg{width:17px;height:17px}
.aj-body .card-head h2{margin:0;font:650 16px var(--display);letter-spacing:-.01em}
.aj-body .card-head small{display:block;margin-top:1px}
.aj-stack{display:grid;gap:18px;grid-template-columns:minmax(0,1fr)}
.aj-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.aj-row p{margin:0}
.aj-pass{padding-right:4px}
.aj-pass input{min-width:0;flex:1}
.aj-pass .btn-icon{flex:none}

/* ---------- Usuarios y permisos ---------- */
.aj-users{display:grid;gap:14px;grid-template-columns:minmax(0,1fr)}
.aj-users .sub-head p{margin:0}
.aj-who{display:grid;min-width:0}
.aj-who b{font-weight:600}
.aj-who small{color:var(--ink-3);font-size:12px;overflow-wrap:anywhere}
.aj-av-owner{background:var(--hero);color:#fff}
.aj-actions{display:flex;justify-content:flex-end;gap:6px}
.aj-perm-sum{font-size:12.5px}
.aj-denied{max-width:520px;margin:24px auto;padding:30px 28px;display:grid;justify-items:center;text-align:center;gap:10px}
.aj-denied h2{margin:6px 0 0;font:650 20px var(--display);letter-spacing:-.02em}
.aj-denied p{margin:0;line-height:1.5}
.aj-perm{display:grid;gap:14px;grid-template-columns:minmax(0,1fr)}
.aj-owner{display:flex;align-items:center;gap:12px;padding:12px 14px;border:1px solid var(--line);border-radius:14px;background:var(--surface-2)}
.aj-owner b{display:block;font-weight:600;font-size:13.5px}
.aj-owner small,.aj-perm-head small{color:var(--ink-3);font-size:12px}
.aj-perm-head{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.aj-perm-head b{display:block;font-weight:600;font-size:13.5px}
.aj-perm-table{border:1px solid var(--line);border-radius:14px}
.aj-perm-table table.perm td{padding:8px 14px}
.aj-perm-table .switch{vertical-align:middle;cursor:pointer}
.aj-perm-table .switch:disabled{opacity:.35;cursor:not-allowed}
@media (max-width:640px){
  .aj-table thead{display:none}
  .aj-table,.aj-table tbody,.aj-table tr,.aj-table td{display:block;width:100%}
  .aj-table tr{padding:12px 14px;border-bottom:1px solid var(--line);display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 10px;align-items:center}
  .aj-table tr:last-child{border-bottom:0}
  .aj-table td{padding:0!important;border:0!important}
  .aj-table td:first-child{grid-column:1/-1}
  .aj-table td.r{grid-column:1/-1}
  .aj-table .aj-actions{justify-content:flex-start}
  .aj-table td[data-l]::before{content:attr(data-l)}
  .aj-table td.r:empty,.aj-table .aj-actions:empty{display:none}
  .aj-users .sub-head p{flex-basis:100%}
  .aj-hero .ah-actions{width:100%}
  .aj-denied{padding:24px 18px}
}
