@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400&family=DM+Sans:wght@300;400;500;600;700&family=Dancing+Script:wght@600&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --red: #7B1E22;
  --red-b: #9B2429;
  --red-m: #5C1518;
  --red-d: #3D0E11;
  --red-k: #1E0608;
  --gold: #D4AF37; /* Dorado metálico más definido */
  --gold-l: #F5E6B3; /* Dorado claro mucho más brillante para lectura */
  --gold-d: #996515;
  --white: #fff;
  --off-white: #FBF9F7;
  --surface: #F7F5F2;
  --surface2: #EFECE8;
  --ash: #6B635E;
  --ash-l: #8C847E;
  --ink: #0D0D0D;
  --ink6: rgba(13,13,13,.75);
  --border: rgba(0,0,0,.1);
  --border2: rgba(0,0,0,.15);
  --ok: #1B6B3A;
  --ok-bg: #E8F5EE;
  --warn: #B45309;
  --warn-bg: #FEF3C7;
  --err: #9B1C1C;
  --err-bg: #FEE2E2;
  --blue: #1D4ED8;
  --blue-bg: #EFF6FF;
  --sw: 260px;
}

html, body { height: 100%; font-family: 'DM Sans', sans-serif; background: var(--surface); color: var(--ink); }

button { cursor: pointer; font-family: inherit; }

a { text-decoration: none; color: inherit; }

/* ── SIDEBAR ── */

.sidebar { position: fixed; top: 0; left: 0; bottom: 0; width: var(--sw); background: var(--red-k); display: flex; flex-direction: column; z-index: 200; transition: transform .3s; }

.sidebar::before { content: ''; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg,rgba(123,30,34,.3),transparent 50%); }

.sidebar::after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 1px; background: linear-gradient(to bottom,transparent,rgba(201,168,76,.3) 30%,rgba(201,168,76,.3) 70%,transparent); }

.sb-brand { position: relative; z-index: 1; padding: 1.1rem 1.2rem 1rem; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid rgba(201,168,76,.12); }

.sb-logo-box { width: 38px; height: 38px; flex-shrink: 0; position: relative; }

.sb-logo-fb { width: 38px; height: 38px; background: linear-gradient(135deg,var(--red-m),var(--red)); border-radius: 6px; display: flex; align-items: center; justify-content: center; position: relative; }

.sb-logo-fb::after { content: ''; position: absolute; inset: -2px; border: 1px solid rgba(201,168,76,.4); border-radius: 7px; pointer-events: none; }

.sb-logo-fb span { font-family: 'Playfair Display', serif; font-size: .85rem; font-weight: 900; color: var(--gold-l); position: relative; z-index: 1; }

.sb-name { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 900; color: #fff; line-height: 1.1; }

.sb-name em { color: var(--gold-l); font-style: italic; font-weight: 400; font-size: .92rem; }

.sb-sub { font-size: .62rem; color: rgba(255,255,255,.6); letter-spacing: .07em; margin-top: 1px; }

.sb-section { position: relative; z-index: 1; font-size: 9px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.5); padding: 1.1rem 1.2rem .4rem; }

.sb-nav { position: relative; z-index: 1; flex: 1; padding: .4rem .7rem; overflow-y: auto; }

.sb-nav::-webkit-scrollbar { width: 3px; }

.sb-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); border-radius: 3px; }

.nav-i { display: flex; align-items: center; gap: 10px; padding: 9px 12px; color: rgba(255,255,255,.7); border-radius: 6px; margin-bottom: 2px; font-size: .84rem; font-weight: 500; transition: all .2s; cursor: pointer; border: none; border-left: 2px solid transparent; background: none; width: 100%; text-align: left; }

.nav-i svg { width: 17px; height: 17px; flex-shrink: 0; }

.nav-i:hover { color: rgba(255,255,255,1); background: rgba(255,255,255,.1); }

.nav-i.active { color: #fff; background: var(--red); border-left-color: var(--gold); font-weight: 700; }

.nav-i .nbadge { margin-left: auto; background: var(--red); color: var(--gold-l); font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 10px; min-width: 20px; text-align: center; flex-shrink: 0; }

.nav-i.active .nbadge { background: var(--gold); color: var(--red-d); }

.sb-footer { position: relative; z-index: 1; padding: .7rem; border-top: 1px solid rgba(255,255,255,.07); display: flex; flex-direction: column; gap: .25rem; }

.sb-user { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 6px; cursor: pointer; transition: background .2s; }

.sb-user:hover { background: rgba(255,255,255,.06); }

.sb-avatar { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg,var(--gold-d),var(--gold)); display: flex; align-items: center; justify-content: center; font-size: .75rem; font-weight: 700; color: var(--red-d); flex-shrink: 0; }

.sb-uname { font-size: .8rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.sb-urole { font-size: .68rem; color: rgba(255,255,255,.7); }

.sb-logout-btn { display: flex; align-items: center; gap: 8px; padding: 7px 12px; color: rgba(255,100,100,.6); background: none; border: none; font-family: inherit; font-size: .78rem; font-weight: 500; cursor: pointer; width: 100%; border-radius: 6px; transition: all .2s; }

.sb-logout-btn:hover { background: rgba(255,50,50,.08); color: #ff6b6b; }

.sb-logout-btn svg { width: 15px; height: 15px; }

.sb-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 150; }

.sb-overlay.active { display: block; }

/* LAYOUT */

.layout { margin-left: var(--sw); min-height: 100vh; display: flex; flex-direction: column; }

.topbar { height: 62px; background: var(--white); border-bottom: 1px solid var(--border); display: flex; align-items: center; padding: 0 1.8rem; gap: 1rem; position: sticky; top: 0; z-index: 100; }

.topbar-hbg { display: none; background: none; border: none; color: var(--ink); padding: 6px; border-radius: 6px; cursor: pointer; }

.topbar-hbg svg { width: 21px; height: 21px; }

.topbar-bc { display: flex; align-items: center; gap: 7px; font-size: .8rem; min-width: 0; }

.topbar-bc span { color: var(--ash); white-space: nowrap; }

.topbar-bc strong { color: var(--ink); font-weight: 600; }

.topbar-bc svg { color: var(--ash-l); flex-shrink: 0; }

.topbar-r { margin-left: auto; display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }

.tsearch { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); padding: 7px 11px; border-radius: 6px; width: 210px; transition: all .2s; }

.tsearch:focus-within { background: var(--white); border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,.12); }

.tsearch svg { width: 14px; height: 14px; color: var(--ash); flex-shrink: 0; }

.tsearch input { border: none; background: none; outline: none; font-family: 'DM Sans', sans-serif; font-size: .8rem; color: var(--ink); width: 100%; }

.tsearch input::placeholder { color: var(--ash-l); }

.tbtn { width: 34px; height: 34px; border-radius: 6px; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--ink6); transition: all .2s; position: relative; cursor: pointer; }

.tbtn:hover { background: var(--white); color: var(--red); border-color: rgba(123,30,34,.2); }

.tbtn svg { width: 16px; height: 16px; }

.tbtn .dot { position: absolute; top: 6px; right: 6px; width: 7px; height: 7px; background: var(--red); border-radius: 50%; border: 1.5px solid var(--white); }

/* PAGES */

.page { padding: 1.8rem 2rem 3rem; flex: 1; max-width: 1300px; width: 100%; animation: fadeUp .3s ease; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* PAGE HEADER */

.ph { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 1.8rem; flex-wrap: wrap; gap: 1rem; }

.ph-title { font-family: 'Playfair Display', serif; font-size: 1.65rem; font-weight: 900; color: var(--ink); line-height: 1; letter-spacing: -.02em; }

.ph-title em { font-style: italic; font-weight: 400; color: var(--red); }

.ph-sub { font-size: .8rem; color: var(--ash); margin-top: .35rem; }

.ph-actions { display: flex; gap: .65rem; flex-wrap: wrap; }

/* BUTTONS */

.btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 15px; border-radius: 6px; font-family: 'DM Sans', sans-serif; font-size: .8rem; font-weight: 600; cursor: pointer; border: none; transition: all .2s; white-space: nowrap; }

.btn svg { width: 14px; height: 14px; flex-shrink: 0; }

.btn-red { background: var(--red); color: var(--white); }

.btn-red:hover { background: var(--red-b); box-shadow: 0 4px 14px rgba(123,30,34,.35); transform: translateY(-1px); }

.btn-out { background: var(--white); color: var(--ink); border: 1px solid var(--border2); }

.btn-out:hover { border-color: var(--gold); color: var(--red-b); }

.btn-ghost { background: none; color: var(--ink6); border: 1px solid var(--border); padding: 7px 12px; }

.btn-ghost:hover { background: var(--surface); color: var(--ink); }

.btn-gold { background: var(--gold); color: var(--red-d); }

.btn-gold:hover { background: var(--gold-l); box-shadow: 0 4px 14px rgba(201,168,76,.3); }

.btn-sm { padding: 5px 10px; font-size: .75rem; }

.btn-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid rgba(27,107,58,.2); }

/* CARDS */

.card { background: var(--white); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; }

.card-hd { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.3rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: .5rem; }

.card-hd-l { display: flex; align-items: center; gap: 9px; }

.card-ico { width: 30px; height: 30px; border-radius: 6px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.card-ico svg { width: 15px; height: 15px; }

.ico-gold { background: rgba(201,168,76,.1); color: var(--gold-d); }

.ico-red { background: rgba(123,30,34,.08); color: var(--red); }

.ico-ink { background: var(--surface); color: var(--ink6); }

.ico-ok { background: var(--ok-bg); color: var(--ok); }

.ico-warn { background: var(--warn-bg); color: var(--warn); }

.ico-blue { background: var(--blue-bg); color: var(--blue); }

.card-title { font-size: .875rem; font-weight: 700; color: var(--ink); }

.card-sub { font-size: .7rem; color: var(--ash); margin-top: 1px; }

.card-link { font-size: .73rem; color: var(--red); font-weight: 600; cursor: pointer; }

.card-link:hover { text-decoration: underline; }

/* STATS */

.sg { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; margin-bottom: 1.4rem; }

.sg-3 { grid-template-columns: repeat(3,1fr); }

.sc { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 1.2rem 1.3rem; position: relative; overflow: hidden; transition: box-shadow .2s, transform .2s; }

.sc:hover { box-shadow: 0 6px 20px rgba(0,0,0,.06); transform: translateY(-2px); }

.sc::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }

.sc-gold::before { background: linear-gradient(to right,var(--gold-d),var(--gold-l)); }

.sc-red::before { background: linear-gradient(to right,var(--red-m),var(--red-b)); }

.sc-warn::before { background: linear-gradient(to right,#D97706,#F59E0B); }

.sc-ok::before { background: linear-gradient(to right,#166534,#16A34A); }

.sc-blue::before { background: linear-gradient(to right,#1D4ED8,#3B82F6); }

.sc-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: .9rem; }

.sc-icon { width: 38px; height: 38px; border-radius: 8px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }

.sc-icon svg { width: 19px; height: 19px; }

.sc-gold .sc-icon { background: rgba(201,168,76,.1); color: var(--gold-d); }

.sc-red .sc-icon { background: rgba(123,30,34,.08); color: var(--red); }

.sc-warn .sc-icon { background: var(--warn-bg); color: var(--warn); }

.sc-ok .sc-icon { background: var(--ok-bg); color: var(--ok); }

.sc-blue .sc-icon { background: var(--blue-bg); color: var(--blue); }

.trend { font-size: .68rem; font-weight: 700; padding: 3px 7px; border-radius: 4px; white-space: nowrap; }

.trend-up { background: var(--ok-bg); color: var(--ok); }

.trend-dn { background: var(--err-bg); color: var(--err); }

.trend-n { background: var(--surface2); color: var(--ash); }

.sc-num { font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 900; color: var(--ink); line-height: 1; margin-bottom: .25rem; }

.sc-lbl { font-size: .74rem; color: var(--ash); font-weight: 500; text-transform: uppercase; letter-spacing: .05em; }

.sc-bar { margin-top: .9rem; height: 4px; background: var(--surface2); border-radius: 2px; overflow: hidden; }

.sc-bar-f { height: 100%; border-radius: 2px; transition: width .8s ease; }

.sc-gold .sc-bar-f { background: var(--gold); }

.sc-red .sc-bar-f { background: var(--red); }

.sc-warn .sc-bar-f { background: #F59E0B; }

.sc-ok .sc-bar-f { background: #16A34A; }

.sc-blue .sc-bar-f { background: #3B82F6; }

/* TABLE */

.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

.tbl { width: 100%; border-collapse: collapse; min-width: 500px; }

.tbl th { padding: 9px 13px; font-size: .69rem; font-weight: 700; text-transform: uppercase; letter-spacing: .07em; color: var(--ash); border-bottom: 1px solid var(--border); text-align: left; background: var(--surface); white-space: nowrap; }

.tbl td { padding: 12px 13px; font-size: .845rem; border-bottom: 1px solid var(--border); vertical-align: middle; }

.tbl tr:last-child td { border-bottom: none; }

.tbl tbody tr { transition: background .15s; }

.tbl tbody tr:hover td { background: rgba(247,245,242,.8); }

/* BADGES */

.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 20px; font-size: .67rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }

.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }

.b-ok { background: var(--ok-bg); color: var(--ok); }

.b-ok::before { background: var(--ok); }

.b-warn { background: var(--warn-bg); color: var(--warn); }

.b-warn::before { background: var(--warn); }

.b-err { background: var(--err-bg); color: var(--err); }

.b-err::before { background: var(--err); }

.b-blue { background: var(--blue-bg); color: var(--blue); }

.b-blue::before { background: var(--blue); }

.b-gray { background: var(--surface2); color: var(--ash); }

.b-gray::before { background: var(--ash); }

.b-red { background: var(--err-bg); color: var(--err); }

.b-red::before { background: var(--err); }

/* ICON BUTTONS */

.ibtn { width: 28px; height: 28px; border-radius: 5px; background: var(--surface); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--ash); transition: all .2s; }

.ibtn:hover { background: var(--white); color: var(--red); border-color: rgba(123,30,34,.2); }

.ibtn svg { width: 13px; height: 13px; }

.ibtn-red { color: var(--red); border-color: rgba(123,30,34,.2); }

.dn { display: flex; align-items: center; gap: 9px; }

.dn-ico { width: 30px; height: 30px; border-radius: 6px; flex-shrink: 0; background: rgba(201,168,76,.1); display: flex; align-items: center; justify-content: center; color: var(--gold-d); }

.dn-ico svg { width: 14px; height: 14px; }

.dn-title { font-weight: 600; font-size: .845rem; color: var(--ink); }

.dn-code { font-size: .7rem; color: var(--ash); margin-top: 1px; }

/* FILTERS */

.filters { display: flex; align-items: center; gap: .35rem; padding: .8rem 1rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }

.filters-r { margin-left: auto; display: flex; gap: .5rem; align-items: center; }

.filter-tab { padding: 6px 13px; border-radius: 20px; border: 1px solid var(--border); background: none; font-family: 'DM Sans', sans-serif; font-size: .75rem; font-weight: 600; color: var(--ash); cursor: pointer; transition: all .2s; }

.filter-tab:hover { color: var(--ink); border-color: var(--ash-l); }

.filter-tab.active { background: var(--red); color: #fff; border-color: var(--red); font-weight: 700; box-shadow: 0 4px 10px rgba(123,30,34,.2); }

.fsearch { display: flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--border); padding: 7px 11px; border-radius: 6px; min-width: 180px; }

.fsearch:focus-within { background: var(--white); border-color: var(--gold); }

.fsearch svg { width: 14px; height: 14px; color: var(--ash); flex-shrink: 0; }

.fsearch input { border: none; background: none; outline: none; font-family: 'DM Sans', sans-serif; font-size: .8rem; color: var(--ink); width: 100%; }

.fsearch input::placeholder { color: var(--ash-l); }

/* FORMS */

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-group { display: flex; flex-direction: column; gap: .4rem; }

.form-group.full { grid-column: 1/-1; }

label.lbl { font-size: .73rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ash); }

.finput, .fselect, .ftextarea { width: 100%; padding: 10px 12px; background: rgba(255,255,255,.75); border: 1px solid var(--border2); font-family: 'DM Sans', sans-serif; font-size: .875rem; color: var(--ink); outline: none; transition: all .25s; border-radius: 5px; -webkit-appearance: none; }

.finput:focus, .fselect:focus, .ftextarea:focus { background: var(--white); border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,.1); }

.finput::placeholder { color: var(--ash); opacity: 0.8; }

.fselect { cursor: pointer; }

.ftextarea { resize: vertical; min-height: 90px; }

/* MODAL */

.modal-bg { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 500; align-items: center; justify-content: center; padding: 1rem; }

.modal-bg.open { display: flex; animation: fadeIn .2s ease; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal { background: var(--white); border-radius: 10px; width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,.25); animation: slideUp .25s ease; }

@keyframes slideUp { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.modal-hd { display: flex; align-items: center; justify-content: space-between; padding: 1.3rem 1.5rem; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--white); z-index: 2; }

.modal-ttl { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 900; color: var(--ink); }

.modal-close { width: 30px; height: 30px; border-radius: 6px; background: var(--surface); border: none; display: flex; align-items: center; justify-content: center; color: var(--ash); transition: all .2s; cursor: pointer; }

.modal-close:hover { background: var(--err-bg); color: var(--err); }

.modal-close svg { width: 15px; height: 15px; }

.modal-body { padding: 1.4rem 1.5rem; }

.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: .6rem; background: var(--surface); }

/* PROGRESS */

.prog-wrap { background: var(--surface2); border-radius: 4px; overflow: hidden; height: 8px; }

.prog-fill { height: 100%; border-radius: 4px; transition: width .8s ease; }

/* TOGGLE */

.toggle-wrap { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--border); }

.toggle-wrap:last-child { border-bottom: none; }

.toggle-label { font-size: .845rem; font-weight: 500; color: var(--ink); }

.toggle-sub { font-size: .72rem; color: var(--ash); }

.toggle { position: relative; width: 40px; height: 22px; flex-shrink: 0; }

.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }

.toggle-slider { position: absolute; inset: 0; background: var(--surface2); border-radius: 20px; cursor: pointer; transition: .3s; }

.toggle-slider::before { content: ''; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: var(--white); border-radius: 50%; transition: .3s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }

.toggle input:checked + .toggle-slider { background: var(--red); }

.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* GRID LAYOUTS */

.mg { display: grid; grid-template-columns: 1fr 340px; gap: 1.2rem; }

.mg-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.2rem; }

.col-r { display: flex; flex-direction: column; gap: 1.2rem; }

/* ALERTS */

.al-list { padding: .5rem; }

.al { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 7px; margin-bottom: .5rem; border: 1px solid transparent; }

.al:last-child { margin-bottom: 0; }

.al-err { background: var(--err-bg); border-color: rgba(155,28,28,.15); }

.al-warn { background: var(--warn-bg); border-color: rgba(180,83,9,.15); }

.al-ok { background: var(--ok-bg); border-color: rgba(27,107,58,.15); }

.al-blue { background: var(--blue-bg); border-color: rgba(29,78,216,.15); }

.al-ico { flex-shrink: 0; margin-top: 1px; }

.al-err .al-ico { color: var(--err); }

.al-warn .al-ico { color: var(--warn); }

.al-ok .al-ico { color: var(--ok); }

.al-blue .al-ico { color: var(--blue); }

.al-ttl { font-size: .82rem; font-weight: 600; color: var(--ink); }

.al-sub { font-size: .73rem; color: var(--ash); margin-top: 2px; }

/* QUICK GRID */

.qg { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; padding: .9rem; }

.qbtn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 8px; border-radius: 7px; border: 1px solid var(--border); background: var(--surface); font-family: 'DM Sans', sans-serif; font-size: .72rem; font-weight: 600; color: var(--ash); cursor: pointer; transition: all .2s; text-align: center; }

.qbtn svg { width: 20px; height: 20px; }

.qbtn:hover { background: var(--white); color: var(--ink); border-color: rgba(201,168,76,.4); box-shadow: 0 2px 8px rgba(0,0,0,.06); }

.qbtn-r { background: rgba(123,30,34,.06); border-color: rgba(123,30,34,.15); color: var(--red); }

.qbtn-r:hover { background: var(--red); color: var(--gold-l); box-shadow: 0 4px 14px rgba(123,30,34,.35); }

/* ACTIVITY */

.act-list { padding: .4rem .5rem; }

.act-i { display: flex; gap: 11px; padding: 9px 8px; border-radius: 6px; transition: background .15s; align-items: flex-start; }

.act-i:hover { background: var(--surface); }

.act-dot { width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; }

.dot-r { background: rgba(123,30,34,.1); color: var(--red); }

.dot-g { background: rgba(201,168,76,.12); color: var(--gold-d); }

.dot-ok { background: var(--ok-bg); color: var(--ok); }

.dot-b { background: var(--blue-bg); color: var(--blue); }

.act-msg { font-size: .8rem; color: var(--ink); font-weight: 500; line-height: 1.4; }

.act-time { font-size: .68rem; color: var(--ash); margin-top: 1px; }

/* USER CARDS */

.user-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--white); transition: all .2s; }

.user-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.06); border-color: rgba(201,168,76,.3); }

.user-av { width: 42px; height: 42px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .9rem; flex-shrink: 0; }

.user-info { flex: 1; min-width: 0; }

.user-name { font-weight: 600; font-size: .875rem; color: var(--ink); }

.user-email { font-size: .72rem; color: var(--ash); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.user-actions { display: flex; gap: .4rem; }

/* ROLE CARDS */

.role-card { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 1.3rem; transition: all .2s; }

.role-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.07); border-color: rgba(201,168,76,.3); }

.role-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: .8rem; gap: .5rem; flex-wrap: wrap; }

.role-name { font-weight: 700; font-size: .9rem; color: var(--ink); margin-bottom: .25rem; }

.role-desc { font-size: .75rem; color: var(--ash); line-height: 1.5; }

.role-perms { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .9rem; }

.perm { font-size: .65rem; font-weight: 600; padding: 2px 7px; border-radius: 4px; background: var(--surface2); color: var(--ash); }

.perm-ok { background: var(--ok-bg); color: var(--ok); }

/* NC CARDS */

.nc { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 1.2rem; display: flex; flex-direction: column; gap: .75rem; transition: all .2s; }

.nc:hover { box-shadow: 0 4px 14px rgba(0,0,0,.06); }

.nc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: .5rem; }

.nc-title { font-weight: 700; font-size: .875rem; color: var(--ink); }

.nc-code { font-size: .7rem; color: var(--ash); margin-top: 2px; }

.nc-body { font-size: .8rem; color: var(--ink6); line-height: 1.6; }

.nc-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }

.nc-meta { font-size: .7rem; color: var(--ash); }

/* FAB */

.fab { position: fixed; bottom: 22px; right: 22px; width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg,var(--gold-d),var(--gold)); display: flex; align-items: center; justify-content: center; color: var(--white); cursor: pointer; z-index: 300; box-shadow: 0 8px 24px rgba(201,168,76,.4); transition: transform .3s, box-shadow .3s; border: none; }

.fab:hover { transform: scale(1.08); box-shadow: 0 12px 30px rgba(201,168,76,.5); }

.fab svg { width: 22px; height: 22px; }

/* TOAST */

.toast-container { position: fixed; bottom: 80px; right: 22px; z-index: 9999; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }

.toast-item { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: var(--ink); color: var(--white); border-radius: 8px; font-size: .82rem; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,.2); min-width: 220px; max-width: 320px; animation: toastIn .3s ease; border-left: 3px solid var(--gold); pointer-events: all; }

@keyframes toastIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

.toast-ok { border-left-color: var(--ok); }

.toast-err { border-left-color: var(--err); }

.toast-warn { border-left-color: var(--warn); }

/* PAGINATION */

.pagination { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.3rem; border-top: 1px solid var(--border); flex-wrap: wrap; gap: .5rem; }

.pag-info { font-size: .78rem; color: var(--ash); }

/* MOBILE BANNER */

.mobile-readonly-banner { display: none; align-items: center; gap: .5rem; background: #FEF3C7; border-bottom: 1px solid #F59E0B; padding: .55rem 1rem; font-size: .75rem; font-weight: 600; color: #92400E; position: sticky; top: 62px; z-index: 49; }

/* NOTIF PANEL */

.notif-panel { position: absolute; top: 40px; right: 0; width: 300px; background: var(--white); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 10px 30px rgba(0,0,0,.12); z-index: 400; overflow: hidden; }

/* RESPONSIVE */

@media(max-width:1200px) {
  .sg { grid-template-columns: repeat(2,1fr); }
  .mg { grid-template-columns: 1fr; }
  .col-r { flex-direction: row; flex-wrap: wrap; }
  .col-r > * { flex: 1; min-width: 280px; }
}

@media(max-width:1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .layout { margin-left: 0; }
  .topbar-hbg { display: flex; }
  .mg-3 { grid-template-columns: 1fr 1fr; }
  .tsearch { width: 160px; }
}

@media(max-width:768px) {
  :root { --sw: 240px; }
  .page { padding: 1.2rem 1rem 2rem; }
  .sg { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .topbar { padding: 0 1rem; }
  .tsearch { display: none; }
  .ph { flex-direction: column; align-items: flex-start; }
  .ph-actions { width: 100%; }
  .mobile-readonly-banner { display: flex !important; }
  .col-r { flex-direction: column; }
  .col-r > * { min-width: unset; }
  .form-grid { grid-template-columns: 1fr; }
  .mg-3 { grid-template-columns: 1fr; }
  .filters-r { width: 100%; margin-left: 0; }
  .fsearch { flex: 1; min-width: 0; }
}

@media(max-width:480px) {
  .sg { grid-template-columns: 1fr; }
  .sc-num { font-size: 1.6rem; }
  .ph-title { font-size: 1.35rem; }
  .qg { grid-template-columns: 1fr 1fr; }
}

/* TASK ITEMS */

.task-item { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: 7px; border: 1px solid var(--border); background: var(--white); margin-bottom: .5rem; transition: all .2s; }

.task-item:hover { box-shadow: 0 3px 10px rgba(0,0,0,.07); border-color: rgba(201,168,76,.3); }

.task-item:last-child { margin-bottom: 0; }

.task-check { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--border); flex-shrink: 0; margin-top: 2px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all .2s; }

.task-check:hover { border-color: var(--ok); background: var(--ok-bg); }

.task-check.done { background: var(--ok); border-color: var(--ok); }

.task-check.done svg { display: block; }

.task-check svg { display: none; width: 11px; height: 11px; stroke: var(--white); }

.task-txt { flex: 1; min-width: 0; }

.task-title { font-size: .83rem; font-weight: 600; color: var(--ink); }

.task-title.done-txt { text-decoration: line-through; color: var(--ash); }

.task-meta { font-size: .7rem; color: var(--ash); margin-top: 2px; }

.task-pri { font-size: .65rem; font-weight: 700; padding: 2px 7px; border-radius: 10px; flex-shrink: 0; }

.pri-h { background: var(--err-bg); color: var(--err); }

.pri-m { background: var(--warn-bg); color: var(--warn); }

.pri-l { background: var(--ok-bg); color: var(--ok); }

/* CAP CARDS */

.cap-card { background: var(--white); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; transition: all .2s; }

.cap-card:hover { box-shadow: 0 4px 14px rgba(0,0,0,.07); border-color: rgba(201,168,76,.25); }

.cap-badge { display: inline-block; font-size: .62rem; font-weight: 700; padding: 2px 8px; border-radius: 4px; text-transform: uppercase; letter-spacing: .05em; }

/* READONLY BADGE (Consultor) */

.readonly-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; background: rgba(201,168,76,.1); border: 1px solid rgba(201,168,76,.25); border-radius: 6px; font-size: .73rem; font-weight: 700; color: var(--gold-d); }

.readonly-badge svg { width: 13px; height: 13px; }

/* HF CARD (hallazgo card consultor) */

.hf-card { background: var(--white); border: 1px solid var(--border); border-radius: 8px; overflow: hidden; transition: box-shadow .2s; }

.hf-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.07); }

/* P4 GRID (documentos consultor) */

.p4-grid { display: grid; grid-template-columns: repeat(5,1fr); gap: .8rem; }

.p4c { background: var(--white); border: 1px solid var(--border); border-radius: 8px; padding: 1rem; cursor: pointer; transition: all .2s; text-align: center; }

.p4c:hover { border-color: var(--gold); box-shadow: 0 4px 14px rgba(0,0,0,.07); }

.p4c.active { border-color: var(--red); background: rgba(123,30,34,.04); }

.p4c-check { font-size: 1.2rem; margin-bottom: .4rem; }

.p4c-num { font-family: 'Playfair Display',serif; font-size: 1.3rem; font-weight: 900; color: var(--red); line-height: 1; margin-bottom: .3rem; }

.p4c-lbl { font-size: .73rem; font-weight: 600; color: var(--ink); line-height: 1.4; margin-bottom: .3rem; }

.p4c-count { font-size: .68rem; color: var(--ash); }

@media(max-width:900px) { .p4-grid { grid-template-columns: repeat(3,1fr); } }

@media(max-width:600px) { .p4-grid { grid-template-columns: 1fr 1fr; } }
/* ── Gestión documental ISO, firmas y notificaciones ── */

.dm-label { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ash); }
.dm-hint { font-size: .72rem; color: var(--ash); line-height: 1.4; }
.dm-error { background: var(--err-bg); border: 1px solid rgba(220,38,38,.25); color: var(--err); border-radius: 8px; padding: .75rem 1rem; font-size: .84rem; margin-top: 1rem; }
.dm-loading { display: flex; flex-direction: column; align-items: center; gap: .8rem; padding: 4rem 1rem; color: var(--ash); font-size: .88rem; }
.dm-spinner { width: 28px; height: 28px; border: 3px solid var(--border); border-top-color: var(--red); border-radius: 50%; animation: dm-spin .9s linear infinite; }
@keyframes dm-spin { to { transform: rotate(360deg); } }

.dm-banner { display: flex; align-items: center; gap: .8rem; flex-wrap: wrap; background: var(--warn-bg); border: 1px solid rgba(180,83,9,.25); color: var(--warn); border-radius: 8px; padding: .8rem 1.1rem; margin-bottom: 1rem; font-size: .86rem; }
.dm-banner span { flex: 1; min-width: 200px; }

.dm-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.2rem; font-size: .74rem; color: var(--ash); margin-bottom: 1rem; }
.dm-legend strong { color: var(--ink6); }
.dm-legend span { display: inline-flex; align-items: center; gap: 6px; }
.dm-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.dm-tabs { display: flex; gap: .4rem; flex-wrap: wrap; margin-bottom: 1rem; }
.dm-filters { padding: .8rem 1rem; border-bottom: 1px solid var(--border); display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }
.dm-filter { width: auto; min-width: 150px; padding: 8px 10px; font-size: .8rem; }
.dm-linkbtn { background: none; border: none; padding: 0; font-weight: 600; font-size: .845rem; color: var(--ink); text-align: left; }
.dm-linkbtn:hover { color: var(--red); text-decoration: underline; }
.dm-empty { display: flex; flex-direction: column; align-items: center; gap: .6rem; padding: 2.5rem 1rem; text-align: center; color: var(--ash); font-size: .85rem; }
.dm-empty strong { color: var(--ink); font-size: 1rem; }
.dm-empty-line { padding: .6rem 1rem; font-size: .78rem; color: var(--ash); }

.dm-chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 10px; background: var(--surface2); color: var(--ink6); font-size: .66rem; font-weight: 700; white-space: nowrap; }
.dm-avatar { width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg,var(--gold),var(--gold-d)); color: var(--red-d); display: inline-flex; align-items: center; justify-content: center; font-size: .68rem; font-weight: 800; flex-shrink: 0; }

/* Progreso */
.dm-prog { display: block; height: 6px; background: var(--surface2); border-radius: 3px; overflow: hidden; flex: 1; min-width: 60px; }
.dm-prog-fill { display: block; height: 100%; border-radius: 3px; transition: width .6s ease; }
.dm-prog-num { font-size: .72rem; font-weight: 800; min-width: 34px; text-align: right; }

/* Árbol de cláusulas */
.dm-tree-tools { display: flex; gap: .4rem; justify-content: flex-end; margin-bottom: .6rem; }
.dm-tree { display: flex; flex-direction: column; gap: .8rem; }
.dm-main { overflow: visible; }
.dm-row { display: flex; align-items: center; gap: .7rem; padding: .7rem 1rem; cursor: pointer; transition: background .15s; }
.dm-row:hover { background: rgba(247,245,242,.9); }
.dm-row-chev { width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; background: none; border: none; color: var(--ash); flex-shrink: 0; }
.dm-row-code { font-family: monospace; font-weight: 800; font-size: .78rem; color: var(--red); min-width: 44px; }
.dm-row-title { flex: 1; min-width: 0; font-weight: 600; font-size: .86rem; display: flex; flex-direction: column; gap: 2px; }
.dm-row-desc { font-weight: 400; font-size: .72rem; color: var(--ash); line-height: 1.35; }
.dm-row-meta { display: flex; gap: 4px; flex-shrink: 0; }
.dm-row-prog { display: flex; align-items: center; gap: 8px; width: 150px; flex-shrink: 0; }
.dm-row-status { min-width: 86px; justify-content: center; flex-shrink: 0; }
.dm-row-upload { flex-shrink: 0; }
.dm-depth-0 > .dm-row { padding: 1rem 1.2rem; }
.dm-depth-0 > .dm-row .dm-row-title { font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 800; }
.dm-depth-0 > .dm-row .dm-row-code { font-size: 1.1rem; }
.dm-depth-0 > .dm-row .dm-prog { height: 8px; }
.dm-children { border-top: 1px solid var(--border); background: rgba(247,245,242,.5); }
.dm-depth-1 > .dm-row { padding-left: 1.4rem; }
.dm-depth-2 > .dm-row { padding-left: 2.6rem; }
.dm-depth-3 > .dm-row { padding-left: 3.8rem; }
.dm-node + .dm-node > .dm-row, .dm-children > .dm-node > .dm-row { border-top: 1px solid var(--border); }
.dm-children > .dm-node:first-child > .dm-row { border-top: none; }
.dm-docs { padding: .4rem 1rem .4rem 3.4rem; display: flex; flex-direction: column; gap: 4px; }
.dm-docline { display: flex; align-items: center; gap: .6rem; background: var(--white); border: 1px solid var(--border); border-radius: 6px; padding: 7px 10px; text-align: left; font-size: .8rem; transition: all .15s; }
.dm-docline:hover { border-color: var(--gold); box-shadow: 0 2px 8px rgba(0,0,0,.05); }
.dm-docline-code { font-family: monospace; font-weight: 800; font-size: .72rem; color: var(--red); flex-shrink: 0; }
.dm-docline-title { flex: 1; min-width: 0; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Carga de archivos */
.dm-drop { border: 2px dashed var(--border2); border-radius: 10px; padding: 1.6rem 1rem; display: flex; flex-direction: column; align-items: center; gap: .4rem; text-align: center; cursor: pointer; color: var(--ash); transition: all .2s; background: var(--surface); }
.dm-drop:hover, .dm-drop.dragging { border-color: var(--gold); background: rgba(212,175,55,.07); color: var(--red); }
.dm-drop.has-file { border-style: solid; border-color: var(--ok); background: var(--ok-bg); color: var(--ink); }
.dm-drop-ext { background: var(--red); color: #fff; font-weight: 800; font-size: .72rem; padding: 4px 9px; border-radius: 5px; letter-spacing: .06em; }
.dm-upload-progress { display: flex; align-items: center; gap: .8rem; margin-top: .9rem; font-size: .78rem; color: var(--ash); }
.dm-upload-progress .dm-prog { flex: 1; }

/* Firma */
.dm-sigpad { position: relative; border: 1px solid var(--border2); border-radius: 8px; background: #fff; overflow: hidden; }
.dm-sigpad canvas { display: block; width: 100%; height: auto; aspect-ratio: 560 / 180; }
.dm-sigpad-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ash-l); font-size: .82rem; pointer-events: none; }
.dm-sigpad-line { position: absolute; left: 6%; right: 6%; bottom: 26%; border-bottom: 1px dashed var(--border2); pointer-events: none; }
.dm-sign-doc { background: var(--surface); border-left: 3px solid var(--gold); border-radius: 6px; padding: .8rem 1rem; margin-bottom: 1rem; display: flex; flex-direction: column; gap: 3px; }
.dm-check { display: flex; gap: .7rem; align-items: flex-start; margin-top: 1rem; font-size: .8rem; line-height: 1.5; color: var(--ink6); cursor: pointer; }
.dm-check input { margin-top: 3px; accent-color: var(--red); width: 16px; height: 16px; flex-shrink: 0; }

.dm-picker { max-height: 280px; overflow-y: auto; border: 1px solid var(--border); border-radius: 8px; }
.dm-picker-row { display: flex; align-items: center; gap: .7rem; padding: .55rem .8rem; border-bottom: 1px solid var(--border); cursor: pointer; }
.dm-picker-row:last-child { border-bottom: none; }
.dm-picker-row:hover { background: var(--surface); }
.dm-picker-row.disabled { opacity: .55; cursor: not-allowed; }
.dm-picker-row input { accent-color: var(--red); width: 16px; height: 16px; }

/* Visor */
.dm-viewer { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); min-height: 60vh; }
.dm-preview { background: var(--surface2); min-height: 60vh; max-height: 80vh; overflow: auto; display: flex; align-items: flex-start; justify-content: center; }
.dm-preview-frame { width: 100%; height: 78vh; border: none; background: #fff; }
.dm-preview-img { max-width: 100%; height: auto; display: block; margin: auto; }
.dm-preview-text { width: 100%; padding: 1rem; font-size: .78rem; line-height: 1.5; white-space: pre-wrap; word-break: break-word; font-family: monospace; background: #fff; align-self: stretch; }
.dm-preview-empty { flex-direction: column; align-items: center; justify-content: center; gap: .6rem; color: var(--ash); text-align: center; padding: 2rem; font-size: .85rem; }
.dm-side { border-left: 1px solid var(--border); padding: 1.1rem 1.2rem; max-height: 80vh; overflow-y: auto; display: flex; flex-direction: column; gap: 1.3rem; }
.dm-side-title { font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ash); margin-bottom: .6rem; }
.dm-actions { display: flex; flex-wrap: wrap; gap: .4rem; }
.dm-dl { display: grid; grid-template-columns: 98px 1fr; gap: .45rem .8rem; font-size: .8rem; }
.dm-dl dt { color: var(--ash); font-weight: 600; }
.dm-dl dd { margin: 0; color: var(--ink); min-width: 0; }
.dm-dl .mono { font-family: monospace; }
.dm-desc { margin-top: .7rem; font-size: .8rem; color: var(--ink6); line-height: 1.5; background: var(--surface); padding: .6rem .8rem; border-radius: 6px; }
.dm-note { font-size: .76rem; padding: .5rem .75rem; border-radius: 6px; margin-bottom: .6rem; line-height: 1.4; }
.dm-note.ok { background: var(--ok-bg); color: var(--ok); }
.dm-note.warn { background: var(--warn-bg); color: var(--warn); }
.dm-note.err { background: var(--err-bg); color: var(--err); font-weight: 700; }
.dm-note.info { background: var(--blue-bg); color: var(--blue); }
.dm-sigs { display: flex; flex-direction: column; gap: .6rem; }
.dm-sig { display: flex; gap: .7rem; align-items: flex-start; border: 1px solid var(--border); border-radius: 8px; padding: .7rem .8rem; background: var(--white); }
.dm-sig.signed { border-color: rgba(27,107,58,.3); background: linear-gradient(to right, var(--ok-bg), #fff 40%); }
.dm-sig-img { display: block; max-width: 180px; max-height: 70px; margin-top: 6px; border: 1px solid var(--border); border-radius: 4px; background: #fff; }
.dm-hash { font-family: monospace; font-size: .65rem; color: var(--ash-l); margin-top: 4px; }

@media (max-width: 900px) {
  .dm-viewer { grid-template-columns: 1fr; }
  .dm-side { border-left: none; border-top: 1px solid var(--border); max-height: none; }
  .dm-preview, .dm-preview-frame { max-height: 60vh; height: 60vh; min-height: 40vh; }
  .dm-row { flex-wrap: wrap; }
  .dm-row-prog { width: 100%; order: 10; }
  .dm-row-meta { display: none; }
  .dm-docs { padding-left: 1rem; }
  .dm-depth-1 > .dm-row, .dm-depth-2 > .dm-row, .dm-depth-3 > .dm-row { padding-left: 1rem; }
}

/* ── Notificaciones ── */
.nt-bell-badge { position: absolute; top: -5px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; background: var(--red); color: #fff; border-radius: 9px; font-size: .62rem; font-weight: 800; display: flex; align-items: center; justify-content: center; border: 2px solid var(--white); line-height: 1; }
.nt-panel { position: absolute; top: calc(100% + 10px); right: 0; width: 380px; max-width: calc(100vw - 24px); background: #fff; border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 16px 48px rgba(0,0,0,.18); z-index: 700; overflow: hidden; }
.nt-panel-hd { display: flex; align-items: center; justify-content: space-between; padding: .85rem 1rem; border-bottom: 1px solid var(--border); gap: .5rem; }
.nt-list { max-height: 420px; overflow-y: auto; }
.nt-item { display: flex; gap: 10px; padding: .8rem 1rem; border-bottom: 1px solid var(--border); cursor: pointer; position: relative; transition: background .15s; text-align: left; width: 100%; background: none; border-left: 3px solid transparent; border-right: none; border-top: none; }
.nt-item:hover { background: var(--surface); }
.nt-item.unread { background: rgba(212,175,55,.08); }
.nt-dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.nt-title { font-size: .82rem; font-weight: 700; color: var(--ink); line-height: 1.3; }
.nt-msg { font-size: .74rem; color: var(--ash); margin-top: 2px; line-height: 1.4; }
.nt-time { font-size: .68rem; color: var(--ash-l); margin-top: 4px; }
.nt-empty { padding: 2.2rem 1rem; text-align: center; color: var(--ash); font-size: .82rem; }
.nt-page-item { display: flex; gap: 12px; align-items: flex-start; padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); }
.nt-page-item.unread { background: rgba(212,175,55,.07); }
.nt-page-item:last-child { border-bottom: none; }

/* Pie de los modales siempre visible (los formularios largos no obligan a hacer scroll para confirmar) */
.modal .modal-footer { position: sticky; bottom: 0; z-index: 2; }
